summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/interpreters/pypy/default.nix14
1 files changed, 4 insertions, 10 deletions
diff --git a/pkgs/development/interpreters/pypy/default.nix b/pkgs/development/interpreters/pypy/default.nix
index 1edda33a1ae9..8abc1ac489cd 100644
--- a/pkgs/development/interpreters/pypy/default.nix
+++ b/pkgs/development/interpreters/pypy/default.nix
@@ -31,16 +31,6 @@ let
       (stdenv.lib.filter (x : x.outPath != stdenv.cc.libc.outPath or "") buildInputs));
 
     preConfigure = ''
-      substituteInPlace Makefile \
-        --replace "-Ojit" "-Ojit --batch" \
-        --replace "pypy/goal/targetpypystandalone.py" "pypy/goal/targetpypystandalone.py --withmod-_minimal_curses --withmod-unicodedata --withmod-thread --withmod-bz2 --withmod-_multiprocessing"
-
-      # we are using cpython and not pypy to do translation
-      substituteInPlace rpython/bin/rpython \
-        --replace "/usr/bin/env pypy" "${pythonFull}/bin/python"
-      substituteInPlace pypy/goal/targetpypystandalone.py \
-        --replace "/usr/bin/env pypy" "${pythonFull}/bin/python"
-
       # hint pypy to find nix ncurses
       substituteInPlace pypy/module/_minimal_curses/fficurses.py \
         --replace "/usr/include/ncurses/curses.h" "${ncurses}/include/curses.h" \
@@ -57,6 +47,10 @@ let
       sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite}/include'], library_dirs=['${sqlite}/lib']@" lib_pypy/_sqlite3_build.py
     '';
 
+    buildPhase = ''
+      ${pythonFull.interpreter} rpython/bin/rpython --make-jobs="$NIX_BUILD_CORES" -Ojit --batch pypy/goal/targetpypystandalone.py --withmod-_minimal_curses --withmod-unicodedata --withmod-thread --withmod-bz2 --withmod-_multiprocessing
+    '';
+
     setupHook = ./setup-hook.sh;
 
     postBuild = ''