Merge pull request #273779 from ConnorBaker/fix/cudaPackages-libPath-manifest-builder

cudaPackages: prefix libPath with lib in manifest builder
This commit is contained in:
Connor Baker 2023-12-12 20:09:15 -05:00 committed by GitHub
commit 0521266e7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
''