From 525588440a47d6f779135b45aede07fe3f2b130b Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 4 Jan 2023 21:30:05 +0000 Subject: [PATCH 01/13] pythonInterpreters.pypy27_prebuilt: 7.3.9 -> 7.3.11 --- pkgs/development/interpreters/python/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 4040223221ea..8eb597593a51 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -293,10 +293,10 @@ in { sourceVersion = { major = "7"; minor = "3"; - patch = "9"; + patch = "11"; }; - sha256 = "sha256-FyqSiwCWp+ALfVj1I/VzAMNcPef4IkkeKnvIRTdcI/g="; # linux64 + sha256 = "sha256-uo7ZWKkFwHNaTP/yh1wlCJlU3AIOCH2YKw/6W52jFs0="; # linux64 pythonVersion = "2.7"; inherit passthruFun; }; From 5dbf9ca20c482c4d2ef63c680516a0a90e00c202 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 4 Jan 2023 21:32:39 +0000 Subject: [PATCH 02/13] pythonInterpreters.pypy39_prebuilt: 7.3.9 -> 7.3.11 --- pkgs/development/interpreters/python/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 8eb597593a51..33bde67cc7dd 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -307,9 +307,9 @@ in { sourceVersion = { major = "7"; minor = "3"; - patch = "9"; + patch = "11"; }; - sha256 = "sha256-RoGMs9dLlrNHh1SDQ9Jm4lYrUx3brzMDg7qTD/GTDtU="; # linux64 + sha256 = "sha256-1QYXLKEQcSdBdddOnFgcMWZDLQF5sDZHDjuejSDq5YE="; # linux64 pythonVersion = "3.9"; inherit passthruFun; }; From 6339c29710b71c2f575d1a4e67385b3b1ca02734 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 4 Jan 2023 21:50:09 +0000 Subject: [PATCH 03/13] pypy37: remove --- pkgs/development/interpreters/python/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 33bde67cc7dd..7f220054f288 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -281,11 +281,8 @@ in { pythonVersion = "3.8"; sha256 = "sha256-W12dklbxKhKa+DhOL1gb36s7wPu+OgpIDZwdLpVJDrE="; }; - pypy37 = __splicedPackages.pypy39.override { - self = __splicedPackages.pythonInterpreters.pypy37; - pythonVersion = "3.7"; - sha256 = "sha256-cEJhY7GU7kYAmYbuptlCYJij/7VS2c29PfqmSkc3P0k="; - }; + + pypy37 = throw "pypy37 has been removed from nixpkgs since it is no longer supported upstream"; # Added 2023-01-04 pypy27_prebuilt = callPackage ./pypy/prebuilt_2_7.nix { # Not included at top-level From 284d9a1067bc0714017659d294bcf260421e4ef7 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 4 Jan 2023 21:40:39 +0000 Subject: [PATCH 04/13] pypy27: 7.3.9 -> 7.3.11 Also build it with pythonInterpreters.pypy27_prebuilt instead of python27, to avoid it being broken after #201859 is merged. Keep in mind that the above change will make this derivation only work with x86_64-linux for now (since pypy27_prebuilt is only packaged for that platform). However support for newer platforms can be added later, and a working package for one platform is better than a broken package in 4 platforms. --- pkgs/development/interpreters/python/default.nix | 6 +++--- .../interpreters/python/pypy/tk_tcl_paths.patch | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 7f220054f288..d0cb4a7a9920 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -247,13 +247,13 @@ in { sourceVersion = { major = "7"; minor = "3"; - patch = "9"; + patch = "11"; }; - sha256 = "sha256-ObCXKVb2VIzlgoAZ264SUDwy1svpGivs+I0+QsxSGXs="; + sha256 = "sha256-ERevtmgx2k6m852NIIR4enRon9AineC+MB+e2bJVCTw="; pythonVersion = "2.7"; db = db.override { dbmSupport = !stdenv.isDarwin; }; - python = __splicedPackages.python27; + python = __splicedPackages.pythonInterpreters.pypy27_prebuilt; inherit passthruFun; inherit (darwin) libunwind; inherit (darwin.apple_sdk.frameworks) Security; diff --git a/pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch b/pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch index 15d03830e07e..cf1bcddeba6b 100644 --- a/pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch +++ b/pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch @@ -1,14 +1,18 @@ --- a/lib_pypy/_tkinter/tklib_build.py +++ b/lib_pypy/_tkinter/tklib_build.py -@@ -17,19 +17,14 @@ elif sys.platform == 'win32': +@@ -17,23 +17,14 @@ elif sys.platform == 'win32': incdirs = [] linklibs = ['tcl85', 'tk85'] libdirs = [] -elif sys.platform == 'darwin': - # homebrew +- homebrew = os.environ.get('HOMEBREW_PREFIX', '') - incdirs = ['/usr/local/opt/tcl-tk/include'] - linklibs = ['tcl8.6', 'tk8.6'] -- libdirs = ['/usr/local/opt/tcl-tk/lib'] +- libdirs = [] +- if homebrew: +- incdirs.append(homebrew + '/include') +- libdirs.append(homebrew + '/opt/tcl-tk/lib') else: # On some Linux distributions, the tcl and tk libraries are # stored in /usr/include, so we must check this case also From 797e62d5038171e8a75a918a058ab11339b44fde Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 4 Jan 2023 22:05:42 +0000 Subject: [PATCH 05/13] pypy39: 7.3.9 -> 7.3.11 Also build it with pypy27 instead of python27. --- pkgs/development/interpreters/python/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index d0cb4a7a9920..b1aedad30027 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -264,13 +264,13 @@ in { sourceVersion = { major = "7"; minor = "3"; - patch = "9"; + patch = "11"; }; - sha256 = "sha256-Krqh6f4ewOIzyfvDd6DI6aBjQICo9PMOtomDAfZhjBI="; + sha256 = "sha256-sPMWb7Klqt/VzrnbXN1feSmg7MygK0omwNrgSS98qOo="; pythonVersion = "3.9"; db = db.override { dbmSupport = !stdenv.isDarwin; }; - python = __splicedPackages.python27; + python = __splicedPackages.pypy27; inherit passthruFun; inherit (darwin) libunwind; inherit (darwin.apple_sdk.frameworks) Security; From be456598db9e4ce72684686683210f11da232efb Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 4 Jan 2023 22:12:44 +0000 Subject: [PATCH 06/13] pypy38: 7.3.9 -> 7.3.11 --- pkgs/development/interpreters/python/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index b1aedad30027..53a471ccedf1 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -279,7 +279,7 @@ in { pypy38 = __splicedPackages.pypy39.override { self = __splicedPackages.pythonInterpreters.pypy38; pythonVersion = "3.8"; - sha256 = "sha256-W12dklbxKhKa+DhOL1gb36s7wPu+OgpIDZwdLpVJDrE="; + sha256 = "sha256-TWdpv8pzc06GZv1wUDt86wam4lkRDmFzMbs4mcpOYFg="; }; pypy37 = throw "pypy37 has been removed from nixpkgs since it is no longer supported upstream"; # Added 2023-01-04 From a49d01ce3f77ba8eb1eebfaf677e2645466b7925 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 4 Jan 2023 22:49:37 +0000 Subject: [PATCH 07/13] pythonInterpreters.pypy27_prebuilt: add support for aarch64-linux --- pkgs/development/interpreters/python/default.nix | 5 ++++- .../interpreters/python/pypy/prebuilt_2_7.nix | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 53a471ccedf1..6f4d941e9cbe 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -293,7 +293,10 @@ in { patch = "11"; }; - sha256 = "sha256-uo7ZWKkFwHNaTP/yh1wlCJlU3AIOCH2YKw/6W52jFs0="; # linux64 + sha256 = { + aarch64-linux = "sha256-6pJNod7+kyXvdg4oiwT5hGFOQFWA9TIetqXI9Tm9QVo="; + x86_64-linux = "sha256-uo7ZWKkFwHNaTP/yh1wlCJlU3AIOCH2YKw/6W52jFs0="; + }.${stdenv.system}; pythonVersion = "2.7"; inherit passthruFun; }; diff --git a/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix b/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix index 877a00efa483..c987f51295bb 100644 --- a/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix +++ b/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix @@ -55,11 +55,16 @@ let tk-8_5 ]; + downloadUrls = { + aarch64-linux = "https://downloads.python.org/pypy/pypy${pythonVersion}-v${version}-aarch64.tar.bz2"; + x86_64-linux = "https://downloads.python.org/pypy/pypy${pythonVersion}-v${version}-linux64.tar.bz2"; + }; + in with passthru; stdenv.mkDerivation { inherit pname version; src = fetchurl { - url = "https://downloads.python.org/pypy/pypy${pythonVersion}-v${version}-linux64.tar.bz2"; + url = downloadUrls.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); inherit sha256; }; @@ -124,7 +129,7 @@ in with passthru; stdenv.mkDerivation { homepage = "http://pypy.org/"; description = "Fast, compliant alternative implementation of the Python language (${pythonVersion})"; license = licenses.mit; - platforms = [ "x86_64-linux" ]; + platforms = lib.mapAttrsToList (arch: _: arch) downloadUrls; }; } From c89380b0c4ca9db893995669e012a63b587f9263 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 6 Jan 2023 11:54:36 +0000 Subject: [PATCH 08/13] pythonInterpreters.pypy27_prebuilt: use autoPatchelfHook --- .../interpreters/python/pypy/prebuilt_2_7.nix | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix b/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix index c987f51295bb..07895c733f84 100644 --- a/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix +++ b/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix @@ -1,11 +1,13 @@ { lib , stdenv , fetchurl +, autoPatchelfHook , python-setup-hook , self -, which # Dependencies , bzip2 +, gdbm +, sqlite , zlib , expat , ncurses6 @@ -48,6 +50,8 @@ let deps = [ bzip2 + gdbm + sqlite zlib expat ncurses6 @@ -68,9 +72,13 @@ in with passthru; stdenv.mkDerivation { inherit sha256; }; - buildInputs = [ which ]; + buildInputs = deps; + + nativeBuildInputs = [ autoPatchelfHook ]; installPhase = '' + runHook preInstall + mkdir -p $out/lib echo "Moving files to $out" mv -t $out bin include lib-python lib_pypy site-packages @@ -80,23 +88,20 @@ in with passthru; stdenv.mkDerivation { rm $out/bin/*.debug - echo "Patching binaries" - interpreter=$(patchelf --print-interpreter $(readlink -f $(which patchelf))) - patchelf --set-interpreter $interpreter \ - --set-rpath $out/lib \ - $out/bin/pypy* - - pushd $out - 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 ${lib.makeLibraryPath deps}:$out/lib {} \; - echo "Removing bytecode" - find . -name "__pycache__" -type d -depth -exec rm -rf {} \; - popd + find . -name "__pycache__" -type d -depth -delete # Include a sitecustomize.py file cp ${../sitecustomize.py} $out/${sitePackages}/sitecustomize.py + runHook postInstall + ''; + + preFixup = '' + find $out/{lib,lib_pypy*} -name "*.so" \ + -exec patchelf \ + --replace-needed libtinfow.so.6 libncursesw.so.6 \ + --replace-needed libgdbm.so.4 libgdbm_compat.so.4 {} \; ''; doInstallCheck = true; From 3d440c1c1eaae24cf6de05ac9a14569708817adc Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 6 Jan 2023 12:01:32 +0000 Subject: [PATCH 09/13] pythonInterpreters.pypy39_prebuilt: use autoPatchelfHook --- .../interpreters/python/pypy/prebuilt.nix | 58 +++++++++---------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/pkgs/development/interpreters/python/pypy/prebuilt.nix b/pkgs/development/interpreters/python/pypy/prebuilt.nix index 69de6e94e378..7c5d94f47445 100644 --- a/pkgs/development/interpreters/python/pypy/prebuilt.nix +++ b/pkgs/development/interpreters/python/pypy/prebuilt.nix @@ -1,18 +1,18 @@ { lib , stdenv , fetchurl +, autoPatchelfHook , python-setup-hook , self -, which # Dependencies , bzip2 -, sqlite -, zlib -, openssl , expat +, gdbm , ncurses6 +, sqlite , tcl-8_5 , tk-8_5 +, zlib # For the Python package set , packageOverrides ? (self: super: {}) , sourceVersion @@ -46,18 +46,7 @@ let pname = "${passthru.executable}_prebuilt"; version = with sourceVersion; "${major}.${minor}.${patch}"; - majorVersion = substring 0 1 pythonVersion; - - deps = [ - bzip2 - sqlite - zlib - openssl - expat - ncurses6 - tcl-8_5 - tk-8_5 - ]; + majorVersion = lib.versions.major pythonVersion; in with passthru; stdenv.mkDerivation { inherit pname version; @@ -67,9 +56,22 @@ in with passthru; stdenv.mkDerivation { inherit sha256; }; - buildInputs = [ which ]; + buildInputs = [ + bzip2 + expat + gdbm + ncurses6 + sqlite + tcl-8_5 + tk-8_5 + zlib + ]; + + nativeBuildInputs = [ autoPatchelfHook ]; installPhase = '' + runHook preInstall + mkdir -p $out echo "Moving files to $out" mv -t $out bin include lib @@ -78,24 +80,20 @@ in with passthru; stdenv.mkDerivation { rm $out/bin/*.debug - echo "Patching binaries" - interpreter=$(patchelf --print-interpreter $(readlink -f $(which patchelf))) - patchelf --set-interpreter $interpreter \ - --set-rpath $out/lib \ - $out/bin/pypy* - - pushd $out - - find ./lib -name "*.so" -exec patchelf --remove-needed libncursesw.so.6 --replace-needed libtinfow.so.6 libncursesw.so.6 {} \; - find ./lib -name "*.so" -exec patchelf --set-rpath ${lib.makeLibraryPath deps}:$out/lib {} \; - echo "Removing bytecode" - find . -name "__pycache__" -type d -depth -exec rm -rf {} \; - popd + find . -name "__pycache__" -type d -depth -delete # Include a sitecustomize.py file cp ${../sitecustomize.py} $out/${sitePackages}/sitecustomize.py + runHook postInstall + ''; + + preFixup = '' + find $out/{lib,lib_pypy*} -name "*.so" \ + -exec patchelf \ + --replace-needed libtinfow.so.6 libncursesw.so.6 \ + --replace-needed libgdbm.so.4 libgdbm_compat.so.4 {} \; ''; doInstallCheck = true; From 40db51d5631c28bf8ea7dc44505333b848e860d2 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 6 Jan 2023 13:11:44 +0000 Subject: [PATCH 10/13] pythonInterpreters.pypy27_prebuilt: add support to darwin --- .../interpreters/python/default.nix | 2 + .../interpreters/python/pypy/prebuilt_2_7.nix | 55 +++++++++++-------- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 6f4d941e9cbe..f48bc87b55ab 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -296,6 +296,8 @@ in { sha256 = { aarch64-linux = "sha256-6pJNod7+kyXvdg4oiwT5hGFOQFWA9TIetqXI9Tm9QVo="; x86_64-linux = "sha256-uo7ZWKkFwHNaTP/yh1wlCJlU3AIOCH2YKw/6W52jFs0="; + aarch64-darwin = "sha256-zFaWq0+TzTSBweSZC13t17pgrAYC+hiQ02iImmxb93E="; + x86_64-darwin = "sha256-Vt7unCJkD1aGw1udZP2xzjq9BEWD5AePCxccov0qGY4="; }.${stdenv.system}; pythonVersion = "2.7"; inherit passthruFun; diff --git a/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix b/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix index 07895c733f84..babaf3fd0a47 100644 --- a/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix +++ b/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix @@ -6,13 +6,13 @@ , self # Dependencies , bzip2 -, gdbm -, sqlite -, zlib , expat +, gdbm , ncurses6 +, sqlite , tcl-8_5 , tk-8_5 +, zlib # For the Python package set , packageOverrides ? (self: super: {}) , sourceVersion @@ -46,22 +46,13 @@ let pname = "${passthru.executable}_prebuilt"; version = with sourceVersion; "${major}.${minor}.${patch}"; - majorVersion = substring 0 1 pythonVersion; - - deps = [ - bzip2 - gdbm - sqlite - zlib - expat - ncurses6 - tcl-8_5 - tk-8_5 - ]; + majorVersion = lib.versions.major pythonVersion; downloadUrls = { aarch64-linux = "https://downloads.python.org/pypy/pypy${pythonVersion}-v${version}-aarch64.tar.bz2"; x86_64-linux = "https://downloads.python.org/pypy/pypy${pythonVersion}-v${version}-linux64.tar.bz2"; + aarch64-darwin = "https://downloads.python.org/pypy/pypy${pythonVersion}-v${version}-macos_arm64.tar.bz2"; + x86_64-darwin = "https://downloads.python.org/pypy/pypy${pythonVersion}-v${version}-macos_x86_64.tar.bz2"; }; in with passthru; stdenv.mkDerivation { @@ -72,9 +63,18 @@ in with passthru; stdenv.mkDerivation { inherit sha256; }; - buildInputs = deps; + buildInputs = [ + bzip2 + expat + gdbm + ncurses6 + sqlite + tcl-8_5 + tk-8_5 + zlib + ]; - nativeBuildInputs = [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; installPhase = '' runHook preInstall @@ -82,11 +82,11 @@ 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/ - - rm $out/bin/*.debug + mv $out/bin/libpypy*-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/ + ${lib.optionalString stdenv.isLinux '' + mv lib/libffi.so.6* $out/lib/ + rm $out/bin/*.debug + ''} echo "Removing bytecode" find . -name "__pycache__" -type d -depth -delete @@ -97,14 +97,21 @@ in with passthru; stdenv.mkDerivation { runHook postInstall ''; - preFixup = '' + preFixup = lib.optionalString (stdenv.isLinux) '' find $out/{lib,lib_pypy*} -name "*.so" \ -exec patchelf \ --replace-needed libtinfow.so.6 libncursesw.so.6 \ --replace-needed libgdbm.so.4 libgdbm_compat.so.4 {} \; + '' + lib.optionalString (stdenv.isDarwin) '' + install_name_tool \ + -change \ + @rpath/libpypy${optionalString isPy3k "3"}-c.dylib \ + $out/lib/libpypy${optionalString isPy3k "3"}-c.dylib \ + $out/bin/${executable} ''; - doInstallCheck = true; + # Native libraries are not working in darwin + doInstallCheck = !stdenv.isDarwin; # Check whether importing of (extension) modules functions installCheckPhase = let From 4645ec9de69d63200588c4a11cc399edcac33730 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 6 Jan 2023 14:16:22 +0000 Subject: [PATCH 11/13] pypy{27,38,39}: remove i686-linux, add aarch64-darwin --- pkgs/development/interpreters/python/pypy/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index 0c3b73e9fd5b..3004ebc1f751 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -173,7 +173,7 @@ in with passthru; stdenv.mkDerivation rec { homepage = "http://pypy.org/"; description = "Fast, compliant alternative implementation of the Python language (${pythonVersion})"; license = licenses.mit; - platforms = [ "aarch64-linux" "i686-linux" "x86_64-linux" "x86_64-darwin" ]; + platforms = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; maintainers = with maintainers; [ andersk ]; }; } From 997a09e6124f7a8a61f0dd138d64ecc9c15beff4 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 6 Jan 2023 15:59:26 +0000 Subject: [PATCH 12/13] pypy39: fix build in darwin --- pkgs/development/interpreters/python/pypy/default.nix | 2 +- pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index 3004ebc1f751..b2b7d0baa53e 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -156,7 +156,7 @@ in with passthru; stdenv.mkDerivation rec { ln -s $out/${executable}-c/lib-python/${if isPy3k then "3" else pythonVersion} $out/lib/${libPrefix} ${lib.optionalString stdenv.isDarwin '' - install_name_tool -change @rpath/libpypy${optionalString isPy3k "3"}-c.dylib $out/lib/libpypy${optionalString isPy3k "3"}-c.dylib $out/bin/${executable} + install_name_tool -change @rpath/lib${executable}-c.dylib $out/lib/lib${executable}-c.dylib $out/bin/${executable} ''} # verify cffi modules diff --git a/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix b/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix index babaf3fd0a47..444d43309511 100644 --- a/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix +++ b/pkgs/development/interpreters/python/pypy/prebuilt_2_7.nix @@ -105,8 +105,8 @@ in with passthru; stdenv.mkDerivation { '' + lib.optionalString (stdenv.isDarwin) '' install_name_tool \ -change \ - @rpath/libpypy${optionalString isPy3k "3"}-c.dylib \ - $out/lib/libpypy${optionalString isPy3k "3"}-c.dylib \ + @rpath/lib${executable}-c.dylib \ + $out/lib/lib${executable}-c.dylib \ $out/bin/${executable} ''; From aa0c474f4bf0d177ca79b05655bc0484c8a3c463 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 6 Jan 2023 19:31:13 +0000 Subject: [PATCH 13/13] pypy{27,38,39}: mark as broken in aarch64-darwin --- pkgs/development/interpreters/python/pypy/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index b2b7d0baa53e..801099dd44b3 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -174,6 +174,7 @@ in with passthru; stdenv.mkDerivation rec { description = "Fast, compliant alternative implementation of the Python language (${pythonVersion})"; license = licenses.mit; platforms = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; + broken = stdenv.isDarwin && stdenv.isAarch64; maintainers = with maintainers; [ andersk ]; }; }