From 7516bbce81f2c5b576d6474799ab0548041b2fc2 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sat, 26 Oct 2024 13:39:02 +0200 Subject: [PATCH 1/2] python3Packages.django-app-helper: init at 3.3.4 --- .../django-app-helper/default.nix | 63 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 65 insertions(+) create mode 100644 pkgs/development/python-modules/django-app-helper/default.nix diff --git a/pkgs/development/python-modules/django-app-helper/default.nix b/pkgs/development/python-modules/django-app-helper/default.nix new file mode 100644 index 000000000000..f0c829ff05b5 --- /dev/null +++ b/pkgs/development/python-modules/django-app-helper/default.nix @@ -0,0 +1,63 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + django, + pythonOlder, + setuptools, + docopt, + dj-database-url, + python, + django-filer, + six, + django-app-helper, +}: + +buildPythonPackage rec { + pname = "django-app-helper"; + version = "3.3.4"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "nephila"; + repo = "django-app-helper"; + rev = "refs/tags/${version}"; + hash = "sha256-4nFg8B1uxGJVY1jcGr0e2Oi14lqXcFOi0HJ+ogE2ikg="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + dj-database-url + docopt + six + ]; + + checkInputs = [ django-filer ]; + + # Tests depend on django-filer, which depends on this package. + # To avoid infinite recursion, we only enable tests when building passthru.tests. + doCheck = false; + + checkPhase = '' + ${python.interpreter} helper.py + ''; + + pythonImportsCheck = [ "app_helper" ]; + + passthru.tests = { + runTests = django-app-helper.overrideAttrs (_: { + doCheck = true; + }); + }; + + meta = { + description = "Helper for Django applications development"; + homepage = "https://django-app-helper.readthedocs.io"; + changelog = "https://github.com/nephila/django-app-helper/releases/tag/${version}"; + license = lib.licenses.gpl2Only; + maintainers = [ lib.maintainers.onny ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eb1a12c33f6a..86051f952ded 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3333,6 +3333,8 @@ self: super: with self; { django-appconf = callPackage ../development/python-modules/django-appconf { }; + django-app-helper = callPackage ../development/python-modules/django-app-helper { }; + django-auditlog = callPackage ../development/python-modules/django-auditlog { }; django-auth-ldap = callPackage ../development/python-modules/django-auth-ldap { }; From ddbf22f69c3ec63886e4b1f5acc4045ce8c7a343 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sun, 27 Oct 2024 18:14:59 +0100 Subject: [PATCH 2/2] python3Packages.django-filer: init at 3.2.3 --- .../python-modules/django-filer/default.nix | 60 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/development/python-modules/django-filer/default.nix diff --git a/pkgs/development/python-modules/django-filer/default.nix b/pkgs/development/python-modules/django-filer/default.nix new file mode 100644 index 000000000000..e87125cd9514 --- /dev/null +++ b/pkgs/development/python-modules/django-filer/default.nix @@ -0,0 +1,60 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + django, + pythonOlder, + pytestCheckHook, + django-polymorphic, + setuptools, + python, + easy-thumbnails, + pillow-heif, + django-app-helper, + distutils, +}: + +buildPythonPackage rec { + pname = "django-filer"; + version = "3.2.3"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "django-cms"; + repo = "django-filer"; + rev = "refs/tags/${version}"; + hash = "sha256-PoUBnfNymighCsGoJE+iu31lxA9wqVXimFPCytQtPLg="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + django + django-polymorphic + easy-thumbnails + ]; + + optional-dependencies = { + heif = [ pillow-heif ]; + }; + + checkInputs = [ + distutils + django-app-helper + ]; + + checkPhase = '' + runHook preCheck + ${python.interpreter} tests/settings.py + runHook postCheck + ''; + + meta = { + description = "File management application for Django"; + homepage = "https://github.com/django-cms/django-filer"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.onny ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 86051f952ded..6ca55effdd36 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3415,6 +3415,8 @@ self: super: with self; { django-extensions = callPackage ../development/python-modules/django-extensions { }; + django-filer = callPackage ../development/python-modules/django-filer { }; + django-filter = callPackage ../development/python-modules/django-filter { }; django-formtools = callPackage ../development/python-modules/django-formtools { };