Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
30 lines
886 B
Nix
30 lines
886 B
Nix
# autoAddCudaCompatRunpath hook must be added AFTER `setupCudaHook`. Both
|
|
# hooks prepend a path with `libcuda.so` to the `DT_RUNPATH` section of
|
|
# patched elf files, but `cuda_compat` path must take precedence (otherwise,
|
|
# it doesn't have any effect) and thus appear first. Meaning this hook must be
|
|
# executed last.
|
|
{
|
|
autoFixElfFiles,
|
|
cuda_compat,
|
|
makeSetupHook,
|
|
}:
|
|
makeSetupHook {
|
|
name = "auto-add-cuda-compat-runpath-hook";
|
|
propagatedBuildInputs = [ autoFixElfFiles ];
|
|
|
|
substitutions = {
|
|
libcudaPath = "${cuda_compat}/compat";
|
|
};
|
|
|
|
meta =
|
|
let
|
|
# Handle `null`s in pre-`cuda_compat` releases,
|
|
# and `badPlatform`s for `!isJetsonBuild`.
|
|
platforms = cuda_compat.meta.platforms or [ ];
|
|
badPlatforms = cuda_compat.meta.badPlatforms or platforms;
|
|
in
|
|
{
|
|
inherit badPlatforms platforms;
|
|
};
|
|
} ./auto-add-cuda-compat-runpath.sh
|