1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 drf-extra-fields, 7 python, 8 netbox, 9}: 10 11buildPythonPackage rec { 12 pname = "netbox-documents"; 13 version = "0.7.4"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "jasonyates"; 18 repo = "netbox-documents"; 19 tag = "v${version}"; 20 hash = "sha256-Y1PmvoYwtVqQ8Ze7bSa5+Hb3B2W9clDXLOZzOqCvWZE="; 21 }; 22 23 build-system = [ setuptools ]; 24 25 dependencies = [ drf-extra-fields ]; 26 27 nativeCheckInputs = [ netbox ]; 28 29 preFixup = '' 30 export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH 31 ''; 32 33 dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion; 34 pythonImportsCheck = [ "netbox_documents" ]; 35 36 meta = { 37 description = "Plugin designed to faciliate the storage of site, circuit, device type and device specific documents within NetBox"; 38 homepage = "https://github.com/jasonyates/netbox-documents"; 39 changelog = "https://github.com/jasonyates/netbox-documents/releases/tag/${src.tag}"; 40 license = lib.licenses.asl20; 41 maintainers = with lib.maintainers; [ felbinger ]; 42 }; 43}