diff --git a/pkgs/by-name/ne/netbox_4_6/plugins/netbox-bgp/package.nix b/pkgs/by-name/ne/netbox_4_6/plugins/netbox-bgp/package.nix new file mode 100644 index 000000000000..0e79cf2632fb --- /dev/null +++ b/pkgs/by-name/ne/netbox_4_6/plugins/netbox-bgp/package.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + netbox, + python, +}: +buildPythonPackage (finalAttrs: { + __structuredAttrs = true; + + pname = "netbox-bgp"; + version = "0.19.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "netbox-community"; + repo = "netbox-bgp"; + tag = "v${finalAttrs.version}"; + hash = "sha256-6LZLsUPC9L9L19KeXJilJvmZYcl6YwqysGO8nFAUmcI="; + }; + + build-system = [ setuptools ]; + + nativeCheckInputs = [ netbox ]; + + preFixup = '' + export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH + ''; + + dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion; + pythonImportsCheck = [ "netbox_bgp" ]; + + passthru.pluginName = "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/${finalAttrs.src.tag}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ felbinger ]; + }; +})