mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
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.
This commit is contained in:
parent
97de18f5aa
commit
41f3a4e003
1 changed files with 8 additions and 4 deletions
|
@ -172,10 +172,14 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
for prog in "$out/bin/julia" "$out/bin/julia-debug"; do
|
# Symlink shared libraries from LD_LIBRARY_PATH into lib/julia,
|
||||||
wrapProgram "$prog" \
|
# as using a wrapper with LD_LIBRARY_PATH causes segmentation
|
||||||
--prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH:$out/lib/julia" \
|
# faults when program returns an error:
|
||||||
--prefix PATH : "${stdenv.lib.makeBinPath [ curl ]}"
|
# $ 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
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue