1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pdm-backend,
6 pygments,
7 objprint,
8 python-slugify,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "marko";
14 version = "2.1.3";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "frostming";
19 repo = "marko";
20 tag = "v${version}";
21 hash = "sha256-rYWBVcDUH0vNPDxSIwiRSWFfPZ7ahe4Z+Sl96tNMDN8=";
22 };
23
24 build-system = [
25 pdm-backend
26 ];
27
28 optional-dependencies = {
29 codehilite = [
30 pygments
31 ];
32 repr = [
33 objprint
34 ];
35 toc = [
36 python-slugify
37 ];
38 };
39
40 pythonImportsCheck = [
41 "marko"
42 ];
43
44 nativeCheckInputs =
45 [
46 pytestCheckHook
47 ]
48 ++ optional-dependencies.toc
49 ++ optional-dependencies.codehilite;
50
51 meta = {
52 changelog = "https://github.com/frostming/marko/blob/${src.tag}/CHANGELOG.md";
53 description = "Markdown parser with high extensibility";
54 homepage = "https://github.com/frostming/marko";
55 license = lib.licenses.mit;
56 maintainers = with lib.maintainers; [ drupol ];
57 };
58}