Nix PHP | 76 Members | |
| A room for PHP developers running on Nix | 22 Servers |
| Sender | Message | Time |
|---|---|---|
| 22 May 2023 | ||
| 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 | |
| oops. | 15:22:48 | |
In reply to @drupol:matrix.orgIs the structure of the vendor directory guaranteed to be stable? | 15:39:45 | |
| I think yes | 15:41:22 | |
| I don't see it changing anytime soon | 15:41:31 | |
| But it could be changing of course, but why would it change ? | 15:41:51 | |
| 🤷♀️ but if we want a long term reproducibility, we need to control as many factors as possible | 15:44:40 | |
| not sure how realistic and necessary is that with PHP packages | 15:45:32 | |