cudaPackages.cuda_nvcc: fix hook's offsets (-1, -1) -> (-1, 0)

Cf. explanations in https://github.com/NixOS/nixpkgs/pull/271078
This commit is contained in:
Someone Serge 2023-12-04 20:40:34 +00:00
parent e084a6c648
commit d031523a01
No known key found for this signature in database
GPG key ID: 7B0E3B1390D61DA4

View file

@ -52,18 +52,7 @@ in
);
cuda_nvcc = prev.cuda_nvcc.overrideAttrs (oldAttrs: {
# Desiredata: whenever a package (e.g. magma) adds cuda_nvcc to
# nativeBuildInputs (offsets `(-1, 0)`), magma should also source the
# setupCudaHook, i.e. we want it the hook to be propagated into the
# same nativeBuildInputs.
#
# Logically, cuda_nvcc should include the hook in depsHostHostPropagated,
# so that the final offsets for the propagated hook would be `(-1, 0) +
# (0, 0) = (-1, 0)`.
#
# In practice, TargetTarget appears to work:
# https://gist.github.com/fd80ff142cd25e64603618a3700e7f82
depsTargetTargetPropagated = [
propagatedBuildInputs = [
final.setupCudaHook
];