2020-11-30 08:33:03 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy27, cffi, pytest }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycmarkgfm";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.2.1";
|
2022-11-27 09:42:12 +00:00
|
|
|
format = "setuptools";
|
2020-11-30 08:33:03 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-oPklCB54aHn33ewTiSlXgx38T0RzLure5OzGuFwsLNo=";
|
2020-11-30 08:33:03 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
|
|
|
|
|
|
# I would gladly use pytestCheckHook, but pycmarkgfm relies on a native
|
|
|
|
# extension (cmark.so, built through setup.py), and pytestCheckHook runs
|
|
|
|
# pytest in an environment that does not contain this extension, which fails.
|
|
|
|
# cmarkgfm has virtually the same build setup as this package, and uses the
|
|
|
|
# same trick: pkgs/development/python-modules/cmarkgfm/default.nix
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytest ];
|
2020-11-30 08:33:03 +00:00
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/zopieux/pycmarkgfm";
|
|
|
|
description = "Bindings to GitHub's Flavored Markdown (cmark-gfm), with enhanced support for task lists";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/zopieux/pycmarkgfm/raw/v${version}/CHANGELOG.md";
|
2020-11-30 08:33:03 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ zopieux ];
|
|
|
|
};
|
|
|
|
}
|