summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-07-17 12:01:55 +0000
committerGitHub <noreply@github.com>2021-07-17 12:01:55 +0000
commit732bd85cf5ce831a88eb7871fd186c386a6493b0 (patch)
treef2f0e28400338209efd16ff0459e5769e566b052 /pkgs/development/interpreters
parent29bbe7c6169adf86e8e51f14ef6c133480f608df (diff)
parent4ee4d805d29afac902a3c631ab13ad08fbe1e84d (diff)
downloadnixpkgs-732bd85cf5ce831a88eb7871fd186c386a6493b0.tar
nixpkgs-732bd85cf5ce831a88eb7871fd186c386a6493b0.tar.gz
nixpkgs-732bd85cf5ce831a88eb7871fd186c386a6493b0.tar.bz2
nixpkgs-732bd85cf5ce831a88eb7871fd186c386a6493b0.tar.lz
nixpkgs-732bd85cf5ce831a88eb7871fd186c386a6493b0.tar.xz
nixpkgs-732bd85cf5ce831a88eb7871fd186c386a6493b0.tar.zst
nixpkgs-732bd85cf5ce831a88eb7871fd186c386a6493b0.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/default.nix14
-rw-r--r--pkgs/development/interpreters/python/pypy/default.nix12
-rw-r--r--pkgs/development/interpreters/python/pypy/dont_fetch_vendored_deps.patch12
-rw-r--r--pkgs/development/interpreters/python/pypy/sqlite_paths.patch12
4 files changed, 41 insertions, 9 deletions
diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix
index 9f68819c6c5..f4943b25187 100644
--- a/pkgs/development/interpreters/python/default.nix
+++ b/pkgs/development/interpreters/python/default.nix
@@ -239,9 +239,9 @@ in {
     sourceVersion = {
       major = "7";
       minor = "3";
-      patch = "3";
+      patch = "5";
     };
-    sha256 = "0di3dr5ry4r0hwxh4fbqjhyl5im948wdby0bhijzsxx83c2qhd7n";
+    sha256 = "sha256-wERP2YcwWMHA2Z4TqTTpIoXLBZksmWi/Ujwyv5vsCp0=";
     pythonVersion = "2.7";
     db = db.override { dbmSupport = !stdenv.isDarwin; };
     python = python27;
@@ -250,15 +250,15 @@ in {
     inherit (darwin.apple_sdk.frameworks) Security;
   };
 
-  pypy36 = callPackage ./pypy {
-    self = pypy36;
+  pypy37 = callPackage ./pypy {
+    self = pypy37;
     sourceVersion = {
       major = "7";
       minor = "3";
-      patch = "3";
+      patch = "5";
     };
-    sha256 = "1bq5i2mqgjjfc4rhxgxm6ihwa76vn2qapd7l59ri7xp01p522gd2";
-    pythonVersion = "3.6";
+    sha256 = "sha256-2SD+QJqeytnQdKqFaMpfPtNYG+ZvZuXYmIt+xm5tmaI=";
+    pythonVersion = "3.7";
     db = db.override { dbmSupport = !stdenv.isDarwin; };
     python = python27;
     inherit passthruFun;
diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix
index a5ba4983e43..668a4e24b39 100644
--- a/pkgs/development/interpreters/python/pypy/default.nix
+++ b/pkgs/development/interpreters/python/pypy/default.nix
@@ -73,6 +73,8 @@ in with passthru; stdenv.mkDerivation rec {
   LD_LIBRARY_PATH = makeLibraryPath (filter (x : x.outPath != stdenv.cc.libc.outPath or "") buildInputs);
 
   patches = [
+    ./dont_fetch_vendored_deps.patch
+
     (substituteAll {
       src = ./tk_tcl_paths.patch;
       inherit tk tcl;
@@ -81,12 +83,18 @@ in with passthru; stdenv.mkDerivation rec {
       tk_libprefix = tk.libPrefix;
       tcl_libprefix = tcl.libPrefix;
     })
+
+    (substituteAll {
+      src = ./sqlite_paths.patch;
+      inherit (sqlite) out dev;
+    })
   ];
 
   postPatch = ''
-    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'"
+    substituteInPlace lib_pypy/pypy_tools/build_cffi_imports.py \
+      --replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES"
 
-    sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite.dev}/include'], library_dirs=['${sqlite.out}/lib']@" lib_pypy/_sqlite3_build.py
+    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'"
   '';
 
   buildPhase = ''
diff --git a/pkgs/development/interpreters/python/pypy/dont_fetch_vendored_deps.patch b/pkgs/development/interpreters/python/pypy/dont_fetch_vendored_deps.patch
new file mode 100644
index 00000000000..bc959e15d1a
--- /dev/null
+++ b/pkgs/development/interpreters/python/pypy/dont_fetch_vendored_deps.patch
@@ -0,0 +1,12 @@
+diff -ur a/lib_pypy/pypy_tools/build_cffi_imports.py b/lib_pypy/pypy_tools/build_cffi_imports.py
+--- a/lib_pypy/pypy_tools/build_cffi_imports.py	2021-04-12 01:11:48.000000000 -0400
++++ b/lib_pypy/pypy_tools/build_cffi_imports.py	2021-07-16 06:37:03.000000000 -0400
+@@ -225,6 +225,8 @@
+ 
+         print('*', ' '.join(args), file=sys.stderr)
+         if embed_dependencies and key in cffi_dependencies:
++            print("Nixpkgs: skipping fetching/building dependency", key)
++        elif False:
+             status, stdout, stderr = _build_dependency(key)
+             if status != 0:
+                 failures.append((key, module))
diff --git a/pkgs/development/interpreters/python/pypy/sqlite_paths.patch b/pkgs/development/interpreters/python/pypy/sqlite_paths.patch
new file mode 100644
index 00000000000..42de7efb3ea
--- /dev/null
+++ b/pkgs/development/interpreters/python/pypy/sqlite_paths.patch
@@ -0,0 +1,12 @@
+diff -ur a/lib_pypy/_sqlite3_build.py b/lib_pypy/_sqlite3_build.py
+--- a/lib_pypy/_sqlite3_build.py	2021-04-12 01:11:48.000000000 -0400
++++ b/lib_pypy/_sqlite3_build.py	2021-07-14 18:08:33.000000000 -0400
+@@ -301,6 +301,8 @@
+ else:
+     extra_args = dict(
+         libraries=libraries,
++        include_dirs=['@dev@/include'],
++        library_dirs=['@out@/lib']
+     )
+ 
+ SOURCE = """