diff --git a/pkgs/by-name/ne/netbox_4_5/plugins/netbox-inventory/package.nix b/pkgs/by-name/ne/netbox_4_5/plugins/netbox-inventory/package.nix new file mode 100644 index 000000000000..d0aa49dbaf1e --- /dev/null +++ b/pkgs/by-name/ne/netbox_4_5/plugins/netbox-inventory/package.nix @@ -0,0 +1,42 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + netbox, + python, +}: + +buildPythonPackage rec { + pname = "netbox-inventory"; + version = "2.5.1"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "ArnesSI"; + repo = "netbox-inventory"; + tag = "v${version}"; + hash = "sha256-6MIYwz11YZhu3ksM7iAfKACKIKpuq283DTzaRR3lcXA="; + }; + + build-system = [ setuptools ]; + + nativeCheckInputs = [ netbox ]; + + preFixup = '' + export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH + ''; + + dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion; + + pythonImportsCheck = [ "netbox_inventory" ]; + + meta = { + description = "NetBox plugin to manage hardware inventory"; + homepage = "https://github.com/ArnesSI/netbox-inventory"; + changelog = "https://github.com/ArnesSI/netbox-inventory/releases/tag/${src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ felbinger ]; + }; +}