From a2f8623363e186271cbe2abae1bcac429d49c340 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 14 Sep 2023 21:40:33 +0200 Subject: build-support/php: prevent the creation of symlinks Using symbolic links create issues on Darwin, therefore, using `makeWrapper` fix this. --- pkgs/build-support/php/hooks/composer-install-hook.sh | 2 +- pkgs/build-support/php/hooks/default.nix | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'pkgs/build-support/php') diff --git a/pkgs/build-support/php/hooks/composer-install-hook.sh b/pkgs/build-support/php/hooks/composer-install-hook.sh index 9f23b90fa401d..bb6cb47e861b9 100644 --- a/pkgs/build-support/php/hooks/composer-install-hook.sh +++ b/pkgs/build-support/php/hooks/composer-install-hook.sh @@ -106,7 +106,7 @@ composerInstallInstallHook() { # Create symlinks for the binaries. jq -r -c 'try .bin[]' composer.json | while read -r bin; do mkdir -p "$out"/share/php/"${pname}" "$out"/bin - ln -s "$out"/share/php/"${pname}"/"$bin" "$out"/bin/"$(basename "$bin")" + makeWrapper "$out"/share/php/"${pname}"/"$bin" "$out"/bin/"$(basename "$bin")" done echo "Finished composerInstallInstallHook" diff --git a/pkgs/build-support/php/hooks/default.nix b/pkgs/build-support/php/hooks/default.nix index 98198f0128795..e7de98647c397 100644 --- a/pkgs/build-support/php/hooks/default.nix +++ b/pkgs/build-support/php/hooks/default.nix @@ -1,21 +1,22 @@ { makeSetupHook -, php , jq , moreutils +, makeBinaryWrapper +, php }: { composerRepositoryHook = makeSetupHook { name = "composer-repository-hook.sh"; - propagatedBuildInputs = [ php jq moreutils ]; + propagatedBuildInputs = [ jq moreutils php ]; substitutions = { }; } ./composer-repository-hook.sh; composerInstallHook = makeSetupHook { name = "composer-install-hook.sh"; - propagatedBuildInputs = [ php jq moreutils ]; + propagatedBuildInputs = [ jq makeBinaryWrapper moreutils php ]; substitutions = { }; } ./composer-install-hook.sh; } -- cgit 1.4.1