@@ -8,10 +8,9 @@
88, zlib
99, openssl_1_0_2
1010, expat
11−, libffi
12−, ncurses
13−, tcl
14−, tk
11+, ncurses6
12+, tcl-8_5
13+, tk-8_5
1514# For the Python package set
1615, packageOverrides ? (self: super: {})
1716, sourceVersion
@@ -46,10 +45,9 @@ let
4645 zlib
4746 openssl_1_0_2
4847 expat
49− libffi
50− ncurses
51− tcl
52− tk
48+ ncurses6
49+ tcl-8_5
50+ tk-8_5
5351 ];
5452
5553in with passthru; stdenv.mkDerivation {
@@ -66,6 +64,7 @@ in with passthru; stdenv.mkDerivation {
6664 mkdir -p $out/lib
6765 echo "Moving files to $out"
6866 mv -t $out bin include lib-python lib_pypy site-packages
67+ mv lib/libffi.so.6* $out/lib/
6968
7069 mv $out/bin/libpypy*-c.so $out/lib/
7170
@@ -78,8 +77,8 @@ in with passthru; stdenv.mkDerivation {
7877 $out/bin/pypy*
7978
8079 pushd $out
81− find {lib,lib_pypy*} -name "*.so" -exec patchelf --replace-needed "libbz2.so.1.0" "libbz2.so.1" {} \;
82− find {lib,lib_pypy*} -name "*.so" -exec patchelf --set-rpath ${stdenv.lib.makeLibraryPath deps} {} \;
80+ find {lib,lib_pypy*} -name "*.so" -exec patchelf --remove-needed libncursesw.so.6 --replace-needed libtinfow.so.6 libncursesw.so.6 {} \;
81+ find {lib,lib_pypy*} -name "*.so" -exec patchelf --set-rpath ${stdenv.lib.makeLibraryPath deps}:$out/lib {} \;
8382
8483 echo "Removing bytecode"
8584 find . -name "__pycache__" -type d -depth -exec rm -rf {} \;