2020-08-24 04:20:12 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub, isPy27
|
2018-07-21 01:44:44 +01:00
|
|
|
, glibcLocales, git
|
2017-05-23 22:09:07 +01:00
|
|
|
, mock, nose, markdown, lxml, typogrify
|
|
|
|
, jinja2, pygments, docutils, pytz, unidecode, six, dateutil, feedgenerator
|
2020-08-24 04:20:12 +01:00
|
|
|
, blinker, pillow, beautifulsoup4, markupsafe, pandoc }:
|
2017-05-23 22:09:07 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 10:25:35 +01:00
|
|
|
pname = "pelican";
|
2020-08-24 04:20:12 +01:00
|
|
|
version = "4.5.0";
|
|
|
|
|
|
|
|
disabled = isPy27;
|
2017-05-23 22:09:07 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "getpelican";
|
|
|
|
repo = "pelican";
|
|
|
|
rev = version;
|
2020-08-24 04:20:12 +01:00
|
|
|
sha256 = "0p8p84fcpkr19d54dhxvldd8ijbg334wmrmkr99pnbrdl1gf64qi";
|
2019-07-20 03:58:04 +01: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
|
|
|
|
'';
|
2017-05-23 22:09:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2019-07-20 03:58:04 +01:00
|
|
|
# Exclude custom locale test, which files were removed above to fix the source checksum
|
2017-05-23 22:09:07 +01:00
|
|
|
checkPhase = ''
|
2020-08-24 04:20:12 +01:00
|
|
|
nosetests -s \
|
|
|
|
--exclude=test_custom_locale_generation_works \
|
|
|
|
--exclude=test_log_filter \
|
|
|
|
pelican
|
2017-05-23 22:09:07 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glibcLocales
|
2020-08-24 04:20:12 +01:00
|
|
|
pandoc
|
2017-05-23 22:09:07 +01:00
|
|
|
git
|
|
|
|
mock
|
|
|
|
markdown
|
|
|
|
typogrify
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2 pygments docutils pytz unidecode six dateutil feedgenerator
|
|
|
|
blinker pillow beautifulsoup4 markupsafe lxml
|
|
|
|
];
|
|
|
|
|
2019-07-20 03:58:04 +01:00
|
|
|
checkInputs = [
|
|
|
|
nose
|
2020-08-24 04:20:12 +01:00
|
|
|
pandoc
|
2019-07-20 03:58:04 +01:00
|
|
|
];
|
|
|
|
|
2017-05-23 22:09:07 +01:00
|
|
|
postPatch= ''
|
|
|
|
substituteInPlace pelican/tests/test_pelican.py \
|
|
|
|
--replace "'git'" "'${git}/bin/git'"
|
|
|
|
'';
|
|
|
|
|
|
|
|
LC_ALL="en_US.UTF-8";
|
|
|
|
|
2017-10-09 17:41:45 +01: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
|
|
|
|
'';
|
|
|
|
|
2017-05-23 22:09:07 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A tool to generate a static blog from reStructuredText or Markdown input files";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://getpelican.com/";
|
2017-05-23 22:09:07 +01:00
|
|
|
license = licenses.agpl3;
|
2019-07-03 10:27:39 +01:00
|
|
|
maintainers = with maintainers; [ offline prikhi ];
|
2017-05-23 22:09:07 +01:00
|
|
|
};
|
|
|
|
}
|