| 21 Apr 2023 |
Jan Tojnar | Pol: you will also want to do previousAttrs.buildPhase or ''runHook ...'' for the phases | 07:54:01 |
Pol | Oooh ! you're right. | 07:54:16 |
Pol | As usual. | 07:54:17 |
Pol | Going to do it now. | 07:54:20 |
Jan Tojnar | the empty phases are a bit ugly but I do not see a way around them | 07:55:01 |
Pol | We could override them in the composer-setup-hook.sh I guess? | 07:55:26 |
Pol | Instead of hooking on preConfigurePhase, we override the phase itself ? | 07:55:46 |
Jan Tojnar | yes, but then if people pass configurePhase to buildPhpProject, they will lose the setupHook | 07:56:31 |
Jan Tojnar | * yes, but then if people pass configurePhase to buildPhpProject, they will lose the setupHook functionality | 07:56:46 |
Jan Tojnar | unless they call it explicitly | 07:57:02 |
Jan Tojnar | which maybe would not be a problem if documented. IDK, we are breaking a new ground so the usage patterns are not developed yet. | 07:57:53 |
Jan Tojnar | * which maybe would not be a problem if documented. IDK, we are breaking a new ground so the usage patterns are not well developed yet. | 07:58:11 |
Pol | Job done. Fixed. | 07:59:35 |
Jan Tojnar | and also strictDeps`` | 08:05:24 |
Jan Tojnar | * and also strictDeps | 08:05:30 |
Jan Tojnar | it really shows that mkDerivation was not designed with this in mind | 08:06:28 |
Pol | So, something like that? | 08:07:16 |
Pol | installPhase = (previousAttrs.installPhase or ''
runHook preInstall
runHook postInstall
'');
| 08:07:27 |
Pol | Is this what you advise me to do in your last comment on Github ? | 08:07:39 |
Jan Tojnar | yes | 08:11:23 |
Jan Tojnar | no need for the parens | 08:11:34 |
Pol | Oki | 08:12:09 |
Pol | Job done. Fixed. | 08:16:37 |
Jan Tojnar | looks good at a glance now | 08:26:19 |
Jan Tojnar | maybe also build-php.nix → build-php-project.nix | 08:26:32 |
Pol | Oki | 08:26:38 |
Pol | Shouldn't it be better build-composer-project ? | 08:27:11 |
Jan Tojnar | you are right | 08:27:24 |
Pol | Ok I will do the change. | 08:27:35 |
Jan Tojnar | personally, I would just merge composerSetupHook into buildComposerDeps but I guess it might be useful in some very rare cases | 08:29:29 |