diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index 54c1f3d750c5..a66e6abcd87a 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -122,6 +122,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/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 01533d4ea935..ba920ddc3ac5 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1708,6 +1708,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 f4513f6b453c..9732092816f4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3595,12 +3595,14 @@ with pkgs; inherit (callPackages ../servers/varnish { }) varnish60 varnish77 + varnish80 ; inherit (callPackages ../servers/varnish/packages.nix { }) varnish60Packages varnish77Packages + varnish80Packages ; - varnishPackages = varnish77Packages; + varnishPackages = varnish80Packages; varnish = varnishPackages.varnish; vncdo = with python3Packages; toPythonApplication vncdo;