pypy: fix installPhase
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
zlib,
|
||||
bzip2,
|
||||
pkg-config,
|
||||
lndir,
|
||||
libffi,
|
||||
sqlite,
|
||||
openssl,
|
||||
@@ -80,7 +81,10 @@ stdenv.mkDerivation rec {
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
lndir
|
||||
];
|
||||
buildInputs = [
|
||||
bzip2
|
||||
openssl
|
||||
@@ -185,16 +189,17 @@ stdenv.mkDerivation rec {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/{bin,include,lib,${executable}-c}
|
||||
mkdir -p $out/{bin,lib/${libPrefix}}
|
||||
|
||||
cp -R {include,lib_pypy,lib-python,${executable}-c} $out/${executable}-c
|
||||
cp lib${executable}-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/
|
||||
ln -s $out/${executable}-c/${executable}-c $out/bin/${executable}
|
||||
cp -R {include,lib_pypy,lib-python} $out
|
||||
install -Dm755 lib${executable}-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/
|
||||
install -Dm755 ${executable}-c $out/bin/${executable}
|
||||
${lib.optionalString isPy39OrNewer "ln -s $out/bin/${executable} $out/bin/pypy3"}
|
||||
|
||||
# other packages expect to find stuff according to libPrefix
|
||||
ln -s $out/${executable}-c/include $out/include/${libPrefix}
|
||||
ln -s $out/${executable}-c/lib-python/${if isPy3k then "3" else pythonVersion} $out/lib/${libPrefix}
|
||||
ln -s $out/include $out/include/${libPrefix}
|
||||
lndir $out/lib-python/${if isPy3k then "3" else pythonVersion} $out/lib/${libPrefix}
|
||||
lndir $out/lib_pypy $out/lib/${libPrefix}
|
||||
|
||||
# Include a sitecustomize.py file
|
||||
cp ${../sitecustomize.py} $out/${
|
||||
@@ -208,11 +213,6 @@ stdenv.mkDerivation rec {
|
||||
lib.optionalString (stdenv.hostPlatform.isDarwin) ''
|
||||
install_name_tool -change @rpath/lib${executable}-c.dylib $out/lib/lib${executable}-c.dylib $out/bin/${executable}
|
||||
''
|
||||
+ lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
|
||||
mkdir -p $out/${executable}-c/pypy/bin
|
||||
mv $out/bin/${executable} $out/${executable}-c/pypy/bin/${executable}
|
||||
ln -s $out/${executable}-c/pypy/bin/${executable} $out/bin/${executable}
|
||||
''
|
||||
# _testcapi is compiled dynamically, into the store.
|
||||
# This would fail if we don't do it here.
|
||||
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
|
||||
Reference in New Issue
Block a user