2017-05-17 07:19:16 +01:00
|
|
|
{ lib
|
2021-02-17 22:11:21 +00:00
|
|
|
, stdenv
|
2017-05-17 07:19:16 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchPypi
|
|
|
|
, doit
|
|
|
|
, glibcLocales
|
|
|
|
, pytest
|
|
|
|
, pytestcov
|
2018-02-12 11:46:57 +00:00
|
|
|
, mock
|
2017-05-17 07:19:16 +01:00
|
|
|
, pygments
|
|
|
|
, pillow
|
|
|
|
, dateutil
|
|
|
|
, docutils
|
|
|
|
, Mako
|
|
|
|
, unidecode
|
|
|
|
, lxml
|
|
|
|
, Yapsy
|
|
|
|
, PyRSS2Gen
|
|
|
|
, Logbook
|
|
|
|
, blinker
|
|
|
|
, natsort
|
|
|
|
, requests
|
|
|
|
, piexif
|
|
|
|
, markdown
|
|
|
|
, phpserialize
|
|
|
|
, jinja2
|
2018-09-12 09:12:05 +01:00
|
|
|
, Babel
|
|
|
|
, freezegun
|
|
|
|
, toml
|
|
|
|
, notebook
|
2019-02-24 16:11:37 +00:00
|
|
|
, ruamel_yaml
|
2019-04-23 10:57:21 +01:00
|
|
|
, aiohttp
|
|
|
|
, watchdog
|
2017-05-17 07:19:16 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Nikola";
|
2021-02-15 21:35:48 +00:00
|
|
|
version = "8.1.3";
|
2017-05-17 07:19:16 +01:00
|
|
|
|
|
|
|
# Nix contains only Python 3 supported version of doit, which is a dependency
|
|
|
|
# of Nikola. Python 2 support would require older doit 0.29.0 (which on the
|
|
|
|
# other hand doesn't support Python 3.3). So, just disable Python 2.
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2018-09-12 09:12:05 +01:00
|
|
|
checkInputs = [ pytest pytestcov mock glibcLocales freezegun ];
|
2017-05-17 07:19:16 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2019-04-04 09:43:33 +01:00
|
|
|
# requirements.txt
|
|
|
|
doit pygments pillow dateutil docutils Mako markdown unidecode
|
|
|
|
lxml Yapsy PyRSS2Gen Logbook blinker natsort requests piexif Babel
|
|
|
|
# requirements-extras.txt
|
2019-04-23 10:57:21 +01:00
|
|
|
phpserialize jinja2 toml notebook ruamel_yaml aiohttp watchdog
|
2017-05-17 07:19:16 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-15 21:35:48 +00:00
|
|
|
sha256 = "05eac356bb4273cdd05d2dd6ad676226133496c457af91987c3f0d40e2fe57ef";
|
2018-12-03 09:56:42 +00:00
|
|
|
};
|
|
|
|
|
2019-06-01 11:56:30 +01:00
|
|
|
patchPhase = ''
|
|
|
|
# upstream added bound so that requires.io doesn't send mails about update
|
|
|
|
# nikola should work with markdown 3.0: https://github.com/getnikola/nikola/pull/3175#issue-220147596
|
|
|
|
sed -i 's/Markdown>.*/Markdown/' requirements.txt
|
|
|
|
'';
|
|
|
|
|
2018-09-12 09:12:05 +01:00
|
|
|
checkPhase = ''
|
|
|
|
LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" py.test .
|
|
|
|
'';
|
|
|
|
|
2017-05-17 07:19:16 +01:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://getnikola.com/";
|
2017-05-17 07:19:16 +01:00
|
|
|
description = "A modular, fast, simple, static website and blog generator";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ jluttine ];
|
2021-02-17 22:11:21 +00:00
|
|
|
# all tests fail
|
|
|
|
broken = stdenv.isDarwin;
|
2017-05-17 07:19:16 +01:00
|
|
|
};
|
|
|
|
}
|