From da682172da2b7217cad7da6cd03da48e9b1c5be9 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Fri, 20 Mar 2026 11:43:33 +0100 Subject: [PATCH 1/2] varnish[Packages]80: init at 8.0.1 uses varnish-modules 0.27 --- nixos/tests/all-tests.nix | 4 ++++ pkgs/servers/varnish/default.nix | 40 ++++++++++++++++++++----------- pkgs/servers/varnish/modules.nix | 6 ++++- pkgs/servers/varnish/packages.nix | 5 ++++ pkgs/top-level/all-packages.nix | 2 ++ 5 files changed, 42 insertions(+), 15 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index cb914220e4be..0b8bacdc4407 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1729,6 +1729,10 @@ in imports = [ ./varnish.nix ]; _module.args.package = pkgs.varnish77; }; + varnish80 = runTest { + imports = [ ./varnish.nix ]; + _module.args.package = pkgs.varnish80; + }; vault = runTest ./vault.nix; vault-agent = runTest ./vault-agent.nix; vault-dev = runTest ./vault-dev.nix; diff --git a/pkgs/servers/varnish/default.nix b/pkgs/servers/varnish/default.nix index c60e02ff5963..6d50f051655a 100644 --- a/pkgs/servers/varnish/default.nix +++ b/pkgs/servers/varnish/default.nix @@ -68,26 +68,32 @@ let buildFlags = [ "localstatedir=/var/run" ]; patches = - lib.optionals (stdenv.isDarwin && lib.versionAtLeast version "7.7") [ - # Fix VMOD section attribute on macOS - # Unreleased commit on master - (fetchpatch2 { - url = "https://github.com/varnishcache/varnish-cache/commit/a95399f5b9eda1bfdba6ee6406c30a1ed0720167.patch"; - hash = "sha256-T7DIkmnq0O+Cr9DTJS4/rOtg3J6PloUo8jHMWoUZYYk="; - }) - # Fix endian.h compatibility on macOS - # PR: https://github.com/varnishcache/varnish-cache/pull/4339 - ./patches/0001-fix-endian-h-compatibility-on-macos.patch - ] + lib.optionals + (stdenv.isDarwin && lib.versionAtLeast version "7.7" && lib.versionOlder version "8.0") + [ + # Fix VMOD section attribute on macOS + # Unreleased commit on master + (fetchpatch2 { + url = "https://github.com/varnishcache/varnish-cache/commit/a95399f5b9eda1bfdba6ee6406c30a1ed0720167.patch"; + hash = "sha256-T7DIkmnq0O+Cr9DTJS4/rOtg3J6PloUo8jHMWoUZYYk="; + }) + # Fix endian.h compatibility on macOS + # PR: https://github.com/varnishcache/varnish-cache/pull/4339 + ./patches/0001-fix-endian-h-compatibility-on-macos.patch + ] ++ lib.optionals (stdenv.isDarwin && lib.versionOlder version "7.6") [ # Fix duplicate OS_CODE definitions on macOS # PR: https://github.com/varnishcache/varnish-cache/pull/4347 ./patches/0002-fix-duplicate-os-code-definitions-on-macos.patch ]; - postPatch = '' - substituteInPlace bin/varnishtest/vtc_main.c --replace-fail /bin/rm "${coreutils}/bin/rm" - ''; + postPatch = + lib.optionalString (lib.versionOlder version "8.0") '' + substituteInPlace bin/varnishtest/vtc_main.c --replace-fail /bin/rm "${coreutils}/bin/rm" + '' + + lib.optionalString (lib.versionAtLeast version "8.0") '' + substituteInPlace bin/varnishtest/vtest2/src/vtc_main.c --replace-fail /bin/rm "${coreutils}/bin/rm" + ''; postConfigure = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' # prevent cache invalidation @@ -144,6 +150,7 @@ let knownVulnerabilities = lib.optionals (lib.versions.major version == "7") [ "VSV00018: https://vinyl-cache.org/security/VSV00018.html" ]; + broken = stdenv.isDarwin && version == "8.0.1"; # https://github.com/NixOS/nixpkgs/issues/495368 }; }; in @@ -158,4 +165,9 @@ in version = "7.7.3"; hash = "sha256-6W7q/Ez+KlWO0vtU8eIr46PZlfRvjADaVF1YOq74AjY="; }; + # EOL 2026-09-15 + varnish80 = common { + version = "8.0.1"; + hash = "sha256-n1oi1YrNvqw3GhY9683TYSG+XuS8hKoYfrfNDDGP5oI="; + }; } diff --git a/pkgs/servers/varnish/modules.nix b/pkgs/servers/varnish/modules.nix index fbbaea22e679..3dc5943fb152 100644 --- a/pkgs/servers/varnish/modules.nix +++ b/pkgs/servers/varnish/modules.nix @@ -22,7 +22,7 @@ let src = fetchFromGitHub { owner = "varnish"; repo = "varnish-modules"; - rev = version; + tag = version; inherit hash; }; @@ -59,4 +59,8 @@ in version = "0.26.0"; hash = "sha256-xKMOkqm6/GoBve0AhPqyVMQv/oh5Rtj6uCeg/yId7BU="; }; + modules27 = common { + version = "0.27.0"; + hash = "sha256-1hE+AKsC6Td+Al7LFN6bgPicU8dtWd3A8PP7VKZLvYM="; + }; } diff --git a/pkgs/servers/varnish/packages.nix b/pkgs/servers/varnish/packages.nix index 2ba8bc689fcd..7167ca143741 100644 --- a/pkgs/servers/varnish/packages.nix +++ b/pkgs/servers/varnish/packages.nix @@ -3,6 +3,7 @@ callPackage, varnish60, varnish77, + varnish80, lib, }: { @@ -24,4 +25,8 @@ varnish = varnish77; modules = (callPackages ./modules.nix { inherit varnish; }).modules26; }; + varnish80Packages = lib.recurseIntoAttrs rec { + varnish = varnish80; + modules = (callPackages ./modules.nix { inherit varnish; }).modules27; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c8c01ff0d16a..f5dbf691ed61 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3600,10 +3600,12 @@ with pkgs; inherit (callPackages ../servers/varnish { }) varnish60 varnish77 + varnish80 ; inherit (callPackages ../servers/varnish/packages.nix { }) varnish60Packages varnish77Packages + varnish80Packages ; varnishPackages = varnish77Packages; varnish = varnishPackages.varnish; From e738bd66971f52dad3b0030174828c3a20b8c38b Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Fri, 20 Mar 2026 11:50:38 +0100 Subject: [PATCH 2/2] varnish: point to varnish80 as default package Also includes release notes. We will likely move to Vinyl Cache 9 for the 26.05 release due to the support window in a follow-up change. --- doc/release-notes/rl-2605.section.md | 3 +++ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index 06e6b8552d72..87a93a999c1d 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -124,6 +124,9 @@ - `lima` has been updated from `1.x` to `2.x`. This major update includes several breaking changes, such as `/tmp/lima` no longer being mounted by default. +- Varnish Cache has been updated to major version 8, `varnish` now refers to `varnish80`. That release contains breaking changes, see [Upgrading to Varnish-Cache 8.0](https://vinyl-cache.org/docs/8.0/whats-new/upgrading-8.0.html). + Note that the Varnish 6 LTS release remains available as `varnish60`. + - `eslint` has been updated from version 9 to version 10. Please see https://eslint.org/blog/2026/02/eslint-v10.0.0-released/ for details about the breaking changes included in the update. - `minio_legacy_fs` has been removed. If you used that package, migrate your data to be compatible with the newest minio and use the package `minio`. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f5dbf691ed61..dbf09e185c43 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3607,7 +3607,7 @@ with pkgs; varnish77Packages varnish80Packages ; - varnishPackages = varnish77Packages; + varnishPackages = varnish80Packages; varnish = varnishPackages.varnish; vncdo = with python3Packages; toPythonApplication vncdo;