1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 docutils, 6 fetchFromGitHub, 7 mock, 8 pydantic, 9 pytest-mock, 10 pytestCheckHook, 11 pythonOlder, 12 setuptools, 13 setuptools-scm, 14}: 15 16buildPythonPackage rec { 17 pname = "rstcheck-core"; 18 version = "1.2.2"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "rstcheck"; 23 repo = "rstcheck-core"; 24 tag = "v${version}"; 25 hash = "sha256-D17I6pncTnrRjA/vt4lt/Bfkko3Lx58Xyti3sM0sC3s="; 26 }; 27 28 build-system = [ 29 setuptools 30 setuptools-scm 31 ]; 32 33 env = { 34 NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-strict-prototypes"; 35 }; 36 37 dependencies = [ 38 docutils 39 pydantic 40 ]; 41 42 nativeCheckInputs = [ 43 mock 44 pytest-mock 45 pytestCheckHook 46 ]; 47 48 disabledTests = [ 49 # https://github.com/rstcheck/rstcheck-core/issues/84 50 "test_check_yaml_returns_error_on_bad_code_block" 51 ]; 52 53 pythonImportsCheck = [ "rstcheck_core" ]; 54 55 meta = with lib; { 56 description = "Library for checking syntax of reStructuredText"; 57 homepage = "https://github.com/rstcheck/rstcheck-core"; 58 changelog = "https://github.com/rstcheck/rstcheck-core/blob/${src.tag}/CHANGELOG.md"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ fab ]; 61 }; 62}