2021-08-27 14:25:00 +00:00
|
|
|
{ lib
|
|
|
|
, beautifulsoup4
|
|
|
|
, blinker
|
|
|
|
, buildPythonPackage
|
|
|
|
, docutils
|
|
|
|
, feedgenerator
|
|
|
|
, fetchFromGitHub
|
|
|
|
, git
|
|
|
|
, glibcLocales
|
|
|
|
, jinja2
|
|
|
|
, lxml
|
|
|
|
, markdown
|
|
|
|
, markupsafe
|
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pandoc
|
|
|
|
, pillow
|
|
|
|
, pygments
|
|
|
|
, python-dateutil
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, rich
|
|
|
|
, pytest-xdist
|
|
|
|
, six
|
|
|
|
, typogrify
|
|
|
|
, unidecode
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pelican";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "4.7.1";
|
2021-08-27 14:25:00 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "getpelican";
|
2021-08-27 14:25:00 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "0w3r4ifbrl6mhfphabqs048qys7x6k164ds63jr10l3namljm8ad";
|
2020-04-24 23:36:52 +00:00
|
|
|
# Remove unicode file names which leads to different checksums on HFS+
|
|
|
|
# vs. other filesystems because of unicode normalisation.
|
|
|
|
extraPostFetch = ''
|
|
|
|
rm -r $out/pelican/tests/output/custom_locale/posts
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glibcLocales
|
2020-09-25 04:45:31 +00:00
|
|
|
pandoc
|
2020-04-24 23:36:52 +00:00
|
|
|
git
|
|
|
|
mock
|
|
|
|
markdown
|
|
|
|
typogrify
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-08-27 14:25:00 +00:00
|
|
|
beautifulsoup4
|
|
|
|
blinker
|
|
|
|
docutils
|
|
|
|
feedgenerator
|
|
|
|
jinja2
|
|
|
|
lxml
|
|
|
|
markupsafe
|
|
|
|
pillow
|
|
|
|
pygments
|
|
|
|
python-dateutil
|
|
|
|
pytz
|
|
|
|
rich
|
|
|
|
six
|
|
|
|
unidecode
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-08-27 14:25:00 +00:00
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
2020-09-25 04:45:31 +00:00
|
|
|
pandoc
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace pelican/tests/test_pelican.py \
|
|
|
|
--replace "'git'" "'${git}/bin/git'"
|
|
|
|
'';
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# DeprecationWarning: 'jinja2.Markup' is deprecated and...
|
|
|
|
"-W ignore::DeprecationWarning"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AssertionError
|
|
|
|
"test_basic_generation_works"
|
|
|
|
"test_custom_generation_works"
|
|
|
|
"test_custom_locale_generation_works"
|
|
|
|
];
|
|
|
|
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# We only want to patch shebangs in /bin, and not those
|
|
|
|
# of the project scripts that are created by Pelican.
|
|
|
|
# See https://github.com/NixOS/nixpkgs/issues/30116
|
|
|
|
dontPatchShebangs = true;
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
patchShebangs $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
pythonImportsCheck = [ "pelican" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-08-27 14:25:00 +00:00
|
|
|
description = "Static site generator that requires no database or server-side logic";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://getpelican.com/";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ offline prikhi ];
|
|
|
|
};
|
|
|
|
}
|