12 buildPythonPackage rec {
13 pname = "time-machine";
17 disabled = pythonOlder "3.10";
19 src = fetchFromGitHub {
21 repo = "time-machine";
23 hash = "sha256-0WYmkrMMeCkBYxy2qGovdxftzrYW9x/3tdeBcYC47Z0=";
26 build-system = [ setuptools ];
32 nativeCheckInputs = [ pytestCheckHook ];
34 disabledTests = lib.optionals (pythonAtLeast "3.9") [
35 # https://github.com/adamchainz/time-machine/issues/405
36 "test_destination_string_naive"
37 # Assertion Errors related to Africa/Addis_Ababa
38 "test_destination_datetime_tzinfo_zoneinfo_nested"
39 "test_destination_datetime_tzinfo_zoneinfo_no_orig_tz"
40 "test_destination_datetime_tzinfo_zoneinfo"
41 "test_move_to_datetime_with_tzinfo_zoneinfo"
44 pythonImportsCheck = [ "time_machine" ];
47 description = "Travel through time in your tests";
48 homepage = "https://github.com/adamchainz/time-machine";
49 changelog = "https://github.com/adamchainz/time-machine/blob/${src.rev}/CHANGELOG.rst";
50 license = licenses.mit;
51 maintainers = with maintainers; [ fab ];