From 833956a621dbbd84a8ea4a6510e51890b5e8e56e Mon Sep 17 00:00:00 2001 From: Dennis Wuitz Date: Mon, 28 Aug 2023 12:21:28 +0200 Subject: [PATCH] python3.pkgs.django-google-analytics-app: init at 6.0.0 --- .../django-google-analytics-app/default.nix | 54 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/development/python-modules/django-google-analytics-app/default.nix diff --git a/pkgs/development/python-modules/django-google-analytics-app/default.nix b/pkgs/development/python-modules/django-google-analytics-app/default.nix new file mode 100644 index 000000000000..ad9262f844a5 --- /dev/null +++ b/pkgs/development/python-modules/django-google-analytics-app/default.nix @@ -0,0 +1,54 @@ +{ lib +, beautifulsoup4 +, buildPythonPackage +, celery +, django +, fetchFromGitHub +, importlib-metadata +, python +, pythonOlder +, requests +, structlog +}: + +buildPythonPackage rec { + pname = "django-google-analytics-app"; + version = "6.0.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "praekeltfoundation"; + repo = "django-google-analytics"; + rev = "refs/tags/${version}"; + hash = "sha256-0KLfGZY8qq5JGb+LJXpQRS76+qXtrf/hv6QLenm+BhQ="; + }; + + propagatedBuildInputs = [ + beautifulsoup4 + celery + django + importlib-metadata + requests + structlog + ]; + + checkPhase = '' + runHook preCheck + ${python.interpreter} -m django check --settings=test_settings + runHook postCheck + ''; + + pythonImportsCheck = [ + "google_analytics" + ]; + + meta = with lib; { + description = "Django Google Analytics brings the power of server side/non-js Google Analytics to your Django projects"; + homepage = "https://github.com/praekeltfoundation/django-google-analytics/"; + changelog = "https://github.com/praekeltfoundation/django-google-analytics/releases/tag/${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ derdennisop ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 446eccfa1955..1663d2f825ed 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2868,6 +2868,8 @@ self: super: with self; { django-gravatar2 = callPackage ../development/python-modules/django-gravatar2 { }; + django-google-analytics-app = callPackage ../development/python-modules/django-google-analytics-app { }; + django-guardian = callPackage ../development/python-modules/django-guardian { }; django-haystack = callPackage ../development/python-modules/django-haystack { };