!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

77 Members
A room for PHP developers running on Nix22 Servers

Load older messages


SenderMessageTime
20 May 2023
@drupol:matrix.orgPolhttps://github.com/NixOS/nixpkgs/pull/232450/files#diff-8b7b6933957bf6ee2ddf23b376fe97a96708ced9cdaf1fcb26f452873a76723dR4116:22:15
@drupol:matrix.orgPol
    jq '."packages-dev" = []' composer.lock > newComposer.lock
    mv newComposer.lock composer.lock
    jq '."require-dev" = {}' composer.json > newComposer.json
    mv newComposer.json composer.json
16:22:24
@drupol:matrix.orgPolThat stuff fixed everything16:22:29
@drupol:matrix.orgPolI have the feeling that we finally see some light at the end of the tunnel.16:30:58
@drupol:matrix.orgPolI'm testing it here, I can't make it fail anymore!16:31:14
@jtojnar:matrix.orgJan Tojnar Pol: how did you solve the issue with store paths in FOD in packages.json? 16:31:14
@drupol:matrix.orgPolAh that.16:31:33
@drupol:matrix.orgPolI found something interesting about that.16:31:49
@jtojnar:matrix.orgJan Tojnar or are you still doing the /build/source thing? 16:32:12
@drupol:matrix.orgPolInstead of doing symlinks, I'm copying stuff from the local repo :)16:32:14
@drupol:matrix.orgPol Thanks to this variable: COMPOSER_MIRROR_PATH_REPOS 16:32:26
@drupol:matrix.orgPolBut 16:32:28
@drupol:matrix.orgPolThe solution was:16:32:43
@drupol:matrix.orgPol
    substituteInPlace .repo/packages.json \
        --replace '/build/source/repo' $composerVendorCache \
16:32:46
@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

Show newer messages


Back to Room ListRoom Version: 6