Nix PHP | 75 Members | |
| A room for PHP developers running on Nix | 21 Servers |
| Sender | Message | Time |
|---|---|---|
| 22 May 2023 | ||
In reply to @drupol:matrix.org I am only providing a single variant since otherwise I can only use | 16:10:05 | |
alternately, we could provide both source and dist generated from a single source but that is pointless since composer will always fall back on what is available, even when using --prefer-source/--prefer-dist flags | 16:12:28 | |
In reply to @jtojnar:matrix.orgIn Drupal, you have these kind of things: https://github.com/drupal/drupal/blob/11.x/composer.json#L124 | 16:16:15 | |
| Composer repos inside the drupal sources. | 16:16:24 | |
| Without this change: https://github.com/drupol/composer-local-repo-plugin/commit/9e1144ba0f3e98442bbfc955edd148be281c4148 it simply doesn't work | 16:16:51 | |
| By the way, I just forced pushed on the branch, I made this new improvement: https://github.com/NixOS/nixpkgs/pull/232450/files#diff-d6938cf1d292c64b6f1726b28397358dfa80ce78c9cfaaf54591acf09c36a04eR43 | 16:17:48 | |
| I'm creating a derivation for building the Composer Home directory containing the Composer plugin. | 16:18:04 | |
| The setup hook is even more clean: https://github.com/NixOS/nixpkgs/blob/240a1b5003a5a6d6ef1ad1786033288941c69c63/pkgs/build-support/php/hooks/composer-setup-hook.sh | 16:19:18 | |
In reply to @drupol:matrix.orgone thing I do not like is that the file contains functions both for fetchComposerDeps and buildComposerProject | 16:24:19 | |
I would probably move composerSetupBuildHook directly into fetchComposerDeps nix file, it should not really be used outside anyway | 16:24:48 | |
| and we will want to minimize API surface so that it is harder to misuse and easier to change in the future | 16:25:26 | |
| True | 16:28:17 | |
| I count on you to tell me all these things | 16:29:17 | |
| 23 May 2023 | ||
| Redacted or Malformed Event | 06:48:12 | |
I just force pushed a commit that is renaming the Composer hook mkComposerVendorCache into mkComposerRepository. | 11:20:35 | |
I also added tests on the composerHomeDir internal derivation. To make sure that the plugin drupol/composer-local-repo-plugin is correctly installed. | 11:21:21 | |
| I moved things around and cleaned even further the hooks. | 11:21:51 | |
I'm trying to keep the branch as tidy as possible, but also making sure that the derivation composer is always working. I'll recalculate the hash of all the other derivations when we will be stable enough. | 11:27:41 | |
Today, Gael committed some things to add composer validate here and there. Later on, we had to make a little debug in Composer to understand why the command composer diagnose was not working. Turns out that some security keys needs to be installed for that.Therefore, I created an internal derivation for installing those keys and added composer diagnose while building the Composer Local Repository.When building a PHP derivation, the output should be similar to: https://gist.github.com/drupol/d1a3ae1ac6bad32b1d1d08188270d157 (see the Composer information in the log). | 16:05:14 | |
| A full installation of Drupal: https://gist.github.com/drupol/2316c9db560d4a646f491083d0b41726 with all the deps... | 16:56:37 | |
| Amazing :) | 16:56:39 | |
| what happend to the backlog of this room? | 17:18:31 | |
| nvm, it took a while to load | 17:18:52 | |
| I'm going to merge the branch https://github.com/NixOS/nixpkgs/pull/232450 in https://github.com/NixOS/nixpkgs/pull/225401 in a few min. | 20:11:26 | |
| Job done! I added a little history of the PR: https://github.com/NixOS/nixpkgs/pull/225401 | 21:04:44 | |
| 24 May 2023 | ||
I have found a simpler way to create a repository of type composer. | 13:52:32 | |
| Simpler and definitely faster. | 13:52:42 | |
The idea is to run composer install, as usual. This will create the vendor directory with all the deps.Then, run composer build-local-repo. The command will just create a composer repo tree structure by copying the dependencies from vendor :) | 13:53:42 | |
| This has been implemented in the plugin at: https://github.com/drupol/composer-local-repo-plugin/commit/e4e96810d5cbaa0b80fce6ab6848404ff61e1da7 | 13:54:26 | |
| Had similar issues. Maybe because of the long thread just above your message? | 14:41:54 | |