mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
Merge pull request #280807 from suhr/fix-pharo
pharo: fix non-path argv[0] segfault
This commit is contained in:
commit
adad0b0a22
@ -54,29 +54,28 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"-DBUILD_BUNDLE=OFF"
|
||||
];
|
||||
|
||||
installPhase =
|
||||
let
|
||||
library_path = lib.strings.makeLibraryPath [
|
||||
"$out"
|
||||
cairo
|
||||
freetype
|
||||
libgit2
|
||||
SDL2
|
||||
];
|
||||
in
|
||||
''
|
||||
runHook preInstall
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cmake --build . --target=install
|
||||
mkdir -p "$out/lib"
|
||||
mkdir "$out/bin"
|
||||
cp build/vm/*.so* "$out/lib/"
|
||||
cp build/vm/pharo "$out/bin/pharo"
|
||||
patchelf --allowed-rpath-prefixes "$NIX_STORE" --shrink-rpath "$out/bin/pharo"
|
||||
wrapProgram "$out/bin/pharo" --set LD_LIBRARY_PATH "${library_path}"
|
||||
cmake --build . --target=install
|
||||
mkdir -p "$out/lib"
|
||||
mkdir "$out/bin"
|
||||
cp build/vm/*.so* "$out/lib/"
|
||||
cp build/vm/pharo "$out/bin/pharo"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = let
|
||||
libPath = lib.makeLibraryPath (finalAttrs.buildInputs ++ [
|
||||
stdenv.cc.cc.lib
|
||||
"$out"
|
||||
]);
|
||||
in ''
|
||||
patchelf --allowed-rpath-prefixes "$NIX_STORE" --shrink-rpath "$out/bin/pharo"
|
||||
ln -s "${libgit2}/lib/libgit2.so" $out/lib/libgit2.so.1.1
|
||||
wrapProgram "$out/bin/pharo" --argv0 $out/bin/pharo --prefix LD_LIBRARY_PATH ":" "${libPath}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Clean and innovative Smalltalk-inspired environment";
|
||||
|
Loading…
Reference in New Issue
Block a user