git.iko.soy/typeable/nixpkgs
on master help sign in
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)

commitf8fe297ff1dd7caebee4b923ce2178da090564ac authorRob Vermaas <rob.vermaas@gmail.com> dateFri 6 Apr 2018, 14:18 (9 years ago) parente7f2b76
1 file changed+8−4
pkgs/development/compilers/julia/0.6.nix+8−4
pkgs/development/compilers/julia/0.6.nix+8−4
@@ -172,10 +172,14 @@ stdenv.mkDerivation rec {
172172 '';
173173
174174 postInstall = ''
175− for prog in "$out/bin/julia" "$out/bin/julia-debug"; do
176− wrapProgram "$prog" \
177− --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH:$out/lib/julia" \
178− --prefix PATH : "${stdenv.lib.makeBinPath [ curl ]}"
175+ # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia,
176+ # as using a wrapper with LD_LIBRARY_PATH causes segmentation
177+ # faults when program returns an error:
178+ # $ julia -e 'throw(Error())'
179+ find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do
180+ if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then
181+ ln -sv $lib $out/lib/julia/$(basename $lib)
182+ fi
179183 done
180184 '';
181185