1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pytestCheckHook, 6 python-dateutil, 7 pythonAtLeast, 8 pythonOlder, 9 setuptools, 10}: 11 12buildPythonPackage rec { 13 pname = "freezegun"; 14 version = "1.5.4"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-eYuTcv3U2QfzPotqWLxk5oLZ/6jUlM5g94AZfugfrtE="; 22 }; 23 24 build-system = [ setuptools ]; 25 26 dependencies = [ python-dateutil ]; 27 28 nativeCheckInputs = [ pytestCheckHook ]; 29 30 disabledTests = lib.optionals (pythonAtLeast "3.13") [ 31 # https://github.com/spulec/freezegun/issues/547 32 "test_method_decorator_works_on_unittest_kwarg_frozen_time" 33 "test_method_decorator_works_on_unittest_kwarg_frozen_time_with_func" 34 "test_method_decorator_works_on_unittest_kwarg_hello" 35 ]; 36 37 pythonImportsCheck = [ "freezegun" ]; 38 39 meta = with lib; { 40 description = "Library that allows your Python tests to travel through time"; 41 homepage = "https://github.com/spulec/freezegun"; 42 changelog = "https://github.com/spulec/freezegun/blob/${version}/CHANGELOG"; 43 license = licenses.asl20; 44 maintainers = with maintainers; [ fab ]; 45 }; 46}