summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/django-ical/default.nix
blob: 13f3986e99e009519d3eaef5bcb0a0860fb3ae64 (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
{
  buildPythonPackage,
  django,
  fetchFromGitHub,
  lib,
  pytest-django,
  pytestCheckHook,
  setuptools-scm,
  icalendar,
  django-recurrence,
}:
buildPythonPackage (finalAttrs: {
  pname = "django-ical";
  version = "1.9.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "jazzband";
    repo = "django-ical";
    tag = finalAttrs.version;
    hash = "sha256-DUe0loayGcUS7MTyLn+g0KBxbIY7VsaoQNHGSMbMI3U=";
  };

  build-system = [ setuptools-scm ];

  dependencies = [
    django
    django-recurrence
    icalendar
  ];

  preCheck = ''
    export DJANGO_SETTINGS_MODULE=test_settings
  '';

  disabledTestPaths = [
    # AssertionError: 'Japan' != 'JST': there seems to be wrong raw data feed
    "django_ical/tests/test_feed.py::ICal20FeedTest::test_timezone"
  ];

  pythonImportsCheck = [
    "django_ical"
  ];

  nativeCheckInputs = [
    pytest-django
    pytestCheckHook
  ];

  meta = {
    description = "iCal feeds for Django based on Django's syndication feed framework";
    homepage = "https://github.com/jazzband/django-ical";
    changelog = "https://github.com/jazzband/django-ical/blob/${finalAttrs.src.tag}/CHANGES.rst";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ kurogeek ];
  };
})