Files
nixpkgs/pkgs/development/python-modules/django-csp/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
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>
2025-12-10 18:09:49 +01:00

49 lines
776 B
Nix

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