From: zimoun <zimon.toutoune@gmail.com>
To: calcium <calcium@disroot.org>, help-guix@gnu.org
Subject: Re: Can You Help With applying patches when doing `guix pull` ?
Date: Fri, 16 Dec 2022 11:17:48 +0100 [thread overview]
Message-ID: <86a63nveib.fsf@gmail.com> (raw)
In-Reply-To: <6b7b0cfa-a938-68ee-4a93-8ac0a942bd66@disroot.org>
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
prev parent reply other threads:[~2022-12-16 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 14:22 Can You Help With applying patches when doing `guix pull` ? calcium
2022-12-16 10:17 ` zimoun [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86a63nveib.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=calcium@disroot.org \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.