From a1ed0571be4594da4381833e5b0e1659f78d884f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 13 Apr 2026 20:59:20 +0200 Subject: [PATCH] exclude frankenphp from older php versions --- nix/image/haze.nix | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/nix/image/haze.nix b/nix/image/haze.nix index 8c7551e..5ce1051 100644 --- a/nix/image/haze.nix +++ b/nix/image/haze.nix @@ -37,8 +37,8 @@ frankenphp, nushell, }: let - inherit (builtins) toString; - inherit (lib) readFile getExe concatStringsSep splitString take; + inherit (builtins) toString compareVersions; + inherit (lib) readFile getExe concatStringsSep splitString take optionals; version = (fromTOML (readFile ../../Cargo.toml)).package.version; @@ -150,17 +150,20 @@ tag = phpVersion; fromImage = baseImage; - copyToRoot = [ - phpEnv - phpEnv.packages.composer - phpunit - (frankenphp.override { - php = php.withExtensions (import ./php-ext.nix { - inherit lib php; - enableBlackfire = false; - }); - }) - ]; + copyToRoot = + [ + phpEnv + phpEnv.packages.composer + phpunit + ] + ++ optionals ((compareVersions phpVersion "8.2") == 1) [ + (frankenphp.override { + php = php.withExtensions (import ./php-ext.nix { + inherit lib php; + enableBlackfire = false; + }); + }) + ]; }; in dockerTools.buildLayeredImage {