From 75cedf7fb09d720880e343ae1d8bc3a3cfef8fe7 Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Mon, 20 May 2024 15:15:42 +0200 Subject: [PATCH 1/2] python312Packages.drf-extra-fields: init at 3.7.0 Co-authored-by: OTABI Tomoya Co-authored-by: Sandro --- .../drf-extra-fields/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/drf-extra-fields/default.nix diff --git a/pkgs/development/python-modules/drf-extra-fields/default.nix b/pkgs/development/python-modules/drf-extra-fields/default.nix new file mode 100644 index 0000000000000..76966803cf29f --- /dev/null +++ b/pkgs/development/python-modules/drf-extra-fields/default.nix @@ -0,0 +1,55 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + django, + djangorestframework, + filetype, + pillow, + psycopg2, + pytestCheckHook, + pytest-django, +}: + +buildPythonPackage rec { + pname = "drf-extra-fields"; + version = "3.7.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "hipo"; + repo = "drf-extra-fields"; + rev = "v${version}"; + hash = "sha256-Ym4vnZ/t0ZdSxU53BC0ducJl1YiTygRSWql/35PNbOU"; + }; + + build-system = [ setuptools ]; + + dependencies = [ + django + djangorestframework + filetype + ]; + + optional-dependencies = { + Base64ImageField = [ pillow ]; + }; + + nativeCheckInputs = [ + (django.override { withGdal = true; }) + psycopg2 + pytestCheckHook + pytest-django + ] ++ optional-dependencies.Base64ImageField; + + pythonImportsCheck = [ "drf_extra_fields" ]; + + meta = { + description = "Extra Fields for Django Rest Framework"; + homepage = "https://github.com/Hipo/drf-extra-fields"; + changelog = "https://github.com/Hipo/drf-extra-fields/releases/tag/${src.rev}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ felbinger ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9dcd987774844..d8eff943aa20a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3724,6 +3724,8 @@ self: super: with self; { dremel3dpy = callPackage ../development/python-modules/dremel3dpy { }; + drf-extra-fields = callPackage ../development/python-modules/drf-extra-fields { }; + drf-jwt = callPackage ../development/python-modules/drf-jwt { }; drf-nested-routers = callPackage ../development/python-modules/drf-nested-routers { }; From 7f233a76275ce88b5c18b1bb1f6e3cb17f23d532 Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Sun, 19 May 2024 13:24:17 +0200 Subject: [PATCH 2/2] python312Packages.netbox-documents: init at 0.7.0 Co-authored-by: OTABI Tomoya Co-authored-by: Sandro --- .../netbox-documents/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/netbox-documents/default.nix diff --git a/pkgs/development/python-modules/netbox-documents/default.nix b/pkgs/development/python-modules/netbox-documents/default.nix new file mode 100644 index 0000000000000..099911166d03b --- /dev/null +++ b/pkgs/development/python-modules/netbox-documents/default.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + drf-extra-fields, + python, + netbox, +}: + +buildPythonPackage rec { + pname = "netbox-documents"; + version = "0.7.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "jasonyates"; + repo = "netbox-documents"; + rev = "v${version}"; + hash = "sha256-Uijdaicbx9A9fBgFx3zyhhFlokFdb9TSolnExbfkkc4="; + }; + + build-system = [ setuptools ]; + + dependencies = [ drf-extra-fields ]; + + nativeCheckInputs = [ netbox ]; + + preFixup = '' + export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH + ''; + + dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion; + pythonImportsCheck = [ "netbox_documents" ]; + + meta = { + description = "Plugin designed to faciliate the storage of site, circuit, device type and device specific documents within NetBox"; + homepage = "https://github.com/jasonyates/netbox-documents"; + changelog = "https://github.com/jasonyates/netbox-documents/releases/tag/${src.rev}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ felbinger ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d8eff943aa20a..a0458f2583b84 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8847,6 +8847,8 @@ self: super: with self; { netapp-ontap = callPackage ../development/python-modules/netapp-ontap { }; + netbox-documents = callPackage ../development/python-modules/netbox-documents { }; + netbox-reorder-rack = callPackage ../development/python-modules/netbox-reorder-rack { }; netcdf4 = callPackage ../development/python-modules/netcdf4 { };