!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

76 Members
A room for PHP developers running on Nix22 Servers

Load older messages


SenderMessageTime
22 May 2023
@drupol:matrix.orgPolThe setup hook is even more clean: https://github.com/NixOS/nixpkgs/blob/240a1b5003a5a6d6ef1ad1786033288941c69c63/pkgs/build-support/php/hooks/composer-setup-hook.sh16:19:18
@jtojnar:matrix.orgJan Tojnar
In reply to @drupol:matrix.org
The setup hook is even more clean: https://github.com/NixOS/nixpkgs/blob/240a1b5003a5a6d6ef1ad1786033288941c69c63/pkgs/build-support/php/hooks/composer-setup-hook.sh
one thing I do not like is that the file contains functions both for fetchComposerDeps and buildComposerProject
16:24:19
@jtojnar:matrix.orgJan Tojnar I would probably move composerSetupBuildHook directly into fetchComposerDeps nix file, it should not really be used outside anyway 16:24:48
@jtojnar:matrix.orgJan Tojnarand we will want to minimize API surface so that it is harder to misuse and easier to change in the future16:25:26
@drupol:matrix.orgPolTrue16:28:17
@drupol:matrix.orgPolI count on you to tell me all these things16:29:17
23 May 2023
@drupol:matrix.orgPolRedacted or Malformed Event06:48:12
@drupol:matrix.orgPol I just force pushed a commit that is renaming the Composer hook mkComposerVendorCache into mkComposerRepository. 11:20:35
@drupol:matrix.orgPol 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
@drupol:matrix.orgPolI moved things around and cleaned even further the hooks. 11:21:51
@drupol:matrix.orgPol 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
@drupol:matrix.orgPol 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
@drupol:matrix.orgPolA full installation of Drupal: https://gist.github.com/drupol/2316c9db560d4a646f491083d0b41726 with all the deps... 16:56:37
@drupol:matrix.orgPolAmazing :)16:56:39
@hexa:lossy.networkhexawhat happend to the backlog of this room?17:18:31
@hexa:lossy.networkhexanvm, it took a while to load17:18:52
@drupol:matrix.orgPolI'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
@drupol:matrix.orgPolJob done! I added a little history of the PR: https://github.com/NixOS/nixpkgs/pull/22540121:04:44
24 May 2023
@drupol:matrix.orgPol I have found a simpler way to create a repository of type composer. 13:52:32
@drupol:matrix.orgPolSimpler and definitely faster.13:52:42
@drupol:matrix.orgPol 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
@drupol:matrix.orgPolThis has been implemented in the plugin at: https://github.com/drupol/composer-local-repo-plugin/commit/e4e96810d5cbaa0b80fce6ab6848404ff61e1da713:54:26
@philipp:xndr.dephilippHad similar issues. Maybe because of the long thread just above your message?14:41:54
@drupol:matrix.orgPoloops.15:22:48
@jtojnar:matrix.orgJan Tojnar
In reply to @drupol:matrix.org
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 :)
Is the structure of the vendor directory guaranteed to be stable?
15:39:45
@drupol:matrix.orgPolI think yes15:41:22
@drupol:matrix.orgPolI don't see it changing anytime soon15:41:31
@drupol:matrix.orgPolBut it could be changing of course, but why would it change ?15:41:51
@jtojnar:matrix.orgJan Tojnar🤷‍♀️ but if we want a long term reproducibility, we need to control as many factors as possible15:44:40
@jtojnar:matrix.orgJan Tojnarnot sure how realistic and necessary is that with PHP packages15:45:32

Show newer messages


Back to Room ListRoom Version: 6