summaryrefslogtreecommitdiffstats
path: root/pkgs/development/cuda-modules
diff options
context:
space:
mode:
authorConnor Baker <connor.baker@tweag.io>2023-12-12 15:55:17 +0000
committerConnor Baker <connor.baker@tweag.io>2023-12-12 20:46:53 +0000
commitf13c79788c8022bb5ad01ae7875cbb2b51edf8bb (patch)
treecb886ead71462f50f060f0b6a5822b39282b4c9c /pkgs/development/cuda-modules
parent205f70b7fba9da89a208d4b6d78ca64f6e36028d (diff)
cudaPackages: prefix libPath with lib in manifest builder
Diffstat (limited to 'pkgs/development/cuda-modules')
-rw-r--r--pkgs/development/cuda-modules/generic-builders/manifest.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/development/cuda-modules/generic-builders/manifest.nix b/pkgs/development/cuda-modules/generic-builders/manifest.nix
index c7ff0f53bb74..95140ca651cd 100644
--- a/pkgs/development/cuda-modules/generic-builders/manifest.nix
+++ b/pkgs/development/cuda-modules/generic-builders/manifest.nix
@@ -170,13 +170,15 @@ backendStdenv.mkDerivation (
''
# Handle the existence of libPath, which requires us to re-arrange the lib directory
+ strings.optionalString (libPath != null) ''
- if [[ ! -d "${libPath}" ]] ; then
- echo "${finalAttrs.pname}: ${libPath} does not exist, only found:" >&2
- find "$(dirname ${libPath})"/ -maxdepth 1 >&2
+ full_lib_path="lib/${libPath}"
+ if [[ ! -d "$full_lib_path" ]] ; then
+ echo "${finalAttrs.pname}: '$full_lib_path' does not exist, only found:" >&2
+ find lib/ -mindepth 1 -maxdepth 1 >&2
echo "This release might not support your CUDA version" >&2
exit 1
fi
- mv "lib/${libPath}" lib_new
+ echo "Making libPath '$full_lib_path' the root of lib" >&2
+ mv "$full_lib_path" lib_new
rm -r lib
mv lib_new lib
''