From 3f826e900cf2f5c34f35d5b9bbb176bcf4296435 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sun, 20 Oct 2024 09:37:43 +0000 Subject: [PATCH] python3Packages.djangorestframework-csv: init at 3.0.2 --- .../djangorestframework-csv/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/djangorestframework-csv/default.nix diff --git a/pkgs/development/python-modules/djangorestframework-csv/default.nix b/pkgs/development/python-modules/djangorestframework-csv/default.nix new file mode 100644 index 0000000000000..a7aa1abbd6f81 --- /dev/null +++ b/pkgs/development/python-modules/djangorestframework-csv/default.nix @@ -0,0 +1,52 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + django, + pythonOlder, + djangorestframework, + pytestCheckHook, + pytest-django, + python, +}: + +buildPythonPackage rec { + pname = "djangorestframework-csv"; + version = "3.0.2"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "mjumbewu"; + repo = "django-rest-framework-csv"; + rev = "refs/tags/${version}"; + hash = "sha256-XtMkSucB7+foRpTaRfGF1Co0n3ONNGyzex6MXR4xM5c="; + }; + + dependencies = [ + django + djangorestframework + ]; + + checkInputs = [ + pytestCheckHook + pytest-django + ]; + + checkPhase = '' + runHook preCheck + ${python.interpreter} manage.py test + runHook postCheck + ''; + + pythonImportsCheck = [ "rest_framework_csv" ]; + + meta = { + description = "CSV Tools for Django REST Framework"; + homepage = "https://github.com/mjumbewu/django-rest-framework-csv"; + changelog = "https://github.com/mjumbewu/django-rest-framework-csv/releases/tag/${version}"; + license = lib.licenses.bsd2; + maintainers = [ lib.maintainers.onny ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0db51ceecb223..abe9a32ce84c6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3514,6 +3514,8 @@ self: super: with self; { djangorestframework-camel-case = callPackage ../development/python-modules/djangorestframework-camel-case { }; + djangorestframework-csv = callPackage ../development/python-modules/djangorestframework-csv { }; + djangorestframework-guardian = callPackage ../development/python-modules/djangorestframework-guardian { }; djangorestframework-guardian2 = callPackage ../development/python-modules/djangorestframework-guardian2 { };