mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
commit
52419cc32e
3 changed files with 19 additions and 29 deletions
|
@ -158,10 +158,10 @@ in {
|
||||||
self = pypy27;
|
self = pypy27;
|
||||||
sourceVersion = {
|
sourceVersion = {
|
||||||
major = "7";
|
major = "7";
|
||||||
minor = "1";
|
minor = "3";
|
||||||
patch = "1";
|
patch = "1";
|
||||||
};
|
};
|
||||||
sha256 = "0yq6ln1ic476sasp8zs4mg5i9524l1p96qwanp486rr1yza1grlg";
|
sha256 = "08ckkhd0ix6j9873a7gr507c72d4cmnv5lwvprlljdca9i8p2dzs";
|
||||||
pythonVersion = "2.7";
|
pythonVersion = "2.7";
|
||||||
db = db.override { dbmSupport = !stdenv.isDarwin; };
|
db = db.override { dbmSupport = !stdenv.isDarwin; };
|
||||||
python = python27;
|
python = python27;
|
||||||
|
@ -174,10 +174,10 @@ in {
|
||||||
self = pypy36;
|
self = pypy36;
|
||||||
sourceVersion = {
|
sourceVersion = {
|
||||||
major = "7";
|
major = "7";
|
||||||
minor = "1";
|
minor = "3";
|
||||||
patch = "1";
|
patch = "1";
|
||||||
};
|
};
|
||||||
sha256 = "1hqvnran7d2dzj5555n7q680dyzhmbklz04pvkxgb5j604v7kkx1";
|
sha256 = "10zsk8jby8j6visk5mzikpb1cidvz27qq4pfpa26jv53klic6b0c";
|
||||||
pythonVersion = "3.6";
|
pythonVersion = "3.6";
|
||||||
db = db.override { dbmSupport = !stdenv.isDarwin; };
|
db = db.override { dbmSupport = !stdenv.isDarwin; };
|
||||||
python = python27;
|
python = python27;
|
||||||
|
@ -191,13 +191,12 @@ in {
|
||||||
self = pythonInterpreters.pypy27_prebuilt;
|
self = pythonInterpreters.pypy27_prebuilt;
|
||||||
sourceVersion = {
|
sourceVersion = {
|
||||||
major = "7";
|
major = "7";
|
||||||
minor = "1";
|
minor = "3";
|
||||||
patch = "1";
|
patch = "1";
|
||||||
};
|
};
|
||||||
sha256 = "0rlx4x9xy9h989w6sy4h7lknm00956r30c5gjxwsvf8fhvq9xc3k"; # linux64
|
sha256 = "18xc5kwidj5hjwbr0w8v1nfpg5l4lk01z8cn804zfyyz8xjqhx5y"; # linux64
|
||||||
pythonVersion = "2.7";
|
pythonVersion = "2.7";
|
||||||
inherit passthruFun;
|
inherit passthruFun;
|
||||||
ncurses = ncurses5;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pypy36_prebuilt = callPackage ./pypy/prebuilt.nix {
|
pypy36_prebuilt = callPackage ./pypy/prebuilt.nix {
|
||||||
|
@ -205,13 +204,12 @@ in {
|
||||||
self = pythonInterpreters.pypy36_prebuilt;
|
self = pythonInterpreters.pypy36_prebuilt;
|
||||||
sourceVersion = {
|
sourceVersion = {
|
||||||
major = "7";
|
major = "7";
|
||||||
minor = "1";
|
minor = "3";
|
||||||
patch = "1";
|
patch = "1";
|
||||||
};
|
};
|
||||||
sha256 = "1c1xx6dm1n4xvh1vd3rcvyyixm5jm9rvzisji1a5bc9l38xzc540"; # linux64
|
sha256 = "04nv0mkalaliphbjw7y0pmb372bxwjzwmcsqkf9kwsik99kg2z7n"; # linux64
|
||||||
pythonVersion = "3.6";
|
pythonVersion = "3.6";
|
||||||
inherit passthruFun;
|
inherit passthruFun;
|
||||||
ncurses = ncurses5;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
graalpython37 = callPackage ./graalpython/default.nix {
|
graalpython37 = callPackage ./graalpython/default.nix {
|
||||||
|
|
|
@ -34,7 +34,7 @@ in with passthru; stdenv.mkDerivation rec {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://bitbucket.org/pypy/pypy/get/release-pypy${pythonVersion}-v${version}.tar.bz2";
|
url = "https://bitbucket.org/pypy/pypy/downloads/pypy${pythonVersion}-v${version}-src.tar.bz2";
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,13 +75,6 @@ in with passthru; stdenv.mkDerivation rec {
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace "lib-python/${if isPy3k then "3/tkinter/tix.py" else "2.7/lib-tk/Tix.py"}" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
|
substituteInPlace "lib-python/${if isPy3k then "3/tkinter/tix.py" else "2.7/lib-tk/Tix.py"}" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
|
||||||
|
|
||||||
# hint pypy to find nix ncurses
|
|
||||||
substituteInPlace pypy/module/_minimal_curses/fficurses.py \
|
|
||||||
--replace "/usr/include/ncurses/curses.h" "${ncurses.dev}/include/curses.h" \
|
|
||||||
--replace "ncurses/curses.h" "${ncurses.dev}/include/curses.h" \
|
|
||||||
--replace "ncurses/term.h" "${ncurses.dev}/include/term.h" \
|
|
||||||
--replace "libraries=['curses']" "libraries=['ncurses']"
|
|
||||||
|
|
||||||
sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite.dev}/include'], library_dirs=['${sqlite.out}/lib']@" lib_pypy/_sqlite3_build.py
|
sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite.dev}/include'], library_dirs=['${sqlite.out}/lib']@" lib_pypy/_sqlite3_build.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -137,7 +130,7 @@ in with passthru; stdenv.mkDerivation rec {
|
||||||
ln -s $out/${executable}-c/${executable}-c $out/bin/${executable}
|
ln -s $out/${executable}-c/${executable}-c $out/bin/${executable}
|
||||||
|
|
||||||
# other packages expect to find stuff according to libPrefix
|
# other packages expect to find stuff according to libPrefix
|
||||||
ln -s $out/${executable}/include $out/include/${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/${executable}-c/lib-python/${if isPy3k then "3" else pythonVersion} $out/lib/${libPrefix}
|
||||||
|
|
||||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
|
|
@ -8,10 +8,9 @@
|
||||||
, zlib
|
, zlib
|
||||||
, openssl_1_0_2
|
, openssl_1_0_2
|
||||||
, expat
|
, expat
|
||||||
, libffi
|
, ncurses6
|
||||||
, ncurses
|
, tcl-8_5
|
||||||
, tcl
|
, tk-8_5
|
||||||
, tk
|
|
||||||
# For the Python package set
|
# For the Python package set
|
||||||
, packageOverrides ? (self: super: {})
|
, packageOverrides ? (self: super: {})
|
||||||
, sourceVersion
|
, sourceVersion
|
||||||
|
@ -46,10 +45,9 @@ let
|
||||||
zlib
|
zlib
|
||||||
openssl_1_0_2
|
openssl_1_0_2
|
||||||
expat
|
expat
|
||||||
libffi
|
ncurses6
|
||||||
ncurses
|
tcl-8_5
|
||||||
tcl
|
tk-8_5
|
||||||
tk
|
|
||||||
];
|
];
|
||||||
|
|
||||||
in with passthru; stdenv.mkDerivation {
|
in with passthru; stdenv.mkDerivation {
|
||||||
|
@ -66,6 +64,7 @@ in with passthru; stdenv.mkDerivation {
|
||||||
mkdir -p $out/lib
|
mkdir -p $out/lib
|
||||||
echo "Moving files to $out"
|
echo "Moving files to $out"
|
||||||
mv -t $out bin include lib-python lib_pypy site-packages
|
mv -t $out bin include lib-python lib_pypy site-packages
|
||||||
|
mv lib/libffi.so.6* $out/lib/
|
||||||
|
|
||||||
mv $out/bin/libpypy*-c.so $out/lib/
|
mv $out/bin/libpypy*-c.so $out/lib/
|
||||||
|
|
||||||
|
@ -78,8 +77,8 @@ in with passthru; stdenv.mkDerivation {
|
||||||
$out/bin/pypy*
|
$out/bin/pypy*
|
||||||
|
|
||||||
pushd $out
|
pushd $out
|
||||||
find {lib,lib_pypy*} -name "*.so" -exec patchelf --replace-needed "libbz2.so.1.0" "libbz2.so.1" {} \;
|
find {lib,lib_pypy*} -name "*.so" -exec patchelf --remove-needed libncursesw.so.6 --replace-needed libtinfow.so.6 libncursesw.so.6 {} \;
|
||||||
find {lib,lib_pypy*} -name "*.so" -exec patchelf --set-rpath ${stdenv.lib.makeLibraryPath deps} {} \;
|
find {lib,lib_pypy*} -name "*.so" -exec patchelf --set-rpath ${stdenv.lib.makeLibraryPath deps}:$out/lib {} \;
|
||||||
|
|
||||||
echo "Removing bytecode"
|
echo "Removing bytecode"
|
||||||
find . -name "__pycache__" -type d -depth -exec rm -rf {} \;
|
find . -name "__pycache__" -type d -depth -exec rm -rf {} \;
|
||||||
|
|
Loading…
Reference in a new issue