1{ lib, buildPythonPackage, fetchPypi, isPy27, cffi, pytest }:
2
3buildPythonPackage rec {
4 pname = "pycmarkgfm";
5 version = "1.1.0";
6 disabled = isPy27;
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "694cb242f4961437c30b5b015dfbce9d1a1fa48305c2e39f902ce7c65b4cbe0e";
11 };
12
13 propagatedBuildInputs = [ cffi ];
14
15 # I would gladly use pytestCheckHook, but pycmarkgfm relies on a native
16 # extension (cmark.so, built through setup.py), and pytestCheckHook runs
17 # pytest in an environment that does not contain this extension, which fails.
18 # cmarkgfm has virtually the same build setup as this package, and uses the
19 # same trick: pkgs/development/python-modules/cmarkgfm/default.nix
20 checkInputs = [ pytest ];
21 checkPhase = ''
22 pytest
23 '';
24
25 meta = with lib; {
26 homepage = "https://github.com/zopieux/pycmarkgfm";
27 description = "Bindings to GitHub's Flavored Markdown (cmark-gfm), with enhanced support for task lists";
28 platforms = platforms.linux ++ platforms.darwin;
29 license = licenses.gpl3Plus;
30 maintainers = with maintainers; [ zopieux ];
31 };
32}