about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math/mathematica/generic.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math/mathematica/generic.nix')
-rw-r--r--nixpkgs/pkgs/applications/science/math/mathematica/generic.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/mathematica/generic.nix b/nixpkgs/pkgs/applications/science/math/mathematica/generic.nix
index 5064a3ddbdf4..5a96bf1a2625 100644
--- a/nixpkgs/pkgs/applications/science/math/mathematica/generic.nix
+++ b/nixpkgs/pkgs/applications/science/math/mathematica/generic.nix
@@ -56,7 +56,9 @@ let cudaEnv = symlinkJoin {
         cuda_cudart cuda_nvcc libcublas libcufft libcurand libcusparse
       ];
       postBuild = ''
-        ln -s ${addOpenGLRunpath.driverLink}/lib/libcuda.so $out/lib
+        if [ ! -e $out/lib/libcuda.so ]; then
+            ln -s ${addOpenGLRunpath.driverLink}/lib/libcuda.so $out/lib
+        fi
         ln -s lib $out/lib64
       '';
     };
@@ -119,7 +121,11 @@ in stdenv.mkDerivation {
   ]) ++ lib.optional cudaSupport cudaEnv;
 
   wrapProgramFlags = [
-    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gcc-unwrapped.lib zlib ]}"
+    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
+      dbus
+      gcc-unwrapped.lib
+      zlib
+    ]}"
     "--prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}"
     # Fix libQt errors - #96490
     "--set USE_WOLFRAM_LD_LIBRARY_PATH 1"