1{ stdenv, buildPythonPackage, fetchFromGitHub 2, glibcLocales, git 3, mock, nose, markdown, lxml, typogrify 4, jinja2, pygments, docutils, pytz, unidecode, six, dateutil, feedgenerator 5, blinker, pillow, beautifulsoup4, markupsafe }: 6 7buildPythonPackage rec { 8 pname = "pelican"; 9 version = "3.7.1"; 10 11 src = fetchFromGitHub { 12 owner = "getpelican"; 13 repo = "pelican"; 14 rev = version; 15 sha256 = "0nkxrb77k2bra7bqckg7f5k73wk98hcbz7rimxl8sw05b2bvd62g"; 16 }; 17 18 doCheck = true; 19 20 checkPhase = '' 21 python -Wd -m unittest discover 22 ''; 23 24 buildInputs = [ 25 glibcLocales 26 # Note: Pelican has to adapt to a changed CLI of pandoc before enabling this 27 # again. Compare https://github.com/getpelican/pelican/pull/2252. 28 # Version 3.7.1 is incompatible with our current pandoc version. 29 # pandoc 30 git 31 mock 32 nose 33 markdown 34 typogrify 35 ]; 36 37 propagatedBuildInputs = [ 38 jinja2 pygments docutils pytz unidecode six dateutil feedgenerator 39 blinker pillow beautifulsoup4 markupsafe lxml 40 ]; 41 42 postPatch= '' 43 substituteInPlace pelican/tests/test_pelican.py \ 44 --replace "'git'" "'${git}/bin/git'" 45 ''; 46 47 LC_ALL="en_US.UTF-8"; 48 49 50 # We only want to patch shebangs in /bin, and not those 51 # of the project scripts that are created by Pelican. 52 # See https://github.com/NixOS/nixpkgs/issues/30116 53 dontPatchShebangs = true; 54 55 postFixup = '' 56 patchShebangs $out/bin 57 ''; 58 59 meta = with stdenv.lib; { 60 description = "A tool to generate a static blog from reStructuredText or Markdown input files"; 61 homepage = http://getpelican.com/; 62 license = licenses.agpl3; 63 maintainers = with maintainers; [ offline prikhi garbas ]; 64 }; 65}