Skip to content

Commit

Permalink
Merge pull request #255156 from NixOS/build-support/php/update-instal…
Browse files Browse the repository at this point in the history
…l-procedure

build-support/php: prevent the creation of symlinks
  • Loading branch information
etu authored Sep 15, 2023
2 parents ee9751f + a2f8623 commit 28fd868
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkgs/build-support/php/hooks/composer-install-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions pkgs/build-support/php/hooks/default.nix
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 28fd868

Please sign in to comment.