1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 pythonOlder,
6 fetchPypi,
7 setuptools,
8 pytest-mock,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "tzlocal";
14 version = "5.2"; # version needs to be compatible with APScheduler
15
16 disabled = pythonOlder "3.8";
17
18 pyproject = true;
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-jTmSBVePGpNCgWQJzB5GqT69V1XjnqLYUzS+qRG/Dm4=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26
27 nativeCheckInputs = [
28 pytest-mock
29 pytestCheckHook
30 ];
31
32 disabledTests = [
33 "test_conflicting"
34 "test_noconflict"
35 "test_symlink_localtime"
36 ] ++ lib.optional stdenv.isDarwin "test_assert_tz_offset";
37
38 pythonImportsCheck = [ "tzlocal" ];
39
40 meta = with lib; {
41 description = "Tzinfo object for the local timezone";
42 homepage = "https://github.com/regebro/tzlocal";
43 changelog = "https://github.com/regebro/tzlocal/blob/${version}/CHANGES.txt";
44 license = licenses.cddl;
45 maintainers = with maintainers; [ dotlambda ];
46 };
47}