587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
65 lines
1.2 KiB
Nix
65 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, flit-core
|
|
, marshmallow
|
|
, mock
|
|
, openapi-spec-validator
|
|
, packaging
|
|
, prance
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, pyyaml
|
|
, setuptools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "apispec";
|
|
version = "6.6.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-wIRvjqpRGcRrLs/pvCTtGduohF+GVdALUd3SlqEOpMs=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
flit-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
packaging
|
|
];
|
|
|
|
passthru.optional-dependencies = {
|
|
marshmallow = [
|
|
marshmallow
|
|
];
|
|
yaml = [
|
|
pyyaml
|
|
];
|
|
validation = [
|
|
openapi-spec-validator
|
|
prance
|
|
] ++ prance.optional-dependencies.osv;
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
mock
|
|
pytestCheckHook
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
|
|
|
pythonImportsCheck = [
|
|
"apispec"
|
|
];
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/marshmallow-code/apispec/blob/${version}/CHANGELOG.rst";
|
|
description = "A pluggable API specification generator with support for the OpenAPI Specification";
|
|
homepage = "https://github.com/marshmallow-code/apispec";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|