5e7c2d6cef
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
29 lines
747 B
Nix
29 lines
747 B
Nix
{ lib
|
|
, makeSetupHook
|
|
, jq
|
|
, moreutils
|
|
, makeBinaryWrapper
|
|
, php
|
|
, cacert
|
|
, buildPackages
|
|
}:
|
|
|
|
{
|
|
composerRepositoryHook = makeSetupHook
|
|
{
|
|
name = "composer-repository-hook.sh";
|
|
propagatedBuildInputs = [ jq moreutils php cacert ];
|
|
substitutions = { };
|
|
} ./composer-repository-hook.sh;
|
|
|
|
composerInstallHook = makeSetupHook
|
|
{
|
|
name = "composer-install-hook.sh";
|
|
propagatedBuildInputs = [ jq makeBinaryWrapper moreutils php 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`.
|
|
diff = "${lib.getBin buildPackages.diffutils}/bin/diff";
|
|
};
|
|
} ./composer-install-hook.sh;
|
|
}
|