about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ml-dtypes/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/ml-dtypes/default.nix')
-rw-r--r--pkgs/development/python-modules/ml-dtypes/default.nix39
1 files changed, 19 insertions, 20 deletions
diff --git a/pkgs/development/python-modules/ml-dtypes/default.nix b/pkgs/development/python-modules/ml-dtypes/default.nix
index 0160b24a5699f..683514fabd2dd 100644
--- a/pkgs/development/python-modules/ml-dtypes/default.nix
+++ b/pkgs/development/python-modules/ml-dtypes/default.nix
@@ -1,16 +1,17 @@
-{ lib
-, buildPythonPackage
-, pythonOlder
-, fetchFromGitHub
-, setuptools
-, numpy
-, pytestCheckHook
-, absl-py
+{
+  lib,
+  buildPythonPackage,
+  pythonOlder,
+  fetchFromGitHub,
+  setuptools,
+  numpy,
+  pytestCheckHook,
+  absl-py,
 }:
 
 buildPythonPackage rec {
   pname = "ml-dtypes";
-  version = "0.3.2";
+  version = "0.4.0";
   pyproject = true;
 
   disabled = pythonOlder "3.9";
@@ -19,7 +20,7 @@ buildPythonPackage rec {
     owner = "jax-ml";
     repo = "ml_dtypes";
     rev = "refs/tags/v${version}";
-    hash = "sha256-epWunA5FULmCuTABl3uckFuNaSEpqJxtp0n0loCb6Q0=";
+    hash = "sha256-3qZ1lS1IdSXNLRNE9tyuO9qauVBDlECZvmmwaOffD30=";
     # Since this upstream patch (https://github.com/jax-ml/ml_dtypes/commit/1bfd097e794413b0d465fa34f2eff0f3828ff521),
     # the attempts to use the nixpkgs packaged eigen dependency have failed.
     # Hence, we rely on the bundled eigen library.
@@ -31,16 +32,13 @@ buildPythonPackage rec {
       --replace "numpy~=1.21.2" "numpy" \
       --replace "numpy~=1.23.3" "numpy" \
       --replace "numpy~=1.26.0" "numpy" \
+      --replace "numpy==2.0.0rc1" "numpy" \
       --replace "setuptools~=68.1.0" "setuptools"
   '';
 
-  nativeBuildInputs = [
-    setuptools
-  ];
+  nativeBuildInputs = [ setuptools ];
 
-  propagatedBuildInputs = [
-    numpy
-  ];
+  propagatedBuildInputs = [ numpy ];
 
   nativeCheckInputs = [
     pytestCheckHook
@@ -53,15 +51,16 @@ buildPythonPackage rec {
     rm -rf ./ml_dtypes
   '';
 
-  pythonImportsCheck = [
-    "ml_dtypes"
-  ];
+  pythonImportsCheck = [ "ml_dtypes" ];
 
   meta = with lib; {
     description = "A stand-alone implementation of several NumPy dtype extensions used in machine learning libraries";
     homepage = "https://github.com/jax-ml/ml_dtypes";
     changelog = "https://github.com/jax-ml/ml_dtypes/releases/tag/v${version}";
     license = licenses.asl20;
-    maintainers = with maintainers; [ GaetanLepage samuela ];
+    maintainers = with maintainers; [
+      GaetanLepage
+      samuela
+    ];
   };
 }