mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
drf-extra-fields,
|
|
python,
|
|
netbox,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "netbox-documents";
|
|
version = "0.8.4";
|
|
pyproject = true;
|
|
__structuredAttrs = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jasonyates";
|
|
repo = "netbox-documents";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-6t7r/98UILL73JT1TwUBAqygQOtOWj1s1bY7IbRcUKQ=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ drf-extra-fields ];
|
|
|
|
nativeCheckInputs = [ netbox ];
|
|
|
|
preFixup = ''
|
|
export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
|
|
'';
|
|
|
|
dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion;
|
|
pythonImportsCheck = [ "netbox_documents" ];
|
|
|
|
meta = {
|
|
description = "Plugin designed to facilitate the storage of site, circuit, device type and device specific documents within NetBox";
|
|
homepage = "https://github.com/jasonyates/netbox-documents";
|
|
changelog = "https://github.com/jasonyates/netbox-documents/releases/tag/${finalAttrs.src.tag}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ felbinger ];
|
|
};
|
|
})
|