1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 netbox,
7 python,
8}:
9
10buildPythonPackage rec {
11 pname = "netbox-reorder-rack";
12 version = "1.1.4";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "netbox-community";
17 repo = "netbox-reorder-rack";
18 tag = "v${version}";
19 hash = "sha256-lWC+Br66POJe3M8L+Pt5D1pWBr9qSpRLn2TcVMXKje4=";
20 };
21
22 build-system = [
23 setuptools
24 ];
25
26 checkInputs = [ netbox ];
27
28 preFixup = ''
29 export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
30 '';
31
32 dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion;
33 pythonImportsCheck = [ "netbox_reorder_rack" ];
34
35 meta = {
36 description = "NetBox plugin to allow users to reorder devices within a rack using a drag and drop UI";
37 homepage = "https://github.com/netbox-community/netbox-reorder-rack";
38 license = lib.licenses.asl20;
39 maintainers = with lib.maintainers; [ minijackson ];
40 };
41}