nixpkgs-suyu/pkgs/development/python-modules/Nikola/default.nix

77 lines
1.7 KiB
Nix
Raw Normal View History

2017-05-17 08:19:16 +02:00
{ lib
, buildPythonPackage
, isPy3k
, fetchPypi
, doit
, glibcLocales
, pytest
, pytestcov
, mock
2017-05-17 08:19:16 +02:00
, pygments
, pillow
, dateutil
, docutils
, Mako
, unidecode
, lxml
, Yapsy
, PyRSS2Gen
, Logbook
, blinker
, natsort
, requests
, piexif
, markdown
, phpserialize
, jinja2
2018-09-12 10:12:05 +02:00
, Babel
, freezegun
, toml
, notebook
2019-02-24 17:11:37 +01:00
, ruamel_yaml
, aiohttp
, watchdog
2017-05-17 08:19:16 +02:00
}:
buildPythonPackage rec {
pname = "Nikola";
2019-11-19 15:35:31 +01:00
version = "8.0.3";
2017-05-17 08:19:16 +02: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 10:12:05 +02:00
checkInputs = [ pytest pytestcov mock glibcLocales freezegun ];
2017-05-17 08:19:16 +02:00
propagatedBuildInputs = [
# requirements.txt
doit pygments pillow dateutil docutils Mako markdown unidecode
lxml Yapsy PyRSS2Gen Logbook blinker natsort requests piexif Babel
# requirements-extras.txt
phpserialize jinja2 toml notebook ruamel_yaml aiohttp watchdog
2017-05-17 08:19:16 +02:00
];
src = fetchPypi {
inherit pname version;
2019-11-19 15:35:31 +01:00
sha256 = "a53470be082fce1843fb73002be2504828f9abc49a84eab5d1effc06ae2a5ddc";
};
2019-06-01 12:56:30 +02: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 10:12:05 +02:00
checkPhase = ''
LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" py.test .
'';
2017-05-17 08:19:16 +02:00
meta = {
homepage = https://getnikola.com/;
2017-05-17 08:19:16 +02:00
description = "A modular, fast, simple, static website and blog generator";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jluttine ];
};
}