summary refs log tree commit diff
path: root/pkgs/development/python-modules/numba/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/numba/default.nix')
-rw-r--r--pkgs/development/python-modules/numba/default.nix19
1 files changed, 6 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix
index 874cbe2376d..cbf8fa40d78 100644
--- a/pkgs/development/python-modules/numba/default.nix
+++ b/pkgs/development/python-modules/numba/default.nix
@@ -12,7 +12,6 @@
 , importlib-metadata
 , substituteAll
 , runCommand
-, fetchpatch
 
 , config
 
@@ -29,15 +28,16 @@ let
 in buildPythonPackage rec {
   # Using an untagged version, with numpy 1.25 support, when it's released
   # also drop the versioneer patch in postPatch
-  version = "unstable-2023-08-11";
+  version = "0.58.1";
   pname = "numba";
-  format = "setuptools";
-  disabled = pythonOlder "3.6" || pythonAtLeast "3.11";
+  pyproject = true;
+
+  disabled = pythonOlder "3.8" || pythonAtLeast "3.12";
 
   src = fetchFromGitHub {
     owner = "numba";
     repo = "numba";
-    rev = "6f0c5060a69656319ab0bae1d8bb89484cd5631f";
+    rev = "refs/tags/${version}";
     # Upstream uses .gitattributes to inject information about the revision
     # hash and the refname into `numba/_version.py`, see:
     #
@@ -50,7 +50,7 @@ in buildPythonPackage rec {
     # use `forceFetchGit = true;`.` If in the future we'll observe the hash
     # changes too often, we can always use forceFetchGit, and inject the
     # relevant strings ourselves, using `sed` commands, in extraPostFetch.
-    hash = "sha256-34qEn/i2X6Xu1cjuiRrmrm/HryNoN+Am4A4pJ90srAE=";
+    hash = "sha256-1Tj2GFoUwRRCWBFxhreF+0Mr+Tjyb7+X4peO+T0qGNs=";
   };
   env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1";
 
@@ -78,13 +78,6 @@ in buildPythonPackage rec {
       cuda_toolkit_lib_path = cudatoolkit.lib;
     })
   ];
-  # with untagged version we need to specify the correct version ourselves
-
-  postPatch = ''
-    substituteInPlace setup.py --replace "version=versioneer.get_version()" "version='0.57.1'"
-    substituteInPlace numba/_version.py \
-      --replace 'git_refnames = " (HEAD -> main)"' 'git_refnames = "tag: 0.57.1"'
-  '';
 
   postFixup = lib.optionalString cudaSupport ''
     find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do