diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2021-07-16 01:59:26 -0400 |
---|---|---|
committer | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2021-07-16 01:59:26 -0400 |
commit | b43959a817c115d92d5adcf7c6db80e58aa22e92 (patch) | |
tree | 215ed07c92830cac15990cc093fb8ba3ee24760f /pkgs/development/interpreters/python/pypy/default.nix | |
parent | b466d6c702867f6a3844db58dd4da6298a1df25c (diff) |
pypy: fix for sandboxed darwin
The implementation of multiprocessing.cpu_count() tries to call the
impure sysctl binary. In the sandbox that fails, so cffi bindings are
not generated.
Diffstat (limited to 'pkgs/development/interpreters/python/pypy/default.nix')
-rw-r--r-- | pkgs/development/interpreters/python/pypy/default.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index a5ba4983e43c..1f229c7d34e2 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -84,6 +84,9 @@ in with passthru; stdenv.mkDerivation rec { ]; postPatch = '' + substituteInPlace lib_pypy/pypy_tools/build_cffi_imports.py \ + --replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES" + 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'" sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite.dev}/include'], library_dirs=['${sqlite.out}/lib']@" lib_pypy/_sqlite3_build.py |