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