From 7fe0d237bf9a62c34c740f8be8bfa3972cb02e1f Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Sun, 19 May 2024 13:15:09 +0200 Subject: [PATCH] python311Packages.netbox-bgp: init at 0.14.0 Co-authored-by: Sandro --- .../python-modules/netbox-bgp/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/netbox-bgp/default.nix diff --git a/pkgs/development/python-modules/netbox-bgp/default.nix b/pkgs/development/python-modules/netbox-bgp/default.nix new file mode 100644 index 000000000000..0cc1d41fcc5f --- /dev/null +++ b/pkgs/development/python-modules/netbox-bgp/default.nix @@ -0,0 +1,42 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + netbox, + pytestCheckHook, + python, +}: + +buildPythonPackage rec { + pname = "netbox-bgp"; + version = "0.14.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "netbox-community"; + repo = "netbox-bgp"; + rev = "v${version}"; + hash = "sha256-O/kvohyQRhAkDKN5smygyrldINkTQX6yY4eTHn7zSPU"; + }; + + build-system = [ setuptools ]; + + nativeCheckInputs = [ netbox ]; + + preFixup = '' + export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH + ''; + + dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion; + + pythonImportsCheck = [ "netbox_bgp" ]; + + meta = { + description = "NetBox plugin for BGP related objects documentation"; + homepage = "https://github.com/netbox-community/netbox-bgp"; + changelog = "https://github.com/netbox-community/netbox-bgp/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 17ea69f96013..6f00c2699f64 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8889,6 +8889,8 @@ self: super: with self; { netapp-ontap = callPackage ../development/python-modules/netapp-ontap { }; + netbox-bgp = callPackage ../development/python-modules/netbox-bgp { }; + netbox-documents = callPackage ../development/python-modules/netbox-documents { }; netbox-reorder-rack = callPackage ../development/python-modules/netbox-reorder-rack { };