From 25d135e5d70a3677bee895e4cff0dd122c1ee028 Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Thu, 16 Jan 2025 19:34:44 +0100 Subject: [PATCH] python312Packages.netbox-diode-plugin: init at 0.6.0 --- .../netbox-diode-plugin/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/netbox-diode-plugin/default.nix diff --git a/pkgs/development/python-modules/netbox-diode-plugin/default.nix b/pkgs/development/python-modules/netbox-diode-plugin/default.nix new file mode 100644 index 0000000000000..5a613105df761 --- /dev/null +++ b/pkgs/development/python-modules/netbox-diode-plugin/default.nix @@ -0,0 +1,49 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + netbox, + brotli, + certifi, + grpcio, + protobuf, +}: +buildPythonPackage rec { + pname = "netbox-diode-plugin"; + version = "0.6.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "netboxlabs"; + repo = "diode-netbox-plugin"; + rev = "v${version}"; + hash = "sha256-VamAjgPUwU2N69r4cFZkg3f6bY4LMXk/4IE85/27n/U="; + }; + + build-system = [ setuptools ]; + + nativeCheckInputs = [ netbox ]; + + dependencies = [ + brotli + certifi + grpcio + protobuf + ]; + + postPatch = '' + sed -i -E 's/(certifi|grpcio|protobuf)==[0-9\.]*/\1/' pyproject.toml + ''; + + pythonImportsCheck = [ "netbox_diode_plugin" ]; + + meta = { + description = "Official NetBox Labs plugin for NetBox for Diode"; + homepage = "https://github.com/netboxlabs/diode-netbox-plugin"; + changelog = "https://github.com/netboxlabs/diode-netbox-plugin/releases/tag/${src.rev}"; + license = lib.licenses.polyFormShield; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ felbinger ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b44f0c18bbb5d..6bd537b02e13f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9162,6 +9162,8 @@ self: super: with self; { netbox-bgp = callPackage ../development/python-modules/netbox-bgp { }; + netbox-diode-plugin = callPackage ../development/python-modules/netbox-diode-plugin { }; + netbox-dns = callPackage ../development/python-modules/netbox-dns { }; netbox-documents = callPackage ../development/python-modules/netbox-documents { };