From 03938279300e131408db1dddfbeacd1df8c3de40 Mon Sep 17 00:00:00 2001 From: Dennis Wuitz Date: Thu, 1 Jun 2023 18:50:13 +0200 Subject: [PATCH] python3.pkgs.django-pwa: init at 1.1.0 --- .../python-modules/django-pwa/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/django-pwa/default.nix diff --git a/pkgs/development/python-modules/django-pwa/default.nix b/pkgs/development/python-modules/django-pwa/default.nix new file mode 100644 index 000000000000..91a216f0ac5c --- /dev/null +++ b/pkgs/development/python-modules/django-pwa/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, django +, fetchFromGitHub +, python +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "django-pwa"; + version = "1.1.0"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "silviolleite"; + repo = "django-pwa"; + rev = "refs/tags/v${version}"; + hash = "sha256-tP1+Jm9hdvN/ZliuVHN8tqy24/tOK1LUUiJv1xUqRrY="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + django + ]; + + pyImportCheck = [ + "pwa" + ]; + + checkPhase = '' + runHook preCheck + ${python.interpreter} runtests.py + runHook postCheck + ''; + + meta = with lib; { + description = "A Django app to include a manifest.json and Service Worker instance to enable progressive web app behavoir"; + homepage = "https://github.com/silviolleite/django-pwa"; + changelog = "https://github.com/silviolleite/django-pwa/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ derdennisop ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3e75efc59d95..3b165746fdff 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3054,6 +3054,8 @@ self: super: with self; { django-prometheus = callPackage ../development/python-modules/django-prometheus { }; + django-pwa = callPackage ../development/python-modules/django-pwa { }; + django-q = callPackage ../development/python-modules/django-q { }; django-scheduler = callPackage ../development/python-modules/django-scheduler { };