home-assistant: 2025.1.1 -> 2025.1.2 (#372513)
[NixPkgs.git] / pkgs / development / python-modules / time-machine / default.nix
blob6794870e32d176fba32690e70014d594b44cfa07
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonAtLeast,
6   pythonOlder,
7   setuptools,
8   python-dateutil,
9   pytestCheckHook,
12 buildPythonPackage rec {
13   pname = "time-machine";
14   version = "2.15.0";
15   pyproject = true;
17   disabled = pythonOlder "3.10";
19   src = fetchFromGitHub {
20     owner = "adamchainz";
21     repo = "time-machine";
22     tag = version;
23     hash = "sha256-0WYmkrMMeCkBYxy2qGovdxftzrYW9x/3tdeBcYC47Z0=";
24   };
26   build-system = [ setuptools ];
28   dependencies = [
29     python-dateutil
30   ];
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"
42   ];
44   pythonImportsCheck = [ "time_machine" ];
46   meta = with lib; {
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 ];
52   };