about summary refs log tree commit diff
path: root/pkgs/build-support/php/hooks/default.nix
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-02-27 00:02:36 +0000
committerGitHub <noreply@github.com>2024-02-27 00:02:36 +0000
commitac95e31c0ca6fe6115ed63effd46d6a1a9beb5b4 (patch)
tree244e0ea5b4243b8fc947773bd72a4d3225fa73b9 /pkgs/build-support/php/hooks/default.nix
parentd6b3e91345f5bf8c9371e1e8967a40764d252117 (diff)
parent6daf4de0662e1d895d220a4a4ddb356eb000abe9 (diff)
downloadnixlib-ac95e31c0ca6fe6115ed63effd46d6a1a9beb5b4.tar
nixlib-ac95e31c0ca6fe6115ed63effd46d6a1a9beb5b4.tar.gz
nixlib-ac95e31c0ca6fe6115ed63effd46d6a1a9beb5b4.tar.bz2
nixlib-ac95e31c0ca6fe6115ed63effd46d6a1a9beb5b4.tar.lz
nixlib-ac95e31c0ca6fe6115ed63effd46d6a1a9beb5b4.tar.xz
nixlib-ac95e31c0ca6fe6115ed63effd46d6a1a9beb5b4.tar.zst
nixlib-ac95e31c0ca6fe6115ed63effd46d6a1a9beb5b4.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support/php/hooks/default.nix')
-rw-r--r--pkgs/build-support/php/hooks/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/build-support/php/hooks/default.nix b/pkgs/build-support/php/hooks/default.nix
index 240ec640723a..98e81c88f9e9 100644
--- a/pkgs/build-support/php/hooks/default.nix
+++ b/pkgs/build-support/php/hooks/default.nix
@@ -2,18 +2,28 @@
 , makeSetupHook
 , diffutils
 , jq
+, writeShellApplication
 , moreutils
 , makeBinaryWrapper
 , cacert
 , buildPackages
 }:
 
+let
+  php-script-utils = writeShellApplication {
+    name = "php-script-utils";
+    runtimeInputs = [ jq ];
+    text = builtins.readFile ./php-script-utils.bash;
+  };
+in
 {
   composerRepositoryHook = makeSetupHook
     {
       name = "composer-repository-hook.sh";
       propagatedBuildInputs = [ jq moreutils cacert ];
-      substitutions = { };
+      substitutions = {
+        phpScriptUtils = lib.getExe php-script-utils;
+      };
     } ./composer-repository-hook.sh;
 
   composerInstallHook = makeSetupHook
@@ -24,6 +34,7 @@
         # Specify the stdenv's `diff` by abspath to ensure that the user's build
         # inputs do not cause us to find the wrong `diff`.
         cmp = "${lib.getBin buildPackages.diffutils}/bin/cmp";
+        phpScriptUtils = lib.getExe php-script-utils;
       };
     } ./composer-install-hook.sh;
 }