infrastructure/modules/dgn-netbox-agent/package.nix
Tom Hubrecht 972b9554b7
All checks were successful
Check meta / check_meta (push) Successful in 18s
Check meta / check_dns (push) Successful in 19s
Check meta / check_dns (pull_request) Successful in 21s
Check meta / check_meta (pull_request) Successful in 21s
build configuration / build_and_cache_geo01 (pull_request) Successful in 1m8s
build configuration / build_and_cache_geo02 (pull_request) Successful in 1m14s
build configuration / build_and_cache_storage01 (pull_request) Successful in 1m21s
build configuration / build_and_cache_compute01 (pull_request) Successful in 1m44s
build configuration / build_and_cache_vault01 (pull_request) Successful in 1m24s
build configuration / build_and_cache_rescue01 (pull_request) Successful in 1m35s
lint / check (pull_request) Successful in 25s
build configuration / build_and_cache_web02 (pull_request) Successful in 1m10s
build configuration / build_and_cache_bridge01 (pull_request) Successful in 1m2s
build configuration / build_and_cache_web03 (pull_request) Successful in 1m13s
build configuration / build_and_cache_web01 (pull_request) Successful in 1m44s
build configuration / build_and_cache_geo01 (push) Successful in 1m9s
build configuration / build_and_cache_geo02 (push) Successful in 1m15s
build configuration / build_and_cache_rescue01 (push) Successful in 1m20s
build configuration / build_and_cache_storage01 (push) Successful in 1m24s
build configuration / build_and_cache_vault01 (push) Successful in 1m28s
build configuration / build_and_cache_compute01 (push) Successful in 1m44s
lint / check (push) Successful in 24s
build configuration / build_and_cache_bridge01 (push) Successful in 1m1s
build configuration / build_and_cache_web02 (push) Successful in 1m11s
build configuration / build_and_cache_web03 (push) Successful in 1m10s
build configuration / build_and_cache_web01 (push) Successful in 1m44s
feat(netbox-agent): Internalize
2024-10-21 19:38:11 +02:00

64 lines
1.2 KiB
Nix

{
lib,
python3,
fetchgit,
ethtool,
dmidecode,
ipmitool,
lldpd,
lshw,
}:
python3.pkgs.buildPythonApplication {
pname = "netbox-agent";
version = "unstable-2023-03-19";
pyproject = true;
src = fetchgit {
url = "https://git.dgnum.eu/DGNum/netbox-agent";
rev = "12ceea413cbb87280713de734b5e1b3e88c00178";
hash = "sha256-v6H8/yNUcpHERiyzytR2ZADLiDK2QpzSEmxTP5m9BLE=";
};
nativeBuildInputs = with python3.pkgs; [
setuptools
wheel
pythonRelaxDepsHook
];
pythonRelaxDeps = true;
propagatedBuildInputs = with python3.pkgs; [
distro
jsonargparse
netaddr
(callPackage ./netifaces2.nix { })
packaging
pynetbox
python-slugify
pyyaml
];
postInstall = ''
wrapProgram $out/bin/netbox_agent \
--prefix PATH ":" ${
lib.makeBinPath [
ethtool
dmidecode
ipmitool
lldpd
lshw
]
}
'';
pythonImportsCheck = [ "netbox_agent" ];
meta = with lib; {
description = "Netbox agent to run on your infrastructure's servers";
homepage = "https://git.dgnum.eu/DGNum/netbox-agent";
license = licenses.asl20;
maintainers = [ ];
mainProgram = "netbox_agent";
};
}