diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2021-12-09 12:27:33 -0800 |
---|---|---|
committer | Jonathan Ringer <jonringer117@gmail.com> | 2021-12-09 12:31:35 -0800 |
commit | 886e71f5dc4db8599c20335e8ebf1069ba45db44 (patch) | |
tree | 59ed3fab852a2cff6e67415886d64236e4cf480a /pkgs/development/python-modules/freezegun/default.nix | |
parent | 600442421b3e79d676de80d38a687e19f1950693 (diff) |
python310Packages.freezegun: fix build
Diffstat (limited to 'pkgs/development/python-modules/freezegun/default.nix')
-rw-r--r-- | pkgs/development/python-modules/freezegun/default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/freezegun/default.nix b/pkgs/development/python-modules/freezegun/default.nix index 742506b6089da..2ffefa1a4e095 100644 --- a/pkgs/development/python-modules/freezegun/default.nix +++ b/pkgs/development/python-modules/freezegun/default.nix @@ -1,6 +1,8 @@ { lib , buildPythonPackage , pythonOlder +, pythonAtLeast +, fetchpatch , fetchPypi , python-dateutil , pytestCheckHook @@ -16,6 +18,14 @@ buildPythonPackage rec { sha256 = "177f9dd59861d871e27a484c3332f35a6e3f5d14626f2bf91be37891f18927f3"; }; + patches = lib.optionals (pythonAtLeast "3.10") [ + # Staticmethods in 3.10+ are now callable, prevent freezegun to attempt to decorate them + (fetchpatch { + url = "https://github.com/spulec/freezegun/pull/397/commits/e63874ce75a74a1159390914045fe8e7955b24c4.patch"; + sha256 = "sha256-FNABqVN5DFqVUR88lYzwbfsZj3xcB9/MvQtm+I2VjnI="; + }) + ]; + propagatedBuildInputs = [ python-dateutil ]; checkInputs = [ pytestCheckHook ]; |