2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
isPy27,
|
|
|
|
fetchFromGitHub,
|
|
|
|
itsdangerous,
|
|
|
|
python-multipart,
|
|
|
|
pytestCheckHook,
|
|
|
|
starlette,
|
|
|
|
httpx,
|
|
|
|
pytest-asyncio,
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.10";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-09-25 04:45:31 +00:00
|
|
|
pname = "asgi-csrf";
|
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
# PyPI tarball doesn't include tests directory
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simonw";
|
|
|
|
repo = pname;
|
2024-09-19 14:19:46 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-VclgePMQh60xXofrquI3sCyPUPlkV4maZ5yybt+4HCs=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
itsdangerous
|
|
|
|
python-multipart
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-11-03 02:18:15 +00:00
|
|
|
httpx
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
starlette
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
doCheck = false; # asgi-lifespan missing
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "asgi_csrf" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "ASGI middleware for protecting against CSRF attacks";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://github.com/simonw/asgi-csrf";
|
|
|
|
maintainers = [ maintainers.ris ];
|
|
|
|
};
|
|
|
|
}
|