Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pkgs/development/cuda-modules/buildRedist/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions pkgs/development/cuda-modules/packages/cuda_cudart.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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";
})
3 changes: 2 additions & 1 deletion pkgs/development/cuda-modules/packages/cuda_nvcc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
_cuda,
backendStdenv,
buildRedist,
setupCudaHook,
cudaAtLeast,
cudaOlder,
cuda_cccl,
Expand All @@ -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:
Expand Down
Loading