1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 hypothesis, 7 python, 8}: 9 10buildPythonPackage rec { 11 pname = "commonmark"; 12 version = "0.9.1"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "readthedocs"; 17 repo = "commonmark.py"; 18 tag = version; 19 hash = "sha256-Ui/G/VLdjWcm7YmVjZ5Q8h0DEEFqdDByre29g3zHUq4="; 20 }; 21 22 build-system = [ setuptools ]; 23 24 nativeCheckInputs = [ hypothesis ]; 25 26 checkPhase = '' 27 runHook preCheck 28 29 ${python.interpreter} commonmark/tests/run_spec_tests.py 30 ${python.interpreter} commonmark/tests/unit_tests.py 31 32 export PATH=$out/bin:$PATH 33 cmark commonmark/tests/test.md 34 cmark commonmark/tests/test.md -a 35 cmark commonmark/tests/test.md -aj 36 37 runHook postCheck 38 ''; 39 40 meta = with lib; { 41 description = "Python CommonMark parser "; 42 mainProgram = "cmark"; 43 homepage = "https://github.com/readthedocs/commonmark.py"; 44 license = licenses.bsd3; 45 }; 46}