From 4e441499936cf66e30310cc551508b2c96d571b7 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Wed, 26 Apr 2023 23:17:55 +0200 Subject: [PATCH 1/3] netbox: 3.4.7 -> 3.4.9 --- pkgs/servers/web-apps/netbox/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/web-apps/netbox/default.nix b/pkgs/servers/web-apps/netbox/default.nix index fb9e8a6aa57fc..0df1cd2f3b150 100644 --- a/pkgs/servers/web-apps/netbox/default.nix +++ b/pkgs/servers/web-apps/netbox/default.nix @@ -23,8 +23,8 @@ in }; netbox = callPackage generic { - version = "3.4.7"; - hash = "sha256-pWHGyzLc0tqfehWbCMF1l96L1pewb5FXBUkw9EqPtP8="; + version = "3.4.9"; + hash = "sha256-+7E+bNMSGdNA9Zixa1v/q/6MbjxQmogg/znKH1bRxRw="; extraPatches = [ # Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL ./config.patch From fff8deb4d25eb7d44814d378423c9be44cdb5f3e Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 27 Apr 2023 18:25:10 +0200 Subject: [PATCH 2/3] netbox: 3.4.9 -> 3.4.10 --- pkgs/servers/web-apps/netbox/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/web-apps/netbox/default.nix b/pkgs/servers/web-apps/netbox/default.nix index 0df1cd2f3b150..7c53edf0ce8eb 100644 --- a/pkgs/servers/web-apps/netbox/default.nix +++ b/pkgs/servers/web-apps/netbox/default.nix @@ -23,8 +23,8 @@ in }; netbox = callPackage generic { - version = "3.4.9"; - hash = "sha256-+7E+bNMSGdNA9Zixa1v/q/6MbjxQmogg/znKH1bRxRw="; + version = "3.4.10"; + hash = "sha256-STNukh/UYAiZ5amLfpmzIcv8OlRqW0zU+66ShfDiGkc="; extraPatches = [ # Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL ./config.patch From 78f9e2e6c7733ad698efd520bf3084ae67ae7f91 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 27 Apr 2023 22:10:35 +0200 Subject: [PATCH 3/3] netbox: 3.4.10 -> 3.5.0 --- .../manual/release-notes/rl-2305.section.md | 2 +- pkgs/servers/web-apps/netbox/default.nix | 4 ++-- pkgs/servers/web-apps/netbox/generic.nix | 23 +++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index 54b410ffd8268..7192b15773b46 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -280,7 +280,7 @@ In addition to numerous new and upgraded packages, this release has the followin - `services.openssh.ciphers` to `services.openssh.settings.Ciphers` - `services.openssh.gatewayPorts` to `services.openssh.settings.GatewayPorts` -- `netbox` was updated to 3.4. NixOS' `services.netbox.package` still defaults to 3.3 if `stateVersion` is earlier than 23.05. Please review upstream's [breaking changes](https://github.com/netbox-community/netbox/releases/tag/v3.4.0), and upgrade NetBox by changing `services.netbox.package`. Database migrations will be run automatically. +- `netbox` was updated to 3.5. NixOS' `services.netbox.package` still defaults to 3.3 if `stateVersion` is earlier than 23.05. Please review upstream's breaking changes [for 3.4.0](https://github.com/netbox-community/netbox/releases/tag/v3.4.0) and [for 3.5.0](https://github.com/netbox-community/netbox/releases/tag/v3.5.0), and upgrade NetBox by changing `services.netbox.package`. Database migrations will be run automatically. - `services.netbox` now support RFC42-style options, through `services.netbox.settings`. diff --git a/pkgs/servers/web-apps/netbox/default.nix b/pkgs/servers/web-apps/netbox/default.nix index 7c53edf0ce8eb..922bc181e05dc 100644 --- a/pkgs/servers/web-apps/netbox/default.nix +++ b/pkgs/servers/web-apps/netbox/default.nix @@ -23,8 +23,8 @@ in }; netbox = callPackage generic { - version = "3.4.10"; - hash = "sha256-STNukh/UYAiZ5amLfpmzIcv8OlRqW0zU+66ShfDiGkc="; + version = "3.5.0"; + hash = "sha256-LsUitX/e+ec/9mRBw+cbGOG2Idl9ZQwf/vxIC3YS5LU="; extraPatches = [ # Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL ./config.patch diff --git a/pkgs/servers/web-apps/netbox/generic.nix b/pkgs/servers/web-apps/netbox/generic.nix index ace3e4f011f07..179ef71b702d7 100644 --- a/pkgs/servers/web-apps/netbox/generic.nix +++ b/pkgs/servers/web-apps/netbox/generic.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, fetchpatch , python3 , version , hash @@ -13,6 +14,23 @@ py = python3 // { pkgs = python3.pkgs.overrideScope (self: super: { django = super.django_4; + drf-nested-routers = super.drf-nested-routers.overridePythonAttrs (_oldAttrs: { + patches = [ + # all for django 4 compat + (fetchpatch { + url = "https://github.com/alanjds/drf-nested-routers/commit/59764cc356f7f593422b26845a9dfac0ad196120.diff"; + hash = "sha256-mq3vLHzQlGl2EReJ5mVVQMMcYgGIVt/T+qi1STtQ0aI="; + }) + (fetchpatch { + url = "https://github.com/alanjds/drf-nested-routers/commit/723a5729dd2ffcb66fe315f229789ca454986fa4.diff"; + hash = "sha256-UCbBjwlidqsJ9vEEWlGzfqqMOr0xuB2TAaUxHsLzFfU="; + }) + (fetchpatch { + url = "https://github.com/alanjds/drf-nested-routers/commit/38e49eb73759bc7dcaaa9166169590f5315e1278.diff"; + hash = "sha256-IW4BLhHHhXDUZqHaXg46qWoQ89pMXv0ZxKjOCTnDcI0="; + }) + ]; + }); }); }; @@ -35,6 +53,7 @@ propagatedBuildInputs = with py.pkgs; [ bleach + boto3 django_4 django-cors-headers django-debug-toolbar @@ -49,8 +68,12 @@ django-taggit django-timezone-field djangorestframework + drf-spectacular + drf-spectacular-sidecar drf-yasg + dulwich swagger-spec-validator # from drf-yasg[validation] + feedparser graphene-django jinja2 markdown