blob: c56fbbb4285c327904fb3c0f44284e69bfc6a37b (
about) (
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
{
lib,
python3,
fetchPypi,
nixosTests,
defaultSpecificationFile ? null,
}:
let
python = python3;
in
python.pkgs.buildPythonApplication rec {
pname = "open-web-calendar";
version = "1.49";
pyproject = true;
disabled = python.pythonOlder "3.9";
src = fetchPypi {
inherit version;
pname = "open_web_calendar";
hash = "sha256-vtmIqiF85zn8CiMUWsCKJUzfiiK/j+xlZIyuIMGxR4I=";
};
# The Pypi tarball doesn't contain open_web_calendars/features
postPatch = ''
ln -s $PWD/features open_web_calendar/features
'';
postInstall = lib.optionalString (defaultSpecificationFile != null) ''
install -D ${defaultSpecificationFile} $out/$defaultSpecificationPath
'';
build-system = with python.pkgs; [
hatchling
hatch-vcs
hatch-requirements-txt
];
dependencies =
with python.pkgs;
[
flask-caching
flask-allowed-hosts
flask
icalendar
icalendar-compatibility
cryptography
bcrypt
caldav
requests
pyyaml
recurring-ical-events
gunicorn
lxml
beautifulsoup4
lxml-html-clean
pytz
mergecal
]
++ requests.optional-dependencies.socks;
nativeCheckInputs = with python.pkgs; [ pytestCheckHook ];
pytestFlagsArray = [ "open_web_calendar/test" ];
pythonImportsCheck = [ "open_web_calendar.app" ];
defaultSpecificationPath = "${python.sitePackages}/open_web_calendar/default_specification.yml";
passthru = {
inherit python;
tests = {
inherit (nixosTests) open-web-calendar;
};
};
meta = with lib; {
description = "Highly customizable web calendar that can be embedded into websites using ICal source links";
homepage = "https://open-web-calendar.quelltext.eu";
changelog =
let
v = builtins.replaceStrings [ "." ] [ "" ] version;
in
"https://open-web-calendar.quelltext.eu/changelog/#v${v}";
license = with licenses; [
gpl2Only
cc-by-sa-40
cc0
];
platforms = platforms.linux;
maintainers = with maintainers; [ erictapen ];
mainProgram = "open-web-calendar";
};
}
|