diff --git a/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix b/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix new file mode 100644 index 000000000000..a800694ad942 --- /dev/null +++ b/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix @@ -0,0 +1,29 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, setuptools_scm +, pyyaml +, jsonschema +, sphinxcontrib_httpdomain +}: + +buildPythonPackage rec { + pname = "sphinxcontrib-openapi"; + version = "0.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0fyniq37nnmhrk4j7mzvg6vfcpb624hb9x70g6mccyw4xrnhadv6"; + }; + + propagatedBuildInputs = [setuptools_scm pyyaml jsonschema sphinxcontrib_httpdomain]; + + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/ikalnytskyi/sphinxcontrib-openapi; + description = "OpenAPI (fka Swagger) spec renderer for Sphinx"; + license = licenses.bsd0; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b546ddd7eadb..602955278df7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3880,18 +3880,7 @@ in { sphinxcontrib-blockdiag = callPackage ../development/python-modules/sphinxcontrib-blockdiag { }; - sphinxcontrib-openapi = buildPythonPackage (rec { - name = "sphinxcontrib-openapi-0.3.0"; - - doCheck = false; - - src = pkgs.fetchurl { - url = "mirror://pypi/s/sphinxcontrib-openapi/${name}.tar.gz"; - sha256 = "0fyniq37nnmhrk4j7mzvg6vfcpb624hb9x70g6mccyw4xrnhadv6"; - }; - - propagatedBuildInputs = with self; [setuptools_scm pyyaml jsonschema sphinxcontrib_httpdomain]; - }); + sphinxcontrib-openapi = callPackage ../development/python-modules/sphinxcontrib-openapi { }; sphinxcontrib_httpdomain = buildPythonPackage (rec { name = "sphinxcontrib-httpdomain-1.5.0";