From bcec56d5ba4b89c32f47e5f7036c9f025e2624c9 Mon Sep 17 00:00:00 2001 From: Cobalt Date: Sat, 21 Dec 2024 14:25:05 +0100 Subject: [PATCH] python3Packages.netbox-floorplan-plugin: init at 0.6.0 Co-authored-by: Nico Felbinger --- .../netbox-floorplan-plugin/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/netbox-floorplan-plugin/default.nix diff --git a/pkgs/development/python-modules/netbox-floorplan-plugin/default.nix b/pkgs/development/python-modules/netbox-floorplan-plugin/default.nix new file mode 100644 index 00000000000000..0b8c4d4814d218 --- /dev/null +++ b/pkgs/development/python-modules/netbox-floorplan-plugin/default.nix @@ -0,0 +1,37 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + netbox, +}: +buildPythonPackage rec { + pname = "netbox-floorplan-plugin"; + version = "0.6.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "netbox-community"; + repo = "netbox-floorplan-plugin"; + rev = version; + hash = "sha256-cJrqSXRCBedZh/pIozz/bHyhQosTy8cFYyji3KJva9Q="; + }; + + build-system = [ setuptools ]; + + nativeCheckInputs = [ netbox ]; + + preFixup = '' + export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH + ''; + + pythonImportsCheck = [ "netbox_floorplan" ]; + + meta = with lib; { + description = "A netbox plugin providing floorplan mapping capability for locations and sites."; + homepage = "https://github.com/netbox-community/netbox-floorplan-plugin"; + changelog = "https://github.com/netbox-community/netbox-floorplan-plugin/releases/tag/${src.rev}"; + license = licenses.lgpl3; + maintainers = with maintainers; [ cobalt ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f65417fab99432..e801ac86260970 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9114,6 +9114,8 @@ self: super: with self; { netbox-reorder-rack = callPackage ../development/python-modules/netbox-reorder-rack { }; + netbox-floorplan-plugin = callPackage ../development/python-modules/netbox-floorplan-plugin { }; + netbox-plugin-prometheus-sd = callPackage ../development/python-modules/netbox-plugin-prometheus-sd { }; netcdf4 = callPackage ../development/python-modules/netcdf4 { };