Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.netbox-diode-plugin: init at 0.6.0 #374361

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/licenses.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,11 @@ lib.mapAttrs mkLicense ({
fullName = "PHP License v3.01";
};

polyFormShield = {
fullName = "PolyForm Shield License 1.0.0";
free = false;
};

postgresql = {
spdxId = "PostgreSQL";
fullName = "PostgreSQL License";
Expand Down
49 changes: 49 additions & 0 deletions pkgs/development/python-modules/netbox-diode-plugin/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
netbox,
brotli,
certifi,
grpcio,
protobuf,
}:
buildPythonPackage rec {
pname = "netbox-diode-plugin";
version = "0.6.0";
pyproject = true;

src = fetchFromGitHub {
owner = "netboxlabs";
repo = "diode-netbox-plugin";
rev = "v${version}";
hash = "sha256-VamAjgPUwU2N69r4cFZkg3f6bY4LMXk/4IE85/27n/U=";
};

build-system = [ setuptools ];

nativeCheckInputs = [ netbox ];

dependencies = [
brotli
certifi
grpcio
protobuf
];

postPatch = ''
sed -i -E 's/(certifi|grpcio|protobuf)==[0-9\.]*/\1/' pyproject.toml
'';

pythonImportsCheck = [ "netbox_diode_plugin" ];

meta = {
description = "Official NetBox Labs plugin for NetBox for Diode";
homepage = "https://github.com/netboxlabs/diode-netbox-plugin";
changelog = "https://github.com/netboxlabs/diode-netbox-plugin/releases/tag/${src.rev}";
license = lib.licenses.polyFormShield;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ felbinger ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9162,6 +9162,8 @@ self: super: with self; {

netbox-bgp = callPackage ../development/python-modules/netbox-bgp { };

netbox-diode-plugin = callPackage ../development/python-modules/netbox-diode-plugin { };

netbox-dns = callPackage ../development/python-modules/netbox-dns { };

netbox-documents = callPackage ../development/python-modules/netbox-documents { };
Expand Down