1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 netbox,
7 django,
8 netaddr,
9 python,
10}:
11buildPythonPackage rec {
12 pname = "netbox-floorplan-plugin";
13 version = "0.7.0";
14 pyproject = true;
15
16 disabled = python.pythonVersion != netbox.python.pythonVersion;
17
18 src = fetchFromGitHub {
19 owner = "netbox-community";
20 repo = "netbox-floorplan-plugin";
21 tag = version;
22 hash = "sha256-ecwPdcVuXU6OIVbafYGaY6+pbBHxhh1AlNmDBlUk1Ss=";
23 };
24
25 build-system = [ setuptools ];
26
27 nativeCheckInputs = [
28 netbox
29 django
30 netaddr
31 ];
32
33 preFixup = ''
34 export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
35 '';
36
37 pythonImportsCheck = [ "netbox_floorplan" ];
38
39 meta = with lib; {
40 description = "Netbox plugin providing floorplan mapping capability for locations and sites";
41 homepage = "https://github.com/netbox-community/netbox-floorplan-plugin";
42 changelog = "https://github.com/netbox-community/netbox-floorplan-plugin/releases/tag/${src.tag}";
43 license = licenses.lgpl3;
44 maintainers = with maintainers; [ cobalt ];
45 };
46}