Change:
Describe the bug pypy3 cannot be installed using on macOS. The package fails to build from source. To Reproduce Steps to reproduce the behavior: latest macOS (Catalina 10.15, but same error on previous version) latest (master) to home.packages ( from binary cache does work/does not have this problem) Expected behavior pypy3 package builds successfully (including all needed deps). Output/Errors Error encountered during compilation: Metadata
I am also not sure why from binary cache is not used (for pypy's dependency, it is compiled from source), but that could be my misunderstanding of normal behaviour -- I'm new!

Discussion:
}; sha256 = "0yq6ln1ic476sasp8zs4mg5i9524l1p96qwanp486rr1yza1grlg"; pythonVersion = "2.7"; <del> db = db.override { dbmSupport = true; }; </del> <ins> db = db.override { dbmSupport = !stdenv.isDarwin; }; </ins> python = python27; inherit passthruFun; <ins> inherit (darwin) libunwind; inherit (darwin.apple_sdk.frameworks) Security; </ins> }; pypy36 = callPackage ./pypy {

}; sha256 = "1hqvnran7d2dzj5555n7q680dyzhmbklz04pvkxgb5j604v7kkx1"; pythonVersion = "3.6"; <del> db = db.override { dbmSupport = true; }; </del> <ins> db = db.override { dbmSupport = !stdenv.isDarwin; }; </ins> python = python27; inherit passthruFun; <ins> inherit (darwin) libunwind; inherit (darwin.apple_sdk.frameworks) Security; </ins> }; pypy27_prebuilt = callPackage ./pypy/prebuilt.nix {

{ stdenv, substituteAll, fetchurl <del> , zlib ? null, zlibSupport ? true, bzip2, pkgconfig, libffi </del> <ins> , zlib ? null, zlibSupport ? true, bzip2, pkgconfig, libffi, libunwind, Security </ins> , sqlite, openssl_1_0_2, ncurses, python, expat, tcl, tk, tix, xlibsWrapper, libX11 , self, gdbm, db, lzma , python-setup-hook

stdenv.cc.libc ] ++ optionals zlibSupport [ zlib <ins> ] ++ optionals stdenv.isDarwin [ libunwind Security </ins> ]; hardeningDisable = optional stdenv.isi686 "pic";

mkdir -p $out/{bin,include,lib,${executable}-c} cp -R {include,lib_pypy,lib-python,${executable}-c} $out/${executable}-c <del> cp lib${executable}-c.so $out/lib/ </del> <ins> cp lib${executable}-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/ </ins> 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/lib-python/${if isPy3k then "3" else pythonVersion} $out/lib/${libPrefix} <ins> ${stdenv.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} ''} </ins> # verify cffi modules $out/bin/${executable} -c ${if isPy3k then "'import tkinter;import sqlite3;import curses;import lzma'" else "'import Tkinter;import sqlite3;import curses'"}

--- pypy-pypy-84a2f3e6a7f8.org/lib_pypy/_tkinter/tklib_build.py	2017-10-03 11:49:20.000000000 +0100 +++ pypy-pypy-84a2f3e6a7f8/lib_pypy/_tkinter/tklib_build.py	2017-11-21 13:20:51.398607530 +0000 <del> @@ -24,11 +24,11 @@ </del> <ins> @@ -17,18 +17,14 @@ incdirs = [] linklibs = ['tcl85', 'tk85'] libdirs = [] -elif sys.platform == 'darwin': -    incdirs = ['/System/Library/Frameworks/Tk.framework/Versions/Current/Headers/'] -    linklibs = ['tcl', 'tk'] -    libdirs = [] </ins> else: # On some Linux distributions, the tcl and tk libraries are # stored in /usr/include, so we must check this case also