about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2024-03-14 21:32:59 +0100
committerGitHub <noreply@github.com>2024-03-14 21:32:59 +0100
commit22f0f4468a990cc3ca4d1514f6ac4f86c14b1f04 (patch)
tree91c46f582b45bd1636956f3da0d99d152489b94f /pkgs
parentd01eb9b99b634515fd10c732f261d7e6a4e1e503 (diff)
parent81c42da3c322b7d9433141e97e5130166fbffa19 (diff)
downloadnixlib-22f0f4468a990cc3ca4d1514f6ac4f86c14b1f04.tar
nixlib-22f0f4468a990cc3ca4d1514f6ac4f86c14b1f04.tar.gz
nixlib-22f0f4468a990cc3ca4d1514f6ac4f86c14b1f04.tar.bz2
nixlib-22f0f4468a990cc3ca4d1514f6ac4f86c14b1f04.tar.lz
nixlib-22f0f4468a990cc3ca4d1514f6ac4f86c14b1f04.tar.xz
nixlib-22f0f4468a990cc3ca4d1514f6ac4f86c14b1f04.tar.zst
nixlib-22f0f4468a990cc3ca4d1514f6ac4f86c14b1f04.zip
Merge pull request #295836 from drupol/use-replace-fail
php: use `--replace-fail`
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/interpreters/php/generic.nix13
-rw-r--r--pkgs/top-level/php-packages.nix2
2 files changed, 7 insertions, 8 deletions
diff --git a/pkgs/development/interpreters/php/generic.nix b/pkgs/development/interpreters/php/generic.nix
index 3bea507ad0a9..68ca8e4d3bba 100644
--- a/pkgs/development/interpreters/php/generic.nix
+++ b/pkgs/development/interpreters/php/generic.nix
@@ -272,12 +272,11 @@ let
             # Don't record the configure flags since this causes unnecessary
             # runtime dependencies
             ''
-              for i in main/build-defs.h.in scripts/php-config.in; do
-                substituteInPlace $i \
-                  --replace '@CONFIGURE_COMMAND@' '(omitted)' \
-                  --replace '@CONFIGURE_OPTIONS@' "" \
-                  --replace '@PHP_LDFLAGS@' ""
-              done
+              substituteInPlace main/build-defs.h.in \
+                --replace-fail '@CONFIGURE_COMMAND@' '(omitted)'
+              substituteInPlace scripts/php-config.in \
+                --replace-fail '@CONFIGURE_OPTIONS@' "" \
+                --replace-fail '@PHP_LDFLAGS@' ""
 
               export EXTENSION_DIR=$out/lib/php/extensions
 
@@ -287,7 +286,7 @@ let
                 ./scripts/dev/genfiles
               fi
             '' + lib.optionalString stdenv.isDarwin ''
-              substituteInPlace configure --replace "-lstdc++" "-lc++"
+              substituteInPlace configure --replace-fail "-lstdc++" "-lc++"
             '';
 
           # When compiling PHP sources from Github, this file is missing and we
diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix
index e8144409ba12..28712e1d26a5 100644
--- a/pkgs/top-level/php-packages.nix
+++ b/pkgs/top-level/php-packages.nix
@@ -411,7 +411,7 @@ lib.makeScope pkgs.newScope (self: with self; {
         {
           name = "gettext";
           buildInputs = [ gettext ];
-          postPhpize = ''substituteInPlace configure --replace 'as_fn_error $? "Cannot locate header file libintl.h" "$LINENO" 5' ':' '';
+          postPhpize = ''substituteInPlace configure --replace-fail 'as_fn_error $? "Cannot locate header file libintl.h" "$LINENO" 5' ':' '';
           configureFlags = [ "--with-gettext=${gettext}" ];
         }
         {