2021-01-24 02:34:45 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy27
|
|
|
|
, fetchFromGitHub
|
|
|
|
, itsdangerous
|
|
|
|
, python-multipart
|
|
|
|
, pytestCheckHook
|
|
|
|
, starlette
|
|
|
|
, httpx
|
|
|
|
, pytest-asyncio
|
|
|
|
}:
|
2020-08-27 23:26:05 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-01-24 02:34:45 +00:00
|
|
|
version = "0.8";
|
2020-08-27 23:26:05 +01:00
|
|
|
pname = "asgi-csrf";
|
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
# PyPI tarball doesn't include tests directory
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simonw";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-01-24 02:34:45 +00:00
|
|
|
sha256 = "sha256-0I/p9SjVVZhJQeR7s1R3tooP9XMNLPlcxl0dBSzsVaw=";
|
2020-08-27 23:26:05 +01:00
|
|
|
};
|
|
|
|
|
2020-10-29 17:13:47 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
itsdangerous
|
|
|
|
python-multipart
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
httpx
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
starlette
|
|
|
|
];
|
|
|
|
|
2021-01-24 02:34:45 +00:00
|
|
|
doCheck = false; # asgi-lifespan missing
|
2020-08-27 23:26:05 +01:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "asgi_csrf" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-08-27 23:26:05 +01:00
|
|
|
description = "ASGI middleware for protecting against CSRF attacks";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://github.com/simonw/asgi-csrf";
|
|
|
|
maintainers = [ maintainers.ris ];
|
|
|
|
};
|
|
|
|
}
|