Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
python,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
python-dateutil,
|
|
drf-yasg,
|
|
netbox,
|
|
netaddr,
|
|
}:
|
|
buildPythonPackage rec {
|
|
pname = "netbox-contract";
|
|
version = "2.4.2";
|
|
pyproject = true;
|
|
|
|
disabled = python.pythonVersion != netbox.python.pythonVersion;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mlebreuil";
|
|
repo = "netbox-contract";
|
|
tag = "v${version}";
|
|
hash = "sha256-hJz6+vJWhwZJId5Otf1LaFkyaLncuuvai83aCu/aKu0=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
python-dateutil
|
|
drf-yasg
|
|
];
|
|
|
|
# running tests requires initialized django project
|
|
nativeCheckInputs = [
|
|
netbox
|
|
netaddr
|
|
];
|
|
|
|
preFixup = ''
|
|
export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
|
|
'';
|
|
|
|
pythonImportsCheck = [ "netbox_contract" ];
|
|
|
|
meta = {
|
|
description = "Contract plugin for netbox";
|
|
homepage = "https://github.com/mlebreuil/netbox-contract";
|
|
changelog = "https://github.com/mlebreuil/netbox-contract/releases/tag/${src.tag}";
|
|
license = lib.licenses.mit;
|
|
platforms = lib.platforms.linux;
|
|
maintainers = with lib.maintainers; [ felbinger ];
|
|
};
|
|
}
|