diff options
author | Herwig Hochleitner <herwig@bendlas.net> | 2017-08-01 00:46:26 +0200 |
---|---|---|
committer | Herwig Hochleitner <herwig@bendlas.net> | 2017-08-03 22:20:49 +0200 |
commit | 189bba047e0415e95916222933b7ecab87d988bc (patch) | |
tree | 50baa03e74306c48257d6d81cb37e1bb11f3b7d0 /pkgs/development/interpreters/python | |
parent | fec79a9b15b146d19ceb1ee724efd416eac8862a (diff) | |
download | nixlib-189bba047e0415e95916222933b7ecab87d988bc.tar nixlib-189bba047e0415e95916222933b7ecab87d988bc.tar.gz nixlib-189bba047e0415e95916222933b7ecab87d988bc.tar.bz2 nixlib-189bba047e0415e95916222933b7ecab87d988bc.tar.lz nixlib-189bba047e0415e95916222933b7ecab87d988bc.tar.xz nixlib-189bba047e0415e95916222933b7ecab87d988bc.tar.zst nixlib-189bba047e0415e95916222933b7ecab87d988bc.zip |
pypy: use pycparser from passed python
Diffstat (limited to 'pkgs/development/interpreters/python')
-rw-r--r-- | pkgs/development/interpreters/python/pypy/2.7/default.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/development/interpreters/python/pypy/2.7/default.nix b/pkgs/development/interpreters/python/pypy/2.7/default.nix index 238cfabf6153..0ea70cc022db 100644 --- a/pkgs/development/interpreters/python/pypy/2.7/default.nix +++ b/pkgs/development/interpreters/python/pypy/2.7/default.nix @@ -3,7 +3,7 @@ , makeWrapper, callPackage, self, gdbm, db , python-setup-hook # For the Python package set -, pkgs, pythonPackages, packageOverrides ? (self: super: {}) +, pkgs, packageOverrides ? (self: super: {}) }: assert zlibSupport -> zlib != null; @@ -17,6 +17,8 @@ let libPrefix = "pypy${majorVersion}"; sitePackages = "site-packages"; + pythonForPypy = python.withPackages (ppkgs: [ ppkgs.pycparser ]); + in stdenv.mkDerivation rec { name = "pypy-${version}"; inherit majorVersion version pythonVersion; @@ -35,8 +37,7 @@ in stdenv.mkDerivation rec { substituteInPlace "lib-python/2.7/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'" ''; - buildInputs = [ bzip2 openssl pkgconfig python libffi ncurses expat sqlite tk tcl xlibsWrapper libX11 makeWrapper gdbm db ] - ++ (with pythonPackages; [ pycparser ]) + buildInputs = [ bzip2 openssl pkgconfig pythonForPypy libffi ncurses expat sqlite tk tcl xlibsWrapper libX11 makeWrapper gdbm db ] ++ stdenv.lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++ stdenv.lib.optional zlibSupport zlib; @@ -64,7 +65,7 @@ in stdenv.mkDerivation rec { ''; buildPhase = '' - ${python.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 + ${pythonForPypy.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 = python-setup-hook sitePackages; |