1{ lib
2, buildPythonPackage
3, isPy3k
4, fetchPypi
5, fetchpatch
6, doit
7, glibcLocales
8, pytest
9, pytestcov
10, mock
11, pygments
12, pillow
13, dateutil
14, docutils
15, Mako
16, unidecode
17, lxml
18, Yapsy
19, PyRSS2Gen
20, Logbook
21, blinker
22, setuptools
23, natsort
24, requests
25, piexif
26, markdown
27, phpserialize
28, jinja2
29, Babel
30, freezegun
31, pyyaml
32, toml
33, notebook
34}:
35
36buildPythonPackage rec {
37 pname = "Nikola";
38 version = "8.0.1";
39
40 # Nix contains only Python 3 supported version of doit, which is a dependency
41 # of Nikola. Python 2 support would require older doit 0.29.0 (which on the
42 # other hand doesn't support Python 3.3). So, just disable Python 2.
43 disabled = !isPy3k;
44
45 checkInputs = [ pytest pytestcov mock glibcLocales freezegun ];
46
47 propagatedBuildInputs = [
48 pygments pillow dateutil docutils Mako unidecode lxml Yapsy PyRSS2Gen
49 Logbook blinker setuptools natsort requests piexif markdown phpserialize
50 jinja2 doit Babel pyyaml toml notebook
51 ];
52
53 src = fetchPypi {
54 inherit pname version;
55 sha256 = "18bq68f9v7xk9ahjl6x4k77yysq5g6g07ng2ndbg35kcsdnw4nk6";
56 };
57
58 patches = fetchpatch {
59 url = https://github.com/getnikola/nikola/commit/d40be74a86af71b5206dc22beb82fcd0d08ea2f6.patch;
60 sha256 = "0disr8bxbfjymwlbm82mxkal3ynnv8zfiqsgfh9fkqhb35bn4l8j";
61 };
62
63 checkPhase = ''
64 LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" py.test .
65 '';
66
67 meta = {
68 homepage = https://getnikola.com/;
69 description = "A modular, fast, simple, static website and blog generator";
70 license = lib.licenses.mit;
71 maintainers = with lib.maintainers; [ jluttine ];
72 };
73}