diff --git a/nixos/modules/services/web-apps/netbox.nix b/nixos/modules/services/web-apps/netbox.nix index abba24d1e430..c61f217b4b68 100644 --- a/nixos/modules/services/web-apps/netbox.nix +++ b/nixos/modules/services/web-apps/netbox.nix @@ -109,18 +109,11 @@ in package = lib.mkOption { type = lib.types.package; default = - if lib.versionAtLeast config.system.stateVersion "25.11" then - pkgs.netbox_4_3 - else if lib.versionAtLeast config.system.stateVersion "25.05" then - pkgs.netbox_4_2 - else - pkgs.netbox_4_1; + if lib.versionAtLeast config.system.stateVersion "25.11" then pkgs.netbox_4_3 else pkgs.netbox_4_2; defaultText = lib.literalExpression '' if lib.versionAtLeast config.system.stateVersion "25.11" then pkgs.netbox_4_3 - else if lib.versionAtLeast config.system.stateVersion "25.05" - then pkgs.netbox_4_2 - else pkgs.netbox_4_1; + else pkgs.netbox_4_2; ''; description = '' NetBox package to use. diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e8427a17974e..86662c1e528d 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -992,7 +992,6 @@ in neo4j = runTest ./neo4j.nix; netbird = runTest ./netbird.nix; netbox-upgrade = runTest ./web-apps/netbox-upgrade.nix; - netbox_4_1 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_1; }; netbox_4_2 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_2; }; netbox_4_3 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_3; }; netdata = runTest ./netdata.nix; diff --git a/pkgs/by-name/ne/netbox_4_1/custom-static-root.patch b/pkgs/by-name/ne/netbox_4_1/custom-static-root.patch deleted file mode 100644 index c9219fa2b871..000000000000 --- a/pkgs/by-name/ne/netbox_4_1/custom-static-root.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py -index 2de06dd10..00406af48 100644 ---- a/netbox/netbox/settings.py -+++ b/netbox/netbox/settings.py -@@ -410,7 +412,7 @@ USE_X_FORWARDED_HOST = True - X_FRAME_OPTIONS = 'SAMEORIGIN' - - # Static files (CSS, JavaScript, Images) --STATIC_ROOT = BASE_DIR + '/static' -+STATIC_ROOT = getattr(configuration, 'STATIC_ROOT', os.path.join(BASE_DIR, 'static')).rstrip('/') - STATIC_URL = f'/{BASE_PATH}static/' - STATICFILES_DIRS = ( - os.path.join(BASE_DIR, 'project-static', 'dist'), diff --git a/pkgs/by-name/ne/netbox_4_1/package.nix b/pkgs/by-name/ne/netbox_4_1/package.nix deleted file mode 100644 index f2b36a10cf3d..000000000000 --- a/pkgs/by-name/ne/netbox_4_1/package.nix +++ /dev/null @@ -1,138 +0,0 @@ -{ - lib, - fetchFromGitHub, - fetchpatch, - python3, - plugins ? _ps: [ ], - nixosTests, -}: -let - py = python3.override { - packageOverrides = _final: prev: { django = prev.django_5; }; - }; - - extraBuildInputs = plugins py.pkgs; -in -py.pkgs.buildPythonApplication rec { - pname = "netbox"; - version = "4.1.11"; - - format = "other"; - - src = fetchFromGitHub { - owner = "netbox-community"; - repo = "netbox"; - tag = "v${version}"; - hash = "sha256-Nd8HWXn7v0llmg934KGtS5+Tj2RvBhJDuXEvB2Pg3nQ="; - }; - - patches = [ - ./custom-static-root.patch - - # Rebase of PR 17620 "Upgrade to Django 5.1" - # https://github.com/netbox-community/netbox/pull/17620 - (fetchpatch { - url = "https://github.com/netbox-community/netbox/commit/cda9e0525dc850ddd82bf46762a64607bf97df83.patch"; - hash = "sha256-iJiz5f926Np1k4c9DpfPe0HefJy1CH6c0wjwBIt1vWQ="; - }) - ]; - - propagatedBuildInputs = - ( - with py.pkgs; - [ - django - django-cors-headers - django-debug-toolbar - django-filter - django-graphiql-debug-toolbar - django-htmx - django-mptt - django-pglocks - django-prometheus - django-redis - django-rq - django-tables2 - django-taggit - django-timezone-field - djangorestframework - drf-spectacular - drf-spectacular-sidecar - feedparser - jinja2 - markdown - netaddr - nh3 - pillow - psycopg - psycopg.optional-dependencies.c - psycopg.optional-dependencies.pool - pyyaml - requests - social-auth-core - social-auth-app-django - strawberry-graphql - strawberry-django - svgwrite - tablib - - # Optional dependencies, kept here for backward compatibility - - # for the S3 data source backend - boto3 - # for Git data source backend - dulwich - # for error reporting - sentry-sdk - ] - ++ social-auth-core.passthru.optional-dependencies.openidconnect - ) - ++ extraBuildInputs; - - buildInputs = with py.pkgs; [ - mkdocs-material - mkdocs-material-extensions - mkdocstrings - mkdocstrings-python - ]; - - nativeBuildInputs = [ py.pkgs.mkdocs ]; - - postBuild = '' - PYTHONPATH=$PYTHONPATH:netbox/ - python -m mkdocs build - ''; - - installPhase = '' - mkdir -p $out/opt/netbox - cp -r . $out/opt/netbox - chmod +x $out/opt/netbox/netbox/manage.py - makeWrapper $out/opt/netbox/netbox/manage.py $out/bin/netbox \ - --prefix PYTHONPATH : "$PYTHONPATH" - ''; - - passthru = { - python = python3; - # PYTHONPATH of all dependencies used by the package - pythonPath = py.pkgs.makePythonPath propagatedBuildInputs; - inherit (py.pkgs) gunicorn; - tests = { - netbox = nixosTests.netbox_4_1; - inherit (nixosTests) netbox-upgrade; - }; - }; - - meta = { - homepage = "https://github.com/netbox-community/netbox"; - description = "IP address management (IPAM) and data center infrastructure management (DCIM) tool"; - mainProgram = "netbox"; - license = lib.licenses.asl20; - knownVulnerabilities = [ - "Netbox version ${version} is EOL; please upgrade by following the current release notes instructions." - ]; - maintainers = with lib.maintainers; [ - minijackson - raitobezarius - ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 17ee608e5268..de1c132ba637 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1821,6 +1821,7 @@ mapAliases { netbox_3_3 = throw "netbox 3.3 series has been removed as it was EOL"; # Added 2023-09-02 netbox_3_5 = throw "netbox 3.5 series has been removed as it was EOL"; # Added 2024-01-22 netbox_3_7 = throw "netbox 3.7 series has been removed as it was EOL"; # Added 2025-04-23 + netbox_4_1 = throw "netbox 4.1 series has been removed as it was EOL"; # Added 2025-10-14 netsurf = recurseIntoAttrs { browser = lib.warnOnInstantiate "'netsurf.browser' has been renamed to 'netsurf-browser'" netsurf-browser; # Added 2025-03-26 buildsystem = lib.warnOnInstantiate "'netsurf.buildsystem' has been renamed to 'netsurf-buildsystem'" netsurf-buildsystem; # Added 2025-03-26