about summary refs log tree commit diff
path: root/pkgs/applications/science/math/mathematica
diff options
context:
space:
mode:
authorGuanpeng Xu <herberteuler@gmail.com>2024-02-02 23:20:29 -0800
committerGuanpeng Xu <herberteuler@gmail.com>2024-02-02 23:20:29 -0800
commit446a6771a60a44d39fb832ea206ad1b2fef1757d (patch)
tree52d68fe2a9a0d8b479561611415661947c826199 /pkgs/applications/science/math/mathematica
parent4f301350dacb4eb0a93578ef3b07c8a996c777e7 (diff)
mathematica: minor fixes
This change includes two fixes:

1. add the directory containing dbus' libraries to LD_LIBRARY_PATH
   (#284736)

2. avoid creating conflicting `libcuda.so` in the CUDA environment
Diffstat (limited to 'pkgs/applications/science/math/mathematica')
-rw-r--r--pkgs/applications/science/math/mathematica/generic.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/applications/science/math/mathematica/generic.nix b/pkgs/applications/science/math/mathematica/generic.nix
index 5064a3ddbdf4e..5a96bf1a26252 100644
--- a/pkgs/applications/science/math/mathematica/generic.nix
+++ b/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"