2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy27
|
|
|
|
, fetchFromGitHub
|
|
|
|
, itsdangerous
|
|
|
|
, python-multipart
|
|
|
|
, pytestCheckHook
|
|
|
|
, starlette
|
|
|
|
, httpx
|
|
|
|
, pytest-asyncio
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "0.9";
|
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;
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-mmOsN2mW6eGtapq3xLqHK8hhSD0Gjzp3DsY5AGUlI8g=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|