diff --git a/pkgs/development/cuda-modules/buildRedist/default.nix b/pkgs/development/cuda-modules/buildRedist/default.nix index 421432c6dc87d..3cf532859a326 100644 --- a/pkgs/development/cuda-modules/buildRedist/default.nix +++ b/pkgs/development/cuda-modules/buildRedist/default.nix @@ -279,8 +279,6 @@ extendMkDerivation { ] ++ nativeBuildInputs; - propagatedBuildInputs = [ setupCudaHook ] ++ propagatedBuildInputs; - buildInputs = [ # autoPatchelfHook will search for a libstdc++ and we're giving it # one that is compatible with the rest of nixpkgs, even when diff --git a/pkgs/development/cuda-modules/packages/cuda_cudart.nix b/pkgs/development/cuda-modules/packages/cuda_cudart.nix index 8ec7c4f8b3c61..ff647525aad31 100644 --- a/pkgs/development/cuda-modules/packages/cuda_cudart.nix +++ b/pkgs/development/cuda-modules/packages/cuda_cudart.nix @@ -32,12 +32,15 @@ buildRedist (finalAttrs: { # NOTE: `cuda_compat` can be disabled by setting the package to `null`. This is useful in cases where # the host OS has a recent enough CUDA driver that the compatibility library isn't needed. propagatedBuildInputs = - # Add the dependency on NVCC's include directory. - # - crt/host_config.h + # TODO(@SomeoneSerge): Consider propagating `crt/host_config.h`, but only + # once we managed to split out `cuda_nvcc`'s headers into a separate output + # # TODO(@connorbaker): Check that the dependency offset for this is correct. - [ (lib.getOutput "include" cuda_nvcc) ] + # + # [ (lib.getInclude cuda_nvcc) ] + # TODO(@connorbaker): From CUDA 13.0, crt/host_config.h is in cuda_crt - ++ lib.optionals (cudaAtLeast "13.0") [ (lib.getOutput "include" cuda_crt) ] + lib.optionals (cudaAtLeast "13.0") [ (lib.getOutput "include" cuda_crt) ] # Add the dependency on CCCL's include directory. # - nv/target # TODO(@connorbaker): Check that the dependency offset for this is correct. @@ -86,5 +89,8 @@ buildRedist (finalAttrs: { popd >/dev/null ''; + # "Never again", cf. https://github.com/NixOS/nixpkgs/pull/457424 + disallowedRequisites = [ (lib.getBin cuda_nvcc) ]; + meta.description = "CUDA Runtime"; }) diff --git a/pkgs/development/cuda-modules/packages/cuda_nvcc.nix b/pkgs/development/cuda-modules/packages/cuda_nvcc.nix index 47906b5977c16..27eacde61847e 100644 --- a/pkgs/development/cuda-modules/packages/cuda_nvcc.nix +++ b/pkgs/development/cuda-modules/packages/cuda_nvcc.nix @@ -2,6 +2,7 @@ _cuda, backendStdenv, buildRedist, + setupCudaHook, cudaAtLeast, cudaOlder, cuda_cccl, @@ -22,7 +23,7 @@ buildRedist (finalAttrs: { allowFHSReferences = true; # Entries here will be in nativeBuildInputs when cuda_nvcc is in nativeBuildInputs - propagatedBuildInputs = [ backendStdenv.cc ]; + propagatedBuildInputs = [ setupCudaHook ]; # Patch the nvcc.profile. # Syntax: