From b5939353eb5ecfcd315741857949d22f4d5e306c Mon Sep 17 00:00:00 2001 From: Vladyslav Burzakovskyy Date: Wed, 10 Jul 2019 16:12:29 +0200 Subject: [PATCH] pythonPackages.django-csp: init at 3.5 --- .../python-modules/django-csp/default.nix | 23 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/python-modules/django-csp/default.nix diff --git a/pkgs/development/python-modules/django-csp/default.nix b/pkgs/development/python-modules/django-csp/default.nix new file mode 100644 index 000000000000..1eed9578a8a2 --- /dev/null +++ b/pkgs/development/python-modules/django-csp/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchPypi, buildPythonPackage, django }: + +buildPythonPackage rec { + pname = "django-csp"; + version = "3.5"; + + src = fetchPypi { + inherit version; + pname = "django_csp"; + sha256 = "0ks4zszbjx5lyqlc34pjica8hfcjzw4i5m6pivvnyv8yf0vh4q04"; + }; + + # too complicated to setup - needs a running django instance + doCheck = false; + + propagatedBuildInputs = [ django ]; + + meta = with stdenv.lib; { + description = "Adds Content-Security-Policy headers to Django"; + homepage = "https://github.com/mozilla/django-csp"; + license = licenses.bsd3; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 152c5c26122b..9d7db68f5d92 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2816,6 +2816,8 @@ in { django-cors-headers = callPackage ../development/python-modules/django-cors-headers { }; + django-csp = callPackage ../development/python-modules/django-csp { }; + django-discover-runner = callPackage ../development/python-modules/django-discover-runner { }; django_environ = callPackage ../development/python-modules/django_environ { };