2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, makeSetupHook
|
2023-10-19 13:55:26 +00:00
|
|
|
, diffutils
|
2023-10-09 19:29:22 +00:00
|
|
|
, jq
|
|
|
|
, moreutils
|
|
|
|
, makeBinaryWrapper
|
|
|
|
, cacert
|
|
|
|
, buildPackages
|
|
|
|
}:
|
|
|
|
|
|
|
|
{
|
|
|
|
composerRepositoryHook = makeSetupHook
|
|
|
|
{
|
|
|
|
name = "composer-repository-hook.sh";
|
2023-10-19 13:55:26 +00:00
|
|
|
propagatedBuildInputs = [ jq moreutils cacert ];
|
2023-10-09 19:29:22 +00:00
|
|
|
substitutions = { };
|
|
|
|
} ./composer-repository-hook.sh;
|
|
|
|
|
|
|
|
composerInstallHook = makeSetupHook
|
|
|
|
{
|
|
|
|
name = "composer-install-hook.sh";
|
2023-10-19 13:55:26 +00:00
|
|
|
propagatedBuildInputs = [ jq makeBinaryWrapper moreutils cacert ];
|
2023-10-09 19:29:22 +00:00
|
|
|
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`.
|
2023-10-19 13:55:26 +00:00
|
|
|
cmp = "${lib.getBin buildPackages.diffutils}/bin/cmp";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
} ./composer-install-hook.sh;
|
|
|
|
}
|