1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 python,
7 netbox,
8 django,
9 netaddr,
10}:
11buildPythonPackage rec {
12 pname = "netbox-attachments";
13 version = "9.0.0";
14 pyproject = true;
15
16 disabled = python.pythonVersion != netbox.python.pythonVersion;
17
18 src = fetchFromGitHub {
19 owner = "Kani999";
20 repo = "netbox-attachments";
21 tag = version;
22 hash = "sha256-lm1+MWDT9N6Y+Uf1t3jTrFRF8jRy86JNdZSL1RQO7cw=";
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_attachments" ];
38
39 meta = {
40 description = "Plugin to manage attachments for any model";
41 homepage = "https://github.com/Kani999/netbox-attachments";
42 changelog = "https://github.com/Kani999/netbox-attachments/releases/tag/${src.tag}";
43 license = lib.licenses.asl20;
44 platforms = lib.platforms.linux;
45 maintainers = with lib.maintainers; [ felbinger ];
46 };
47}