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