From 303884b3cbcf012e07ee67872b0f2aa8254122ae Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Tue, 24 Feb 2026 21:18:13 +0100 Subject: [PATCH] php: fix updateScript failure due to incorrect release url --- pkgs/development/interpreters/php/default.nix | 29 +++++++++---------- pkgs/development/interpreters/php/generic.nix | 2 +- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index ea895c44ac2b..4bc90e463d7c 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -7,17 +7,16 @@ }: let - commonArgs = { - stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv; - pcre2 = pcre2.override { - withJitSealloc = false; # See https://bugs.php.net/bug.php?id=78927 and https://bugs.php.net/bug.php?id=78630 - }; - }; - - generic = + mkPhp = { version, hash }: let - base = callPackage ./generic.nix (commonArgs // { inherit version hash; }); + base = callPackage ./generic.nix { + stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv; + pcre2 = pcre2.override { + withJitSealloc = false; # See https://bugs.php.net/bug.php?id=78927 and https://bugs.php.net/bug.php?id=78630 + }; + inherit version hash; + }; in base.withExtensions ( { all, ... }: @@ -64,24 +63,24 @@ let zip zlib ] - ++ lib.optional (lib.versionOlder version "8.4") all.imap - ++ lib.optional (lib.versionOlder version "8.5") all.opcache + ++ lib.optionals (lib.versionOlder version "8.4") [ all.imap ] + ++ lib.optionals (lib.versionOlder version "8.5") [ all.opcache ] ); in { - php82 = generic { + php82 = mkPhp { version = "8.2.30"; hash = "sha256-EEggtsj8lZ3eSzNCE19CvavyRuhpGKFjgaF9hEfIZvo="; }; - php83 = generic { + php83 = mkPhp { version = "8.3.30"; hash = "sha256-gAt7btULc8jueETuXy98xhL6p4daCqfEUp6O1YZqUDA="; }; - php84 = generic { + php84 = mkPhp { version = "8.4.18"; hash = "sha256-WGsy2Szrz7yklcX2rRozZAVT0KnAv9LmcVM02VnPmFg="; }; - php85 = generic { + php85 = mkPhp { version = "8.5.3"; hash = "sha256-/F7KvBg862TZ/KPc04e9KbK2dEgyavmY/eADEkkWgjs="; }; diff --git a/pkgs/development/interpreters/php/generic.nix b/pkgs/development/interpreters/php/generic.nix index 1d7980f30439..b40972d7696f 100644 --- a/pkgs/development/interpreters/php/generic.nix +++ b/pkgs/development/interpreters/php/generic.nix @@ -382,7 +382,7 @@ let jq ] } - new_version=$(curl --silent "https://www.php.net/releases/active" | jq --raw-output '."${lib.versions.major version}"."${lib.versions.majorMinor version}".version') + new_version=$(curl --silent "https://www.php.net/releases/active.php" | jq --raw-output '."${lib.versions.major version}"."${lib.versions.majorMinor version}".version') update-source-version "$UPDATE_NIX_ATTR_PATH.unwrapped" "$new_version" "--file=$1" ''; in