Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.9 kB view raw
1{ stdenv, buildPythonPackage, fetchFromGitHub, isPy27 2, glibcLocales, git 3, mock, nose, markdown, lxml, typogrify 4, jinja2, pygments, docutils, pytz, unidecode, six, dateutil, feedgenerator 5, blinker, pillow, beautifulsoup4, markupsafe, pandoc }: 6 7buildPythonPackage rec { 8 pname = "pelican"; 9 version = "4.5.0"; 10 11 disabled = isPy27; 12 13 src = fetchFromGitHub { 14 owner = "getpelican"; 15 repo = "pelican"; 16 rev = version; 17 sha256 = "0p8p84fcpkr19d54dhxvldd8ijbg334wmrmkr99pnbrdl1gf64qi"; 18 # Remove unicode file names which leads to different checksums on HFS+ 19 # vs. other filesystems because of unicode normalisation. 20 extraPostFetch = '' 21 rm -r $out/pelican/tests/output/custom_locale/posts 22 ''; 23 }; 24 25 doCheck = true; 26 27 # Exclude custom locale test, which files were removed above to fix the source checksum 28 checkPhase = '' 29 nosetests -s \ 30 --exclude=test_custom_locale_generation_works \ 31 --exclude=test_log_filter \ 32 pelican 33 ''; 34 35 buildInputs = [ 36 glibcLocales 37 pandoc 38 git 39 mock 40 markdown 41 typogrify 42 ]; 43 44 propagatedBuildInputs = [ 45 jinja2 pygments docutils pytz unidecode six dateutil feedgenerator 46 blinker pillow beautifulsoup4 markupsafe lxml 47 ]; 48 49 checkInputs = [ 50 nose 51 pandoc 52 ]; 53 54 postPatch= '' 55 substituteInPlace pelican/tests/test_pelican.py \ 56 --replace "'git'" "'${git}/bin/git'" 57 ''; 58 59 LC_ALL="en_US.UTF-8"; 60 61 # We only want to patch shebangs in /bin, and not those 62 # of the project scripts that are created by Pelican. 63 # See https://github.com/NixOS/nixpkgs/issues/30116 64 dontPatchShebangs = true; 65 66 postFixup = '' 67 patchShebangs $out/bin 68 ''; 69 70 meta = with stdenv.lib; { 71 description = "A tool to generate a static blog from reStructuredText or Markdown input files"; 72 homepage = "http://getpelican.com/"; 73 license = licenses.agpl3; 74 maintainers = with maintainers; [ offline prikhi ]; 75 }; 76}