unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Can You Help With applying patches when doing `guix pull` ?
@ 2022-12-15 14:22 calcium
  2022-12-16 10:17 ` zimoun
  0 siblings, 1 reply; 2+ messages in thread
From: calcium @ 2022-12-15 14:22 UTC (permalink / raw)
  To: help-guix

Is there an easy way to applies patches locally (at every pull) without having to maintain a whole channel ?

Because I want to have the patch tree-sitter for emacs[1] and the patch exwm-emacs-next[2] without creating and maintainging my whole channel !  for 2 patches that are already compatible with Guix's official channel !! but just need a maintainer's approval.

[1]: https://qa.guix.gnu.org/issue/49946
[2]: https://qa.guix.gnu.org/issue/39804

Thanks, it would be very useful (There are lots of patches that I would love to have, without the hassle of maintaining a mirror channel with some patches, because they can take more than 2 years to be merged into Guix's channel)

Thank you for your help and support.

PS:
I already know about `guix build --patch ...`, but it doesn't do what I want.

Otherwise, would there be a way to create and maintain automatically a local channel that just apply those patches ?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Can You Help With applying patches when doing `guix pull` ?
  2022-12-15 14:22 Can You Help With applying patches when doing `guix pull` ? calcium
@ 2022-12-16 10:17 ` zimoun
  0 siblings, 0 replies; 2+ messages in thread
From: zimoun @ 2022-12-16 10:17 UTC (permalink / raw)
  To: calcium, help-guix

Hi,

On Thu, 15 Dec 2022 at 14:22, calcium <calcium@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-16 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-15 14:22 Can You Help With applying patches when doing `guix pull` ? calcium
2022-12-16 10:17 ` zimoun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).