about summary refs log tree commit diff
path: root/pkgs/development/python-modules/astropy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/astropy/default.nix')
-rw-r--r--pkgs/development/python-modules/astropy/default.nix22
1 files changed, 19 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix
index 5aca4395568e8..c6a7f9fea08be 100644
--- a/pkgs/development/python-modules/astropy/default.nix
+++ b/pkgs/development/python-modules/astropy/default.nix
@@ -1,6 +1,7 @@
 {
   lib,
   fetchPypi,
+  fetchpatch,
   buildPythonPackage,
   pythonOlder,
 
@@ -27,16 +28,29 @@
 
 buildPythonPackage rec {
   pname = "astropy";
-  version = "6.0.1";
+  version = "6.1.1";
   pyproject = true;
 
   disabled = pythonOlder "3.8"; # according to setup.cfg
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-ial13jVtBgjnTx9JNEL7Osu7eoW3OeB0RguwNAAUs5w=";
+    hash = "sha256-5cb0XZEcMKy41VbH+O2ZSuxxsQjmHu5QZ/AK8eTjYTg=";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "drop-usage-known-bad-actor-cdn.patch";
+      url = "https://github.com/astropy/astropy/commit/d329cb38e49584ad0ff5244fd2fff74cfa1f92f1.patch";
+      hash = "sha256-+DbDwYeyR+mMDLRB4jiyol/5WO0LwqSCCEwjgflxoTk=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace-fail "numpy>=2.0.0"  "numpy"
+  '';
+
   nativeBuildInputs = [
     astropy-extension-helpers
     cython
@@ -83,7 +97,9 @@ buildPythonPackage rec {
     "test_sidereal_lon_independent"
     "test_timedelta_full_precision_arithmetic"
     "test_datetime_to_timedelta"
-  ] ++ lib.optionals stdenv.isDarwin [ "test_sidereal_lat_independent" ];
+
+    "test_datetime_difference_agrees_with_timedelta_no_hypothesis"
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_sidereal_lat_independent" ];
 
   meta = {
     description = "Astronomy/Astrophysics library for Python";