From 1568b6c5fd8491e76d71deb316e094ed20cf5225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 19 May 2022 01:46:30 +0200 Subject: [PATCH] python310Packages.django-guardian: normalise attr, add pythonImportsCheck, adopt --- .../default.nix | 25 +++++++++++++++---- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) rename pkgs/development/python-modules/{django_guardian => django-guardian}/default.nix (55%) diff --git a/pkgs/development/python-modules/django_guardian/default.nix b/pkgs/development/python-modules/django-guardian/default.nix similarity index 55% rename from pkgs/development/python-modules/django_guardian/default.nix rename to pkgs/development/python-modules/django-guardian/default.nix index c7bda13dd9ab..6dd9c669a3f1 100644 --- a/pkgs/development/python-modules/django_guardian/default.nix +++ b/pkgs/development/python-modules/django-guardian/default.nix @@ -1,7 +1,13 @@ -{ lib, buildPythonPackage, fetchPypi -, django-environ, mock, django -, pytest, pytest-runner, pytest-django +{ lib +, buildPythonPackage +, fetchPypi +, django-environ +, mock +, django +, pytestCheckHook +, pytest-django }: + buildPythonPackage rec { pname = "django-guardian"; version = "2.4.0"; @@ -11,12 +17,21 @@ buildPythonPackage rec { sha256 = "c58a68ae76922d33e6bdc0e69af1892097838de56e93e78a8361090bcd9f89a0"; }; - checkInputs = [ pytest pytest-runner pytest-django django-environ mock ]; propagatedBuildInputs = [ django ]; + checkInputs = [ + django-environ + mock + pytestCheckHook + pytest-django + ]; + + pythonImportsCheck = [ "guardian" ]; + meta = with lib; { description = "Per object permissions for Django"; homepage = "https://github.com/django-guardian/django-guardian"; - license = [ licenses.mit licenses.bsd2 ]; + license = with licenses; [ mit bsd2 ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index d76d079eab29..29827b54712c 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -57,6 +57,7 @@ mapAliases ({ django_appconf = django-appconf; # added 2022-03-03 django_environ = django-environ; # added 2021-12-25 django_extensions = django-extensions; # added 2022-01-09 + django_guardian = django-guardian; # added 2022-05-19 django_modelcluster = django-modelcluster; # added 2022-04-02 django_redis = django-redis; # added 2021-10-11 django_taggit = django-taggit; # added 2021-10-11 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e25e0968fa7d..cc55c40e2645 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2321,7 +2321,7 @@ in { django-gravatar2 = callPackage ../development/python-modules/django-gravatar2 { }; - django_guardian = callPackage ../development/python-modules/django_guardian { }; + django-guardian = callPackage ../development/python-modules/django-guardian { }; django-haystack = callPackage ../development/python-modules/django-haystack { };