1{ lib 2, buildPythonPackage 3, docutils 4, fetchFromGitHub 5, importlib-metadata 6, mock 7, poetry-core 8, pydantic 9, pytest-mock 10, pytestCheckHook 11, pythonOlder 12, types-docutils 13, typing-extensions 14}: 15 16buildPythonPackage rec { 17 pname = "rstcheck-core"; 18 version = "1.0.2"; 19 format = "pyproject"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchFromGitHub { 24 owner = "rstcheck"; 25 repo = pname; 26 rev = "v${version}"; 27 hash = "sha256-XNr+prK9VDP66ZaFvh3Qrx+eJs6mnVO8lvoMC/qrCLs="; 28 }; 29 30 nativeBuildInputs = [ 31 poetry-core 32 ]; 33 34 propagatedBuildInputs = [ 35 docutils 36 importlib-metadata 37 pydantic 38 types-docutils 39 typing-extensions 40 ]; 41 42 checkInputs = [ 43 mock 44 pytest-mock 45 pytestCheckHook 46 ]; 47 48 postPatch = '' 49 substituteInPlace pyproject.toml \ 50 --replace 'types-docutils = ">=0.18, <0.19"' 'types-docutils = ">=0.18"' \ 51 --replace 'docutils = ">=0.7, <0.19"' 'docutils = ">=0.7"' 52 ''; 53 54 pythonImportsCheck = [ 55 "rstcheck_core" 56 ]; 57 58 meta = with lib; { 59 description = "Library for checking syntax of reStructuredText"; 60 homepage = "https://github.com/rstcheck/rstcheck-core"; 61 license = licenses.mit; 62 maintainers = with maintainers; [ fab ]; 63 }; 64}