| 20 May 2023 |
Pol | And: https://github.com/NixOS/nixpkgs/blob/b636eeae54bb7fd1223041eecf5fa08dcf77520f/pkgs/build-support/php/hooks/composer-install-hook.sh | 16:36:36 |
Jan Tojnar | yeah, I think this is an okay low-tech variant workaround | 16:36:53 |
Jan Tojnar | * yeah, I think this is an okay low-tech workaround | 16:36:57 |
Jan Tojnar | HTTP server would be cleaner but not sure doing that is worth it | 16:36:59 |
Pol | I wish I could get rid of
| 16:37:01 |
Pol | * I wish I could get rid of
substituteInPlace .repo/packages.json \
--replace '/build/source/repo' $composerVendorCache \
| 16:37:10 |
Pol | WDYT about the idea of using JQ to nuke the require-dev and packages-dev ? | 16:37:45 |
Jan Tojnar | I do not like it very much – composer config already interfered with the project too much for my taste – but it might be a necessary compromise | 16:39:37 |
Pol | I agree... | 16:39:48 |
Pol | We can now focus on the scripts | 16:40:18 |
Pol | And avoid repeating stuff in both of them | 16:40:28 |
Jan Tojnar | I only worry about project that need dev dependencies during build time | 16:40:32 |
Pol | For example, where to put those 2 lines?
composer config repo.packagist false
composer config repo.composer '{"type": "composer", "url": "file://'"$PWD"'/.repo"}'
In the install or in the setup ?
| 16:40:54 |
Pol | In reply to @jtojnar:matrix.org I only worry about project that need dev dependencies during build time yeah... maybe we will discover issue once I will update all the vendorHash in the PR. | 16:41:19 |
Jan Tojnar | I would put it into the configure part along with composer update --lock --no-install --no-ansi | 16:41:51 |
Pol | I mean, should we add it in the script building the repo or in the script running composer install ? | 16:42:38 |
Jan Tojnar | I mean the division between setup-hook.sh and fetch-deps.nix I used for composition-c4 is still the ideal design IMO | 16:43:24 |
Pol | yeah I noticed, I like it very much | 16:43:39 |
Pol | Would you be ok to contribute in drupol/composer-local-repo-plugin and to improve it if you feel like it needs to be improved ? | 16:44:20 |
Pol | I'm going to close the laptop, got friends over today, but I'm happy of this thing ! We can move forward a little bit :) | 16:45:18 |
Pol | See you later! | 16:45:26 |
Jan Tojnar | not sure when I will be able to get around it, still have two other projects I wanted to do this week 😸 | 16:45:54 |
Jan Tojnar | enjoy | 16:46:08 |
Pol | I mean, feel free to modify it at anytime :) | 16:54:10 |
Pol | I think it needs improvements | 16:54:24 |
Pol | For example, | 16:54:30 |
Pol | We should make sure that keys are sorted alphabetically in the produced packages.json | 16:54:45 |
Pol | So we don't have surprise at some point. | 16:54:59 |
Pol | Changing the structure of that single packages.json file and we are good to re-compute all the derivation hashes | 16:55:20 |
Pol | So we need to fix the structure of that file | 16:55:27 |