From ce0a7c1f002f4333e6d84b9585b2e16b225a35c1 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 Co-authored-by: Sandro --- .../netbox-floorplan-plugin/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) 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..41e9cc5c0d16ec --- /dev/null +++ b/pkgs/development/python-modules/netbox-floorplan-plugin/default.nix @@ -0,0 +1,40 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + netbox, + pythonAtLeast, +}: +buildPythonPackage rec { + pname = "netbox-floorplan-plugin"; + version = "0.6.0"; + pyproject = true; + + disabled = pythonAtLeast "3.13"; + + src = fetchFromGitHub { + owner = "netbox-community"; + repo = "netbox-floorplan-plugin"; + tag = 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 = "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.tag}"; + license = licenses.lgpl3; + maintainers = with maintainers; [ cobalt ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b44f0c18bbb5d6..4560c94158eb1f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9166,7 +9166,7 @@ self: super: with self; { netbox-documents = callPackage ../development/python-modules/netbox-documents { }; - netbox-interface-synchronization = callPackage ../development/python-modules/netbox-interface-synchronization { }; + netbox-floorplan-plugin = callPackage ../development/python-modules/netbox-floorplan-plugin { }; netbox-plugin-prometheus-sd = callPackage ../development/python-modules/netbox-plugin-prometheus-sd { };