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