9 buildComposerProjectOverride =
10 finalAttrs: previousAttrs:
13 phpDrv = finalAttrs.php or php;
14 composer = finalAttrs.composer or phpDrv.packages.composer;
17 composerLock = previousAttrs.composerLock or null;
18 composerNoDev = previousAttrs.composerNoDev or true;
19 composerNoPlugins = previousAttrs.composerNoPlugins or true;
20 composerNoScripts = previousAttrs.composerNoScripts or true;
21 composerStrictValidation = previousAttrs.composerStrictValidation or true;
23 nativeBuildInputs = (previousAttrs.nativeBuildInputs or [ ]) ++ [
26 phpDrv.composerHooks2.composerInstallHook
29 buildInputs = (previousAttrs.buildInputs or [ ]) ++ [ phpDrv ];
31 patches = previousAttrs.patches or [ ];
32 strictDeps = previousAttrs.strictDeps or true;
34 # Should we keep these empty phases?
36 previousAttrs.configurePhase or ''
43 previousAttrs.buildPhase or ''
49 doCheck = previousAttrs.doCheck or true;
51 previousAttrs.checkPhase or ''
58 previousAttrs.installPhase or ''
64 doInstallCheck = previousAttrs.doInstallCheck or false;
66 previousAttrs.installCheckPhase or ''
67 runHook preInstallCheck
69 runHook postInstallCheck
73 previousAttrs.composerVendor or (phpDrv.mkComposerVendor {
83 composerLock = previousAttrs.composerLock or null;
84 composerNoDev = previousAttrs.composerNoDev or true;
85 composerNoPlugins = previousAttrs.composerNoPlugins or true;
86 composerNoScripts = previousAttrs.composerNoScripts or true;
87 composerStrictValidation = previousAttrs.composerStrictValidation or true;
90 # Projects providing a lockfile from upstream can be automatically updated.
91 passthru = previousAttrs.passthru or { } // {
93 previousAttrs.passthru.updateScript
94 or (if finalAttrs.composerVendor.composerLock == null then nix-update-script { } else null);
97 meta = previousAttrs.meta or { } // {
98 platforms = lib.platforms.all;
102 args: (stdenvNoCC.mkDerivation args).overrideAttrs buildComposerProjectOverride