summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/x-wr-timezone/default.nix
blob: 32c7b83adef6f866ac362137ddc85a1cbdb08eed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  click,
  icalendar,
  tzdata,
  pytestCheckHook,
  restructuredtext-lint,
  pygments,
  pytz,
  pytest-click,
}:

buildPythonPackage rec {
  pname = "x-wr-timezone";
  version = "2.0.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "niccokunzmann";
    repo = "x-wr-timezone";
    tag = "v${version}";
    hash = "sha256-Llpe3Z0Yfd0vRgx95D4YVrnNJk0g/VqPuNvtUrUpFk0=";
  };

  build-system = [ setuptools ];

  dependencies = [
    click
    icalendar
    tzdata
  ];

  nativeCheckInputs = [
    pytestCheckHook
    restructuredtext-lint
    pygments
    pytz
    pytest-click
  ];

  preCheck = ''
    export PATH=$out/bin:$PATH
  '';

  pythonImportsCheck = [ "x_wr_timezone" ];

  meta = {
    changelog = "https://github.com/niccokunzmann/x-wr-timezone/blob/${src.tag}/README.rst#changelog";
    description = "Convert calendars using X-WR-TIMEZONE to standard ones";
    homepage = "https://github.com/niccokunzmann/x-wr-timezone";
    license = lib.licenses.lgpl3Plus;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}