From abde345eca6de5a6dfa07cbc3cfda7dfd1a52648 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 30 Jun 2024 23:33:06 +0300 Subject: [PATCH] python3Packages.astropy: apply patch removing the usage of polyfill.io `cdn.polyfill.io` is now considered to be a bad actor. https://sansec.io/research/polyfill-supply-chain-attack Disabled on more test that was flaky on my side. --- pkgs/development/python-modules/astropy/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix index 6da626bb545d..c88029cb09a8 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, @@ -37,6 +38,14 @@ buildPythonPackage rec { 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" @@ -88,6 +97,8 @@ buildPythonPackage rec { "test_sidereal_lon_independent" "test_timedelta_full_precision_arithmetic" "test_datetime_to_timedelta" + + "test_datetime_difference_agrees_with_timedelta_no_hypothesis" ] ++ lib.optionals stdenv.isDarwin [ "test_sidereal_lat_independent" ]; meta = {