nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 defusedxml,
6 docutils,
7 fetchFromGitHub,
8 flit-core,
9 jinja2,
10 markdown-it-py,
11 mdit-py-plugins,
12 pytest-param-files,
13 pytest-regressions,
14 pytestCheckHook,
15 pyyaml,
16 sphinx-pytest,
17 sphinx,
18 typing-extensions,
19}:
20
21buildPythonPackage rec {
22 pname = "myst-docutils";
23 version = "5.0.0";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "executablebooks";
28 repo = "MyST-Parser";
29 tag = "v${version}";
30 hash = "sha256-0lGejdGVVvZar3sPBbvThXzJML7PcR5+shyDHTTtVEY=";
31 };
32
33 build-system = [ flit-core ];
34
35 dependencies = [
36 docutils
37 jinja2
38 markdown-it-py
39 mdit-py-plugins
40 pyyaml
41 sphinx
42 typing-extensions
43 ];
44
45 nativeCheckInputs = [
46 beautifulsoup4
47 defusedxml
48 pytest-param-files
49 pytest-regressions
50 pytestCheckHook
51 sphinx-pytest
52 ];
53
54 pythonImportsCheck = [ "myst_parser" ];
55
56 disabledTests = [
57 # Tests require linkify
58 "test_cmdline"
59 "test_extended_syntaxes"
60 # sphinx compat
61 "test_sphinx_directives"
62 ];
63
64 disabledTestPaths = [
65 # Assertion errors
66 "tests/test_sphinx/"
67 ];
68
69 meta = {
70 description = "Extended commonmark compliant parser, with bridges to docutils/sphinx";
71 homepage = "https://github.com/executablebooks/MyST-Parser";
72 changelog = "https://github.com/executablebooks/MyST-Parser/blob/${src.tag}/CHANGELOG.md";
73 license = lib.licenses.mit;
74 };
75}