From 33a6b73ae13869376df64ecaeb3afcbd03cf2be2 Mon Sep 17 00:00:00 2001 From: kurogeek Date: Thu, 8 Jan 2026 13:12:38 +0700 Subject: [PATCH] python3Packages.django-dbbackup: init at 4.3.0 --- .../django-dbbackup/default.nix | 80 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 82 insertions(+) create mode 100644 pkgs/development/python-modules/django-dbbackup/default.nix diff --git a/pkgs/development/python-modules/django-dbbackup/default.nix b/pkgs/development/python-modules/django-dbbackup/default.nix new file mode 100644 index 000000000000..3e9fe5a9a379 --- /dev/null +++ b/pkgs/development/python-modules/django-dbbackup/default.nix @@ -0,0 +1,80 @@ +{ + buildPythonPackage, + coverage, + django, + django-storages, + fetchFromGitHub, + flake8, + gnupg, + lib, + pep8, + psycopg2, + pylint, + pytest-django, + pytestCheckHook, + python-dotenv, + python-gnupg, + pytz, + setuptools, + testfixtures, + tox, + pythonOlder, +}: +buildPythonPackage rec { + pname = "django-dbbackup"; + version = "4.3.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "django-dbbackup"; + repo = "django-dbbackup"; + tag = version; + hash = "sha256-w+LfU5I7swnCJpwqBqoCTRUCZjKoIxK3OC+8CrihLEI="; + }; + + disabled = pythonOlder "3.9"; + + dependencies = [ + django + python-gnupg + pytz + ]; + + build-system = [ setuptools ]; + doCheck = true; + preCheck = '' + tempDir=$(mktemp -d) + export HOME=$tempDir + export DJANGO_SETTINGS_MODULE=dbbackup.tests.settings + ''; + pythonImportsCheck = [ "dbbackup" ]; + disabledTestPaths = [ + # Specific gnupg version required, which aren't provided in upstream + "dbbackup/tests/commands/test_dbrestore.py::DbrestoreCommandRestoreBackupTest::test_decrypt" + "dbbackup/tests/test_connectors/test_base.py::BaseCommandDBConnectorTest::test_run_command_with_parent_env" + "dbbackup/tests/test_utils.py::Encrypt_FileTest::test_func" + "dbbackup/tests/test_utils.py::Compress_FileTest::test_func" + ]; + nativeCheckInputs = [ + coverage + django-storages + flake8 + gnupg + pep8 + psycopg2 + pylint + pytest-django + pytestCheckHook + python-dotenv + testfixtures + tox + ]; + + meta = with lib; { + description = "Management commands to help backup and restore your project database and media files"; + homepage = "https://github.com/Archmonger/django-dbbackup"; + changelog = "https://github.com/Archmonger/django-dbbackup/releases/tag/${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ kurogeek ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 58e77ee3429b..589f1e598087 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4148,6 +4148,8 @@ self: super: with self; { django-currentuser = callPackage ../development/python-modules/django-currentuser { }; + django-dbbackup = callPackage ../development/python-modules/django-dbbackup { }; + django-debug-toolbar = callPackage ../development/python-modules/django-debug-toolbar { }; django-dynamic-preferences =