about summary refs log tree commit diff
diff options
context:
space:
mode:
-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}" ];
         }
         {