1{
2 lib,
3 aiohttp,
4 babel,
5 blinker,
6 buildPythonPackage,
7 docutils,
8 doit,
9 feedparser,
10 fetchPypi,
11 fetchpatch2,
12 freezegun,
13 ghp-import,
14 hsluv,
15 html5lib,
16 ipykernel,
17 jinja2,
18 lxml,
19 mako,
20 markdown,
21 micawber,
22 mock,
23 natsort,
24 notebook,
25 phpserialize,
26 piexif,
27 pillow,
28 pygal,
29 pygments,
30 pyphen,
31 pyrss2gen,
32 pytestCheckHook,
33 python-dateutil,
34 pythonOlder,
35 requests,
36 ruamel-yaml,
37 setuptools,
38 toml,
39 typogrify,
40 unidecode,
41 watchdog,
42 yapsy,
43}:
44
45buildPythonPackage rec {
46 pname = "nikola";
47 version = "8.3.0";
48 pyproject = true;
49
50 disabled = pythonOlder "3.8";
51
52 src = fetchPypi {
53 pname = "Nikola";
54 inherit version;
55 hash = "sha256-VYuhiGLMTHcOZM8/bGZT7Xx5BOHo9gsMPjufYglrBL0=";
56 };
57
58 patches = [
59 (fetchpatch2 {
60 name = "nikola-pytest8-compat.patch";
61 url = "https://github.com/getnikola/nikola/commit/5f1003f91cd59f62622d379efe9be5fb19a1ed3e.patch";
62 hash = "sha256-2H3125RUnwvN/XgwgfRe1139rhAz/9viMEcUYRGQMPs=";
63 })
64 ];
65
66 postPatch = ''
67 substituteInPlace setup.cfg \
68 --replace-fail "--cov nikola --cov-report term-missing" ""
69 '';
70
71 nativeBuildInputs = [ setuptools ];
72
73 propagatedBuildInputs = [
74 aiohttp
75 babel
76 blinker
77 docutils
78 doit
79 feedparser
80 ghp-import
81 hsluv
82 html5lib
83 ipykernel
84 jinja2
85 lxml
86 mako
87 markdown
88 micawber
89 natsort
90 notebook
91 phpserialize
92 piexif
93 pillow
94 pygal
95 pygments
96 pyphen
97 pyrss2gen
98 python-dateutil
99 requests
100 ruamel-yaml
101 toml
102 typogrify
103 unidecode
104 watchdog
105 yapsy
106 ];
107
108 nativeCheckInputs = [
109 freezegun
110 mock
111 pytestCheckHook
112 ];
113
114 disabledTests = [
115 # AssertionError
116 "test_compiling_markdown"
117 # Date formatting slightly differs from expectation
118 "test_format_date_long"
119 "test_format_date_timezone"
120 "test_format_date_locale_variants"
121 "test_format_date_locale_variants"
122 ];
123
124 pythonImportsCheck = [ "nikola" ];
125
126 meta = with lib; {
127 description = "Static website and blog generator";
128 mainProgram = "nikola";
129 homepage = "https://getnikola.com/";
130 changelog = "https://github.com/getnikola/nikola/blob/v${version}/CHANGES.txt";
131 license = licenses.mit;
132 maintainers = with maintainers; [ jluttine ];
133 };
134}