nixpkgs/pkgs/build-support/php/hooks/default.nix
Pol Dellaiera 614182f9e0
Merge pull request #261582 from NixOS/php/build-support/fix-diff-and-env-vars
php/build-support: fix `diff` command and env. variables
2023-10-17 21:19:55 +02:00

29 lines
743 B
Nix

{ lib
, makeSetupHook
, diffutils
, jq
, moreutils
, makeBinaryWrapper
, cacert
, buildPackages
}:
{
composerRepositoryHook = makeSetupHook
{
name = "composer-repository-hook.sh";
propagatedBuildInputs = [ jq moreutils cacert ];
substitutions = { };
} ./composer-repository-hook.sh;
composerInstallHook = makeSetupHook
{
name = "composer-install-hook.sh";
propagatedBuildInputs = [ jq makeBinaryWrapper moreutils cacert ];
substitutions = {
# 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";
};
} ./composer-install-hook.sh;
}