1{
2 lib,
3 buildPythonPackage,
4 django,
5 fetchFromGitHub,
6 netaddr,
7 netbox,
8 pillow,
9 qrcode,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "netbox-qrcode";
15 version = "0.0.19";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "netbox-community";
20 repo = "netbox-qrcode";
21 tag = "v${version}";
22 hash = "sha256-hrVnNEgLL3r1BtZdBaJu6H5b/tuXUxzGjKcITTopE60=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [
28 qrcode
29 pillow
30 ];
31
32 nativeCheckInputs = [
33 django
34 netaddr
35 netbox
36 ];
37
38 preFixup = ''
39 export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
40 '';
41
42 pythonImportsCheck = [ "netbox_qrcode" ];
43
44 meta = {
45 description = "Netbox plugin for generate QR codes for objects: Rack, Device, Cable";
46 homepage = "https://github.com/netbox-community/netbox-qrcode";
47 changelog = "https://github.com/netbox-community/netbox-qrcode/releases/tag/${src.tag}";
48 license = lib.licenses.asl20;
49 platforms = lib.platforms.linux;
50 maintainers = with lib.maintainers; [ felbinger ];
51 };
52}