diff options
Diffstat (limited to 'pkgs/development/libraries/science/math/libtorch/bin.nix')
-rw-r--r-- | pkgs/development/libraries/science/math/libtorch/bin.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/development/libraries/science/math/libtorch/bin.nix b/pkgs/development/libraries/science/math/libtorch/bin.nix index 5b08cfa7dcf07..92050cd172834 100644 --- a/pkgs/development/libraries/science/math/libtorch/bin.nix +++ b/pkgs/development/libraries/science/math/libtorch/bin.nix @@ -4,12 +4,13 @@ , lib , libcxx , llvmPackages +, config -, addOpenGLRunpath +, addDriverRunpath , patchelf , fixDarwinDylibNames -, cudaSupport +, cudaSupport ? config.cudaSupport }: let @@ -31,7 +32,7 @@ in stdenv.mkDerivation { nativeBuildInputs = if stdenv.isDarwin then [ fixDarwinDylibNames ] - else [ patchelf ] ++ lib.optionals cudaSupport [ addOpenGLRunpath ]; + else [ patchelf ] ++ lib.optionals cudaSupport [ addDriverRunpath ]; dontBuild = true; dontConfigure = true; @@ -64,7 +65,7 @@ in stdenv.mkDerivation { echo "setting rpath for $lib..." patchelf --set-rpath "${rpath}:$out/lib" "$lib" ${lib.optionalString cudaSupport '' - addOpenGLRunpath "$lib" + addDriverRunpath "$lib" ''} done '' + lib.optionalString stdenv.isDarwin '' |