diff --git a/common/optional/x86-64-v3/patches/cuda/default.nix b/common/optional/x86-64-v3/patches/cuda/default.nix deleted file mode 100644 index 433aabc..0000000 --- a/common/optional/x86-64-v3/patches/cuda/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ 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; - }); - } -) diff --git a/common/optional/x86-64-v3/patches/cuda/propagated-build-output-arrays.patch b/common/optional/x86-64-v3/patches/cuda/propagated-build-output-arrays.patch deleted file mode 100644 index 27a267a..0000000 --- a/common/optional/x86-64-v3/patches/cuda/propagated-build-output-arrays.patch +++ /dev/null @@ -1,44 +0,0 @@ -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" diff --git a/common/optional/x86-64-v3/patches/default.nix b/common/optional/x86-64-v3/patches/default.nix index 382e4a8..ec56dc5 100644 --- a/common/optional/x86-64-v3/patches/default.nix +++ b/common/optional/x86-64-v3/patches/default.nix @@ -1,8 +1,6 @@ _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; }; diff --git a/common/optional/x86-64-v3/patches/trunk/default.nix b/common/optional/x86-64-v3/patches/trunk/default.nix deleted file mode 100644 index 4acfcc9..0000000 --- a/common/optional/x86-64-v3/patches/trunk/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ 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" - ''; -}) diff --git a/common/optional/x86-64-v3/patches/trunk/libdeflate-gcc16.patch b/common/optional/x86-64-v3/patches/trunk/libdeflate-gcc16.patch deleted file mode 100644 index 4f787a5..0000000 --- a/common/optional/x86-64-v3/patches/trunk/libdeflate-gcc16.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2a3762cf736aff9aa5dda329fdec3c08a816eb9b Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -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"