1{ lib
2, fetchPypi
3, click
4, pyyaml
5, buildPythonPackage
6, isPy3k
7, fetchpatch
8}:
9
10buildPythonPackage rec{
11 version = "2.1.0";
12 pname = "panflute";
13
14 disabled = !isPy3k;
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "8a3d5dd2a10c3aa6fa8167713fedb47400f0e8ae6ea8346fd4b599842bb1882d";
19 };
20 patches = [
21 # Upstream has relaxed the version constaints for the click dependency
22 # but there hasn't been a release since then
23 (fetchpatch {
24 url = "https://github.com/sergiocorreia/panflute/commit/dee6c716a73072a968d67f8638a61de44025d8de.patch";
25 sha256 = "sha256-Kj/NTcXsSkevpfr8OwoIQi0p6ChXDM6YgYDPNHJtJZo=";
26 })
27 ];
28
29 propagatedBuildInputs = [ click pyyaml ];
30
31 meta = with lib; {
32 description = "A Pythonic alternative to John MacFarlane's pandocfilters, with extra helper functions";
33 homepage = "http://scorreia.com/software/panflute";
34 license = licenses.bsd3;
35 maintainers = with maintainers; [ synthetica ];
36 };
37}