diff options
author | Rob Vermaas <rob.vermaas@gmail.com> | 2018-04-06 14:18:16 +0200 |
---|---|---|
committer | Rob Vermaas <rob.vermaas@gmail.com> | 2018-04-06 14:20:12 +0200 |
commit | f8fe297ff1dd7caebee4b923ce2178da090564ac (patch) | |
tree | 03ff56af9d83d72ea965e4bc93b0fba9980ccd32 | |
parent | e7f2b7692b137e809262f80798cb0fe7d5f0ce3f (diff) |
julia: remove wrapper from julia binaries, in stead
symlink shared libraries from LD_LIBRARY_PATH into lib/julia, as using a wrapper with LD_LIBRARY_PATH causes segmentation faults when program returns an error: $ julia -e 'throw(Error())' only applied for 0.6, which is the current julia version. Will see if we can remove the older versions in master. (cherry picked from commit 41f3a4e0030a1b0233de6ca7f5208c44eb370313)
-rw-r--r-- | pkgs/development/compilers/julia/0.6.nix | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/development/compilers/julia/0.6.nix b/pkgs/development/compilers/julia/0.6.nix index 36bbb7d817f70..6fad8e5259c59 100644 --- a/pkgs/development/compilers/julia/0.6.nix +++ b/pkgs/development/compilers/julia/0.6.nix @@ -172,10 +172,14 @@ stdenv.mkDerivation rec { ''; postInstall = '' - for prog in "$out/bin/julia" "$out/bin/julia-debug"; do - wrapProgram "$prog" \ - --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH:$out/lib/julia" \ - --prefix PATH : "${stdenv.lib.makeBinPath [ curl ]}" + # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia, + # as using a wrapper with LD_LIBRARY_PATH causes segmentation + # faults when program returns an error: + # $ julia -e 'throw(Error())' + find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do + if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then + ln -sv $lib $out/lib/julia/$(basename $lib) + fi done ''; |