staging-next 2026-02-08 (#488406)
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
- Node.js default version has been updated from 22 LTS to 24 LTS.
|
||||
This introduces some breaking changes; Refer to the [upstream migration article](https://nodejs.org/en/blog/migrations/v22-to-v24) for details.
|
||||
|
||||
- Ruby default version has been updated from 3.3 to 3.4.
|
||||
Refer to the [upstream release announcement](https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/) for details.
|
||||
|
||||
- The Factor programming language has been updated to Version 0.101 bringing various improvements to UI rendering and HiDPI support as well as support for Unicode 17.0.0.
|
||||
Starting from Version 0.100, the Factor VM is compiled with Clang.
|
||||
|
||||
@@ -160,6 +163,8 @@
|
||||
|
||||
- `services.openssh.settings.AcceptEnv` now explicitly defined as an option that takes a list of strings, to facilitate option merging. Setting it to a string value is no longer supported.
|
||||
|
||||
- `nodejs-slim` has a `npm` and a `corepack` outputs, and `nodejs` no longer has a `libv8` output.
|
||||
|
||||
- All Xfce packages have been moved to top level (e.g. if you previously added `pkgs.xfce.xfce4-whiskermenu-plugin` to `environment.systemPackages`, you will need to change it to `pkgs.xfce4-whiskermenu-plugin`). The `xfce` scope will be removed in NixOS 26.11.
|
||||
|
||||
- `spacefm` was removed because it appeared to be unmaintained upstream.
|
||||
@@ -186,6 +191,8 @@
|
||||
|
||||
- `fetchPnpmDeps` and `pnpmConfigHook` were added as top-level attributes, replacing the now deprecated `pnpm.fetchDeps` and `pnpm.configHook` attributes.
|
||||
|
||||
- `buildNpmPackage` now supports `npmDepsCacheVersion`. Set to `2` to enable packument caching, which fixes builds for projects using npm workspaces.
|
||||
|
||||
- Added `dell-bios-fan-control` package and service.
|
||||
|
||||
- `openrgb` was updated to 1.0rc2, which now uses Plugin API version 4.
|
||||
|
||||
@@ -80,7 +80,7 @@ luaepnf,,,,,,
|
||||
luaevent,,,,,,
|
||||
luaexpat,,,,1.4.1-1,,arobyn flosse
|
||||
luaffi,,,https://luarocks.org/dev,,,
|
||||
luafilesystem,,,,1.8.0-1,,flosse
|
||||
luafilesystem,,,,,,flosse
|
||||
lualdap,,,,,,aanderse
|
||||
lualine.nvim,,,https://luarocks.org/dev,,,
|
||||
lualogging,,,,,,
|
||||
|
||||
|
@@ -106,6 +106,8 @@ in
|
||||
|
||||
services.pcscd.plugins = [ pkgs.ccid ];
|
||||
|
||||
services.udev.packages = [ pkgs.ccid ];
|
||||
|
||||
systemd.sockets.pcscd.wantedBy = [ "sockets.target" ];
|
||||
|
||||
systemd.services.pcscd = {
|
||||
@@ -134,5 +136,12 @@ in
|
||||
"${lib.getExe package} -f -x -c ${cfgFile} ${lib.escapeShellArgs cfg.extraArgs}"
|
||||
];
|
||||
};
|
||||
|
||||
users.users.pcscd = {
|
||||
isSystemUser = true;
|
||||
group = "pcscd";
|
||||
};
|
||||
|
||||
users.groups.pcscd = { };
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ in
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
WorkingDirectory = "${pkgs.deye-dummycloud}/lib/node_modules/deye-dummycloud";
|
||||
ExecStart = "${pkgs.nodejs}/bin/node app.js";
|
||||
ExecStart = "${pkgs.lib.getExe pkgs.nodejs-slim} app.js";
|
||||
Restart = "always";
|
||||
User = "deye-dummycloud";
|
||||
DynamicUser = true;
|
||||
|
||||
@@ -229,7 +229,7 @@ in
|
||||
sed -i "s/^as_token:.*$/$as_token/g" ${registrationFile}
|
||||
fi
|
||||
if ! [ -f "${cfg.settings.ircService.mediaProxy.signingKeyPath}" ]; then
|
||||
${lib.getExe pkgs.nodejs} ${pkg}/lib/generate-signing-key.js > "${cfg.settings.ircService.mediaProxy.signingKeyPath}"
|
||||
${lib.getExe pkgs.nodejs-slim} ${pkg}/lib/generate-signing-key.js > "${cfg.settings.ircService.mediaProxy.signingKeyPath}"
|
||||
fi
|
||||
# Allow synapse access to the registration
|
||||
if ${pkgs.getent}/bin/getent group matrix-synapse > /dev/null; then
|
||||
|
||||
@@ -104,7 +104,7 @@ in
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${lib.getExe cfg.package} server start";
|
||||
ExecStart = "${lib.getExe' cfg.package "atuin-server"} start";
|
||||
RuntimeDirectory = "atuin";
|
||||
RuntimeDirectoryMode = "0700";
|
||||
DynamicUser = true;
|
||||
|
||||
@@ -97,7 +97,7 @@ in
|
||||
NODE_PATH = "${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/node_modules";
|
||||
};
|
||||
preStart = "mkdir -p /var/lib/uptime";
|
||||
serviceConfig.ExecStart = "${pkgs.nodejs}/bin/node ${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/app.js";
|
||||
serviceConfig.ExecStart = "${pkgs.lib.getExe pkgs.nodejs-slim} ${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/app.js";
|
||||
};
|
||||
|
||||
services.mongodb.enable = mkIf (!cfg.usesRemoteMongo) true;
|
||||
@@ -115,7 +115,7 @@ in
|
||||
};
|
||||
# Ugh, need to wait for web service to be up
|
||||
preStart = if cfg.enableWebService then "sleep 1s" else "mkdir -p /var/lib/uptime";
|
||||
serviceConfig.ExecStart = "${pkgs.nodejs}/bin/node ${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/monitor.js";
|
||||
serviceConfig.ExecStart = "${pkgs.lib.getExe pkgs.nodejs-slim} ${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/monitor.js";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
@@ -25,7 +25,7 @@ let
|
||||
userJson = pkgs.writeText "user.json" (builtins.toJSON userCfg);
|
||||
in
|
||||
(pkgs.runCommand "${varName}.js" { } ''
|
||||
${pkgs.nodejs}/bin/node ${extractor} ${source} ${varName} > default.json
|
||||
${pkgs.lib.getExe pkgs.nodejs-slim} ${extractor} ${source} ${varName} > default.json
|
||||
(
|
||||
echo "var ${varName} = "
|
||||
${pkgs.jq}/bin/jq -s '.[0] * .[1]' default.json ${userJson}
|
||||
|
||||
@@ -377,7 +377,7 @@ in
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
WorkingDirectory = "${cfg.ui.package}";
|
||||
ExecStart = "${pkgs.nodejs}/bin/node ${cfg.ui.package}/dist/js/server.js";
|
||||
ExecStart = "${pkgs.lib.getExe pkgs.nodejs-slim} ${cfg.ui.package}/dist/js/server.js";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1234,6 +1234,7 @@ in
|
||||
pass-secret-service = runTest ./pass-secret-service.nix;
|
||||
password-option-override-ordering = runTest ./password-option-override-ordering.nix;
|
||||
patroni = handleTestOn [ "x86_64-linux" ] ./patroni.nix { };
|
||||
pcsclite = runTest ./pcsclite.nix;
|
||||
pdfding = import ./web-apps/pdfding {
|
||||
inherit (pkgs) lib;
|
||||
inherit runTest;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ pkgs, makeInstalledTest, ... }:
|
||||
|
||||
makeInstalledTest {
|
||||
tested = pkgs.libsForQt5.appstream-qt;
|
||||
tested = pkgs.kdePackages.appstream-qt;
|
||||
|
||||
testConfig = {
|
||||
appstream.enable = true;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
name = "pcsclite";
|
||||
meta.maintainers = [ lib.maintainers.bjornfor ];
|
||||
|
||||
nodes = {
|
||||
machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.pcsc-tools
|
||||
];
|
||||
services.pcscd = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("pcscd.socket")
|
||||
|
||||
with subtest("client can connect"):
|
||||
machine.succeed("pcsc_scan -r")
|
||||
'';
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
machine.wait_for_unit("sshwifty.service")
|
||||
machine.wait_for_open_port(80)
|
||||
machine.wait_until_succeeds("curl --fail -6 http://localhost/", timeout=60)
|
||||
machine.wait_until_succeeds("${lib.getExe pkgs.nodejs} ${./sshwifty-test.js}", timeout=60)
|
||||
machine.wait_until_succeeds("${lib.getExe pkgs.nodejs-slim} ${./sshwifty-test.js}", timeout=60)
|
||||
'';
|
||||
|
||||
meta.maintainers = [ lib.maintainers.ungeskriptet ];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ lib, fetchFromGitHub }:
|
||||
rec {
|
||||
version = "9.1.2035";
|
||||
version = "9.1.2109";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@@ -11,7 +11,7 @@ rec {
|
||||
owner = "vim";
|
||||
repo = "vim";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-x7WosfqYApaY2Vv1X9+2at/A/KqfacuPy53MGtnxk9w=";
|
||||
hash = "sha256-Lglu940Uf0ZOaitoI41XK4Xgk7e1UeXsfdIxOMgNQ18=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -33,6 +33,8 @@ let
|
||||
pname = "maple";
|
||||
inherit version src meta;
|
||||
|
||||
strictDeps = false;
|
||||
|
||||
cargoHash = "sha256-RMDlLpPWDLHCRWLz7NAAQhp6FhKA7aNYqx9MCqR8vYM=";
|
||||
|
||||
cargoPatches = [
|
||||
@@ -59,6 +61,8 @@ vimUtils.buildVimPlugin {
|
||||
pname = "vim-clap";
|
||||
inherit version src meta;
|
||||
|
||||
strictDeps = false;
|
||||
|
||||
postInstall = ''
|
||||
ln -s ${maple}/bin/maple $out/bin/maple
|
||||
'';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
# Remove gcc and python references
|
||||
removeReferencesTo,
|
||||
@@ -309,6 +310,14 @@ stdenv.mkDerivation (
|
||||
patches = [
|
||||
# Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
|
||||
./modtool-newmod-permissions.patch
|
||||
|
||||
# Finding `boost_system` fails because the stub compiled library of
|
||||
# Boost.System, which has been a header-only library since 1.69, was
|
||||
# removed in 1.89.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/gnuradio/commit/d8814e0c3ef68372e5a1093603ef602e2119cd8a.patch";
|
||||
hash = "sha256-TQxqsce1AhSjdwaG2IP11QTeOgdJHN6cAAnznBl8eM8=";
|
||||
})
|
||||
];
|
||||
passthru = shared.passthru // {
|
||||
# Deps that are potentially overridden and are used inside GR plugins - the same version must
|
||||
|
||||
@@ -55,7 +55,7 @@ fi
|
||||
export NIX_BINTOOLS${role_post}=@out@
|
||||
|
||||
for cmd in \
|
||||
ar as ld nm objcopy objdump readelf ranlib strip strings size windres
|
||||
ar as ld nm objcopy objdump readelf ranlib strip strings size windres rc
|
||||
do
|
||||
if
|
||||
PATH=$_PATH type -p "@targetPrefix@${cmd}" > /dev/null
|
||||
@@ -64,6 +64,16 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
# If there is no `<prefix>rc`, but there is a `<prefix>windres`, define
|
||||
# `RC<suffix>=${WINDRES<suffix>}`.
|
||||
if
|
||||
[[ ! -v "RC${role_post}" ]] && [[ -v "WINDRES${role_post}" ]]
|
||||
then
|
||||
windres_var="WINDRES${role_post}"
|
||||
export "RC${role_post}=${!windres_var}"
|
||||
unset -v windres_var
|
||||
fi
|
||||
|
||||
# If unset, assume the default hardening flags.
|
||||
: ${NIX_HARDENING_ENABLE="@default_hardening_flags_str@"}
|
||||
export NIX_HARDENING_ENABLE
|
||||
|
||||
@@ -26,6 +26,9 @@ lib.extendMkDerivation {
|
||||
# The output hash of the dependencies for this project.
|
||||
# Can be calculated in advance with prefetch-npm-deps.
|
||||
npmDepsHash ? "",
|
||||
# Fetcher format version for npmDeps. Set to 2 to enable packument caching
|
||||
# for workspace support. Changing this will invalidate npmDepsHash.
|
||||
npmDepsFetcherVersion ? 1,
|
||||
# Whether to force the usage of Git dependencies that have install scripts, but not a lockfile.
|
||||
# Use with care.
|
||||
forceGitDeps ? false,
|
||||
@@ -66,6 +69,7 @@ lib.extendMkDerivation {
|
||||
;
|
||||
name = "${name}-npm-deps";
|
||||
hash = npmDepsHash;
|
||||
fetcherVersion = npmDepsFetcherVersion;
|
||||
},
|
||||
# Custom npmConfigHook
|
||||
npmConfigHook ? null,
|
||||
@@ -85,6 +89,10 @@ lib.extendMkDerivation {
|
||||
{
|
||||
inherit npmDeps npmBuildScript;
|
||||
|
||||
env = (args.env or { }) // {
|
||||
NIX_NPM_FETCHER_VERSION = npmDepsFetcherVersion;
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
nativeBuildInputs
|
||||
++ [
|
||||
|
||||
@@ -28,6 +28,29 @@ npmConfigHook() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -e "$npmDeps/.fetcher-version" ]]; then
|
||||
local -r fetcherVersion=$(cat "$npmDeps/.fetcher-version")
|
||||
else
|
||||
local -r fetcherVersion="1"
|
||||
fi
|
||||
|
||||
# Only run this in buildNpmPackage, this is just for a nicer error message; we trust that
|
||||
# people using the setup hook directly also know how FODs work. ;)
|
||||
if [[ -n ${NIX_NPM_FETCHER_VERSION+x} ]] && [[ $NIX_NPM_FETCHER_VERSION != $fetcherVersion ]]; then
|
||||
echo
|
||||
echo "ERROR: npmDepsHash is out of date"
|
||||
echo
|
||||
echo "The fetcher version in the arguments to buildNpmPackage ($NIX_NPM_FETCHER_VERSION) is not the same as the one in $npmDeps ($fetcherVersion)."
|
||||
echo
|
||||
echo "To fix the issue:"
|
||||
echo '1. Use `lib.fakeHash` as the npmDepsHash value'
|
||||
echo "2. Build the derivation and wait for it to fail with a hash mismatch"
|
||||
echo "3. Copy the 'got: sha256-' value back into the npmDepsHash field"
|
||||
echo
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local -r cacheLockfile="$npmDeps/package-lock.json"
|
||||
if [[ -f npm-shrinkwrap.json ]]; then
|
||||
local -r srcLockfile="$PWD/npm-shrinkwrap.json"
|
||||
@@ -78,7 +101,11 @@ npmConfigHook() {
|
||||
|
||||
local cachePath
|
||||
|
||||
if [ -z "${makeCacheWritable-}" ]; then
|
||||
# When a given cache key has multiple entries (which is the case with
|
||||
# fetcher version 2), npm always needs to write to the cache.
|
||||
#
|
||||
# TODO(winter): report upstream?
|
||||
if [ -z "${makeCacheWritable-}" ] && (( fetcherVersion == 1 )); then
|
||||
cachePath="$npmDeps"
|
||||
else
|
||||
echo "Making cache writable"
|
||||
@@ -100,9 +127,10 @@ npmConfigHook() {
|
||||
echo "ERROR: npm failed to install dependencies"
|
||||
echo
|
||||
echo "Here are a few things you can try, depending on the error:"
|
||||
echo '1. Set `makeCacheWritable = true`'
|
||||
echo '1. Set `npmDepsFetcherVersion = 2` (and update `npmDepsHash`)'
|
||||
echo '2. Set `makeCacheWritable = true`'
|
||||
echo " Note that this won't help if npm is complaining about not being able to write to the logs directory -- look above that for the actual error."
|
||||
echo '2. Set `npmFlags = [ "--legacy-peer-deps" ]`'
|
||||
echo '3. Set `npmFlags = [ "--legacy-peer-deps" ]`'
|
||||
echo
|
||||
|
||||
exit 1
|
||||
|
||||
@@ -215,6 +215,10 @@
|
||||
# A string with a JSON attrset specifying registry mirrors, for example
|
||||
# {"registry.example.org": "my-mirror.local/registry.example.org"}
|
||||
npmRegistryOverridesString ? config.npmRegistryOverridesString,
|
||||
# Fetcher format version. Bump this to invalidate all existing hashes.
|
||||
# Version 1: original format (tarballs only)
|
||||
# Version 2: includes packuments for workspace support
|
||||
fetcherVersion ? 1,
|
||||
...
|
||||
}@args:
|
||||
let
|
||||
@@ -272,6 +276,10 @@
|
||||
|
||||
NIX_NPM_REGISTRY_OVERRIDES = npmRegistryOverridesString;
|
||||
|
||||
# Fetcher version controls which features are enabled in prefetch-npm-deps
|
||||
# Version 2+ enables packument fetching for workspace support
|
||||
NPM_FETCHER_VERSION = toString fetcherVersion;
|
||||
|
||||
SSL_CERT_FILE =
|
||||
if
|
||||
(
|
||||
|
||||
@@ -24,9 +24,16 @@ pub(super) struct Key {
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub(super) struct Metadata {
|
||||
pub(super) url: Url,
|
||||
#[serde(rename = "reqHeaders", skip_serializing_if = "Option::is_none")]
|
||||
pub(super) req_headers: Option<ReqHeaders>,
|
||||
pub(super) options: Options,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct ReqHeaders {
|
||||
pub accept: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub(super) struct Options {
|
||||
pub(super) compress: bool,
|
||||
@@ -58,6 +65,7 @@ impl Cache {
|
||||
url: Url,
|
||||
data: &[u8],
|
||||
integrity: Option<String>,
|
||||
req_headers: Option<ReqHeaders>,
|
||||
) -> anyhow::Result<()> {
|
||||
let (algo, hash, integrity) = if let Some(integrity) = integrity {
|
||||
let (algo, hash) = integrity
|
||||
@@ -115,13 +123,27 @@ impl Cache {
|
||||
size: data.len(),
|
||||
metadata: Metadata {
|
||||
url,
|
||||
req_headers,
|
||||
options: Options { compress: true },
|
||||
},
|
||||
})?;
|
||||
|
||||
let mut file = File::options().append(true).create(true).open(index_path)?;
|
||||
let mut file = File::options()
|
||||
.append(true)
|
||||
.create(true)
|
||||
.open(&index_path)?;
|
||||
|
||||
write!(file, "{:x}\t{data}", Sha1::new().chain(&data).finalize())?;
|
||||
// cacache format uses newline as entry separator (see cacache entry-index.js)
|
||||
// Only add newline prefix if file already has content, to maintain backwards compatibility with previous versions of prefetch-npm-deps, which handled this case incorrectly.
|
||||
let needs_newline = fs::metadata(&index_path)
|
||||
.map(|m| m.len() > 0)
|
||||
.unwrap_or(false);
|
||||
let prefix = if needs_newline { "\n" } else { "" };
|
||||
write!(
|
||||
file,
|
||||
"{prefix}{:x}\t{data}",
|
||||
Sha1::new().chain(&data).finalize()
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#![warn(clippy::pedantic)]
|
||||
|
||||
use crate::cacache::{Cache, Key};
|
||||
use crate::cacache::{Cache, Key, ReqHeaders};
|
||||
use anyhow::{anyhow, bail};
|
||||
use log::info;
|
||||
use rayon::prelude::*;
|
||||
use serde_json::{Map, Value};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
collections::{HashMap, HashSet},
|
||||
env, fs,
|
||||
path::{Path, PathBuf},
|
||||
process,
|
||||
@@ -22,6 +23,178 @@ fn cache_map_path() -> Option<PathBuf> {
|
||||
env::var_os("CACHE_MAP_PATH").map(PathBuf::from)
|
||||
}
|
||||
|
||||
/// Get the packument URL for a package name
|
||||
fn get_packument_url(registry: &str, package_name: &str) -> anyhow::Result<Url> {
|
||||
// URL-encode the package name for scoped packages
|
||||
let encoded_name = package_name.replace('/', "%2f");
|
||||
Url::parse(&format!("{registry}/{encoded_name}"))
|
||||
.map_err(|e| anyhow!("failed to construct packument URL: {e}"))
|
||||
}
|
||||
|
||||
/// Normalize packument data to ensure determinism.
|
||||
///
|
||||
/// Filters to whitelisted fields and requested versions only.
|
||||
/// Allowed top-level fields in normalized packuments.
|
||||
///
|
||||
/// For lockfile-based installs, versions are exact (e.g., "4.17.21") so npm-pick-manifest
|
||||
/// just does a direct `versions[ver]` lookup. Tarballs are fetched via the resolved URL.
|
||||
const ALLOWED_TOP_LEVEL_FIELDS: &[&str] = &["name", "versions"];
|
||||
|
||||
/// Allowed fields in version objects.
|
||||
///
|
||||
/// Based on analysis of pacote, npm-pick-manifest, npm-install-checks, and arborist.
|
||||
/// Only fields actually read during `npm install` are included.
|
||||
const ALLOWED_VERSION_FIELDS: &[&str] = &[
|
||||
"name",
|
||||
"version",
|
||||
// Dependencies
|
||||
"dependencies",
|
||||
"devDependencies",
|
||||
"peerDependencies",
|
||||
"peerDependenciesMeta",
|
||||
"optionalDependencies",
|
||||
"bundleDependencies",
|
||||
"bundledDependencies",
|
||||
// Distribution (tarball URL and integrity)
|
||||
"dist",
|
||||
// Executables
|
||||
"bin",
|
||||
// Platform constraints (npm-install-checks)
|
||||
"engines",
|
||||
"os",
|
||||
"cpu",
|
||||
// Lifecycle scripts
|
||||
"scripts",
|
||||
];
|
||||
|
||||
/// Allowed fields in `dist` sub-objects.
|
||||
///
|
||||
/// Only fields that npm reads during `npm install` are included.
|
||||
/// Excluded volatile fields:
|
||||
/// - `signatures`: changes when npm rotates registry signing keys
|
||||
/// - `npm-signature`: legacy signature format, also mutable
|
||||
/// - `attestations`: provenance attestations, can be added/updated post-publish
|
||||
/// - `fileCount`, `unpackedSize`: informational only, not used during install
|
||||
const ALLOWED_DIST_FIELDS: &[&str] = &[
|
||||
"tarball", // URL to download the package tarball
|
||||
"integrity", // SRI hash for verification (e.g., sha512-...)
|
||||
"shasum", // SHA-1 fallback hash for older lockfiles
|
||||
];
|
||||
|
||||
fn normalize_packument(
|
||||
package_name: &str,
|
||||
data: &[u8],
|
||||
requested_versions: &HashSet<String>,
|
||||
) -> anyhow::Result<Vec<u8>> {
|
||||
let mut json: Value = serde_json::from_slice(data)
|
||||
.map_err(|e| anyhow!("failed to parse packument JSON for {package_name}: {e}"))?;
|
||||
|
||||
let obj = json
|
||||
.as_object_mut()
|
||||
.ok_or_else(|| anyhow!("packument for {package_name} is not a JSON object"))?;
|
||||
|
||||
// Keep only whitelisted top-level fields to ensure determinism
|
||||
obj.retain(|key, _| ALLOWED_TOP_LEVEL_FIELDS.contains(&key.as_str()));
|
||||
|
||||
// Filter and normalize versions
|
||||
if let Some(Value::Object(versions)) = obj.get_mut("versions") {
|
||||
// Only keep versions that are in the lockfile
|
||||
versions.retain(|version, _| requested_versions.contains(version));
|
||||
|
||||
// Normalize each version object to only include necessary fields
|
||||
for version_val in versions.values_mut() {
|
||||
if let Some(version_obj) = version_val.as_object_mut() {
|
||||
version_obj.retain(|key, _| ALLOWED_VERSION_FIELDS.contains(&key.as_str()));
|
||||
|
||||
// Normalize the dist sub-object to strip volatile fields
|
||||
// (signatures, npm-signature, attestations, fileCount, unpackedSize)
|
||||
if let Some(Value::Object(dist_obj)) = version_obj.get_mut("dist") {
|
||||
dist_obj.retain(|key, _| ALLOWED_DIST_FIELDS.contains(&key.as_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
serde_json::to_vec(&json)
|
||||
.map_err(|e| anyhow!("failed to re-serialize packument for {package_name}: {e}"))
|
||||
}
|
||||
|
||||
/// Fetch and cache packuments (package metadata) for all packages.
|
||||
///
|
||||
/// This is needed because npm may query package metadata for optional peer dependencies
|
||||
/// and for workspace packages.
|
||||
///
|
||||
/// npm's cache policy checks that the Accept header matches between the cached
|
||||
/// request and the new request. npm can request packuments with two different headers:
|
||||
/// 1. "corgiDoc" (abbreviated metadata) - used initially
|
||||
/// 2. "fullDoc" (full metadata) - used when npm needs full package info (e.g., workspaces)
|
||||
///
|
||||
/// We cache both versions to ensure cache hits regardless of which header npm uses.
|
||||
/// See: pacote/lib/registry.js and @npmcli/arborist/lib/arborist/build-ideal-tree.js
|
||||
fn fetch_packuments(
|
||||
cache: &Cache,
|
||||
package_versions: HashMap<String, HashSet<String>>,
|
||||
) -> anyhow::Result<()> {
|
||||
const CORGI_DOC: &str =
|
||||
"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*";
|
||||
const FULL_DOC: &str = "application/json";
|
||||
|
||||
info!("Fetching {} packuments", package_versions.len());
|
||||
|
||||
package_versions
|
||||
.into_par_iter()
|
||||
.try_for_each(|(package_name, requested_versions)| {
|
||||
let packument_url = get_packument_url("https://registry.npmjs.org", &package_name)?;
|
||||
|
||||
match util::get_url_body_with_retry(&packument_url) {
|
||||
Ok(packument_data) => {
|
||||
let normalized_data =
|
||||
normalize_packument(&package_name, &packument_data, &requested_versions)?;
|
||||
|
||||
// npm's make-fetch-happen uses the URL-encoded form for cache keys
|
||||
// e.g., "https://registry.npmjs.org/@types%2freact-dom" not "@types/react-dom"
|
||||
// We must use the encoded form in both the cache key string AND the metadata URL
|
||||
|
||||
// Cache with corgiDoc header (for initial requests)
|
||||
cache
|
||||
.put(
|
||||
format!("make-fetch-happen:request-cache:{packument_url}"),
|
||||
packument_url.clone(),
|
||||
&normalized_data,
|
||||
None, // Packuments don't have integrity hashes
|
||||
Some(ReqHeaders {
|
||||
accept: String::from(CORGI_DOC),
|
||||
}),
|
||||
)
|
||||
.map_err(|e| {
|
||||
anyhow!("couldn't insert packument cache entry (corgi) for {package_name}: {e:?}")
|
||||
})?;
|
||||
|
||||
// Cache with fullDoc header (for workspace/full metadata requests)
|
||||
cache
|
||||
.put(
|
||||
format!("make-fetch-happen:request-cache:{packument_url}"),
|
||||
packument_url.clone(),
|
||||
&normalized_data,
|
||||
None,
|
||||
Some(ReqHeaders {
|
||||
accept: String::from(FULL_DOC),
|
||||
}),
|
||||
)
|
||||
.map_err(|e| {
|
||||
anyhow!("couldn't insert packument cache entry (full) for {package_name}: {e:?}")
|
||||
})?;
|
||||
}
|
||||
Err(e) => {
|
||||
// Log but don't fail - some packages might not need packuments
|
||||
info!("Warning: couldn't fetch packument for {package_name}: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
Ok::<_, anyhow::Error>(())
|
||||
})
|
||||
}
|
||||
|
||||
/// `fixup_lockfile` rewrites `integrity` hashes to match cache and removes the `integrity` field from Git dependencies.
|
||||
///
|
||||
/// Sometimes npm has multiple instances of a given `resolved` URL that have different types of `integrity` hashes (e.g. SHA-1
|
||||
@@ -157,9 +330,21 @@ fn map_cache() -> anyhow::Result<HashMap<Url, String>> {
|
||||
|
||||
if entry.file_type().is_file() {
|
||||
let content = fs::read_to_string(entry.path())?;
|
||||
let key: Key = serde_json::from_str(content.split_ascii_whitespace().nth(1).unwrap())?;
|
||||
// cacache index format: each line is <sha1_hash>\t<json>
|
||||
// Multiple entries can exist in the same file (e.g., same URL with different headers)
|
||||
for line in content.lines() {
|
||||
if line.is_empty() {
|
||||
continue;
|
||||
}
|
||||
// Split on tab, not whitespace, because JSON values may contain spaces
|
||||
let json_part = line
|
||||
.split_once('\t')
|
||||
.map(|(_, json)| json)
|
||||
.ok_or_else(|| anyhow!("invalid cache index entry: missing tab separator"))?;
|
||||
let key: Key = serde_json::from_str(json_part)?;
|
||||
|
||||
hashes.insert(key.metadata.url, key.integrity);
|
||||
hashes.insert(key.metadata.url, key.integrity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,6 +426,26 @@ fn main() -> anyhow::Result<()> {
|
||||
let cache = Cache::new(out.join("_cacache"));
|
||||
cache.init()?;
|
||||
|
||||
// Collect package names and their versions from the lockfile for packument filtering.
|
||||
// For non-aliased packages: extract from lockfile keys like "node_modules/@scope/name" -> "@scope/name"
|
||||
// For aliased packages: the name is already the real package name (e.g., "string-width" not "string-width-cjs")
|
||||
// We only care about packages that have a version string (registry packages).
|
||||
let mut package_versions: HashMap<String, HashSet<String>> = HashMap::new();
|
||||
for p in &packages {
|
||||
if let Some(version) = &p.version {
|
||||
let pkg_name = p
|
||||
.name
|
||||
.rsplit_once("node_modules/")
|
||||
.map(|(_, name)| name.to_string())
|
||||
.unwrap_or_else(|| p.name.clone());
|
||||
package_versions
|
||||
.entry(pkg_name)
|
||||
.or_default()
|
||||
.insert(version.to_string());
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch and cache tarballs
|
||||
packages.into_par_iter().try_for_each(|package| {
|
||||
let tarball = package
|
||||
.tarball()
|
||||
@@ -253,12 +458,24 @@ fn main() -> anyhow::Result<()> {
|
||||
package.url,
|
||||
&tarball,
|
||||
integrity,
|
||||
None, // tarballs don't need special request headers
|
||||
)
|
||||
.map_err(|e| anyhow!("couldn't insert cache entry for {}: {e:?}", package.name))?;
|
||||
|
||||
Ok::<_, anyhow::Error>(())
|
||||
})?;
|
||||
|
||||
// Fetch and cache packuments (package metadata) - only for fetcher version 2+
|
||||
let fetcher_version: u32 = env::var("NPM_FETCHER_VERSION")
|
||||
.ok()
|
||||
.and_then(|v| v.parse().ok())
|
||||
.unwrap_or(1);
|
||||
|
||||
if fetcher_version >= 2 {
|
||||
fetch_packuments(&cache, package_versions)?;
|
||||
fs::write(out.join(".fetcher-version"), format!("{fetcher_version}"))?;
|
||||
}
|
||||
|
||||
fs::write(out.join("package-lock.json"), lock_content)?;
|
||||
|
||||
if print_hash {
|
||||
@@ -422,4 +639,5 @@ mod tests {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,12 @@ pub(super) fn packages(content: &str) -> anyhow::Result<Vec<Package>> {
|
||||
.unwrap_or_default()
|
||||
.into_iter()
|
||||
.filter(|(n, p)| !n.is_empty() && matches!(p.resolved, Some(UrlOrString::Url(_))))
|
||||
.map(|(n, p)| Package { name: Some(n), ..p })
|
||||
.map(|(n, p)| Package {
|
||||
// Use the package's own name if present (for aliases like string-width-cjs -> string-width),
|
||||
// otherwise extract from the lockfile key
|
||||
name: Some(p.name.unwrap_or(n)),
|
||||
..p
|
||||
})
|
||||
.collect(),
|
||||
_ => bail!(
|
||||
"We don't support lockfile version {}, please file an issue.",
|
||||
@@ -73,6 +78,7 @@ struct OldPackage {
|
||||
pub(super) struct Package {
|
||||
#[serde(default)]
|
||||
pub(super) name: Option<String>,
|
||||
pub(super) version: Option<String>,
|
||||
pub(super) resolved: Option<UrlOrString>,
|
||||
pub(super) integrity: Option<HashCollection>,
|
||||
}
|
||||
@@ -249,6 +255,7 @@ fn to_new_packages(
|
||||
|
||||
new.push(Package {
|
||||
name: Some(name),
|
||||
version: None, // v1 lockfiles don't include version in the same structure
|
||||
resolved: if matches!(package.version, UrlOrString::Url(_)) {
|
||||
Some(package.version)
|
||||
} else {
|
||||
@@ -310,6 +317,7 @@ mod tests {
|
||||
assert_eq!(new.len(), 1, "new packages map should contain 1 value");
|
||||
assert_eq!(new[0], Package {
|
||||
name: Some(String::from("sqlite3")),
|
||||
version: None,
|
||||
resolved: Some(UrlOrString::Url(Url::parse("git+ssh://git@github.com/mapbox/node-sqlite3.git#593c9d498be2510d286349134537e3bf89401c4a").unwrap())),
|
||||
integrity: None
|
||||
});
|
||||
|
||||
@@ -112,6 +112,7 @@ pub fn lockfile(
|
||||
#[derive(Debug)]
|
||||
pub struct Package {
|
||||
pub name: String,
|
||||
pub version: Option<String>,
|
||||
pub url: Url,
|
||||
specifics: Specifics,
|
||||
}
|
||||
@@ -175,6 +176,7 @@ impl Package {
|
||||
|
||||
Ok(Package {
|
||||
name: pkg.name.unwrap(),
|
||||
version: pkg.version,
|
||||
url: resolved,
|
||||
specifics,
|
||||
})
|
||||
|
||||
@@ -5,36 +5,23 @@
|
||||
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
replaceVarsWith,
|
||||
perl,
|
||||
signingUtils,
|
||||
stdenvNoCC,
|
||||
shell ? stdenvNoCC.shell,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "nuke-references";
|
||||
|
||||
strictDeps = true;
|
||||
enableParallelBuilding = true;
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
substituteAll ${./nuke-refs.sh} $out/bin/nuke-refs
|
||||
chmod a+x $out/bin/nuke-refs
|
||||
'';
|
||||
|
||||
# FIXME: get rid of perl dependency.
|
||||
env = {
|
||||
inherit perl;
|
||||
replaceVarsWith {
|
||||
src = ./nuke-refs;
|
||||
replacements = {
|
||||
inherit perl; # FIXME: get rid of perl dependency.
|
||||
inherit (builtins) storeDir;
|
||||
shell = lib.getBin shell + (shell.shellPath or "");
|
||||
signingUtils = lib.optionalString (
|
||||
stdenvNoCC.targetPlatform.isDarwin && stdenvNoCC.targetPlatform.isAarch64
|
||||
) signingUtils;
|
||||
};
|
||||
|
||||
dir = "bin";
|
||||
isExecutable = true;
|
||||
meta.mainProgram = "nuke-refs";
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
stdenvNoCC,
|
||||
lib,
|
||||
buildPackages,
|
||||
replaceVars,
|
||||
makeSetupHook,
|
||||
expand-response-params,
|
||||
pkg-config,
|
||||
baseBinName ? "pkg-config",
|
||||
propagateDoc ? pkg-config != null && pkg-config ? man,
|
||||
@@ -35,6 +38,7 @@ let
|
||||
# See description in cc-wrapper.
|
||||
suffixSalt = replaceStrings [ "-" "." ] [ "_" "_" ] targetPlatform.config;
|
||||
|
||||
wrapperName = "PKG_CONFIG_WRAPPER";
|
||||
wrapperBinName = "${targetPrefix}${baseBinName}";
|
||||
in
|
||||
|
||||
@@ -48,50 +52,90 @@ stdenv.mkDerivation {
|
||||
|
||||
outputs = [ "out" ] ++ optionals propagateDoc ([ "man" ] ++ optional (pkg-config ? doc) "doc");
|
||||
|
||||
passthru = {
|
||||
inherit targetPrefix suffixSalt;
|
||||
inherit pkg-config;
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
dontUnpack = true;
|
||||
|
||||
# Additional flags passed to pkg-config.
|
||||
env.addFlags = optionalString stdenv.targetPlatform.isStatic "--static";
|
||||
installPhase =
|
||||
let
|
||||
addFlags = optionalString stdenv.targetPlatform.isStatic "--static";
|
||||
shell = getBin stdenvNoCC.shell + stdenvNoCC.shell.shellPath or "";
|
||||
prog = "${getBin pkg-config}/bin/${baseBinName}";
|
||||
in
|
||||
''
|
||||
mkdir -p $out/bin $out/nix-support
|
||||
wrap() {
|
||||
local dst="$1"
|
||||
local wrapper="$2"
|
||||
export prog="$3"
|
||||
# Do not take variables from env but substitute them explicitly
|
||||
# to prepare for structuredAttrs
|
||||
# Avoid using a nested derivation since we need to substitute $out
|
||||
substitute "$wrapper" "$out/bin/$dst" \
|
||||
--replace-fail "@suffixSalt@" "${suffixSalt}" \
|
||||
--replace-fail "@shell@" "${shell}" \
|
||||
--replace-fail "@prog@" "$prog" \
|
||||
--replace-fail "@out@" "$out" \
|
||||
--replace-fail "@addFlags@" "${addFlags}"
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/nix-support
|
||||
chmod +x "$out/bin/$dst"
|
||||
}
|
||||
|
||||
wrap() {
|
||||
local dst="$1"
|
||||
local wrapper="$2"
|
||||
export prog="$3"
|
||||
substituteAll "$wrapper" "$out/bin/$dst"
|
||||
chmod +x "$out/bin/$dst"
|
||||
}
|
||||
echo $pkg-config > $out/nix-support/orig-pkg-config
|
||||
|
||||
echo $pkg-config > $out/nix-support/orig-pkg-config
|
||||
wrap ${wrapperBinName} ${./pkg-config-wrapper.sh} "${getBin pkg-config}/bin/${baseBinName}"
|
||||
''
|
||||
# symlink in share for autoconf to find macros
|
||||
|
||||
wrap ${wrapperBinName} ${./pkg-config-wrapper.sh} "${getBin pkg-config}/bin/${baseBinName}"
|
||||
''
|
||||
# symlink in share for autoconf to find macros
|
||||
# TODO(@Ericson2314): in the future just make the unwrapped pkg-config a
|
||||
# propagated dep once we can rely on downstream deps coming first in
|
||||
# search paths. (https://github.com/NixOS/nixpkgs/pull/31414 took a crack
|
||||
# at this.)
|
||||
+ ''
|
||||
ln -s ${pkg-config}/share $out/share
|
||||
'';
|
||||
|
||||
# TODO(@Ericson2314): in the future just make the unwrapped pkg-config a
|
||||
# propagated dep once we can rely on downstream deps coming first in
|
||||
# search paths. (https://github.com/NixOS/nixpkgs/pull/31414 took a crack
|
||||
# at this.)
|
||||
+ ''
|
||||
ln -s ${pkg-config}/share $out/share
|
||||
'';
|
||||
|
||||
setupHooks = [
|
||||
../setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
setupHooks =
|
||||
let
|
||||
roleHook = makeSetupHook rec {
|
||||
name = "pkg-config-role-hook";
|
||||
substitutions = {
|
||||
inherit
|
||||
name
|
||||
suffixSalt
|
||||
wrapperName
|
||||
;
|
||||
};
|
||||
} ../setup-hooks/role.bash;
|
||||
setupHook = makeSetupHook {
|
||||
name = "pkgs-config-setup-hook";
|
||||
substitutions = {
|
||||
inherit
|
||||
targetPrefix
|
||||
baseBinName
|
||||
;
|
||||
};
|
||||
} ./setup-hook.sh;
|
||||
in
|
||||
[
|
||||
"${roleHook}/nix-support/setup-hook"
|
||||
"${setupHook}/nix-support/setup-hook"
|
||||
];
|
||||
|
||||
postFixup =
|
||||
let
|
||||
addFlags = replaceVars ./add-flags.sh { inherit suffixSalt; };
|
||||
utils = replaceVars ../wrapper-common/utils.bash {
|
||||
inherit
|
||||
suffixSalt
|
||||
wrapperName
|
||||
;
|
||||
inherit (targetPlatform) darwinMinVersion;
|
||||
expandResponseParams = "${expand-response-params}/bin/expand-response-params";
|
||||
};
|
||||
|
||||
in
|
||||
##
|
||||
## User env support
|
||||
##
|
||||
@@ -115,8 +159,8 @@ stdenv.mkDerivation {
|
||||
)
|
||||
|
||||
+ ''
|
||||
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
|
||||
substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash
|
||||
install -m444 -T ${addFlags} $out/nix-support/add-flags.sh
|
||||
install -m444 -T ${utils} $out/nix-support/utils.bash
|
||||
''
|
||||
|
||||
##
|
||||
@@ -124,10 +168,14 @@ stdenv.mkDerivation {
|
||||
##
|
||||
+ extraBuildCommands;
|
||||
|
||||
env = {
|
||||
shell = getBin stdenvNoCC.shell + stdenvNoCC.shell.shellPath or "";
|
||||
wrapperName = "PKG_CONFIG_WRAPPER";
|
||||
inherit targetPrefix suffixSalt baseBinName;
|
||||
passthru = {
|
||||
inherit
|
||||
targetPrefix
|
||||
suffixSalt
|
||||
pkg-config
|
||||
baseBinName
|
||||
wrapperName
|
||||
;
|
||||
};
|
||||
|
||||
meta =
|
||||
|
||||
@@ -5,31 +5,21 @@
|
||||
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
replaceVarsWith,
|
||||
signingUtils,
|
||||
stdenvNoCC,
|
||||
shell ? stdenvNoCC.shell,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "remove-references-to";
|
||||
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
substituteAll ${./remove-references-to.sh} $out/bin/remove-references-to
|
||||
chmod a+x $out/bin/remove-references-to
|
||||
'';
|
||||
|
||||
env = {
|
||||
replaceVarsWith {
|
||||
src = ./remove-references-to;
|
||||
replacements = {
|
||||
inherit (builtins) storeDir;
|
||||
shell = lib.getBin shell + (shell.shellPath or "");
|
||||
signingUtils = lib.optionalString (
|
||||
stdenvNoCC.targetPlatform.isDarwin && stdenvNoCC.targetPlatform.isAarch64
|
||||
) signingUtils;
|
||||
};
|
||||
|
||||
dir = "bin";
|
||||
isExecutable = true;
|
||||
meta.mainProgram = "remove-references-to";
|
||||
}
|
||||
|
||||
@@ -780,6 +780,8 @@ rec {
|
||||
# but users are likely passing non-substitution arguments through substitutions
|
||||
# turn off __structuredAttrs to unbreak substituteAll
|
||||
__structuredAttrs = false;
|
||||
pname = name;
|
||||
version = lib.trivial.release + "pre-git";
|
||||
inherit meta;
|
||||
inherit depsTargetTargetPropagated;
|
||||
inherit propagatedBuildInputs;
|
||||
|
||||
@@ -1086,7 +1086,7 @@ rec {
|
||||
in
|
||||
writeDash name ''
|
||||
export NODE_PATH=${node-env}/lib/node_modules
|
||||
exec ${lib.getExe pkgs.nodejs} ${pkgs.writeText "js" content} "$@"
|
||||
exec ${lib.getExe pkgs.nodejs-slim} ${pkgs.writeText "js" content} "$@"
|
||||
'';
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,16 +31,24 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ ./darwin.patch ];
|
||||
|
||||
# The fuloong2f is not supported by aalib still
|
||||
preConfigure = ''
|
||||
preConfigure =
|
||||
# The configure script does the correct thing when 'system' is already set
|
||||
# Export it explicitly in case __structuredAttrs is true.
|
||||
export system
|
||||
appendToVar configureFlags \
|
||||
"--bindir=$bin/bin" \
|
||||
"--includedir=$dev/include" \
|
||||
"--libdir=$out/lib"
|
||||
'';
|
||||
''
|
||||
export system
|
||||
appendToVar configureFlags \
|
||||
"--bindir=$bin/bin" \
|
||||
"--includedir=$dev/include" \
|
||||
"--libdir=$out/lib"
|
||||
''
|
||||
# There is a check for linux-gnu on POWER that disables shared library creation if /lib/ld.so.1 doesn't exists
|
||||
# (which it never does for us), because it assumes that it is then running on / targeting MkLinux, which supposedly
|
||||
# didn't support shared libraries.
|
||||
# MkLinux is discontinued, regular Linux supports POWER now. Delete the case and allow shared libraries to be made.
|
||||
+ ''
|
||||
substituteInPlace ltconfig \
|
||||
--replace-fail 'powerpc*) dynamic_linker=no ;;' ""
|
||||
'';
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
|
||||
@@ -3,27 +3,57 @@
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
gbenchmark,
|
||||
gtest,
|
||||
simdjson,
|
||||
simdutf,
|
||||
testers,
|
||||
validatePkgConfig,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ada";
|
||||
version = "3.4.1";
|
||||
version = "3.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ada-url";
|
||||
repo = "ada";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-2xrued35FRqmtZjrMTBtl5r/TB/pXNhhcKOfuwjxrhc=";
|
||||
hash = "sha256-+aXZY6JFfbw1N+EkenPhfp6ErUJFnbiJsgHpQq36Os4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
validatePkgConfig
|
||||
];
|
||||
buildInputs = [ simdutf ];
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [
|
||||
simdjson
|
||||
gtest
|
||||
gbenchmark
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
# uses CPM that requires network access
|
||||
(lib.cmakeBool "ADA_TOOLS" false)
|
||||
(lib.cmakeBool "ADA_TESTING" false)
|
||||
(lib.cmakeBool "ADA_TESTING" finalAttrs.finalPackage.doCheck)
|
||||
(lib.cmakeBool "ADA_USE_SIMDUTF" true)
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
|
||||
(lib.cmakeBool "FETCHCONTENT_FULLY_DISCONNECTED" true)
|
||||
(lib.cmakeBool "CPM_USE_LOCAL_PACKAGES" true)
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
|
||||
tests.pkg-config = testers.hasPkgConfigModules {
|
||||
package = finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "WHATWG-compliant and fast URL parser written in modern C";
|
||||
homepage = "https://github.com/ada-url/ada";
|
||||
@@ -33,5 +63,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
maintainers = with lib.maintainers; [ nickcao ];
|
||||
platforms = lib.platforms.all;
|
||||
pkgConfigModules = [ "ada" ];
|
||||
};
|
||||
})
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
fetchurl,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "alsa-topology-conf-${version}";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "alsa-topology-conf";
|
||||
version = "1.2.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://alsa/lib/${name}.tar.bz2";
|
||||
url = "mirror://alsa/lib/alsa-topology-conf-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-98W64VRavNc4JLyX9OcsNA4Rq+oYi6DxwG9eCtd2sXk=";
|
||||
};
|
||||
|
||||
@@ -37,4 +37,4 @@ stdenv.mkDerivation rec {
|
||||
maintainers = [ lib.maintainers.roastiek ];
|
||||
platforms = lib.platforms.linux ++ lib.platforms.freebsd;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -69,8 +69,8 @@ let
|
||||
name = "arrow-testing";
|
||||
owner = "apache";
|
||||
repo = "arrow-testing";
|
||||
rev = "9a02925d1ba80bd493b6d4da6e8a777588d57ac4";
|
||||
hash = "sha256-dEFCkeQpQrU61uCwJp/XB2umbQHjXtzado36BGChoc0=";
|
||||
rev = "19dda67f485ffb3ffa92f4c6fa083576ef052d58";
|
||||
hash = "sha256-mna6I/a5ZxMLdWN0QfCsgsre6yMeuSv4syX5ePGLhfg=";
|
||||
};
|
||||
|
||||
parquet-testing = fetchFromGitHub {
|
||||
@@ -81,7 +81,7 @@ let
|
||||
hash = "sha256-Xd6o3RT6Q0tPutV77J0P1x3F6U3RHdCBOKGUKtkQCKk=";
|
||||
};
|
||||
|
||||
version = "22.0.0";
|
||||
version = "23.0.0";
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "arrow-cpp";
|
||||
@@ -91,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "apache";
|
||||
repo = "arrow";
|
||||
rev = "apache-arrow-${version}";
|
||||
hash = "sha256-i4Smt43oi4sddUt3qH7ePjensBSfPW+w/ExLVcVNKic=";
|
||||
hash = "sha256-BluUlbtGJwvlrpN/c/KziOfFh5dvzZyuCy4JZkkFea4=";
|
||||
};
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/cpp";
|
||||
@@ -120,8 +120,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
ARROW_XSIMD_URL = fetchFromGitHub {
|
||||
owner = "xtensor-stack";
|
||||
repo = "xsimd";
|
||||
tag = "13.0.0";
|
||||
hash = "sha256-qElJYW5QDj3s59L3NgZj5zkhnUMzIP2mBa1sPks3/CE=";
|
||||
tag = "14.0.0";
|
||||
hash = "sha256-ijNoHb6xC+OHJbUB4j1PRsoHMzjrnOHVoDRe/nKguDo=";
|
||||
};
|
||||
|
||||
ARROW_SUBSTRAIT_URL = fetchFromGitHub {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
diff --git a/src/examples/cpp11/Makefile.am b/src/examples/cpp11/Makefile.am
|
||||
index a132a469f..65eb90a6d 100644
|
||||
--- a/src/examples/cpp11/Makefile.am
|
||||
+++ b/src/examples/cpp11/Makefile.am
|
||||
@@ -289,9 +289,9 @@ endif
|
||||
|
||||
if HAVE_BOOST_COROUTINE
|
||||
spawn_echo_server_SOURCES = spawn/echo_server.cpp
|
||||
-spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
|
||||
+spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono
|
||||
spawn_parallel_grep_SOURCES = spawn/parallel_grep.cpp
|
||||
-spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
|
||||
+spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
@@ -29,6 +29,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/asio";
|
||||
|
||||
patches = [
|
||||
# Linking against `boost_system` fails because the stub compiled library
|
||||
# of Boost.System, which has been a header-only library since 1.69, was
|
||||
# removed in 1.89.
|
||||
# Upstream issue: https://github.com/chriskohlhoff/asio/issues/1716
|
||||
./boost-1.89.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemdLibs,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "at-spi2-core";
|
||||
version = "2.58.2";
|
||||
version = "2.58.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@@ -38,8 +38,8 @@ stdenv.mkDerivation rec {
|
||||
separateDebugInfo = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/at-spi2-core/${lib.versions.majorMinor version}/at-spi2-core-${version}.tar.xz";
|
||||
hash = "sha256-ooI7li7RbN1csfxTZQKf0hg5TYUqzUCYsyGFS9ZpL24=";
|
||||
url = "mirror://gnome/sources/at-spi2-core/${lib.versions.majorMinor finalAttrs.version}/at-spi2-core-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-sPq+psl0LtqMnGdfm4wdG6u6HagtoD6hEDcQIzcXwbA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -122,4 +122,4 @@ stdenv.mkDerivation rec {
|
||||
teams = [ lib.teams.gnome ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "atuin";
|
||||
version = "18.11.0";
|
||||
version = "18.12.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "atuinsh";
|
||||
repo = "atuin";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-yjsCNN15E06te6cueSZksg7mcMyx2FiXKrbGAEcQWmg=";
|
||||
hash = "sha256-ojIL8Iy74UgFE4Mp75oHWbZDsFRKRhOBdkPP/TtZpz4=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-xaALIVJpMek4nbSozxtOEWivRDlMmKdu6KqKiNMp0jk=";
|
||||
cargoHash = "sha256-KamAFi6OHE38ss8rIncNecNMVjd8gAeSWMh8G7Yb/rQ=";
|
||||
|
||||
# atuin's default features include 'check-updates', which do not make sense
|
||||
# for distribution builds. List all other default features.
|
||||
@@ -27,7 +27,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
buildFeatures = [
|
||||
"client"
|
||||
"sync"
|
||||
"server"
|
||||
"clipboard"
|
||||
"daemon"
|
||||
];
|
||||
|
||||
@@ -9,10 +9,10 @@ import json
|
||||
from fnmatch import fnmatch
|
||||
from collections import defaultdict
|
||||
from contextlib import contextmanager
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import dataclass, asdict
|
||||
from itertools import chain
|
||||
from pathlib import Path, PurePath
|
||||
from typing import DefaultDict, Generator, Iterator, Optional
|
||||
from typing import DefaultDict, Generator, Iterator, Optional, Protocol
|
||||
|
||||
from elftools.common.exceptions import ELFError # type: ignore
|
||||
from elftools.elf.dynamic import DynamicSection # type: ignore
|
||||
@@ -233,40 +233,107 @@ def find_first_matching_rpath_with_origin(binary: Path, lib_dir: Path, rpaths: l
|
||||
return Path(rpath)
|
||||
return None
|
||||
|
||||
class Event(Protocol):
|
||||
"""Protocol for loggable events that occur during the auto-patchelf process."""
|
||||
def to_human_readable_str(self) -> str: ...
|
||||
|
||||
|
||||
@dataclass
|
||||
class SkipFile:
|
||||
file: Path # The file being skipped
|
||||
reason: str # Why the file is being skipped
|
||||
|
||||
def to_human_readable_str(self) -> str:
|
||||
return f"skipping {self.file} because {self.reason}"
|
||||
|
||||
|
||||
@dataclass
|
||||
class SetInterpreter:
|
||||
file: Path # The file being patched
|
||||
interpreter_path: Path # The interpreter being set
|
||||
|
||||
def to_human_readable_str(self) -> str:
|
||||
return f"setting interpreter of {self.file}"
|
||||
|
||||
|
||||
@dataclass
|
||||
class IgnoredDependency:
|
||||
file: Path # The file that contains the ignored dependency
|
||||
name: Path # The name of the dependency
|
||||
pattern: str # The pattern that caused this missing dep to be ignored
|
||||
|
||||
def to_human_readable_str(self) -> str:
|
||||
return f"warn: auto-patchelf ignoring missing {self.name} wanted by {self.file}"
|
||||
|
||||
@dataclass
|
||||
class Dependency:
|
||||
file: Path # The file that contains the dependency
|
||||
name: Path # The name of the dependency
|
||||
found: bool = False # Whether it was found somewhere
|
||||
file: Path # The file that contains the dependency
|
||||
name: Path # The name of the dependency
|
||||
found: bool = False # Whether it was found somewhere
|
||||
location: Optional[Path] = None # Where the dependency was found (if found)
|
||||
|
||||
def to_human_readable_str(self) -> str:
|
||||
if self.found:
|
||||
return f" {self.name} -> found: {self.location}"
|
||||
else:
|
||||
return f" {self.name} -> not found!"
|
||||
|
||||
|
||||
def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list[Path] = [], keep_libc: bool = False, preserve_origin: bool = False, extra_args: list[str] = []) -> list[Dependency]:
|
||||
@dataclass
|
||||
class SetRpath:
|
||||
file: Path # The file being patched
|
||||
rpath: str # The RPATH being set
|
||||
|
||||
def to_human_readable_str(self) -> str:
|
||||
return f"setting RPATH to: {self.rpath}"
|
||||
|
||||
|
||||
class Logger:
|
||||
"""Outputs events in either structured (JSON) or human-readable format."""
|
||||
|
||||
def __init__(self, structured: bool = False):
|
||||
self.structured = structured
|
||||
|
||||
def debug(self, message: str):
|
||||
"""Output a debug log message (text), only if not in structured mode."""
|
||||
if not self.structured:
|
||||
print(message)
|
||||
|
||||
def log(self, event: Event) -> None:
|
||||
"""Output an event immediately. In structured mode, output JSON. In human-readable mode, output human-readable text."""
|
||||
if self.structured:
|
||||
event_type = type(event).__name__
|
||||
event_data = asdict(event)
|
||||
print(json.dumps({event_type: event_data}, default=str))
|
||||
else:
|
||||
print(event.to_human_readable_str())
|
||||
|
||||
|
||||
|
||||
def auto_patchelf_file(logger: Logger, path: Path, runtime_deps: list[Path], append_rpaths: list[Path] = [], keep_libc: bool = False, preserve_origin: bool = False, extra_args: list[str] = []) -> list[Dependency]:
|
||||
try:
|
||||
with open_elf(path) as elf:
|
||||
|
||||
if is_static_executable(elf):
|
||||
# No point patching these
|
||||
print(f"skipping {path} because it is statically linked")
|
||||
logger.log(SkipFile(file=path, reason="it is statically linked"))
|
||||
return []
|
||||
|
||||
if elf.num_segments() == 0:
|
||||
# no segment (e.g. object file)
|
||||
print(f"skipping {path} because it contains no segment")
|
||||
logger.log(SkipFile(file=path, reason="it contains no segment"))
|
||||
return []
|
||||
|
||||
file_arch = get_arch(elf)
|
||||
if interpreter_arch != file_arch:
|
||||
# Our target architecture is different than this file's
|
||||
# architecture, so skip it.
|
||||
print(f"skipping {path} because its architecture ({file_arch})"
|
||||
f" differs from target ({interpreter_arch})")
|
||||
logger.log(SkipFile(file=path, reason=f"its architecture ({file_arch}) differs from target ({interpreter_arch})"))
|
||||
return []
|
||||
|
||||
file_osabi = get_osabi(elf)
|
||||
if not osabi_are_compatible(interpreter_osabi, file_osabi):
|
||||
print(f"skipping {path} because its OS ABI ({file_osabi}) is"
|
||||
f" not compatible with target ({interpreter_osabi})")
|
||||
logger.log(SkipFile(file=path, reason=f"its OS ABI ({file_osabi}) is not compatible with target ({interpreter_osabi})"))
|
||||
return []
|
||||
|
||||
file_is_dynamic_executable = is_dynamic_executable(elf)
|
||||
@@ -283,13 +350,13 @@ def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list
|
||||
|
||||
rpath = []
|
||||
if file_is_dynamic_executable:
|
||||
print("setting interpreter of", path)
|
||||
logger.log(SetInterpreter(file=path, interpreter_path=interpreter_path))
|
||||
subprocess.run(
|
||||
["patchelf", "--set-interpreter", interpreter_path.as_posix(), path.as_posix()] + extra_args,
|
||||
check=True)
|
||||
rpath += runtime_deps
|
||||
|
||||
print("searching for dependencies of", path)
|
||||
logger.debug(f"searching for dependencies of {path}")
|
||||
dependencies = []
|
||||
# Be sure to get the output of all missing dependencies instead of
|
||||
# failing at the first one, because it's more useful when working
|
||||
@@ -335,8 +402,9 @@ def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list
|
||||
elif found_dependency := find_dependency(candidate.name, file_arch, file_osabi):
|
||||
origin_rpath_entry = find_first_matching_rpath_with_origin(path, found_dependency, existing_rpaths) if preserve_origin else None
|
||||
rpath.append(origin_rpath_entry or found_dependency)
|
||||
dependencies.append(Dependency(path, candidate, found=True))
|
||||
print(f" {candidate} -> found: {found_dependency}")
|
||||
dep = Dependency(file=path, name=candidate, found=True, location=found_dependency)
|
||||
dependencies.append(dep)
|
||||
logger.log(dep)
|
||||
was_found = True
|
||||
break
|
||||
elif is_libc and keep_libc:
|
||||
@@ -345,8 +413,9 @@ def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list
|
||||
|
||||
if not was_found:
|
||||
dep_name = dep[0] if len(dep) == 1 else f"any({', '.join(map(str, dep))})"
|
||||
dependencies.append(Dependency(path, dep_name, found=False))
|
||||
print(f" {dep_name} -> not found!")
|
||||
dep = Dependency(file=path, name=dep_name, found=False, location=None)
|
||||
dependencies.append(dep)
|
||||
logger.log(dep)
|
||||
|
||||
rpath.extend(append_rpaths)
|
||||
|
||||
@@ -360,7 +429,7 @@ def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list
|
||||
rpath_str = ":".join(dict.fromkeys(map(Path.as_posix, rpath)))
|
||||
|
||||
if rpath:
|
||||
print("setting RPATH to:", rpath_str)
|
||||
logger.log(SetRpath(file=path, rpath=rpath_str))
|
||||
subprocess.run(
|
||||
["patchelf", "--set-rpath", rpath_str, path.as_posix()] + extra_args,
|
||||
check=True)
|
||||
@@ -369,6 +438,7 @@ def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list
|
||||
|
||||
|
||||
def auto_patchelf(
|
||||
logger: Logger,
|
||||
paths_to_patch: list[Path],
|
||||
lib_dirs: list[Path],
|
||||
runtime_deps: list[Path],
|
||||
@@ -393,20 +463,20 @@ def auto_patchelf(
|
||||
dependencies = []
|
||||
for path in chain.from_iterable(glob(p, '*', recursive) for p in paths_to_patch):
|
||||
if not path.is_symlink() and path.is_file():
|
||||
dependencies += auto_patchelf_file(path, runtime_deps, append_rpaths, keep_libc, preserve_origin, extra_args)
|
||||
dependencies += auto_patchelf_file(logger, path, runtime_deps, append_rpaths, keep_libc, preserve_origin, extra_args)
|
||||
|
||||
missing = [dep for dep in dependencies if not dep.found]
|
||||
|
||||
# Print a summary of the missing dependencies at the end
|
||||
print(f"auto-patchelf: {len(missing)} dependencies could not be satisfied")
|
||||
logger.debug(f"auto-patchelf: {len(missing)} dependencies could not be satisfied")
|
||||
failure = False
|
||||
for dep in missing:
|
||||
for pattern in ignore_missing:
|
||||
if fnmatch(dep.name.name, pattern):
|
||||
print(f"warn: auto-patchelf ignoring missing {dep.name} wanted by {dep.file}")
|
||||
logger.log(IgnoredDependency(file=dep.file, name=dep.name, pattern=pattern))
|
||||
break
|
||||
else:
|
||||
print(f"error: auto-patchelf could not satisfy dependency {dep.name} wanted by {dep.file}")
|
||||
logger.debug(f"error: auto-patchelf could not satisfy dependency {dep.name} wanted by {dep.file}")
|
||||
failure = True
|
||||
|
||||
if failure:
|
||||
@@ -485,6 +555,11 @@ def main() -> None:
|
||||
action="store_false",
|
||||
help="Do not add the existing rpaths of the patched files to the list of directories to search for dependencies.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--structured-logs",
|
||||
action="store_true",
|
||||
help="Output events as JSON Lines to stdout instead of human-readable diagnostics.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--extra-args",
|
||||
# Undocumented Python argparse feature: consume all remaining arguments
|
||||
@@ -496,11 +571,13 @@ def main() -> None:
|
||||
help="Extra arguments to pass to patchelf. This argument should always come last.",
|
||||
)
|
||||
|
||||
print("automatically fixing dependencies for ELF files")
|
||||
args = parser.parse_args()
|
||||
pprint.pprint(vars(args))
|
||||
logger = Logger(structured=args.structured_logs)
|
||||
logger.debug("automatically fixing dependencies for ELF files")
|
||||
logger.debug(pprint.pformat(vars(args)))
|
||||
|
||||
auto_patchelf(
|
||||
logger,
|
||||
args.paths,
|
||||
args.libs,
|
||||
args.runtime_dependencies,
|
||||
|
||||
@@ -14,14 +14,14 @@ let
|
||||
pname = "awscli";
|
||||
# N.B: if you change this, change botocore and boto3 to a matching version too
|
||||
# check e.g. https://github.com/aws/aws-cli/blob/1.33.21/setup.py
|
||||
version = "1.42.18";
|
||||
version = "1.44.21";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aws";
|
||||
repo = "aws-cli";
|
||||
tag = version;
|
||||
hash = "sha256-f6CVQotsdvU2g/GjOMWPay/7FxxRvhtBrVZE5TLHTNY=";
|
||||
hash = "sha256-yQFK1YjehmACZGMXfMQLc5OiiIGDO08OtwFSpaRyi58=";
|
||||
};
|
||||
|
||||
pythonRelaxDeps = [
|
||||
|
||||
@@ -46,6 +46,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
"six"
|
||||
"termcolor"
|
||||
"urllib3"
|
||||
"wcwidth"
|
||||
];
|
||||
|
||||
dependencies = with python.pkgs; [
|
||||
@@ -62,6 +63,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
setuptools
|
||||
tabulate
|
||||
termcolor
|
||||
wcwidth
|
||||
websocket-client
|
||||
];
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ccid";
|
||||
version = "1.6.2";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LudovicRousseau";
|
||||
repo = "CCID";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-n7rOjnLZH4RLmddtBycr3FK2Bi/OLR+9IjWBRbWjnUw=";
|
||||
hash = "sha256-6eaznSIQZl1bpIe1F9EtwotF9BjOruJ9g/c2QrTgfUg=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -33,6 +33,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
mesonFlags = [
|
||||
(lib.mesonBool "serial" true)
|
||||
# Upstream tries to install udev outside of PREFIX. It's easier to disable
|
||||
# this and install it ourself than to patch meson.build.
|
||||
(lib.mesonBool "udev-rules" false)
|
||||
];
|
||||
|
||||
# error: call to undeclared function 'InterruptRead';
|
||||
@@ -61,6 +64,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
install -Dm 0444 -t $out/lib/udev/rules.d ../src/92_pcscd_ccid.rules
|
||||
substituteInPlace $out/lib/udev/rules.d/92_pcscd_ccid.rules \
|
||||
--replace-fail "/usr/sbin/pcscd" "${pcsclite}/bin/pcscd"
|
||||
# Disable reference to binary that we don't build.
|
||||
substituteInPlace $out/lib/udev/rules.d/92_pcscd_ccid.rules \
|
||||
--replace-fail 'ATTRS{idVendor}=="0d46", ATTRS{idProduct}=="4081", RUN+="/usr/sbin/Kobil_mIDentity_switch"' \
|
||||
'# disabled: ATTRS{idVendor}=="0d46", ATTRS{idProduct}=="4081", RUN+="/usr/sbin/Kobil_mIDentity_switch"'
|
||||
'';
|
||||
|
||||
# The resulting shared object ends up outside of the default paths which are
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
cffi,
|
||||
pkg-config,
|
||||
pytestCheckHook,
|
||||
pytest-subtests,
|
||||
pretend,
|
||||
libiconv,
|
||||
iso8601,
|
||||
@@ -98,7 +97,6 @@ buildPythonPackage rec {
|
||||
pretend
|
||||
py
|
||||
pytestCheckHook
|
||||
pytest-subtests
|
||||
pytz
|
||||
];
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cryptsetup";
|
||||
version = "2.8.3";
|
||||
version = "2.8.4";
|
||||
|
||||
outputs = [
|
||||
"bin"
|
||||
@@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
url =
|
||||
"mirror://kernel/linux/utils/cryptsetup/v${lib.versions.majorMinor finalAttrs.version}/"
|
||||
+ "cryptsetup-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-SoojuLnRoyUEUuQKzq1EIaA+RaOJVK0FlWNPQmaqgA8=";
|
||||
hash = "sha256-RD5G+JZMmsx4D0Va+7jiOqDo7X7FBM/FngT0BvoeioM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -87,7 +87,7 @@ assert
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "curl";
|
||||
version = "8.17.0";
|
||||
version = "8.18.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
@@ -96,7 +96,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version
|
||||
}/curl-${finalAttrs.version}.tar.xz"
|
||||
];
|
||||
hash = "sha256-lV9ucprWs1ZiYOj+9oYg52ujwxrPChhSRBahhaz3eZI=";
|
||||
hash = "sha256-QN95Fm50qiAUk2XhHuTHmKRq1Xw05PaP0TEA4smpGUY=";
|
||||
};
|
||||
|
||||
# this could be accomplished by updateAutotoolsGnuConfigScriptsHook, but that causes infinite recursion
|
||||
|
||||
@@ -21,6 +21,8 @@ clangStdenv.mkDerivation rec {
|
||||
version = "1.0.1";
|
||||
pname = "d-SEAMS";
|
||||
|
||||
strictDeps = false;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "d-SEAMS";
|
||||
repo = "seams-core";
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
dbus,
|
||||
linuxHeaders,
|
||||
systemd,
|
||||
expat,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -146,6 +147,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
dbus
|
||||
linuxHeaders
|
||||
systemd
|
||||
expat
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
|
||||
@@ -95,14 +95,15 @@ Without it, only the user's primary group is used in authentication!
|
||||
+}
|
||||
--- dbus-1.6.8/dbus/dbus-sysdeps-unix.c.orig 2013-02-28 13:08:52.171215237 +0000
|
||||
+++ dbus-1.6.8/dbus/dbus-sysdeps-unix.c 2013-02-28 13:13:52.224615146 +0000
|
||||
@@ -21,6 +21,10 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
@@ -26,6 +26,11 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
+#ifndef HAVE_GETGROUPLIST
|
||||
+#include "getgrouplist.c"
|
||||
+#define HAVE_GETGROUPLIST
|
||||
+#endif
|
||||
|
||||
#include <config.h>
|
||||
|
||||
+
|
||||
#include "dbus-internals.h"
|
||||
#include "dbus-sysdeps.h"
|
||||
#include "dbus-sysdeps-unix.h"
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
diff --git a/bus/legacy-config/meson.build b/bus/legacy-config/meson.build
|
||||
index 1e635713..4be240e9 100644
|
||||
--- a/bus/legacy-config/meson.build
|
||||
+++ b/bus/legacy-config/meson.build
|
||||
@@ -24,7 +24,7 @@ if platform_unix
|
||||
input: 'system.conf.in',
|
||||
output: 'system.conf',
|
||||
configuration: data_config,
|
||||
- install_dir: get_option('sysconfdir') / 'dbus-1',
|
||||
+ install_dir: install_sysconfdir / 'dbus-1',
|
||||
)
|
||||
endif
|
||||
|
||||
@@ -32,5 +32,5 @@ configure_file(
|
||||
input: 'session.conf.in',
|
||||
output: 'session.conf',
|
||||
configuration: data_config,
|
||||
- install_dir: get_option('sysconfdir') / 'dbus-1',
|
||||
+ install_dir: install_sysconfdir / 'dbus-1',
|
||||
)
|
||||
diff --git a/bus/meson.build b/bus/meson.build
|
||||
index 058e3b25..0a5de112 100644
|
||||
--- a/bus/meson.build
|
||||
+++ b/bus/meson.build
|
||||
@@ -23,7 +23,7 @@ session_conf = configure_file(
|
||||
input: 'session.conf.in',
|
||||
output: 'session.conf',
|
||||
configuration: data_config,
|
||||
- install_dir: get_option('datadir') / 'dbus-1',
|
||||
+ install_dir: install_datadir / 'dbus-1',
|
||||
)
|
||||
|
||||
if platform_unix
|
||||
@@ -31,7 +31,7 @@ if platform_unix
|
||||
input: 'system.conf.in',
|
||||
output: 'system.conf',
|
||||
configuration: data_config,
|
||||
- install_dir: get_option('datadir') / 'dbus-1',
|
||||
+ install_dir: install_datadir / 'dbus-1',
|
||||
)
|
||||
endif
|
||||
|
||||
@@ -39,19 +39,19 @@ configure_file(
|
||||
input: 'example-system-enable-stats.conf.in',
|
||||
output: 'example-system-enable-stats.conf',
|
||||
configuration: data_config,
|
||||
- install_dir: get_option('datadir') / 'doc' / 'dbus' / 'examples',
|
||||
+ install_dir: install_datadir / 'doc' / 'dbus' / 'examples',
|
||||
)
|
||||
|
||||
configure_file(
|
||||
input: 'example-session-disable-stats.conf.in',
|
||||
output: 'example-session-disable-stats.conf',
|
||||
configuration: data_config,
|
||||
- install_dir: get_option('datadir') / 'doc' / 'dbus' / 'examples',
|
||||
+ install_dir: install_datadir / 'doc' / 'dbus' / 'examples',
|
||||
)
|
||||
|
||||
install_data(
|
||||
'example-system-hardening-without-traditional-activation.conf',
|
||||
- install_dir: get_option('datadir') / 'doc' / 'dbus' / 'examples',
|
||||
+ install_dir: install_datadir / 'doc' / 'dbus' / 'examples',
|
||||
)
|
||||
|
||||
if use_launchd
|
||||
@@ -185,15 +185,14 @@ if platform_unix and use_traditional_activation
|
||||
endif
|
||||
|
||||
install_emptydirs += [
|
||||
- get_option('datadir') / 'dbus-1' / 'session.d',
|
||||
- get_option('datadir') / 'dbus-1' / 'services',
|
||||
+ install_datadir / 'dbus-1' / 'session.d',
|
||||
+ install_datadir / 'dbus-1' / 'services',
|
||||
]
|
||||
|
||||
if platform_unix
|
||||
install_emptydirs += [
|
||||
- runstatedir / 'dbus',
|
||||
- get_option('datadir') / 'dbus-1' / 'system.d',
|
||||
- get_option('datadir') / 'dbus-1' / 'system-services',
|
||||
+ install_datadir / 'dbus-1' / 'system.d',
|
||||
+ install_datadir / 'dbus-1' / 'system-services',
|
||||
]
|
||||
endif
|
||||
|
||||
diff --git a/doc/meson.build b/doc/meson.build
|
||||
index adc6f17d..1f2c5dce 100644
|
||||
--- a/doc/meson.build
|
||||
+++ b/doc/meson.build
|
||||
@@ -142,7 +142,7 @@ configure_file(
|
||||
# Install dtd files
|
||||
|
||||
|
||||
-xml_dir = get_option('datadir') / 'xml' / 'dbus-1'
|
||||
+xml_dir = install_datadir / 'xml' / 'dbus-1'
|
||||
dtd_files = [
|
||||
'busconfig.dtd',
|
||||
'introspect.dtd',
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 3f4ad316..6cee2c6b 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -918,7 +918,17 @@ dbus_enable_modular_tests = (
|
||||
###############################################################################
|
||||
# Paths and directories
|
||||
|
||||
-docs_dir = get_option('datadir') / 'doc' / 'dbus'
|
||||
+install_datadir = get_option('install_datadir')
|
||||
+if install_datadir == ''
|
||||
+ install_datadir = get_option('prefix') / get_option('datadir')
|
||||
+endif
|
||||
+
|
||||
+install_sysconfdir = get_option('install_sysconfdir')
|
||||
+if install_sysconfdir == ''
|
||||
+ install_sysconfdir = get_option('prefix') / get_option('sysconfdir')
|
||||
+endif
|
||||
+
|
||||
+docs_dir = install_datadir / 'doc' / 'dbus'
|
||||
|
||||
# TODO: If a future Meson version gets a runstatedir option, try both.
|
||||
# https://github.com/mesonbuild/meson/issues/4141
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 1bd00579..1dfb3c15 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -109,6 +109,20 @@ option(
|
||||
description: 'Inotify support on Linux'
|
||||
)
|
||||
|
||||
+option(
|
||||
+ 'install_datadir',
|
||||
+ type: 'string',
|
||||
+ value: '',
|
||||
+ description: 'datadir for installation, so that we can set --datadir=/etc and have dbus load files from there but still install them to $out/share'
|
||||
+)
|
||||
+
|
||||
+option(
|
||||
+ 'install_sysconfdir',
|
||||
+ type: 'string',
|
||||
+ value: '',
|
||||
+ description: 'sysconfdir for installation, so that we can set --sysconfdir=/etc and have dbus load files from there but still install them to $out/etc'
|
||||
+)
|
||||
+
|
||||
option(
|
||||
'installed_tests',
|
||||
type: 'boolean',
|
||||
diff --git a/test/data/meson.build b/test/data/meson.build
|
||||
index ef570492..713396b7 100644
|
||||
--- a/test/data/meson.build
|
||||
+++ b/test/data/meson.build
|
||||
@@ -224,14 +224,14 @@ if install_tests
|
||||
'link_name': 'session.conf',
|
||||
'install_dir': test_exec_dir / 'data' / 'valid-config-files',
|
||||
'pointing_to':
|
||||
- get_option('prefix') / get_option('datadir') /
|
||||
+ install_datadir /
|
||||
'dbus-1' / 'session.conf',
|
||||
},
|
||||
{
|
||||
'link_name': 'system.conf',
|
||||
'install_dir': test_exec_dir / 'data' / 'valid-config-files-system',
|
||||
'pointing_to':
|
||||
- get_option('prefix') / get_option('datadir') /
|
||||
+ install_datadir /
|
||||
'dbus-1' / 'system.conf',
|
||||
},
|
||||
]
|
||||
diff --git a/test/meson.build b/test/meson.build
|
||||
index a60afac6..be7bd935 100644
|
||||
--- a/test/meson.build
|
||||
+++ b/test/meson.build
|
||||
@@ -25,7 +25,7 @@
|
||||
install_tests = get_option('installed_tests')
|
||||
|
||||
test_exec_dir = get_option('libexecdir') / 'installed-tests' / 'dbus'
|
||||
-test_meta_dir = get_option('datadir') / 'installed-tests' / 'dbus'
|
||||
+test_meta_dir = install_datadir / 'installed-tests' / 'dbus'
|
||||
|
||||
###############################################################################
|
||||
# Test configuration needs some specific keys
|
||||
diff --git a/tools/meson.build b/tools/meson.build
|
||||
index 5d78d93a..7d094364 100644
|
||||
--- a/tools/meson.build
|
||||
+++ b/tools/meson.build
|
||||
@@ -112,5 +112,4 @@ install_data('GetAllMatchRules.py',
|
||||
|
||||
# Create the empty directory to hold the machine ID
|
||||
install_emptydirs += [
|
||||
- get_option('localstatedir') / 'lib' / 'dbus',
|
||||
]
|
||||
@@ -7,14 +7,17 @@
|
||||
enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal,
|
||||
systemdMinimal,
|
||||
audit,
|
||||
libcap_ng,
|
||||
libapparmor,
|
||||
dbus,
|
||||
docbook_xml_dtd_44,
|
||||
docbook-xsl-nons,
|
||||
xmlto,
|
||||
autoreconfHook,
|
||||
autoconf-archive,
|
||||
libxslt,
|
||||
meson,
|
||||
ninja,
|
||||
python3,
|
||||
x11Support ? (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin),
|
||||
writeText,
|
||||
libx11,
|
||||
libsm,
|
||||
libice,
|
||||
@@ -22,30 +25,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "dbus";
|
||||
version = "1.14.10";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dbus.freedesktop.org/releases/dbus/dbus-${finalAttrs.version}.tar.xz";
|
||||
sha256 = "sha256-uh8h0r2dM52i1KqHgMCd8y/qh5mLc9ok9Jq53x42pQ8=";
|
||||
};
|
||||
|
||||
patches = lib.optional stdenv.hostPlatform.isSunOS ./implement-getgrouplist.patch;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace bus/Makefile.am \
|
||||
--replace 'install-data-hook:' 'disabled:' \
|
||||
--replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus' ':'
|
||||
substituteInPlace tools/Makefile.am \
|
||||
--replace 'install-data-local:' 'disabled:' \
|
||||
--replace 'installcheck-local:' 'disabled:'
|
||||
''
|
||||
# cleanup of runtime references
|
||||
+ ''
|
||||
substituteInPlace ./dbus/dbus-sysdeps-unix.c \
|
||||
--replace 'DBUS_BINDIR "/dbus-launch"' "\"$lib/bin/dbus-launch\""
|
||||
substituteInPlace ./tools/dbus-launch.c \
|
||||
--replace 'DBUS_DAEMONDIR"/dbus-daemon"' '"/run/current-system/sw/bin/dbus-daemon"'
|
||||
'';
|
||||
version = "1.16.2";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@@ -54,76 +34,126 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"doc"
|
||||
"man"
|
||||
];
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dbus.freedesktop.org/releases/dbus/dbus-${finalAttrs.version}.tar.xz";
|
||||
sha256 = "sha256-C6KhpLFq/nvOssB+nOmajCw1COXewpDbtkM4S9a+t+I=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Implement getgrouplist for platforms where it is not available (e.g. Illumos/Solaris)
|
||||
./implement-getgrouplist.patch
|
||||
|
||||
# Add a Meson configuration option that will allow us to use a different
|
||||
# `datadir` for installation from the one that will be compiled into dbus.
|
||||
# This is necessary to allow NixOS to manage dbus service definitions,
|
||||
# since the `datadir` in the package will be immutable. But we still want
|
||||
# to install the files to the latter, since there is no other suitable
|
||||
# place for the project to install them.
|
||||
#
|
||||
# We will also just remove installation of empty `${runstatedir}/dbus`
|
||||
# and `${localstatedir}/lib/dbus` since these are useless in the package.
|
||||
./meson-install-dirs.patch
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Fixes Darwin issues like:
|
||||
# dyld[29056]: Library not loaded: @rpath/libdbus-1.3.dylib
|
||||
# Referenced from: <...> /nix/store/.../bin/dbus-run-session
|
||||
# Reason: no LC_RPATH's found
|
||||
./set-install_rpath.patch
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
autoconf-archive
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
docbook_xml_dtd_44
|
||||
docbook-xsl-nons
|
||||
xmlto
|
||||
libxslt # for xsltproc
|
||||
python3
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
buildInputs = [
|
||||
expat
|
||||
]
|
||||
++ lib.optionals x11Support [
|
||||
libx11
|
||||
libice
|
||||
libsm
|
||||
]
|
||||
++ lib.optional enableSystemd systemdMinimal
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
audit
|
||||
libapparmor
|
||||
libcap_ng
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
lib.optionals x11Support [
|
||||
libx11
|
||||
libice
|
||||
libsm
|
||||
]
|
||||
++ lib.optional enableSystemd systemdMinimal
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
audit
|
||||
libapparmor
|
||||
];
|
||||
# ToDo: optional selinux?
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
configureFlags = [
|
||||
"--enable-user-session"
|
||||
"--enable-xml-docs"
|
||||
mesonFlags = [
|
||||
"--libexecdir=${placeholder "out"}/libexec"
|
||||
# datadir from which dbus will load files will be managed by the NixOS module:
|
||||
"--datadir=/etc"
|
||||
# But we still want to install stuff to the package:
|
||||
"-Dinstall_datadir=${placeholder "out"}/share"
|
||||
"--localstatedir=/var"
|
||||
"--runstatedir=/run"
|
||||
"-Druntime_dir=/run"
|
||||
"--sysconfdir=/etc"
|
||||
"--with-session-socket-dir=/tmp"
|
||||
"--with-system-pid-file=/run/dbus/pid"
|
||||
"--with-system-socket=/run/dbus/system_bus_socket"
|
||||
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
||||
"--with-systemduserunitdir=${placeholder "out"}/etc/systemd/user"
|
||||
"-Dinstall_sysconfdir=${placeholder "out"}/etc"
|
||||
"-Ddoxygen_docs=disabled"
|
||||
"-Dducktype_docs=disabled"
|
||||
"-Dlaunchd_agent_dir=${placeholder "out"}/Library/LaunchAgents"
|
||||
"-Dqt_help=disabled"
|
||||
"-Drelocation=disabled" # Conflicts with multiple outputs
|
||||
"-Dmodular_tests=disabled" # Requires glib
|
||||
"-Dsession_socket_dir=/tmp"
|
||||
"-Dsystemd_system_unitdir=${placeholder "out"}/etc/systemd/system"
|
||||
"-Dsystemd_user_unitdir=${placeholder "out"}/etc/systemd/user"
|
||||
(lib.mesonEnable "x11_autolaunch" x11Support)
|
||||
(lib.mesonEnable "apparmor" stdenv.hostPlatform.isLinux)
|
||||
(lib.mesonEnable "epoll" stdenv.hostPlatform.isLinux)
|
||||
(lib.mesonEnable "inotify" stdenv.hostPlatform.isLinux)
|
||||
(lib.mesonEnable "libaudit" stdenv.hostPlatform.isLinux)
|
||||
(lib.mesonEnable "kqueue" (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isBSD))
|
||||
(lib.mesonEnable "launchd" stdenv.hostPlatform.isDarwin)
|
||||
(lib.mesonEnable "systemd" enableSystemd)
|
||||
"-Dselinux=disabled"
|
||||
]
|
||||
++ lib.optional (!x11Support) "--without-x"
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
"--enable-apparmor"
|
||||
"--enable-libaudit"
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# `launchctl` is only needed at runtime. Lie to `find_program` because it will always be present on a Darwin host.
|
||||
"--cross-file=${writeText "darwin.ini" ''
|
||||
[binaries]
|
||||
launchctl = 'true'
|
||||
''}"
|
||||
]
|
||||
++ lib.optionals enableSystemd [ "SYSTEMCTL=${systemdMinimal}/bin/systemctl" ];
|
||||
|
||||
NIX_CFLAGS_LINK = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-Wl,--as-needed";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
++ lib.optionals enableSystemd [
|
||||
"--cross-file=${writeText "crossfile.ini" ''
|
||||
[binaries]
|
||||
systemctl = '${systemdMinimal}/bin/systemctl'
|
||||
''}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
makeFlags = [
|
||||
# Fix paths in XML catalog broken by mismatching build/install datadir.
|
||||
"dtddir=${placeholder "out"}/share/xml/dbus-1"
|
||||
];
|
||||
postPatch = ''
|
||||
patchShebangs \
|
||||
test/data/copy_data_for_tests.py \
|
||||
meson_post_install.py
|
||||
|
||||
installFlags = [
|
||||
"sysconfdir=${placeholder "out"}/etc"
|
||||
"datadir=${placeholder "out"}/share"
|
||||
];
|
||||
# Cleanup of runtime references
|
||||
substituteInPlace ./dbus/dbus-sysdeps-unix.c \
|
||||
--replace-fail 'DBUS_BINDIR "/dbus-launch"' "\"$lib/bin/dbus-launch\""
|
||||
substituteInPlace ./tools/dbus-launch.c \
|
||||
--replace-fail 'DBUS_DAEMONDIR"/dbus-daemon"' '"/run/current-system/sw/bin/dbus-daemon"'
|
||||
'';
|
||||
|
||||
# it's executed from $lib by absolute path
|
||||
postFixup = ''
|
||||
# It's executed from $lib by absolute path
|
||||
moveToOutput bin/dbus-launch "$lib"
|
||||
ln -s "$lib/bin/dbus-launch" "$out/bin/"
|
||||
'';
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
From 95a13025ec6fe4dd3c7a927732267e4abc4f4daf Mon Sep 17 00:00:00 2001
|
||||
From: Michael Daniels <mdaniels5757@gmail.com>
|
||||
Date: Sun, 22 Feb 2026 11:49:35 -0500
|
||||
Subject: [PATCH] set install_rpath for some executables
|
||||
|
||||
Fixes Darwin issues like:
|
||||
|
||||
dyld[29056]: Library not loaded: @rpath/libdbus-1.3.dylib
|
||||
Referenced from: <3A452FD0-A471-30CB-A14F-FD0F818E4625> /nix/store/6ghcwk1zrkqkzvsh6i3b2dlagx7hs2d7-dbus-1.16.2/bin/dbus-run-session
|
||||
Reason: no LC_RPATH's found
|
||||
---
|
||||
bus/meson.build | 2 ++
|
||||
tools/meson.build | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/bus/meson.build b/bus/meson.build
|
||||
index 176894d6..bec64aa1 100644
|
||||
--- a/bus/meson.build
|
||||
+++ b/bus/meson.build
|
||||
@@ -139,6 +139,7 @@ dbus_daemon = executable('dbus-daemon',
|
||||
include_directories: root_include,
|
||||
link_with: libdbus_daemon_internal,
|
||||
install: true,
|
||||
+ install_rpath: get_option('libdir'),
|
||||
)
|
||||
|
||||
|
||||
@@ -180,6 +181,7 @@ if platform_unix and use_traditional_activation
|
||||
link_with: liblaunch_helper_internal,
|
||||
install: true,
|
||||
install_dir: get_option('libexecdir'),
|
||||
+ install_rpath: get_option('libdir'),
|
||||
)
|
||||
endif
|
||||
|
||||
diff --git a/tools/meson.build b/tools/meson.build
|
||||
index 5d78d93a..def2a716 100644
|
||||
--- a/tools/meson.build
|
||||
+++ b/tools/meson.build
|
||||
@@ -65,6 +65,7 @@ if message_bus
|
||||
include_directories: root_include,
|
||||
link_with: libdbus_internal,
|
||||
install: true,
|
||||
+ install_rpath: get_option('libdir'),
|
||||
)
|
||||
endif
|
||||
|
||||
@@ -75,6 +76,7 @@ dbus_send = executable('dbus-send',
|
||||
include_directories: root_include,
|
||||
link_with: libdbus,
|
||||
install: true,
|
||||
+ install_rpath: get_option('libdir'),
|
||||
)
|
||||
|
||||
dbus_test_tool = executable('dbus-test-tool',
|
||||
--
|
||||
2.51.2
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "doxygen";
|
||||
version = "1.15.0";
|
||||
version = "1.16.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "doxygen";
|
||||
repo = "doxygen";
|
||||
tag = "Release_${lib.replaceStrings [ "." ] [ "_" ] finalAttrs.version}";
|
||||
hash = "sha256-HbUAIfkfP0Tvb2NLSerTSL8A+8Ox2thgGL2/zGLkZdc=";
|
||||
hash = "sha256-pVO5hSKSwhR8ZiKaHhiTUMGnLD+EqIbzVxMUUHl5x0c=";
|
||||
};
|
||||
|
||||
# https://github.com/doxygen/doxygen/issues/10928#issuecomment-2179320509
|
||||
|
||||
@@ -11,32 +11,28 @@
|
||||
|
||||
haskellPackages.mkDerivation rec {
|
||||
pname = "echidna";
|
||||
version = "2.2.7";
|
||||
version = "2.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "crytic";
|
||||
repo = "echidna";
|
||||
tag = "v${version}";
|
||||
sha256 = "sha256-rDtxyUpWfdMvS5BY1y8nydkQk/eCdmtjCqGJ+I4vy0I=";
|
||||
sha256 = "sha256-Zopkqc01uUccJzdjP+qmHHZzB2iXK0U0fQi6EhgCRKg=";
|
||||
};
|
||||
|
||||
isExecutable = true;
|
||||
|
||||
patches = [
|
||||
# Fix build with GHC 9.10
|
||||
# https://github.com/crytic/echidna/pull/1446
|
||||
(fetchpatch {
|
||||
url = "https://github.com/crytic/echidna/commit/1b498bdb8c86d8297aa34de8f48b6dce2f4dd84d.patch";
|
||||
hash = "sha256-JeKPv2Q2gIt1XpI81XPFu80/x8QcOI4k1QN/mTf+bqk=";
|
||||
})
|
||||
];
|
||||
|
||||
buildTools = with haskellPackages; [
|
||||
hpack
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
hpack
|
||||
'';
|
||||
|
||||
executableHaskellDepends = with haskellPackages; [
|
||||
# base dependencies
|
||||
# package.yml/dependencies
|
||||
aeson
|
||||
base
|
||||
containers
|
||||
@@ -45,9 +41,9 @@ haskellPackages.mkDerivation rec {
|
||||
MonadRandom
|
||||
mtl
|
||||
text
|
||||
# library dependencies
|
||||
# package.yml/library.dependencies
|
||||
ansi-terminal
|
||||
async
|
||||
array
|
||||
base16-bytestring
|
||||
binary
|
||||
brick
|
||||
@@ -58,11 +54,14 @@ haskellPackages.mkDerivation rec {
|
||||
exceptions
|
||||
extra
|
||||
filepath
|
||||
Glob
|
||||
hashable
|
||||
html-conduit
|
||||
html-entities
|
||||
http-conduit
|
||||
ListLike
|
||||
mcp-server
|
||||
mustache
|
||||
optics
|
||||
optics-core
|
||||
process
|
||||
@@ -71,19 +70,22 @@ haskellPackages.mkDerivation rec {
|
||||
semver
|
||||
signal
|
||||
split
|
||||
stm
|
||||
strip-ansi-escape
|
||||
time
|
||||
unliftio
|
||||
unliftio-core
|
||||
utf8-string
|
||||
vector
|
||||
vty
|
||||
vty-crossplatform
|
||||
wai-extra
|
||||
warp
|
||||
wreq
|
||||
word-wrap
|
||||
xml-conduit
|
||||
yaml
|
||||
# executable dependencies
|
||||
# package.yml/ecutable.echidna.dependencies
|
||||
code-page
|
||||
filepath
|
||||
hashable
|
||||
@@ -92,14 +94,6 @@ haskellPackages.mkDerivation rec {
|
||||
with-utf8
|
||||
];
|
||||
|
||||
executableToolDepends = [
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
hpack
|
||||
'';
|
||||
|
||||
postInstall =
|
||||
with haskellPackages;
|
||||
# https://github.com/NixOS/nixpkgs/pull/304352
|
||||
@@ -127,6 +121,4 @@ haskellPackages.mkDerivation rec {
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "echidna";
|
||||
# Fails to build since https://hydra.nixos.org/build/313316669/nixlog/2
|
||||
broken = true;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ let
|
||||
sourceRoot
|
||||
;
|
||||
fetcherVersion = 2;
|
||||
hash = "sha256-3ZgE1ysb1OeB4BNszvlrnYcc7gOo7coPfOEQmMHC6E0=";
|
||||
hash = "sha256-ok1Yl8CIPwViioH5HOM4VWilRU3HsSa8IAsBFl/QgG0=";
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
# files.
|
||||
|
||||
let
|
||||
version = "2.7.3";
|
||||
version = "2.7.4";
|
||||
tag = "R_${lib.replaceStrings [ "." ] [ "_" ] version}";
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
url =
|
||||
with finalAttrs;
|
||||
"https://github.com/libexpat/libexpat/releases/download/${tag}/${pname}-${version}.tar.xz";
|
||||
hash = "sha256-cd+PQHBqe7CoClNnB56nXZHaT4xlxY7Fm837997Nq58=";
|
||||
hash = "sha256-npyrtFfB4J3pHbJwbYNlZFeSY46zvh+U27IUkwEIasA=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
@@ -75,6 +75,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"--enable-avx512"
|
||||
"--enable-avx128-fma"
|
||||
]
|
||||
++
|
||||
lib.optionals (stdenv.hostPlatform.isAarch64 && (precision == "single" || precision == "double"))
|
||||
[
|
||||
"--enable-neon"
|
||||
]
|
||||
++ lib.optionals enableMpi [
|
||||
"--enable-mpi"
|
||||
# link libfftw3_mpi explicitly with -lmpi
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "flatbuffers";
|
||||
version = "25.9.23";
|
||||
version = "25.12.19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "flatbuffers";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-A9nWfgcuVW3x9MDFeviCUK/oGcWJQwadI8LqNR8BlQw=";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-I4PthsQOOV8tsi5uRYudyqBPcbE+ZH8Q9j0Ms4HP9Ec=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
ocamlPackages = ocaml-ng.ocamlPackages.overrideScope (
|
||||
ocamlPackages = ocaml-ng.ocamlPackages_5_3.overrideScope (
|
||||
self: super: {
|
||||
ppxlib = super.ppxlib.override { version = "0.34.0"; };
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
lib,
|
||||
replaceVars,
|
||||
cmake,
|
||||
@@ -10,6 +11,7 @@
|
||||
zlib,
|
||||
glib,
|
||||
giflib,
|
||||
gettext,
|
||||
libpng,
|
||||
libjpeg,
|
||||
libtiff,
|
||||
@@ -48,6 +50,26 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
patches = [
|
||||
# Provide a Nix-controlled location for the initial `sys.path` entry.
|
||||
(replaceVars ./set-python-sys-path.patch { python = "${py}/${py.sitePackages}"; })
|
||||
(fetchpatch {
|
||||
name = "CVE-2025-15279_1.patch";
|
||||
url = "https://github.com/fontforge/fontforge/commit/7d67700cf8888e0bb37b453ad54ed932c8587073.patch";
|
||||
hash = "sha256-AqixWSgMc75qkgO30nWnI9NKLRtVwCDR+uSEiwMtFKg=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "CVE-2025-15279_2.patch";
|
||||
url = "https://github.com/fontforge/fontforge/commit/720ea95020c964202928afd2e93b0f5fac11027e.patch";
|
||||
hash = "sha256-DsP2fDTZlTtg8MXcnsuGQ4PFPOVp56Jm95gq877PLlE=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "CVE-2025-15275.patch";
|
||||
url = "https://github.com/fontforge/fontforge/commit/7195402701ace7783753ef9424153eff48c9af44.patch";
|
||||
hash = "sha256-NHgKUvHF389z7PRqaDj3IWLSLijlSw0F3UYcMjLxKvE=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "CVE-2025-15269.patch";
|
||||
url = "https://github.com/fontforge/fontforge/commit/6aea6db5da332d8ac94e3501bb83c1b21f52074d.patch";
|
||||
hash = "sha256-3KsWSXVRpPJbytVmzjExCGw6IaCgcrKwqQGRKpQAOiY=";
|
||||
})
|
||||
];
|
||||
|
||||
# use $SOURCE_DATE_EPOCH instead of non-deterministic timestamps
|
||||
@@ -62,9 +84,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# do not use x87's 80-bit arithmetic, rounding errors result in very different font binaries
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-msse2 -mfpmath=sse";
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
cmake
|
||||
gettext
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@@ -97,6 +122,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ lib.optional (!withGUI) "-DENABLE_GUI=OFF"
|
||||
++ lib.optional (!withGTK) "-DENABLE_X11=ON"
|
||||
++ lib.optional (!withPython) "-DENABLE_PYTHON_SCRIPTING=OFF"
|
||||
++ lib.optional withPython "-DPython3_EXECUTABLE=${lib.getExe py}"
|
||||
++ lib.optional withExtras "-DENABLE_FONTFORGE_EXTRAS=ON";
|
||||
|
||||
preConfigure = ''
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
pkg-config,
|
||||
python3,
|
||||
rinutils,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -74,10 +75,29 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.cmakeBool "BUILD_STATIC_LIBRARY" false)
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
|
||||
preFixup = ''
|
||||
# This is a module and should not be wrapped, or it causes import errors
|
||||
# on the scripts that are actually executable
|
||||
chmod a-x $out/bin/fc_solve_find_index_s2ints.py
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapPythonProgramsIn "$out/bin" "$out ''${pythonPath[*]}"
|
||||
'';
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
postInstallCheck = ''
|
||||
# Check that the python wrappers work correctly:
|
||||
# * fc_solve_find_index_s2ints.py should be unwrapped (we get SyntaxError otherwise)
|
||||
# * the wrapper should provide all modules from the pythonPath (we get ModuleNotFoundError otherwise)
|
||||
# * we don't provide valid input so expect IndexError
|
||||
unset PYTHONPATH
|
||||
($out/bin/make_pysol_freecell_board.py 2>&1 | tee /dev/stderr || true) | grep -q "IndexError:"
|
||||
'';
|
||||
doInstallCheck = true;
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://fc-solve.shlomifish.org/";
|
||||
description = "FreeCell automatic solver";
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
Disable the SimplifedLayerNormFusion optimization for onnxruntime embedding
|
||||
models to prevent a crash when using FP16 models (like jinna-clip-v1) with newer
|
||||
onnxruntime versions.
|
||||
|
||||
https://github.com/microsoft/onnxruntime/issues/26717#issuecomment-3800462654
|
||||
|
||||
|
||||
diff --git a/frigate/embeddings/onnx/runner.py b/frigate/embeddings/onnx/runner.py
|
||||
index c34c97a8d..dca91daae 100644
|
||||
--- a/frigate/embeddings/onnx/runner.py
|
||||
+++ b/frigate/embeddings/onnx/runner.py
|
||||
@@ -52,6 +52,7 @@ class ONNXModelRunner:
|
||||
model_path,
|
||||
providers=providers,
|
||||
provider_options=options,
|
||||
+ disabled_optimizers=["SimplifiedLayerNormFusion"],
|
||||
)
|
||||
|
||||
def get_input_names(self) -> list[str]:
|
||||
@@ -84,7 +84,22 @@ python3Packages.buildPythonApplication rec {
|
||||
hash = "sha256-1+n0n0yCtjfAHkXzsZdIF0iCVdPGmsG7l8/VTqBVEjU=";
|
||||
})
|
||||
./ffmpeg.patch
|
||||
# https://github.com/blakeblackshear/frigate/pull/21876
|
||||
./ai-edge-litert.patch
|
||||
(fetchpatch {
|
||||
# peewee-migrate 0.14.x compat
|
||||
url = "https://github.com/blakeblackshear/frigate/commit/dde02cadb2168c44e9eb395ddfbb7b169096bd15.patch";
|
||||
excludes = [
|
||||
"docker/main/requirements-wheels.txt"
|
||||
"migrations/031_create_trigger_table.py"
|
||||
"migrations/032_add_password_changed_at.py"
|
||||
];
|
||||
hash = "sha256-RrmwjE4SHJIUOYfqcCtMy9Pht7UXhHcoAZlFQv9aQFw=";
|
||||
})
|
||||
# https://github.com/microsoft/onnxruntime/issues/26717
|
||||
./onnxruntime-compat.patch
|
||||
# https://github.com/blakeblackshear/frigate/pull/22089
|
||||
./proc-cmdline-strip.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
Strip trailing whitespace from process commandlines. This is annoying for exact
|
||||
process matches against Prometheus labels.
|
||||
|
||||
https://github.com/blakeblackshear/frigate/pull/22089
|
||||
|
||||
diff --git a/frigate/util/services.py b/frigate/util/services.py
|
||||
index b31a7eea3..f1e8f0f5f 100644
|
||||
--- a/frigate/util/services.py
|
||||
+++ b/frigate/util/services.py
|
||||
@@ -118,7 +118,7 @@ def get_cpu_stats() -> dict[str, dict]:
|
||||
pid = str(process.info["pid"])
|
||||
try:
|
||||
cpu_percent = process.info["cpu_percent"]
|
||||
- cmdline = process.info["cmdline"]
|
||||
+ cmdline = " ".join(process.info["cmdline"]).rstrip()
|
||||
|
||||
with open(f"/proc/{pid}/stat", "r") as f:
|
||||
stats = f.readline().split()
|
||||
@@ -152,7 +152,7 @@ def get_cpu_stats() -> dict[str, dict]:
|
||||
"cpu": str(cpu_percent),
|
||||
"cpu_average": str(round(cpu_average_usage, 2)),
|
||||
"mem": f"{mem_pct}",
|
||||
- "cmdline": clean_camera_user_pass(" ".join(cmdline)),
|
||||
+ "cmdline": clean_camera_user_pass(cmdline),
|
||||
}
|
||||
except Exception:
|
||||
continue
|
||||
@@ -181,13 +181,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(withFeatureAs true "auto-load-safe-path" (builtins.concatStringsSep ":" safePaths))
|
||||
(withFeature enableDebuginfod "debuginfod")
|
||||
(enableFeature (!stdenv.hostPlatform.isMusl) "nls")
|
||||
]
|
||||
++ optional (!hostCpuOnly) "--enable-targets=all"
|
||||
++ [
|
||||
(enableFeature (
|
||||
!stdenv.hostPlatform.isStatic && !stdenv.hostPlatform.isLoongArch64
|
||||
) "inprocess-agent")
|
||||
]
|
||||
++ optional (!hostCpuOnly) "--enable-targets=all"
|
||||
# Workaround for Apple Silicon, "--target" must be "faked", see eg: https://github.com/Homebrew/homebrew-core/pull/209753
|
||||
++ optional (
|
||||
stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gdk-pixbuf";
|
||||
version = "2.44.4";
|
||||
version = "2.44.5";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@@ -38,14 +38,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ lib.optional withIntrospection "devdoc"
|
||||
++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) "installedTests";
|
||||
|
||||
src =
|
||||
let
|
||||
inherit (finalAttrs) pname version;
|
||||
in
|
||||
fetchurl {
|
||||
url = "mirror://gnome/sources/gdk-pixbuf/${lib.versions.majorMinor version}/gdk-pixbuf-${version}.tar.xz";
|
||||
hash = "sha256-k6Gqw/FCeuc0Vzl1gqLDjQSWOKgBeIzL1fSMpge9vRc=";
|
||||
};
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gdk-pixbuf/${lib.versions.majorMinor finalAttrs.version}/gdk-pixbuf-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-abk+CRObgMDuZhUD1g3rWlh0oxdytRhLnNVGKkEAq2g=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Move installed tests to a separate output
|
||||
@@ -155,7 +151,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome.updateScript {
|
||||
packageName = finalAttrs.pname;
|
||||
packageName = "gdk-pixbuf";
|
||||
versionPolicy = "odd-unstable";
|
||||
};
|
||||
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "gh";
|
||||
version = "2.86.0";
|
||||
version = "2.87.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cli";
|
||||
repo = "cli";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-+MPhDgXIVfYGp5ALI5GjRoeLRRUtNgpzUawxoqR76iE=";
|
||||
hash = "sha256-QPQVsdZy17rNX5ACoKHiJG+f/2CAiBfO3B1ucton0tw=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-pBHEqMgEoR3sWNbQjGBNso7WLP9Rz2gu89Bzu+7jz5c=";
|
||||
vendorHash = "sha256-POrm4lHEO2Eti7dbohKBwXW+DTs22EUZX+tMNUCL3lg=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
|
||||
@@ -5,17 +5,18 @@
|
||||
ninja,
|
||||
python3,
|
||||
gnome,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "gi-docgen";
|
||||
version = "2025.5";
|
||||
version = "2026.1";
|
||||
|
||||
pyproject = false;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gi-docgen/${lib.versions.major version}/gi-docgen-${version}.tar.xz";
|
||||
hash = "sha256-JXmjP/h7Yi0Q0QLJG30OzlBjQLcONNu2UiFj4WyQrKM=";
|
||||
hash = "sha256-wxbWwEaZl2toI5Eqrh+ypqP/olU7Qivoj7VuuIGs9Hk=";
|
||||
};
|
||||
|
||||
depsBuildBuild = [
|
||||
@@ -36,12 +37,17 @@ python3.pkgs.buildPythonApplication rec {
|
||||
typogrify
|
||||
];
|
||||
|
||||
doCheck = false; # no tests
|
||||
# For Python this must be placed in nativeCheckInputs instead of nativeInstallCheckInputs
|
||||
# https://github.com/nixos/nixpkgs/issues/420531
|
||||
nativeCheckInputs = [ versionCheckHook ];
|
||||
# doCheck = false; # no tests - restore this after versionCheckHook can be moved
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
postFixup = ''
|
||||
# Do not propagate Python
|
||||
substituteInPlace $out/nix-support/propagated-build-inputs \
|
||||
--replace "${python3}" ""
|
||||
--replace-fail "${python3}" ""
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
diff -ur a/Makefile b/Makefile
|
||||
--- a/Makefile 2026-02-14 15:58:16.624434564 -0500
|
||||
+++ b/Makefile 2026-02-14 15:59:25.701016105 -0500
|
||||
@@ -4059,9 +4059,9 @@
|
||||
contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)
|
||||
$(AR) $(ARFLAGS) $@ $^
|
||||
|
||||
-contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) GIT-LDFLAGS
|
||||
+contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) $(RUST_LIB) GIT-LDFLAGS
|
||||
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
|
||||
- $(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security -framework CoreFoundation
|
||||
+ $(filter %.o,$^) $(LIB_FILE) $(RUST_LIB) $(EXTLIBS) -framework Security -framework CoreFoundation
|
||||
|
||||
contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS
|
||||
$(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
|
||||
@@ -51,7 +51,7 @@
|
||||
deterministic-host-uname, # trick Makefile into targeting the host platform when cross-compiling
|
||||
doInstallCheck ? !stdenv.hostPlatform.isDarwin, # extremely slow on darwin
|
||||
tests,
|
||||
rustSupport ? false,
|
||||
rustSupport ? lib.meta.availableOn stdenv.hostPlatform rustc,
|
||||
cargo,
|
||||
rustc,
|
||||
}:
|
||||
@@ -61,7 +61,7 @@ assert sendEmailSupport -> perlSupport;
|
||||
assert svnSupport -> perlSupport;
|
||||
|
||||
let
|
||||
version = "2.52.0";
|
||||
version = "2.53.0";
|
||||
svn = subversionClient.override { perlBindings = perlSupport; };
|
||||
gitwebPerlLibs = with perlPackages; [
|
||||
CGI
|
||||
@@ -103,7 +103,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
}.tar.xz"
|
||||
else
|
||||
"https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
|
||||
hash = "sha256-PNj+6G9pqUnLYQ/ujNkmTmhz0H+lhBH2Bgs9YnKe18U=";
|
||||
hash = "sha256-WBi9fYCwYbu9/sikM9YJ3IgYoFmR9zH/xKVh4soYxlM=";
|
||||
};
|
||||
|
||||
outputs = [ "out" ] ++ lib.optional withManual "doc";
|
||||
@@ -130,13 +130,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
url = "https://lore.kernel.org/git/20251201031040.1120091-1-brianmlyles@gmail.com/raw";
|
||||
hash = "sha256-vvhbvg74OIMzfksHiErSnjOZ+W0M/T9J8GOQ4E4wKbU=";
|
||||
})
|
||||
# Fixes t8020 test on big-endian
|
||||
]
|
||||
++ lib.optionals osxkeychainSupport [
|
||||
# Fix build failure on Darwin when building Keychain integration
|
||||
# See https://github.com/git/git/pull/2188 and https://github.com/Homebrew/homebrew-core/pull/266961
|
||||
(fetchurl {
|
||||
name = "last-modified-fix-bug-caused-by-inproper-initialized-memory.patch";
|
||||
url = "https://lore.kernel.org/git/20251128-toon-big-endian-ci-v1-1-80da0f629c1e@iotcl.com/raw";
|
||||
hash = "sha256-WdewOwD7hMhnahhUUEYAlM58tT3MkxUlBa3n8IwrESU=";
|
||||
name = "osxkeychain-define-build-targets-in-toplevel-Makefile.patch";
|
||||
url = "https://lore.kernel.org/git/pull.2046.v2.git.1770775169908.gitgitgadget@gmail.com/raw";
|
||||
hash = "sha256-7jTiMM5XFRDj/srtVf8olW62T/mesqLcyRp3NZJcid8=";
|
||||
})
|
||||
]
|
||||
++ lib.optionals (rustSupport && osxkeychainSupport) [
|
||||
# The above patch doesn’t work with Rust support enabled.
|
||||
./osxkeychain-link-rust_lib.patch
|
||||
]
|
||||
++ lib.optionals withSsh [
|
||||
# Hard-code the ssh executable to ${pkgs.openssh}/bin/ssh instead of
|
||||
# searching in $PATH
|
||||
@@ -277,7 +284,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
make -C contrib/diff-highlight "''${flagsArray[@]}"
|
||||
''
|
||||
+ lib.optionalString osxkeychainSupport ''
|
||||
make -C contrib/credential/osxkeychain "''${flagsArray[@]}"
|
||||
make -C contrib/credential/osxkeychain COMPUTE_HEADER_DEPENDENCIES=no "''${flagsArray[@]}"
|
||||
''
|
||||
+ lib.optionalString withLibsecret ''
|
||||
make -C contrib/credential/libsecret "''${flagsArray[@]}"
|
||||
|
||||
@@ -19,7 +19,7 @@ python3Packages.buildPythonApplication rec {
|
||||
};
|
||||
|
||||
build-system = with python3Packages; [
|
||||
setuptools
|
||||
flit-core
|
||||
ruamel-yaml
|
||||
flit-core
|
||||
];
|
||||
@@ -33,6 +33,8 @@ python3Packages.buildPythonApplication rec {
|
||||
requests
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [ "globus-sdk" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
nativeCheckInputs = with python3Packages; [
|
||||
@@ -52,10 +54,6 @@ python3Packages.buildPythonApplication rec {
|
||||
versionCheckHook
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"globus-sdk"
|
||||
];
|
||||
|
||||
versionCheckProgramArg = "version";
|
||||
|
||||
postInstall = ''
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
From ab20ba112e6fa5117bfeadde199fdc6c18cbdfb5 Mon Sep 17 00:00:00 2001
|
||||
From: OPNA2608 <opna2608@protonmail.com>
|
||||
Date: Mon, 12 Jan 2026 16:41:53 +0100
|
||||
Subject: [PATCH] Look for external gtest build, if not building in-tree
|
||||
|
||||
---
|
||||
CMakeLists.txt | 12 ++++++++++++
|
||||
gtests/CMakeLists.txt | 8 +++-----
|
||||
2 files changed, 15 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1e7d3ec9..ecda9c53 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -321,6 +321,18 @@ if(ENABLE_GLSLANG_BINARIES)
|
||||
add_subdirectory(StandAlone)
|
||||
endif()
|
||||
|
||||
+option(ALLOW_EXTERNAL_GTEST "Allows to build against installed googletest. This is unsupported if the commit isn't the one in known_good.json")
|
||||
+set(GMOCK_TARGET gmock)
|
||||
+if(NOT TARGET ${GMOCK_TARGET})
|
||||
+ if(ALLOW_EXTERNAL_GTEST)
|
||||
+ message(STATUS "Trying to find local googletest")
|
||||
+ find_package(GTest)
|
||||
+ if(TARGET GTest::gmock)
|
||||
+ set(GMOCK_TARGET GTest::gmock)
|
||||
+ endif()
|
||||
+ endif()
|
||||
+endif()
|
||||
+
|
||||
if(GLSLANG_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(gtests)
|
||||
diff --git a/gtests/CMakeLists.txt b/gtests/CMakeLists.txt
|
||||
index 27a5500c..21125775 100644
|
||||
--- a/gtests/CMakeLists.txt
|
||||
+++ b/gtests/CMakeLists.txt
|
||||
@@ -32,7 +32,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
if(GLSLANG_TESTS)
|
||||
- if(TARGET gmock)
|
||||
+ if(TARGET ${GMOCK_TARGET})
|
||||
message(STATUS "Google Mock found - building tests")
|
||||
|
||||
set(TEST_SOURCES
|
||||
@@ -76,9 +76,7 @@ if(GLSLANG_TESTS)
|
||||
PRIVATE GLSLANG_TEST_BUILD=1)
|
||||
target_include_directories(glslangtests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
- ${PROJECT_SOURCE_DIR}
|
||||
- ${gmock_SOURCE_DIR}/include
|
||||
- ${gtest_SOURCE_DIR}/include)
|
||||
+ ${PROJECT_SOURCE_DIR})
|
||||
|
||||
if(ENABLE_OPT)
|
||||
target_link_libraries(glslangtests
|
||||
@@ -90,7 +88,7 @@ if(GLSLANG_TESTS)
|
||||
glslang glslang-default-resource-limits
|
||||
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
|
||||
|
||||
- target_link_libraries(glslangtests PRIVATE ${LIBRARIES} gmock)
|
||||
+ target_link_libraries(glslangtests PRIVATE ${LIBRARIES} ${GMOCK_TARGET})
|
||||
|
||||
# The TARGET_RUNTIME_DLL_DIRS feature requires CMake 3.27 or greater.
|
||||
if(WIN32 AND BUILD_SHARED_LIBS AND CMAKE_VERSION VERSION_LESS "3.27")
|
||||
--
|
||||
2.51.2
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
ctestCheckHook,
|
||||
gtest,
|
||||
python3,
|
||||
spirv-headers,
|
||||
spirv-tools,
|
||||
@@ -10,15 +12,21 @@
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "glslang";
|
||||
version = "16.1.0";
|
||||
version = "16.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "glslang";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-cEREniYgSd62mnvKaQkgs69ETL5pLl5Gyv3hKOtSv3w=";
|
||||
hash = "sha256-2uWnZZNGdZorHaiLzMb/rpM6bL9oBClKqiFkUH3krJQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Allow building against our already-built gtest, without eating a rebuild
|
||||
# https://github.com/KhronosGroup/glslang/pull/4140
|
||||
./external-gtest.patch
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"bin"
|
||||
"out"
|
||||
@@ -35,12 +43,32 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
spirv-headers
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
ctestCheckHook
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
gtest
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
|
||||
(lib.cmakeBool "BUILD_EXTERNAL" false)
|
||||
(lib.cmakeBool "ALLOW_EXTERNAL_SPIRV_TOOLS" true)
|
||||
(lib.cmakeBool "ALLOW_EXTERNAL_GTEST" finalAttrs.finalPackage.doCheck)
|
||||
];
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
disabledTests =
|
||||
# CompileToAstTest.FromFile/array_frag looks for result of UB, expected output is LE
|
||||
# https://github.com/KhronosGroup/glslang/issues/2797
|
||||
# GlslNonSemanticShaderDebugInfoSpirv13Test.FromFile/spv_debuginfo_coopmatKHR_comp has endianness-issues
|
||||
# https://github.com/KhronosGroup/glslang/issues/4145
|
||||
lib.optionals (!stdenv.hostPlatform.isLittleEndian) [
|
||||
"glslang-gtests"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# add a symlink for backwards compatibility
|
||||
ln -s $bin/bin/glslang $bin/bin/glslangValidator
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
version ?
|
||||
# This is a workaround for update-source-version to be able to update this
|
||||
let
|
||||
_version = "0-unstable-2025-10-08";
|
||||
_version = "0-unstable-2025-12-01";
|
||||
in
|
||||
_version,
|
||||
rev ? "07d3c6f4dc290fae5ca6152ebcb37d6815c411ab",
|
||||
hash ? "sha256-kIPhfuJBQSISdRjloe0N2JrqvuVrEkNijb92/9zSE9I=",
|
||||
rev ? "6e0b557db44b3c164094e57687d20ba036a80667",
|
||||
hash ? "sha256-04h38X/hqWwMiAOVsVu4OUrt8N+S7yS/JXc5yvRGo1I=",
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
runtimeShell,
|
||||
}:
|
||||
|
||||
# Note: this package is used for bootstrapping fetchurl, and thus
|
||||
@@ -53,6 +54,19 @@ stdenv.mkDerivation {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
fixupPhase = ''
|
||||
runHook preFixup
|
||||
if [[ -z "''${dontPatchShebangs-}" ]]; then
|
||||
substituteInPlace $out/config.guess \
|
||||
--replace-fail '#! /bin/sh' '#!${runtimeShell}'
|
||||
substituteInPlace $out/config.sub \
|
||||
--replace-fail '#! /bin/sh' '#!${runtimeShell}'
|
||||
fi
|
||||
runHook postFixup
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
meta = {
|
||||
description = "Attempt to guess a canonical system name";
|
||||
homepage = "https://savannah.gnu.org/projects/config";
|
||||
|
||||
@@ -62,11 +62,11 @@ in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnutls";
|
||||
version = "3.8.11";
|
||||
version = "3.8.12";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnupg/gnutls/v${lib.versions.majorMinor version}/gnutls-${version}.tar.xz";
|
||||
hash = "sha256-kb0jxKhuvGFS6BMD0gz2zq65e8j4QmbQ+uxuKfF7qiA=";
|
||||
hash = "sha256-p7NBQhv9RZrPejdMpK87ngZgjc1715Kyv0cL6gErjlE=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
# nixpkgs-update: no auto update
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "grpc";
|
||||
version = "1.76.0"; # N.B: if you change this, please update:
|
||||
version = "1.78.0"; # N.B: if you change this, please update:
|
||||
# pythonPackages.grpcio
|
||||
# pythonPackages.grpcio-channelz
|
||||
# pythonPackages.grpcio-health-checking
|
||||
@@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "grpc";
|
||||
repo = "grpc";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-f25ccZC0pJw00ETgxBtXU6+0OnlJsV7zXjK/ayiCIJY=";
|
||||
hash = "sha256-hupso9w++lYtAMoLS/qVmUYqZyQAX3rH0I8zCLyBo40=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ python3.pkgs.buildPythonApplication (finalAttrs: {
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"irc"
|
||||
"ruamel.yaml"
|
||||
"mautrix"
|
||||
];
|
||||
|
||||
dependencies = with python3.pkgs; [
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
boost,
|
||||
eigen,
|
||||
hdf5,
|
||||
mpiSupport ? hdf5.mpiSupport,
|
||||
mpi ? hdf5.mpi,
|
||||
@@ -14,20 +12,18 @@ assert mpiSupport -> mpi != null;
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "highfive${lib.optionalString mpiSupport "-mpi"}";
|
||||
version = "2.10.1";
|
||||
version = "3.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "BlueBrain";
|
||||
repo = "HighFive";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-Nv+nbel/xGlGTB8sKF0EM1xwz/ZEri5uGB7ma6Ba6fo=";
|
||||
owner = "highfive-devs";
|
||||
repo = "highfive";
|
||||
tag = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-BuDvoQgMdZIDHYwXqigM78DQ+WtT+K0FdXERMUjmXc0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
eigen
|
||||
hdf5
|
||||
];
|
||||
|
||||
@@ -36,19 +32,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DHIGHFIVE_USE_BOOST=ON"
|
||||
"-DHIGHFIVE_USE_EIGEN=ON"
|
||||
"-DHIGHFIVE_EXAMPLES=OFF"
|
||||
"-DHIGHFIVE_UNIT_TESTS=OFF"
|
||||
"-DHIGHFIVE_USE_INSTALL_DEPS=ON"
|
||||
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
|
||||
]
|
||||
++ (lib.optionals mpiSupport [ "-DHIGHFIVE_PARALLEL_HDF5=ON" ]);
|
||||
++ (lib.optionals mpiSupport [ "-DHDF5_IS_PARALLEL=ON" ]);
|
||||
|
||||
meta = {
|
||||
description = "Header-only C++ HDF5 interface";
|
||||
homepage = "https://github.com/highfive-devs/highfive";
|
||||
changelog = "https://github.com/highfive-devs/highfive/blob/${finalAttrs.src.tag}/CHANGELOG.md";
|
||||
license = lib.licenses.boost;
|
||||
homepage = "https://bluebrain.github.io/HighFive/";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ robertodr ];
|
||||
};
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hwdata";
|
||||
version = "0.403";
|
||||
version = "0.404";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vcrhonek";
|
||||
repo = "hwdata";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-90Op2armm7Fg0Eyj5+Md0IMos915wqjv8cqTYVJF/NA=";
|
||||
hash = "sha256-/OHPLONJF66HN2Xmbo5Ifi+VgevmbQhpsC1RXMKkDBk=";
|
||||
};
|
||||
|
||||
doCheck = false; # this does build machine-specific checks (e.g. enumerates PCI bus)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
networkmanager,
|
||||
nix-update-script,
|
||||
python3,
|
||||
pywal,
|
||||
pywal16,
|
||||
stdenv,
|
||||
swww,
|
||||
upower,
|
||||
@@ -79,7 +79,7 @@ ags.bundle {
|
||||
libsoup_3
|
||||
matugen
|
||||
networkmanager
|
||||
pywal
|
||||
pywal16
|
||||
swww
|
||||
upower
|
||||
wireplumber
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "iana-etc";
|
||||
version = "20250505";
|
||||
version = "20251215";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz";
|
||||
sha256 = "sha256-p+VTQMtuhMu64bPK86dRMA7qpk8PtlgI+/vAuiyljXw=";
|
||||
sha256 = "sha256-BUGhVHvWSdFJdqaoPasLt87lTUFVF2B7X7sfigwrJss=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
||||
+10
-4
@@ -54,6 +54,7 @@
|
||||
potrace,
|
||||
coreutils,
|
||||
curl,
|
||||
versionCheckHook,
|
||||
testers,
|
||||
nixos-icons,
|
||||
perlPackages,
|
||||
@@ -85,13 +86,13 @@ in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "imagemagick";
|
||||
version = "7.1.2-12";
|
||||
version = "7.1.2-13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ImageMagick";
|
||||
repo = "ImageMagick";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-0X8Zpr4frknRbWzAu1nprok2ceScTHV8d4+ktnBpQF0=";
|
||||
hash = "sha256-meADRjoV1c48laD35TuWAwuE95L90agROuuKBd++Kn8=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
@@ -173,7 +174,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
configDestination=($out/share/ImageMagick-*)
|
||||
grep -v '/nix/store' $dev/lib/ImageMagick-*/config-Q16HDRI/configure.xml > $configDestination/configure.xml
|
||||
for file in "$dev"/bin/*-config; do
|
||||
substituteInPlace "$file" --replace pkg-config \
|
||||
substituteInPlace "$file" --replace-fail "$PKG_CONFIG" \
|
||||
"PKG_CONFIG_PATH='$dev/lib/pkgconfig' '$(command -v $PKG_CONFIG)'"
|
||||
done
|
||||
''
|
||||
@@ -183,8 +184,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
done
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
|
||||
passthru.tests = {
|
||||
version = testers.testVersion { package = finalAttrs.finalPackage; };
|
||||
inherit nixos-icons;
|
||||
inherit (perlPackages) ImageMagick;
|
||||
inherit (python3.pkgs) img2pdf willow;
|
||||
@@ -44,11 +44,11 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "imlib2";
|
||||
version = "1.12.5";
|
||||
version = "1.12.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/enlightenment/imlib2-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-+iMV8oN5tDCm5mBbQoSwe+BqPvQi1PXhybskcUxM9t0=";
|
||||
hash = "sha256-JQ+XUvadxSLlKagaqpOVcF9/wxL/JFPl3lmsK6HyhY8=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -17,6 +17,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
pyproject = true;
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"huggingface-hub"
|
||||
"numpy"
|
||||
"pillow"
|
||||
"pydantic-settings"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
fetchpatch,
|
||||
ncurses,
|
||||
perl,
|
||||
help2man,
|
||||
@@ -9,26 +10,38 @@
|
||||
libxcrypt,
|
||||
util-linux,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "inetutils";
|
||||
version = "2.6";
|
||||
version = "2.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/inetutils/inetutils-${version}.tar.xz";
|
||||
hash = "sha256-aL7b/q9z99hr4qfZm8+9QJPYKfUncIk5Ga4XTAsjV8o=";
|
||||
url = "mirror://gnu/inetutils/inetutils-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-oVa+HN48XA/+/CYhgNk2mmBIQIeQeqVUxieH0vQOwIY=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"apparmor"
|
||||
"info"
|
||||
"man"
|
||||
];
|
||||
|
||||
patches = [
|
||||
# https://git.congatec.com/yocto/meta-openembedded/commit/3402bfac6b595c622e4590a8ff5eaaa854e2a2a3
|
||||
./inetutils-1_9-PATH_PROCNET_DEV.patch
|
||||
|
||||
./tests-libls.sh.patch
|
||||
(if stdenv.isDarwin then ./tests-libls-2.sh.patch else ./tests-libls.sh.patch)
|
||||
|
||||
(fetchpatch {
|
||||
name = "CVE-2026-24061_1.patch";
|
||||
url = "https://codeberg.org/inetutils/inetutils/commit/fd702c02497b2f398e739e3119bed0b23dd7aa7b.patch";
|
||||
hash = "sha256-d/FdQyLD0gYr+erFqKDr8Okf04DFXknFaN03ls2aonQ=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "CVE-2026-24061_2.patch";
|
||||
url = "https://codeberg.org/inetutils/inetutils/commit/ccba9f748aa8d50a38d7748e2e60362edd6a32cc.patch";
|
||||
hash = "sha256-ws+ed5vb7kVMHEbqK7yj6FUT355pTv2RZEYuXs5M7Io=";
|
||||
})
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
@@ -64,6 +77,8 @@ stdenv.mkDerivation rec {
|
||||
]
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin "--disable-servers";
|
||||
|
||||
${if stdenv.isDarwin then "hardeningDisable" else null} = [ "format" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
installFlags = [ "SUIDMODE=" ];
|
||||
@@ -110,4 +125,4 @@ stdenv.mkDerivation rec {
|
||||
*/
|
||||
priority = (util-linux.meta.priority or lib.meta.defaultPriority) + 1;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
tests: Remove bogus test for unsorted file listing and tests for -u and -c, which fail on apfs.
|
||||
|
||||
Minimized from what Debian applies:
|
||||
https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/local/0006-tests-Remove-bogus-test-for-unsorted-file-listing.patch?id=8ab7f49fe5cf194e989ae6ae6a78eb65397c5778
|
||||
--- a/tests/libls.sh
|
||||
+++ b/tests/libls.sh
|
||||
@@ -94 +93,0 @@ REPLY_C=`$LS -C $LSDIR`
|
||||
-REPLY_Cf=`$LS -Cf $LSDIR`
|
||||
@@ -108,2 +106,0 @@ REPLY_n=`$LS -n $LSDIR`
|
||||
-REPLY_Ccts=`$LS -Ccts $LSDIR`
|
||||
-REPLY_Cuts=`$LS -Cuts $LSDIR`
|
||||
@@ -133,2 +129,0 @@ test `echo "$diff" | $GREP -c -v '^[.]\{1,2\}$'` -eq 0 ||
|
||||
-test x"$REPLY_C" != x"$REPLY_Cf" ||
|
||||
- { errno=1; echo >&2 'Failed to disable sorting with "-f".'; }
|
||||
@@ -153,3 +146,0 @@ test x"$REPLY_l" != x"$REPLY_n" ||
|
||||
-test x"$REPLY_Ccts" != x"$REPLY_Cuts" ||
|
||||
- { errno=1; echo >&2 'Failed to distinguish "-u" from "-c".'; }
|
||||
-
|
||||
@@ -4,7 +4,7 @@
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
makeWrapper,
|
||||
boost,
|
||||
boost188,
|
||||
xz,
|
||||
libiconv,
|
||||
withGog ? false,
|
||||
@@ -25,7 +25,9 @@ stdenv.mkDerivation {
|
||||
|
||||
buildInputs = [
|
||||
xz
|
||||
boost
|
||||
# pin to oplder boost188 as boost189
|
||||
# fails to find cmake bits: https://github.com/dscharrer/innoextract/pull/199
|
||||
boost188
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
||||
|
||||
|
||||
@@ -3,28 +3,34 @@
|
||||
stdenv,
|
||||
fetchurl,
|
||||
gettext,
|
||||
meson,
|
||||
ninja,
|
||||
python3,
|
||||
testers,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "iso-codes";
|
||||
version = "4.19.0";
|
||||
version = "4.20.1";
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
with finalAttrs;
|
||||
"https://salsa.debian.org/iso-codes-team/iso-codes/-/archive/v${version}/${pname}-v${version}.tar.gz";
|
||||
hash = "sha256-SxQ6iR/rfRu2TkT+PvJT7za6EYXR0SnBQlM43G5G4n0=";
|
||||
"https://salsa.debian.org/iso-codes-team/iso-codes/-/archive/v${version}/iso-codes-v${version}.tar.gz";
|
||||
hash = "sha256-LX2fYISrnObFNM5xo91RRLbkdPPJdhZFmoj3P0SmS/8=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs scripts
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
meson
|
||||
ninja
|
||||
python3
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.tests = {
|
||||
pkg-config = testers.hasPkgConfigModules {
|
||||
package = finalAttrs.finalPackage;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
# Optional Dependencies
|
||||
dbus ? null,
|
||||
expat, # for dbus
|
||||
libffado ? null,
|
||||
alsa-lib ? null,
|
||||
|
||||
@@ -66,6 +67,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
optLibffado
|
||||
optAlsaLib
|
||||
]
|
||||
++ lib.optionals (optDbus != null) [ expat ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
aften
|
||||
]
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "jansson";
|
||||
version = "2.14.1";
|
||||
version = "2.15.0";
|
||||
|
||||
outputs = [
|
||||
"dev"
|
||||
@@ -20,8 +20,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
src = fetchFromGitHub {
|
||||
owner = "akheron";
|
||||
repo = "jansson";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-ct/EzRDrHkZrCcm98XGCbjbOM2h3AAMldPoTWA5+dAE=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-s7g1QvJjl9LsWw+VZsTQHCoEgw2Ad9+8V0b2NFml5rw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
meta = {
|
||||
description = "C library for encoding, decoding and manipulating JSON data";
|
||||
homepage = "https://github.com/akheron/jansson";
|
||||
changelog = "https://github.com/akheron/jansson/raw/${finalAttrs.src.rev}/CHANGES";
|
||||
changelog = "https://github.com/akheron/jansson/raw/${finalAttrs.src.tag}/CHANGES";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ getchoo ];
|
||||
platforms = lib.platforms.all;
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
https://gitlab.isc.org/isc-projects/kea/-/commit/b03071ba6912a08e4cc4cb4db50d9624ce86f41e
|
||||
|
||||
From b03071ba6912a08e4cc4cb4db50d9624ce86f41e Mon Sep 17 00:00:00 2001
|
||||
From: Francis Dupont <fdupont@isc.org>
|
||||
Date: Fri, 29 Aug 2025 00:40:03 +0200
|
||||
Subject: [PATCH] [#4085] Proposed update
|
||||
|
||||
---
|
||||
meson.build | 3 ++-
|
||||
src/lib/asiodns/io_fetch.h | 1 +
|
||||
src/lib/asiolink/interval_timer.h | 1 +
|
||||
3 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 434abf58313..fbd76dce5e5 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -189,7 +189,7 @@ message(f'Detected system "@SYSTEM@".')
|
||||
|
||||
#### Dependencies
|
||||
|
||||
-boost_dep = dependency('boost', version: '>=1.66', modules: ['system'])
|
||||
+boost_dep = dependency('boost', version: '>=1.66')
|
||||
dl_dep = dependency('dl')
|
||||
threads_dep = dependency('threads')
|
||||
add_project_dependencies(boost_dep, dl_dep, threads_dep, language: ['cpp'])
|
||||
@@ -200,6 +200,7 @@ boost_headers = [
|
||||
'boost/asio/coroutine.hpp',
|
||||
'boost/asio/io_context.hpp',
|
||||
'boost/asio/ip/address.hpp',
|
||||
+ 'boost/asio/deadline_timer.hpp',
|
||||
'boost/asio/signal_set.hpp',
|
||||
'boost/circular_buffer.hpp',
|
||||
'boost/date_time/posix_time/posix_time_types.hpp',
|
||||
diff --git a/src/lib/asiodns/io_fetch.h b/src/lib/asiodns/io_fetch.h
|
||||
index 6fcbb78abb0..3053cc2e0a2 100644
|
||||
--- a/src/lib/asiodns/io_fetch.h
|
||||
+++ b/src/lib/asiodns/io_fetch.h
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <util/buffer.h>
|
||||
|
||||
#include <boost/asio/coroutine.hpp>
|
||||
+#include <boost/asio/deadline_timer.hpp>
|
||||
#include <boost/shared_array.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
||||
diff --git a/src/lib/asiolink/interval_timer.h b/src/lib/asiolink/interval_timer.h
|
||||
index 0b1c10c7882..790d132b42a 100644
|
||||
--- a/src/lib/asiolink/interval_timer.h
|
||||
+++ b/src/lib/asiolink/interval_timer.h
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef ASIOLINK_INTERVAL_TIMER_H
|
||||
#define ASIOLINK_INTERVAL_TIMER_H 1
|
||||
|
||||
+#include <boost/asio/deadline_timer.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <functional>
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -38,6 +38,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
patches = [
|
||||
./dont-create-system-paths.patch
|
||||
# backport of an upstream fix for boost-1.89:
|
||||
# https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2771
|
||||
./boost-1.89.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lcms2";
|
||||
version = "2.17";
|
||||
version = "2.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/lcms/lcms2-${version}.tar.gz";
|
||||
hash = "sha256-0Rr1aeQqG6oWUNIK1h0S5Br0/q1Kp5ZKAfk7CLU6sHQ=";
|
||||
hash = "sha256-7me+NWb0WTYsHuCU/eLBWdM/oDkKpO1fWvZ2+eUAQ0c=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -73,6 +73,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
./patches/0016-Add-dyldinfo-to-the-ld64-build.patch
|
||||
./patches/0017-Fix-dyldinfo-build.patch
|
||||
./patches/0018-Use-STL-containers-instead-of-LLVM-containers.patch
|
||||
|
||||
# Fix zippered versions on macOS 26+. Part of upstream ld64-956.6. Remove on next version bump.
|
||||
# https://github.com/apple-oss-distributions/ld64/commit/1a4389663d65d6630e4b3e31ace2a86b6183b452
|
||||
./patches/0019-Fix-zippered-versions-macos-26.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/ld/Options.cpp b/src/ld/Options.cpp
|
||||
--- a/src/ld/Options.cpp
|
||||
+++ b/src/ld/Options.cpp
|
||||
@@ -4882,7 +4885,8 @@ void Options::reconfigureDefaults()
|
||||
uint32_t iOSMacOSMajorVersion = (iOSMacVersion >> 16) & 0xFFFF;
|
||||
|
||||
// macOS 11 -> iOSMac 14, and so on
|
||||
- uint32_t newMajorVersion = macOSMajorVersion + 3;
|
||||
+ uint32_t newMajorVersion = macOSMajorVersion < 26 ? macOSMajorVersion + 3 : macOSMajorVersion;
|
||||
+ // rdar://154107557 (ld64 fix handling of zippered versions for macOS 26+)
|
||||
if ( newMajorVersion > iOSMacOSMajorVersion ) {
|
||||
uint32_t newVersion = newMajorVersion << 16;
|
||||
std::string oldVersionString = getVersionString32(iOSMacVersion);
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "less";
|
||||
version = "685";
|
||||
version = "691";
|
||||
|
||||
# `less` is provided by the following sources:
|
||||
# - meta.homepage
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# homepage, and only those not marked as beta.
|
||||
src = fetchurl {
|
||||
url = "https://www.greenwoodsoftware.com/less/less-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-JwEEHnZ+aX7kIM4IJWQc7cjyC1FXar6Z2SwWZtMy6dw=";
|
||||
hash = "sha256-iLSA7aG7T5IAn3losjGJ6vEykhH1o1FYaeEz0oYVTSU=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libadwaita";
|
||||
version = "1.8.3";
|
||||
version = "1.8.4";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "GNOME";
|
||||
repo = "libadwaita";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-IrniaMcsM1ZADNNgAmT3ELbkcwPTpYIBf8lOY4TaLd0=";
|
||||
hash = "sha256-Dj1QJatjnK7Rb+SZLiRO0eHERzqmoq01n8fUE7SVWMI=";
|
||||
};
|
||||
|
||||
depsBuildBuild = [
|
||||
|
||||
@@ -41,6 +41,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"LINKED_LIB_EXT="
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Key derivation function that was selected as the winner of the Password Hashing Competition in July 2015";
|
||||
longDescription = ''
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user