chore(netbox): Upgrade
Some checks failed
Check workflows / check_workflows (push) Failing after 24s
Check meta / check_dns (pull_request) Successful in 21s
Check meta / check_meta (pull_request) Successful in 22s
Check workflows / check_workflows (pull_request) Failing after 23s
Run pre-commit on all files / check (push) Successful in 27s
Build all the nodes / geo01 (pull_request) Successful in 4m4s
Build all the nodes / storage01 (pull_request) Successful in 3m59s
Build all the nodes / geo02 (pull_request) Successful in 4m2s
Build all the nodes / bridge01 (pull_request) Successful in 4m9s
Build all the nodes / rescue01 (pull_request) Successful in 4m4s
Build all the nodes / compute01 (pull_request) Successful in 4m22s
Run pre-commit on all files / check (pull_request) Successful in 24s
Build all the nodes / web02 (pull_request) Successful in 1m11s
Build all the nodes / web03 (pull_request) Successful in 1m24s
Build all the nodes / vault01 (pull_request) Successful in 1m36s
Build all the nodes / web01 (pull_request) Failing after 14m37s

This commit is contained in:
sinavir 2024-11-11 00:57:08 +01:00
parent a50637d55e
commit b00e47ec85
No known key found for this signature in database
3 changed files with 75 additions and 8 deletions

View file

@ -13,7 +13,7 @@ in
services = {
netbox = {
enable = true;
package = nixpkgs.unstable.netbox_3_7;
package = nixpkgs.unstable.netbox_4_1;
secretKeyFile = "/dev/null";
listenAddress = "127.0.0.1";
plugins = p: [ p.netbox-qrcode ];

View file

@ -0,0 +1,70 @@
diff --git a/pkgs/development/python-modules/netbox-qrcode/default.nix b/pkgs/development/python-modules/netbox-qrcode/default.nix
new file mode 100644
index 000000000000..b378b839a8dc
--- /dev/null
+++ b/pkgs/development/python-modules/netbox-qrcode/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, setuptools
+, wheel
+, pillow
+, qrcode
+, netbox
+}:
+
+buildPythonPackage rec {
+ pname = "netbox-qrcode";
+ version = "0.0.13";
+ pyproject = true;
+
+ src = fetchFromGitHub {
+ owner = "netbox-community";
+ repo = "netbox-qrcode";
+ rev = "v${version}";
+ hash = "sha256-/labSZyB1SkU/uemuL946RDk8IVEAgCYJY2vrJFney0=";
+ };
+
+ nativeBuildInputs = [
+ setuptools
+ wheel
+ ];
+
+ propagatedBuildInputs = [
+ qrcode
+ pillow
+ ];
+
+ checkInputs = [
+ netbox
+ ];
+
+ preFixup = ''
+ export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
+ '';
+
+ pythonImportsCheck = [
+ "netbox_qrcode"
+ ];
+
+ meta = with lib; {
+ description = "NetBox Plugin for generate QR Codes";
+ homepage = "https://github.com/netbox-community/netbox-qrcode";
+ license = licenses.asl20;
+ maintainers = with maintainers; [ sinavir ];
+ };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 9999d745e3ac..b226e0063672 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -8989,6 +8989,8 @@ self: super: with self; {
netbox-reorder-rack = callPackage ../development/python-modules/netbox-reorder-rack { };
+ netbox-qrcode = callPackage ../development/python-modules/netbox-qrcode { };
+
netcdf4 = callPackage ../development/python-modules/netcdf4 { };
netdata = callPackage ../development/python-modules/netdata { };

View file

@ -1,10 +1,8 @@
{
"nixos-24.05" = [
# netbox qrcode plugin
{
_type = "commit";
sha = "c82191d848e7a37e125ee15c485f32ac01afc0b2";
hash = "sha256-TooktlqihtULzJJsHvm8EubbUdJZvbDKdIDcYu7Qcig=";
_type = "static";
path = ./06-netbox-qrcode.patch;
}
# nixos/nextcloud: Rename autocreate (a no-op) to verify_bucket_exists
@ -50,9 +48,8 @@
"nixos-unstable" = [
# netbox qrcode plugin
{
_type = "commit";
sha = "c82191d848e7a37e125ee15c485f32ac01afc0b2";
hash = "sha256-TooktlqihtULzJJsHvm8EubbUdJZvbDKdIDcYu7Qcig=";
_type = "static";
path = ./06-netbox-qrcode.patch;
}
# Build netbird-relay