python3Packages.aiohttp-apispec: move to python-modules

This commit is contained in:
Fabian Affolter 2022-02-14 12:01:25 +01:00
parent c3a5c49429
commit d584164d24
3 changed files with 47 additions and 37 deletions

View file

@ -1,37 +0,0 @@
{ lib, buildPythonPackage, fetchPypi, pythonOlder
, aiohttp, webargs, fetchFromGitHub, callPackage
}:
let
apispec3 = callPackage ./apispec.nix {};
jinja2 = callPackage ../../../../development/python2-modules/jinja2 {};
in
buildPythonPackage rec {
pname = "aiohttp-apispec";
version = "unstable-2021-21-08";
# unstable so we can use latest webargs
src = fetchFromGitHub {
owner = "maximdanilchenko";
repo = "aiohttp-apispec";
rev = "cfa19646394480dda289f6b7af19b7d50f245d81";
sha256 = "uEgDRAlMjTa4rvdE3fkORCHIlCLzxPJJ2/m4ZRU3eIQ=";
fetchSubmodules = false;
};
propagatedBuildInputs = [ aiohttp webargs apispec3 jinja2 ];
pythonImportsCheck = [
"aiohttp_apispec"
];
# Requires pytest-sanic, currently broken in nixpkgs
doCheck = false;
meta = with lib; {
description = "Build and document REST APIs with aiohttp and apispec";
homepage = "https://github.com/maximdanilchenko/aiohttp-apispec/";
license = licenses.mit;
maintainers = [ maintainers.viric ];
};
}

View file

@ -0,0 +1,45 @@
{ lib
, aiohttp
, buildPythonPackage
, callPackage
, fetchFromGitHub
, fetchPypi
, pythonOlder
, webargs
}:
buildPythonPackage rec {
pname = "aiohttp-apispec";
version = "2.2.2";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "maximdanilchenko";
repo = pname;
rev = "v${version}";
hash = "sha256-51QyD56k+1fq2tOqBNUtPRFza9uku79GcvTh8wov04g=";
};
propagatedBuildInputs = [
aiohttp
apispec3
jinja2
webargs
];
pythonImportsCheck = [
"aiohttp_apispec"
];
# Requires pytest-sanic, currently broken in nixpkgs
doCheck = false;
meta = with lib; {
description = "Build and document REST APIs with aiohttp and apispec";
homepage = "https://github.com/maximdanilchenko/aiohttp-apispec/";
license = licenses.mit;
maintainers = with maintainers; [ viric ];
};
}

View file

@ -308,6 +308,8 @@ in {
aiohttp = callPackage ../development/python-modules/aiohttp { };
aiohttp-apispec = callPackage ../development/python-modules/aiohttp-apispec { };
aiohttp-cors = callPackage ../development/python-modules/aiohttp-cors { };
aiohttp-jinja2 = callPackage ../development/python-modules/aiohttp-jinja2 { };