depot/third_party/nixpkgs/pkgs/development/python-modules/aiohttp-swagger/default.nix
Default email 88abffb7d2 Project import generated by Copybara.
GitOrigin-RevId: bc9b956714ed6eac5f8888322aac5bc41389defa
2021-09-18 12:52:07 +02:00

52 lines
1,006 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, aiohttp
, jinja2
, markupsafe
, pytest-aiohttp
, pytestCheckHook
, pythonOlder
, pyyaml
}:
buildPythonPackage rec {
pname = "aiohttp-swagger";
version = "1.0.15";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "cr0hn";
repo = pname;
rev = version;
sha256 = "sha256-M43sNpbXWXFRTd549cZhvhO35nBB6OH+ki36BzSk87Q=";
};
propagatedBuildInputs = [
aiohttp
jinja2
markupsafe
pyyaml
];
checkInputs = [
pytestCheckHook
pytest-aiohttp
];
postPatch = ''
substituteInPlace requirements.txt \
--replace "markupsafe~=1.1.1" "markupsafe>=1.1.1" \
--replace "jinja2~=2.11.2" "jinja2>=2.11.2"
'';
pythonImportsCheck = [ "aiohttp_swagger" ];
meta = with lib; {
description = "Swagger API Documentation builder for aiohttp";
homepage = "https://github.com/cr0hn/aiohttp-swagger";
license = licenses.mit;
maintainers = with maintainers; [ elohmeier ];
};
}