blob: 59f659f20540f99c1c0714c142ec18b56d08adab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
netbox,
python,
napalm,
django,
}:
buildPythonPackage rec {
pname = "netbox-napalm-plugin";
version = "0.3.3";
pyproject = true;
disabled = python.pythonVersion != netbox.python.pythonVersion;
src = fetchFromGitHub {
owner = "netbox-community";
repo = "netbox-napalm-plugin";
tag = "v${version}";
hash = "sha256-qo16Bwq2a9AbO80qnQo0WtJ7HbrqqGChMJaqYYD5Aqg=";
};
build-system = [ setuptools ];
dependencies = [ napalm ];
nativeCheckInputs = [
netbox
django
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'napalm<5.0' 'napalm'
'';
preFixup = ''
export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
'';
pythonImportsCheck = [ "netbox_napalm_plugin" ];
meta = {
description = "Netbox plugin for Napalm integration";
homepage = "https://github.com/netbox-community/netbox-napalm-plugin";
changelog = "https://github.com/netbox-community/netbox-napalm-plugin/releases/tag/${src.tag}";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ felbinger ];
};
}
|