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 pandoc
29 git
30 mock
31 nose
32 markdown
33 typogrify
34 ];
35
36 propagatedBuildInputs = [
37 jinja2 pygments docutils pytz unidecode six dateutil feedgenerator
38 blinker pillow beautifulsoup4 markupsafe lxml
39 ];
40
41 postPatch= ''
42 substituteInPlace pelican/tests/test_pelican.py \
43 --replace "'git'" "'${git}/bin/git'"
44 '';
45
46 LC_ALL="en_US.UTF-8";
47
48 meta = with stdenv.lib; {
49 description = "A tool to generate a static blog from reStructuredText or Markdown input files";
50 homepage = http://getpelican.com/;
51 license = licenses.agpl3;
52 maintainers = with maintainers; [ offline prikhi garbas ];
53 };
54}