Skip to content

Commit adc0529

Browse files
python312Packages.netbox-napalm-plugin: init at 0.3.1 (NixOS#374534)
2 parents c6241b0 + 29a5363 commit adc0529

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
setuptools,
6+
netbox,
7+
pythonAtLeast,
8+
napalm,
9+
}:
10+
buildPythonPackage rec {
11+
pname = "netbox-napalm-plugin";
12+
version = "0.3.1";
13+
pyproject = true;
14+
15+
disabled = pythonAtLeast "3.13";
16+
17+
src = fetchFromGitHub {
18+
owner = "netbox-community";
19+
repo = "netbox-napalm-plugin";
20+
rev = "v${version}";
21+
hash = "sha256-nog6DymnnD0ABzG21jy00yNWhSTHfd7vJ4vo1DjsfKs=";
22+
};
23+
24+
build-system = [ setuptools ];
25+
26+
dependencies = [ napalm ];
27+
28+
nativeCheckInputs = [ netbox ];
29+
30+
postPatch = ''
31+
substituteInPlace pyproject.toml \
32+
--replace-fail 'napalm<5.0' 'napalm'
33+
'';
34+
35+
preFixup = ''
36+
export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
37+
'';
38+
39+
pythonImportsCheck = [ "netbox_napalm_plugin" ];
40+
41+
meta = {
42+
description = "Netbox plugin for Napalm integration";
43+
homepage = "https://github.com/netbox-community/netbox-napalm-plugin";
44+
changelog = "https://github.com/netbox-community/netbox-napalm-plugin/releases/tag/${src.rev}";
45+
license = lib.licenses.asl20;
46+
platforms = lib.platforms.linux;
47+
maintainers = with lib.maintainers; [ felbinger ];
48+
};
49+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9170,6 +9170,8 @@ self: super: with self; {
91709170

91719171
netbox-interface-synchronization = callPackage ../development/python-modules/netbox-interface-synchronization { };
91729172

9173+
netbox-napalm-plugin = callPackage ../development/python-modules/netbox-napalm-plugin { };
9174+
91739175
netbox-plugin-prometheus-sd = callPackage ../development/python-modules/netbox-plugin-prometheus-sd { };
91749176

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

0 commit comments

Comments
 (0)