Commit 7aebac99 authored by Else, Someone's avatar Else, Someone
Browse files

cudaPackages: fix regression, propagating too much

Code moved around in CUDA13 PR also changed actual behaviour
parent a4c85a90
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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
+10 −4
Original line number Diff line number Diff line
@@ -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";
})
+2 −1
Original line number Diff line number Diff line
@@ -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: