1{
2 lib,
3 aiofiles,
4 buildPythonPackage,
5 colorama,
6 fetchFromGitHub,
7 git,
8 jsonschema,
9 pdm-backend,
10 pytestCheckHook,
11 pythonOlder,
12}:
13
14buildPythonPackage rec {
15 pname = "griffe";
16 version = "0.47.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "mkdocstrings";
23 repo = "griffe";
24 rev = "refs/tags/${version}";
25 hash = "sha256-NkS8cD0G/nbquQfMVcdbTLnJx26PQnqWB8UnBTNIBdE=";
26 };
27
28 build-system = [ pdm-backend ];
29
30 dependencies = [ colorama ];
31
32 nativeCheckInputs = [
33 git
34 jsonschema
35 pytestCheckHook
36 ];
37
38 passthru.optional-dependencies = {
39 async = [ aiofiles ];
40 };
41
42 pythonImportsCheck = [ "griffe" ];
43
44 meta = with lib; {
45 description = "Signatures for entire Python programs";
46 homepage = "https://github.com/mkdocstrings/griffe";
47 changelog = "https://github.com/mkdocstrings/griffe/blob/${version}/CHANGELOG.md";
48 license = licenses.isc;
49 maintainers = with maintainers; [ fab ];
50 mainProgram = "griffe";
51 };
52}