fa5436e0a7
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
48 lines
782 B
Nix
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;
|
|
};
|
|
}
|