From 488db3d392856d841b72986700fc572306972da0 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Mon, 17 Jul 2017 12:32:16 +0900 Subject: [PATCH] mathematica: fix library paths --- pkgs/applications/science/math/mathematica/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix index 1a9adcd4782f..6191af85bd10 100644 --- a/pkgs/applications/science/math/mathematica/default.nix +++ b/pkgs/applications/science/math/mathematica/default.nix @@ -56,6 +56,7 @@ stdenv.mkDerivation rec { unixODBC libxml2 libuuid + zlib ] ++ (with xorg; [ libX11 libXext @@ -93,6 +94,12 @@ stdenv.mkDerivation rec { echo "=== Running MathInstaller ===" ./MathInstaller -auto -createdir=y -execdir=$out/bin -targetdir=$out/libexec/Mathematica -silent + + # Fix library paths + cd $out/libexec/Mathematica/Executables + for path in mathematica MathKernel Mathematica WolframKernel wolfram; do + sed -i -e 's/export LD_LIBRARY_PATH/export LD_LIBRARY_PATH=${builtins.replaceStrings ["/"] ["\\/"] "${zlib}/lib"}:\''${LD_LIBRARY_PATH}/' $path + done ''; preFixup = ''