diff --git a/lib/licenses/licenses.nix b/lib/licenses/licenses.nix index 8543f1c32907..7ba37040c1da 100644 --- a/lib/licenses/licenses.nix +++ b/lib/licenses/licenses.nix @@ -1150,6 +1150,12 @@ lib.mapAttrs mkLicense ( redistributable = true; # Only if used in Netdata products. }; + netboxLimitedUse = { + fullName = "NetBox Limited Use License 1.0"; + free = false; + url = "https://github.com/netboxlabs/netbox-branching/blob/8465b9aee69ded23930cfe1a522695bfb8955a5a/LICENSE.md"; + }; + ngpl = { spdxId = "NGPL"; fullName = "Nethack General Public License"; diff --git a/pkgs/by-name/ne/netbox_4_5/plugins/netbox-custom-objects/package.nix b/pkgs/by-name/ne/netbox_4_5/plugins/netbox-custom-objects/package.nix new file mode 100644 index 000000000000..2cc4444bc49f --- /dev/null +++ b/pkgs/by-name/ne/netbox_4_5/plugins/netbox-custom-objects/package.nix @@ -0,0 +1,42 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + netbox, + python, +}: + +buildPythonPackage rec { + pname = "netbox-custom-objects"; + version = "0.5.1"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "netboxlabs"; + repo = "netbox-custom-objects"; + tag = "v${version}"; + hash = "sha256-8PEqt6TpoQ8ncyZPesRos0BQHF3cKIzgoFr56v8UTTY="; + }; + + build-system = [ setuptools ]; + + nativeCheckInputs = [ netbox ]; + + preFixup = '' + export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH + ''; + + dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion; + + pythonImportsCheck = [ "netbox_custom_objects" ]; + + meta = { + description = "NetBox plugin to create new object types"; + homepage = "https://github.com/netboxlabs/netbox-custom-objects"; + changelog = "https://github.com/netboxlabs/netbox-custom-objects/releases/tag/${src.tag}"; + license = lib.licenses.netboxLimitedUse; + maintainers = with lib.maintainers; [ felbinger ]; + }; +}