depot/third_party/nixpkgs/pkgs/development/python-modules/django-csp/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

48 lines
782 B
Nix

{
lib,
fetchPypi,
buildPythonPackage,
# build-system
setuptools,
# dependencies
django,
# tests
jinja2,
pytest-django,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "django-csp";
version = "3.8";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "django_csp";
hash = "sha256-7w8an32Nporm4WnALprGYcDs8E23Dg0dhWQFEqaEccA=";
};
postPatch = ''
sed -i "/addopts =/d" pyproject.toml
'';
build-system = [ setuptools ];
dependencies = [ django ];
nativeCheckInputs = [
jinja2
pytest-django
pytestCheckHook
];
meta = with lib; {
description = "Adds Content-Security-Policy headers to Django";
homepage = "https://github.com/mozilla/django-csp";
license = licenses.bsd3;
};
}