1{ 2 lib, 3 fetchPypi, 4 buildPythonPackage, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 django, 11 12 # tests 13 jinja2, 14 pytest-django, 15 pytestCheckHook, 16}: 17 18buildPythonPackage rec { 19 pname = "django-csp"; 20 version = "4.0"; 21 pyproject = true; 22 23 src = fetchPypi { 24 inherit version; 25 pname = "django_csp"; 26 hash = "sha256-snAQu3Ausgo9rTKReN8rYaK4LTOLcPvcE8OjvShxKDM="; 27 }; 28 29 postPatch = '' 30 sed -i "/addopts =/d" pyproject.toml 31 ''; 32 33 build-system = [ setuptools ]; 34 35 dependencies = [ django ]; 36 37 nativeCheckInputs = [ 38 jinja2 39 pytest-django 40 pytestCheckHook 41 ]; 42 43 meta = with lib; { 44 description = "Adds Content-Security-Policy headers to Django"; 45 homepage = "https://github.com/mozilla/django-csp"; 46 license = licenses.bsd3; 47 }; 48}