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