Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, attrs 3, buildPythonPackage 4, commonmark 5, fetchFromGitHub 6, flit-core 7, linkify-it-py 8, markdown 9, mdurl 10, mistletoe 11, mistune 12, myst-parser 13, panflute 14, pyyaml 15, sphinx 16, sphinx-book-theme 17, sphinx-copybutton 18, sphinx-design 19, stdenv 20, pytest-regressions 21, pytestCheckHook 22, pythonOlder 23}: 24 25buildPythonPackage rec { 26 pname = "markdown-it-py"; 27 version = "2.2.0"; 28 format = "pyproject"; 29 30 disabled = pythonOlder "3.6"; 31 32 src = fetchFromGitHub { 33 owner = "executablebooks"; 34 repo = pname; 35 rev = "refs/tags/v${version}"; 36 hash = "sha256-qdRU1BxczFDGoIEtl0ZMkKNn4p5tec8YuPt5ZwX5fYM="; 37 }; 38 39 nativeBuildInputs = [ 40 flit-core 41 ]; 42 43 propagatedBuildInputs = [ 44 mdurl 45 ]; 46 47 nativeCheckInputs = [ 48 pytest-regressions 49 pytestCheckHook 50 ] ++ passthru.optional-dependencies.linkify; 51 52 # disable and remove benchmark tests 53 preCheck = '' 54 rm -r benchmarking 55 ''; 56 doCheck = !stdenv.isi686; 57 58 pythonImportsCheck = [ 59 "markdown_it" 60 ]; 61 62 passthru.optional-dependencies = { 63 compare = [ commonmark markdown mistletoe mistune panflute ]; 64 linkify = [ linkify-it-py ]; 65 rtd = [ attrs myst-parser pyyaml sphinx sphinx-copybutton sphinx-design sphinx-book-theme ]; 66 }; 67 68 meta = with lib; { 69 description = "Markdown parser in Python"; 70 homepage = "https://markdown-it-py.readthedocs.io/"; 71 changelog = "https://github.com/executablebooks/markdown-it-py/blob/${src.rev}/CHANGELOG.md"; 72 license = licenses.mit; 73 maintainers = with maintainers; [ bhipple ]; 74 }; 75}