2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, aiofiles
|
2022-10-30 15:09:59 +00:00
|
|
|
, buildPythonPackage
|
2022-07-14 12:49:19 +00:00
|
|
|
, cached-property
|
2022-11-21 17:40:18 +00:00
|
|
|
, colorama
|
2022-07-14 12:49:19 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, git
|
2023-04-12 12:48:02 +00:00
|
|
|
, jsonschema
|
|
|
|
, pdm-backend
|
2022-07-14 12:49:19 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildPythonPackage rec {
|
2022-07-14 12:49:19 +00:00
|
|
|
pname = "griffe";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "0.32.3";
|
2022-07-14 12:49:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mkdocstrings";
|
|
|
|
repo = pname;
|
2022-11-27 09:42:12 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-rPh4FtcigZzscm3y/BJ/0Q0wURlumowlHY15MiQw2B8=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'license = "ISC"' 'license = {file = "LICENSE"}' \
|
|
|
|
'';
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = [
|
2023-04-12 12:48:02 +00:00
|
|
|
pdm-backend
|
2022-07-14 12:49:19 +00:00
|
|
|
];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
colorama
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
2022-07-14 12:49:19 +00:00
|
|
|
cached-property
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
git
|
2023-04-12 12:48:02 +00:00
|
|
|
jsonschema
|
2022-07-14 12:49:19 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
async = [
|
|
|
|
aiofiles
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"griffe"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Signatures for entire Python programs";
|
|
|
|
homepage = "https://github.com/mkdocstrings/griffe";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/mkdocstrings/griffe/blob/${version}/CHANGELOG.md";
|
2022-07-14 12:49:19 +00:00
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|