2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
2021-12-30 13:39:12 +00:00
|
|
|
, stdenv
|
2021-12-06 16:07:01 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
|
|
|
, pytz-deprecation-shim
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tzlocal";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "4.2"; # version needs to be compatible with APScheduler
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "ee5842fa3a795f023514ac2d801c4a81d1743bbe642e3940143326b3a00addd7";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pytz-deprecation-shim
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_conflicting"
|
|
|
|
"test_noconflict"
|
|
|
|
"test_symlink_localtime"
|
2021-12-30 13:39:12 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin "test_assert_tz_offset";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
pythonImportsCheck = [ "tzlocal" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Tzinfo object for the local timezone";
|
|
|
|
homepage = "https://github.com/regebro/tzlocal";
|
2022-04-27 09:35:20 +00:00
|
|
|
changelog = "https://github.com/regebro/tzlocal/blob/${version}/CHANGES.txt";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.cddl;
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|