nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 latex2mathml,
6 pygments,
7 pytest7CheckHook,
8 setuptools,
9 wavedrom,
10}:
11
12buildPythonPackage rec {
13 pname = "markdown2";
14 version = "2.5.4";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "trentm";
19 repo = "python-markdown2";
20 tag = version;
21 hash = "sha256-2w11vVzZUS6HzXmZT+Ag5rPqRnn/tlLnHL4xIDv0l+g=";
22 };
23
24 build-system = [ setuptools ];
25
26 pythonImportsCheck = [ "markdown2" ];
27
28 nativeCheckInputs = [ pytest7CheckHook ];
29
30 optional-dependencies = {
31 code_syntax_highlighting = [ pygments ];
32 wavedrom = [ wavedrom ];
33 latex = [ latex2mathml ];
34 all = lib.concatAttrValues (lib.removeAttrs optional-dependencies [ "all" ]);
35 };
36
37 meta = {
38 changelog = "https://github.com/trentm/python-markdown2/blob/${src.tag}/CHANGES.md";
39 description = "Fast and complete Python implementation of Markdown";
40 mainProgram = "markdown2";
41 homepage = "https://github.com/trentm/python-markdown2";
42 license = lib.licenses.mit;
43 maintainers = with lib.maintainers; [ hbunke ];
44 };
45}