!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

74 Members
A room for PHP developers running on Nix21 Servers

Load older messages


SenderMessageTime
20 May 2023
@drupol:matrix.orgPol
In reply to @jtojnar:matrix.org
or are you still doing the /build/source thing?
That stuff is the only thing I don't like in the implementation.
16:34:01
@drupol:matrix.orgPol I would I could immediately use $out in it. 16:34:11
@jtojnar:matrix.orgJan Tojnarah, you are copying the repo into the builder16:34:37
@drupol:matrix.orgPolI haven't found a better alternative yet.16:35:26
@drupol:matrix.orgPol I just copy packages.json, nothing else 16:35:42
@drupol:matrix.orgPolI don't copy the repo in the builder16:35:47
@drupol:matrix.orgPol
    cp -ar ${composerVendorCache}/packages.json .repo/
16:35:57
@drupol:matrix.orgPolSee: https://github.com/NixOS/nixpkgs/blob/b636eeae54bb7fd1223041eecf5fa08dcf77520f/pkgs/build-support/php/hooks/composer-setup-hook.sh16:36:18
@drupol:matrix.orgPolAnd: https://github.com/NixOS/nixpkgs/blob/b636eeae54bb7fd1223041eecf5fa08dcf77520f/pkgs/build-support/php/hooks/composer-install-hook.sh16:36:36
@jtojnar:matrix.orgJan Tojnaryeah, I think this is an okay low-tech variant workaround16:36:53
@jtojnar:matrix.orgJan Tojnar * yeah, I think this is an okay low-tech workaround 16:36:57
@jtojnar:matrix.orgJan TojnarHTTP server would be cleaner but not sure doing that is worth it16:36:59
@drupol:matrix.orgPol

I wish I could get rid of

16:37:01
@drupol:matrix.orgPol *

I wish I could get rid of

    substituteInPlace .repo/packages.json \
        --replace '/build/source/repo' $composerVendorCache \
16:37:10
@drupol:matrix.orgPol WDYT about the idea of using JQ to nuke the require-dev and packages-dev ? 16:37:45
@jtojnar:matrix.orgJan 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
@drupol:matrix.orgPolI agree... 16:39:48
@drupol:matrix.orgPolWe can now focus on the scripts16:40:18
@drupol:matrix.orgPolAnd avoid repeating stuff in both of them16:40:28
@jtojnar:matrix.orgJan TojnarI only worry about project that need dev dependencies during build time16:40:32
@drupol:matrix.orgPol

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
@drupol:matrix.orgPol
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
@jtojnar:matrix.orgJan Tojnar I would put it into the configure part along with composer update --lock --no-install --no-ansi 16:41:51
@drupol:matrix.orgPol I mean, should we add it in the script building the repo or in the script running composer install ? 16:42:38
@jtojnar:matrix.orgJan 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
@drupol:matrix.orgPolyeah I noticed, I like it very much16:43:39
@drupol:matrix.orgPol 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
@drupol:matrix.orgPolI'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
@drupol:matrix.orgPolSee you later!16:45:26
@jtojnar:matrix.orgJan Tojnarnot sure when I will be able to get around it, still have two other projects I wanted to do this week 😸16:45:54

Show newer messages


Back to Room ListRoom Version: 6