Simplify the sed script

This commit is contained in:
Mitsuhiro Nakamura 2017-07-19 15:18:44 +09:00
parent 488db3d392
commit 7aaea7297e

View File

@ -98,7 +98,7 @@ stdenv.mkDerivation rec {
# 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
sed -i -e 's#export LD_LIBRARY_PATH$#export LD_LIBRARY_PATH=${zlib}/lib:\''${LD_LIBRARY_PATH}#' $path
done
'';