1{
2 lib,
3 buildPythonPackage,
4 pythonAtLeast,
5 fetchFromGitHub,
6 setuptools,
7 netbox,
8}:
9buildPythonPackage rec {
10 pname = "netbox-attachments";
11 version = "7.2.0";
12 pyproject = true;
13
14 disabled = pythonAtLeast "3.13";
15
16 src = fetchFromGitHub {
17 owner = "Kani999";
18 repo = "netbox-attachments";
19 tag = version;
20 hash = "sha256-EYf1PbFIFyCb2fYrnn/T8dnXz3dHmDOLI8Wbnef8V8M=";
21 };
22
23 build-system = [ setuptools ];
24
25 nativeCheckInputs = [ netbox ];
26
27 preFixup = ''
28 export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
29 '';
30
31 pythonImportsCheck = [ "netbox_attachments" ];
32
33 meta = {
34 description = "Plugin to manage attachments for any model";
35 homepage = "https://github.com/Kani999/netbox-attachments";
36 changelog = "https://github.com/Kani999/netbox-attachments/releases/tag/${src.tag}";
37 license = lib.licenses.asl20;
38 platforms = lib.platforms.linux;
39 maintainers = with lib.maintainers; [ felbinger ];
40 };
41}