add script to fetch netbox data and write to local files

This commit is contained in:
lilly 2025-02-21 21:15:20 +01:00
parent 5a0cd84dd5
commit eab11d4a5b
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
6 changed files with 96 additions and 2 deletions
packages/fetch-netbox-data

View file

@ -0,0 +1,23 @@
{ python3 }:
python3.pkgs.buildPythonApplication {
name = "fetch-netbox-data";
version = "1.0.0";
src = ./.;
pyproject = false;
propagatedBuildInputs = with python3.pkgs; [
pynetbox
dnspython
];
installPhase = ''
runHook preInstall
install -Dm755 ./fetch-netbox-data.py $out/bin/fetch-netbox-data
runHook postInstall
'';
meta = {
mainProgram = "fetch-netbox-data";
platforms = python3.meta.platforms;
};
}