567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
58 lines
999 B
Nix
58 lines
999 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
setuptools,
|
|
|
|
# dependencies
|
|
itsdangerous,
|
|
python-multipart,
|
|
|
|
# tests
|
|
asgi-lifespan,
|
|
pytestCheckHook,
|
|
starlette,
|
|
httpx,
|
|
pytest-asyncio,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "asgi-csrf";
|
|
version = "0.11";
|
|
pyproject = true;
|
|
|
|
# PyPI tarball doesn't include tests directory
|
|
src = fetchFromGitHub {
|
|
owner = "simonw";
|
|
repo = "asgi-csrf";
|
|
tag = version;
|
|
hash = "sha256-STitMWabAPz61AU+5gFJSHBBqf67Q8UtS6ks8Q/ZybY=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
itsdangerous
|
|
python-multipart
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
asgi-lifespan
|
|
httpx
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
starlette
|
|
];
|
|
|
|
pythonImportsCheck = [ "asgi_csrf" ];
|
|
|
|
meta = {
|
|
description = "ASGI middleware for protecting against CSRF attacks";
|
|
license = lib.licenses.asl20;
|
|
homepage = "https://github.com/simonw/asgi-csrf";
|
|
maintainers = [ lib.maintainers.ris ];
|
|
};
|
|
}
|