Skip to content

Commit f13c797

Browse files
author
Connor Baker
committed
cudaPackages: prefix libPath with lib in manifest builder
1 parent 205f70b commit f13c797

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

pkgs/development/cuda-modules/generic-builders/manifest.nix

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,15 @@ backendStdenv.mkDerivation (
170170
''
171171
# Handle the existence of libPath, which requires us to re-arrange the lib directory
172172
+ strings.optionalString (libPath != null) ''
173-
if [[ ! -d "${libPath}" ]] ; then
174-
echo "${finalAttrs.pname}: ${libPath} does not exist, only found:" >&2
175-
find "$(dirname ${libPath})"/ -maxdepth 1 >&2
173+
full_lib_path="lib/${libPath}"
174+
if [[ ! -d "$full_lib_path" ]] ; then
175+
echo "${finalAttrs.pname}: '$full_lib_path' does not exist, only found:" >&2
176+
find lib/ -mindepth 1 -maxdepth 1 >&2
176177
echo "This release might not support your CUDA version" >&2
177178
exit 1
178179
fi
179-
mv "lib/${libPath}" lib_new
180+
echo "Making libPath '$full_lib_path' the root of lib" >&2
181+
mv "$full_lib_path" lib_new
180182
rm -r lib
181183
mv lib_new lib
182184
''

0 commit comments

Comments
 (0)