aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/interpreters/python/pypy
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/interpreters/python/pypy')
-rw-r--r--nixpkgs/pkgs/development/interpreters/python/pypy/default.nix11
-rw-r--r--nixpkgs/pkgs/development/interpreters/python/pypy/prebuilt.nix19
2 files changed, 11 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/development/interpreters/python/pypy/default.nix b/nixpkgs/pkgs/development/interpreters/python/pypy/default.nix
index e5828fdd374..10073602071 100644
--- a/nixpkgs/pkgs/development/interpreters/python/pypy/default.nix
+++ b/nixpkgs/pkgs/development/interpreters/python/pypy/default.nix
@@ -34,7 +34,7 @@ in with passthru; stdenv.mkDerivation rec {
inherit pname version;
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;
};
@@ -75,13 +75,6 @@ in with passthru; stdenv.mkDerivation rec {
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'"
- # 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
'';
@@ -137,7 +130,7 @@ in with passthru; stdenv.mkDerivation rec {
ln -s $out/${executable}-c/${executable}-c $out/bin/${executable}
# 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}
${stdenv.lib.optionalString stdenv.isDarwin ''
diff --git a/nixpkgs/pkgs/development/interpreters/python/pypy/prebuilt.nix b/nixpkgs/pkgs/development/interpreters/python/pypy/prebuilt.nix
index 0ebd3364834..1522047a380 100644
--- a/nixpkgs/pkgs/development/interpreters/python/pypy/prebuilt.nix
+++ b/nixpkgs/pkgs/development/interpreters/python/pypy/prebuilt.nix
@@ -8,10 +8,9 @@
, zlib
, openssl_1_0_2
, expat
-, libffi
-, ncurses
-, tcl
-, tk
+, ncurses6
+, tcl-8_5
+, tk-8_5
# For the Python package set
, packageOverrides ? (self: super: {})
, sourceVersion
@@ -46,10 +45,9 @@ let
zlib
openssl_1_0_2
expat
- libffi
- ncurses
- tcl
- tk
+ ncurses6
+ tcl-8_5
+ tk-8_5
];
in with passthru; stdenv.mkDerivation {
@@ -66,6 +64,7 @@ in with passthru; stdenv.mkDerivation {
mkdir -p $out/lib
echo "Moving files to $out"
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/
@@ -78,8 +77,8 @@ in with passthru; stdenv.mkDerivation {
$out/bin/pypy*
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 --set-rpath ${stdenv.lib.makeLibraryPath deps} {} \;
+ 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}:$out/lib {} \;
echo "Removing bytecode"
find . -name "__pycache__" -type d -depth -exec rm -rf {} \;