at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 setuptools-scm, 7 pytestCheckHook, 8 pythonOlder, 9 rstcheck-core, 10 sphinx, 11 typer, 12}: 13 14buildPythonPackage rec { 15 pname = "rstcheck"; 16 version = "6.2.5"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "rstcheck"; 23 repo = "rstcheck"; 24 tag = "v${version}"; 25 hash = "sha256-ajevEHCsPvr5e4K8I5AfxFZ+Vo1quaGUKFIEB9Wlobc="; 26 }; 27 28 build-system = [ 29 setuptools 30 setuptools-scm 31 ]; 32 33 dependencies = [ 34 rstcheck-core 35 typer 36 ]; 37 38 optional-dependencies = { 39 sphinx = [ sphinx ]; 40 }; 41 42 nativeCheckInputs = [ pytestCheckHook ]; 43 44 pythonImportsCheck = [ "rstcheck" ]; 45 46 preCheck = '' 47 # The tests need to find and call the rstcheck executable 48 export PATH="$PATH:$out/bin"; 49 ''; 50 51 meta = with lib; { 52 description = "Checks syntax of reStructuredText and code blocks nested within it"; 53 homepage = "https://github.com/myint/rstcheck"; 54 changelog = "https://github.com/rstcheck/rstcheck/blob/v${version}/CHANGELOG.md"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ staccato ]; 57 mainProgram = "rstcheck"; 58 }; 59}