Hi, On Thu, 15 Dec 2022 at 14:22, calcium <calc...@disroot.org> wrote:
> Is there an easy way to applies patches locally (at every pull) > without having to maintain a whole channel ? As far as I know, no it is not possible to patch at the channel level (patch the package definition). And as you noticed, it is only possible to transform this package definition; guix build --help-transform). The only solution is to have another channel where the patches are applied. The new QA could do that for you; at least for one issue. For instance, --8<---------------cut here---------------start------------->8--- guix time-machine --branch=issue-49946 \ --commit=<some-commit> \ --url=https://git.guix-patches.cbaines.net/git/guix-patches \ --disable-authentication \ -- <subcommand> --8<---------------cut here---------------end--------------->8--- However, the QA is improving and sometimes, for some issues, there are some bugs (the patches are not correctly extracted or else). It seems the case here, a bug. Well, from my point of view, the use of “guix time-machine” would be the direction I would follow for your use case. Well, if the QA does not work perfectly yet, in the meantime, you can locally apply the patches you want and then run: guix time-machine --url=file:///path/to/the/local/checkout/containing/pat\hes \ --disable-authentication \ -- <subcommand> What is missing, IMHO, is a way to apply transformations to the channel when running “guix time-machine”. For example, guix time-machine --with-patches=guix=foobar.patch \ -- build emacs --with-patches=texinfo=fixes.patch It had been already discussed several times but never implemented. :-) Otherwise, the usual way is to re-build Guix locally: git clone https://git.savannah.gnu.org/git/guix.git && cd guix guix shell -D guix git am <patches> ./bootstrap && ./configure --localstatedir=/var && make ./pre-env guix pull -p /path/to/other/guix /path/to/other/guix/bin/guix show tree-sitter-php where you probably need to disable the authentication and set up it. The former is affected by “guix gc”, not the latter. Both use the same idea: have another separated Guix profile containing the patches. Somehow, you are maintaining another channel. Cheers, simon