more patches
This commit is contained in:
1 parent
5ba86fdaea
commit
13fb3d426b
11 files changed
+208
No files matched your search
@@ -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"
|
||||
Reference in new issue
Block a user