Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / apispec / default.nix
blobdab433e1619f8a3e2f35f1b04a5a44511cd87250
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , marshmallow
5 , mock
6 , openapi-spec-validator
7 , packaging
8 , prance
9 , pytestCheckHook
10 , pythonOlder
11 , pyyaml
14 buildPythonPackage rec {
15   pname = "apispec";
16   version = "6.3.0";
17   format = "setuptools";
19   disabled = pythonOlder "3.7";
21   src = fetchPypi {
22     inherit pname version;
23     hash = "sha256-bLCNks5z/ws79Gyy6lwA1XKJsPJ5+wJWo99GgYK6U0Q=";
24   };
26   propagatedBuildInputs = [
27     packaging
28   ];
30   passthru.optional-dependencies = {
31     marshmallow = [
32       marshmallow
33     ];
34     yaml = [
35       pyyaml
36     ];
37     validation = [
38       openapi-spec-validator
39       prance
40     ] ++ prance.optional-dependencies.osv;
41   };
43   nativeCheckInputs = [
44     mock
45     pytestCheckHook
46   ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
48   pythonImportsCheck = [
49     "apispec"
50   ];
52   meta = with lib; {
53     changelog = "https://github.com/marshmallow-code/apispec/blob/${version}/CHANGELOG.rst";
54     description = "A pluggable API specification generator with support for the OpenAPI Specification";
55     homepage = "https://github.com/marshmallow-code/apispec";
56     license = licenses.mit;
57     maintainers = with maintainers; [ ];
58   };