about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support/php/hooks/default.nix
blob: 240ec640723ad4d66c5973fa847bfc8d438cab3a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ 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;
}