1{
2 lib,
3 buildPythonPackage,
4 chardet,
5 docutils,
6 fetchpatch,
7 fetchPypi,
8 pbr,
9 pygments,
10 pytestCheckHook,
11 pythonOlder,
12 restructuredtext-lint,
13 setuptools-scm,
14 stevedore,
15 wheel,
16}:
17
18buildPythonPackage rec {
19 pname = "doc8";
20 version = "1.1.1";
21 format = "pyproject";
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-2XqT6PWi78RxOggEZX3trYN0XMpM0diN6Rhvd/l3YAQ=";
28 };
29
30 patches = [
31 # https://github.com/PyCQA/doc8/pull/146
32 (fetchpatch {
33 name = "remove-setuptools-scm-git-archive.patch";
34 url = "https://github.com/PyCQA/doc8/commit/06416e95041db92e4295b13ab596351618f6b32e.patch";
35 hash = "sha256-IIE3cDNOx+6RLjidGrokyazaX7MOVbMKUb7yQIM5sI0=";
36 })
37 ];
38
39 nativeBuildInputs = [
40 setuptools-scm
41 wheel
42 ];
43
44 buildInputs = [ pbr ];
45
46 propagatedBuildInputs = [
47 docutils
48 chardet
49 stevedore
50 restructuredtext-lint
51 pygments
52 ];
53
54 nativeCheckInputs = [ pytestCheckHook ];
55
56 pythonImportsCheck = [ "doc8" ];
57
58 meta = with lib; {
59 description = "Style checker for Sphinx (or other) RST documentation";
60 mainProgram = "doc8";
61 homepage = "https://github.com/pycqa/doc8";
62 changelog = "https://github.com/PyCQA/doc8/releases/tag/v${version}";
63 license = licenses.asl20;
64 maintainers = with maintainers; [ onny ];
65 };
66}