more patches
treefmt / nix fmt (pull_request) Successful in 2s
build_systems / prebuild-common-x86-64-v3 (pull_request) Successful in 21s
build_systems / build-portal-1 (pull_request) Successful in 18s
test ebook search / test-ebook-search (pull_request) Successful in 1m6s
build_systems / build-bob (pull_request) Successful in 1m58s
build_systems / build-rhapsody-in-green (pull_request) Failing after 38m40s
build_systems / build-jeeves (pull_request) Successful in 8h2m34s
build_systems / build-brain (pull_request) Failing after 12h0m0s

This commit is contained in:
2026-10-02 16:26:10 -04:00
parent bed7804f22
commit d317060926
11 changed files with 208 additions and 0 deletions
@@ -0,0 +1,19 @@
Subject: [PATCH] Compare font content in the overlap-removal regression
PFA_SKIP ends with a separator, producing an empty prefix that matches every
line. Remove the empty prefix for this test so glyph differences are checked,
and assert that tx exits successfully before inspecting the output.
--- a/tests/tx_test.py
+++ b/tests/tx_test.py
@@ -1064,6 +1064,8 @@
output_path = get_temp_file_path()
args = [TOOL, '-t1', '+V', '-o', output_path, input_path]
- subprocess.call(args)
- assert differ([expected_path, output_path, '-s', PFA_SKIP[0]])
+ subprocess.check_call(args)
+ # An empty skip prefix matches every line and hides font differences.
+ skip_headers = SPLIT_MARKER.join(filter(None, PFA_SKIP[0].split(SPLIT_MARKER)))
+ assert differ([expected_path, output_path, '-s', skip_headers])
@@ -0,0 +1,10 @@
{ afdko }:
afdko.overridePythonAttrs (old: {
# FMA changes overlap-removal coordinates by 0.01 units on x86-64-v3.
# Separate multiply/add rounding reproduces the reference Type 1 font exactly.
env = (old.env or { }) // {
NIX_CFLAGS_COMPILE = (old.env.NIX_CFLAGS_COMPILE or "") + " -ffp-contract=off";
};
patches = (old.patches or [ ]) ++ [ ./check-overlap-font-content.patch ];
})
@@ -0,0 +1,19 @@
{ prev }:
let
buildRedistHook = prev.runCommand "buildRedistHook.bash" { } ''
cp ${prev.path}/pkgs/development/cuda-modules/buildRedist/buildRedistHook.bash "$out"
chmod u+w "$out"
patch "$out" < ${./propagated-build-output-arrays.patch}
'';
in
prev.cudaPackages_12_9.overrideScope (
_cudaFinal: cudaPrev: {
buildRedist =
args:
(cudaPrev.buildRedist args).overrideAttrs (old: {
nativeBuildInputs = map (
input: if builtins.baseNameOf input == "buildRedistHook.bash" then buildRedistHook else input
) old.nativeBuildInputs;
});
}
)
@@ -0,0 +1,44 @@
Subject: [PATCH] Preserve structured CUDA output arrays
The multiple-outputs hook now accepts arrays. The old compatibility export
collapses include and lib into one array element, breaking indirect expansion.
Keep the array and iterate over each output when propagating to out.
--- a/buildRedistHook.bash
+++ b/buildRedistHook.bash
@@ -23,9 +23,6 @@
postInstallCheckHooks+=(checkCudaNonEmptyOutputs)
nixLog "added checkCudaNonEmptyOutputs to postInstallCheckHooks"
-
- preFixupHooks+=(fixupPropagatedBuildOutputsForMultipleOutputs)
- nixLog "added fixupPropagatedBuildOutputsForMultipleOutputs to preFixupHooks"
postFixupHooks+=(fixupCudaPropagatedBuildOutputsToOut)
nixLog "added fixupCudaPropagatedBuildOutputsToOut to postFixupHooks"
@@ -193,16 +190,6 @@
return 0
}
-# TODO(@connorbaker): https://github.com/NixOS/nixpkgs/issues/323126.
-# _multioutPropagateDev() currently expects a space-separated string rather than an array.
-# NOTE: Because _multioutPropagateDev is a postFixup hook, we correct it in preFixup.
-fixupPropagatedBuildOutputsForMultipleOutputs() {
- nixLog "converting propagatedBuildOutputs to a space-separated string"
- # shellcheck disable=SC2124
- export propagatedBuildOutputs="${propagatedBuildOutputs[@]}"
- return 0
-}
-
# The multiple outputs setup hook only propagates build outputs to dev.
# We want to propagate them to out as well, in case the user interpolates
# the package into a string -- in such a case, the dev output is not selected
@@ -217,7 +204,7 @@
mkdir -p "${out:?}/nix-support"
# NOTE: We must use printWords to ensure the output is a single line.
- for output in $propagatedBuildOutputs; do
+ for output in "${propagatedBuildOutputs[@]}"; do
# Propagate the other components to the out output
nixLog "adding ${!output:?} to propagatedBuildInputs of ${out:?}"
printWords "${!output:?}" >>"${out:?}/nix-support/propagated-build-inputs"
@@ -1,11 +1,16 @@
_final: prev:
(import ./abseil { inherit prev; })
// {
cudaPackages_12_9 = import ./cuda { inherit prev; };
trunk = import ./trunk { inherit (prev) trunk jq; };
gnutls = import ./gnutls { inherit (prev) gnutls; };
prometheus = import ./prometheus { inherit (prev) prometheus; };
zopfli = import ./zopfli { inherit (prev) zopfli; };
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(_pythonFinal: pythonPrev: {
afdko = import ./afdko { inherit (pythonPrev) afdko; };
psutil = import ./psutil { inherit (pythonPrev) psutil; };
pytest-xdist = import ./pytest-xdist { inherit (pythonPrev) pytest-xdist; };
scipy = import ./scipy { inherit (pythonPrev) scipy; };
})
@@ -0,0 +1,4 @@
{ psutil }:
psutil.overridePythonAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./heap-info-zero-mmap.patch ];
})
@@ -0,0 +1,17 @@
Subject: [PATCH] Allow an empty mmap allocation total in heap_info
The allocator may satisfy all live allocations from the heap. A zero
mmap_used value is valid and depends on the worker allocation history.
Keep the heap and platform checks without requiring an mmap allocation.
--- a/tests/test_system.py
+++ b/tests/test_system.py
@@ -267,6 +267,7 @@
if MACOS:
assert m.mmap_used == 0 # not supported
else:
- assert m.mmap_used > 0
+ # A process can have no live mmap-backed malloc allocations.
+ assert m.mmap_used >= 0
if WINDOWS:
assert m.heap_count >= 0
@@ -0,0 +1,21 @@
{ trunk, jq }:
trunk.overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ jq ];
# Patch the bundled libdeflate before Cargo validates its vendor checksums.
postPatch = (old.postPatch or "") + ''
libdeflateVendors=( "$cargoDepsCopy"/source-*/libdeflate-sys-1.23.1 )
if [ "''${#libdeflateVendors[@]}" -ne 1 ] || [ ! -d "''${libdeflateVendors[0]}" ]; then
echo "Expected exactly one vendored libdeflate-sys 1.23.1" >&2
exit 1
fi
libdeflateVendor="''${libdeflateVendors[0]}"
patch -d "$libdeflateVendor/libdeflate" -p1 < ${./libdeflate-gcc16.patch}
libdeflateHeader=libdeflate/lib/x86/cpu_features.h
libdeflateChecksum=$(sha256sum "$libdeflateVendor/$libdeflateHeader" | cut -d ' ' -f 1)
jq --arg path "$libdeflateHeader" --arg hash "$libdeflateChecksum" \
'.files[$path] = $hash' "$libdeflateVendor/.cargo-checksum.json" \
> "$libdeflateVendor/.cargo-checksum.json.new"
mv "$libdeflateVendor/.cargo-checksum.json.new" "$libdeflateVendor/.cargo-checksum.json"
'';
})
@@ -0,0 +1,33 @@
From 2a3762cf736aff9aa5dda329fdec3c08a816eb9b Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@gmail.com>
Date: Tue, 20 May 2025 21:18:28 +0100
Subject: [PATCH] lib/x86/cpu_features.h: drop evex512 on gcc-16
gcc-16 `master` branch dropped support for `evex512` as:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=c052a6f4a1c803cb92147ff98fb91cf3511e0856
As a result libdeflate build started failing as:
In file included from /build/source/lib/adler32.c:28:
/build/source/lib/x86/adler32_template.h:135:12: error: attribute 'target' argument 'no-evex512' is unknown
135 | ADD_SUFFIX(reduce_to_32bits)(vec_t v_s1, vec_t v_s2, u32 *s1_p, u32 *s2_p)
| ^~~~~~~~~~~~~~~~
The change adds upper build to `evex512` for `gcc`.
---
lib/x86/cpu_features.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/x86/cpu_features.h b/lib/x86/cpu_features.h
index fbfdb0eb..f9d69d72 100644
--- a/lib/x86/cpu_features.h
+++ b/lib/x86/cpu_features.h
@@ -165,7 +165,7 @@ static inline u32 get_x86_cpu_features(void) { return 0; }
# define HAVE_AVXVNNI(features) ((features) & X86_CPU_FEATURE_AVXVNNI)
#endif
-#if (GCC_PREREQ(14, 0) || CLANG_PREREQ(18, 0, 18000000)) \
+#if ((GCC_PREREQ(14, 0) && !(GCC_PREREQ(16, 0))) || CLANG_PREREQ(18, 0, 18000000)) \
&& !defined(__EVEX512__) /* avoid subtracting the evex512 feature */
# define EVEX512 ",evex512" /* needed to override potential -mno-evex512 */
# define NO_EVEX512 ",no-evex512"
@@ -0,0 +1,4 @@
{ zopfli }:
zopfli.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./unaligned-match-loads.patch ];
})
@@ -0,0 +1,32 @@
Subject: [PATCH] Read unaligned match buffers with memcpy
Byte buffers need not satisfy integer alignment or aliasing requirements.
GCC 16 with x86-64-v3 vectorizes the cast loads using aligned AVX reads,
causing a segmentation fault. Copy into local integers instead.
--- a/src/zopfli/lz77.c
+++ b/src/zopfli/lz77.c
@@ -302,13 +302,20 @@
if (sizeof(size_t) == 8) {
/* 8 checks at once per array bounds check (size_t is 64-bit). */
- while (scan < safe_end && *((size_t*)scan) == *((size_t*)match)) {
+ while (scan < safe_end) {
+ size_t scan_word, match_word;
+ memcpy(&scan_word, scan, sizeof(scan_word));
+ memcpy(&match_word, match, sizeof(match_word));
+ if (scan_word != match_word) break;
scan += 8;
match += 8;
}
} else if (sizeof(unsigned int) == 4) {
/* 4 checks at once per array bounds check (unsigned int is 32-bit). */
- while (scan < safe_end
- && *((unsigned int*)scan) == *((unsigned int*)match)) {
+ while (scan < safe_end) {
+ unsigned int scan_word, match_word;
+ memcpy(&scan_word, scan, sizeof(scan_word));
+ memcpy(&match_word, match, sizeof(match_word));
+ if (scan_word != match_word) break;
scan += 4;
match += 4;
}