* Search path for patches
@ 2024-09-13 17:33 Konrad Hinsen
2024-09-13 18:30 ` Ekaitz Zarraga
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Konrad Hinsen @ 2024-09-13 17:33 UTC (permalink / raw)
To: Guix Devel
Hi everyone,
I have been searching for a while, without much success, so I am trying
to tap into your collective wisdom: What's the search path used by
search-patches?
More precisely, where do I have to put patches
1. In a channel?
2. In a directory added to GUIX_PACKAGE_PATH/GUILE_LOAD_PATH?
The main Guix channel has a "patches" directory inside "packages". The
channel guix-science has it at the root. For my own channel that I am
trying to set up, neither seems to work so far.
Cheers,
Konrad.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Search path for patches
2024-09-13 17:33 Search path for patches Konrad Hinsen
@ 2024-09-13 18:30 ` Ekaitz Zarraga
2024-09-13 22:05 ` Nicolas Graves
2024-09-15 8:04 ` Liliana Marie Prikler
2 siblings, 0 replies; 6+ messages in thread
From: Ekaitz Zarraga @ 2024-09-13 18:30 UTC (permalink / raw)
To: Konrad Hinsen, Guix Devel
On 2024-09-13 19:33, Konrad Hinsen wrote:
> Hi everyone,
>
> I have been searching for a while, without much success, so I am trying
> to tap into your collective wisdom: What's the search path used by
> search-patches?
>
> More precisely, where do I have to put patches
> 1. In a channel?
> 2. In a directory added to GUIX_PACKAGE_PATH/GUILE_LOAD_PATH?
>
> The main Guix channel has a "patches" directory inside "packages". The
> channel guix-science has it at the root. For my own channel that I am
> trying to set up, neither seems to work so far.
>
> Cheers,
> Konrad.
>
In your own channel it is the root folder of the channel if I'm not
mistaken. Pretty annoying, honestly.
In Guix it's defaulted to the patches/ directory in packages/
It would be great if they were coherent.
Cheers,
Ekaitz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Search path for patches
2024-09-13 17:33 Search path for patches Konrad Hinsen
2024-09-13 18:30 ` Ekaitz Zarraga
@ 2024-09-13 22:05 ` Nicolas Graves
2024-09-15 8:14 ` Konrad Hinsen
2024-09-15 8:04 ` Liliana Marie Prikler
2 siblings, 1 reply; 6+ messages in thread
From: Nicolas Graves @ 2024-09-13 22:05 UTC (permalink / raw)
To: Konrad Hinsen, Guix Devel
On 2024-09-13 19:33, Konrad Hinsen wrote:
> Hi everyone,
>
> I have been searching for a while, without much success, so I am trying
> to tap into your collective wisdom: What's the search path used by
> search-patches?
>
> More precisely, where do I have to put patches
> 1. In a channel?
> 2. In a directory added to GUIX_PACKAGE_PATH/GUILE_LOAD_PATH?
>
> The main Guix channel has a "patches" directory inside "packages". The
> channel guix-science has it at the root. For my own channel that I am
> trying to set up, neither seems to work so far.
Not a direct answer, but I use the approach I've found in guixrus:
(patches
(parameterize
((%patch-path
(map
(lambda (directory)
(string-append directory "/guixrus/packages/patches"))
%load-path)))
(search-patches
;;patches created from github issues
"lxappearence-gtk3-01-only-do-x11-on-x11.patch"
"lxappearence-gtk3-02-set-some-settings-gsettings.patch")))
This is allows you to put patches quite conveniently in a channel.
--
Best regards,
Nicolas Graves
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Search path for patches
2024-09-13 22:05 ` Nicolas Graves
@ 2024-09-15 8:14 ` Konrad Hinsen
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Hinsen @ 2024-09-15 8:14 UTC (permalink / raw)
To: Ekaitz Zarraga, Nicolas Graves, Guix Devel
Hi Ekaitz and Nicolas,
Thanks for your comments!
Ekaitz Zarraga <ekaitz@elenq.tech> writes:
> In your own channel it is the root folder of the channel if I'm not
> mistaken. Pretty annoying, honestly.
> In Guix it's defaulted to the patches/ directory in packages/
I hadn't considered the possibility that the default channel has
special treatment. At least now I understand what I see. And yes,
root folder is an annoying choice.
Nicolas Graves <ngraves@ngraves.fr> writes:
> Not a direct answer, but I use the approach I've found in guixrus:
> ...
That works for me as well, thanks! It's a bit verbose, but for now I
only have two packages that need patches, so it's OK.
Thanks again,
Konrad.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Search path for patches
2024-09-13 17:33 Search path for patches Konrad Hinsen
2024-09-13 18:30 ` Ekaitz Zarraga
2024-09-13 22:05 ` Nicolas Graves
@ 2024-09-15 8:04 ` Liliana Marie Prikler
2024-09-16 16:23 ` Konrad Hinsen
2 siblings, 1 reply; 6+ messages in thread
From: Liliana Marie Prikler @ 2024-09-15 8:04 UTC (permalink / raw)
To: Konrad Hinsen, guix-devel
Am Freitag, dem 13.09.2024 um 19:33 +0200 schrieb Konrad Hinsen:
> Hi everyone,
>
> I have been searching for a while, without much success, so I am
> trying to tap into your collective wisdom: What's the search path
> used by search-patches?
>
> More precisely, where do I have to put patches
> 1. In a channel?
> 2. In a directory added to GUIX_PACKAGE_PATH/GUILE_LOAD_PATH?
>
> The main Guix channel has a "patches" directory inside "packages".
> The channel guix-science has it at the root. For my own channel that
> I am trying to set up, neither seems to work so far.
The search-patch procedure in (gnu packages) – which see – uses the
%patch-path parameter to figure out where patches come from.
Typically, you'd place patches in the root directory, or somewhere
within your GUILE_LOAD_PATH to have them picked up, but I do recommend
writing your own (search-patch) or parameterizing %patch-path if you
want to place them in a special location.
Cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Search path for patches
2024-09-15 8:04 ` Liliana Marie Prikler
@ 2024-09-16 16:23 ` Konrad Hinsen
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Hinsen @ 2024-09-16 16:23 UTC (permalink / raw)
To: Liliana Marie Prikler, guix-devel
Hi Liliana,
Thanks for your suggestions!
> The search-patch procedure in (gnu packages) – which see – uses the
> %patch-path parameter to figure out where patches come from.
> Typically, you'd place patches in the root directory, or somewhere
> within your GUILE_LOAD_PATH to have them picked up, but I do recommend
> writing your own (search-patch) or parameterizing %patch-path if you
> want to place them in a special location.
The second technique (parameterizing) is what Nicolas proposed as well.
It's fine for a small number of packages requiring patches (my case so
far), but a bit verbose if used frequently.
Writing my own search-patch has the advantage of being done once for the
whole channel. Maybe I'll end up doing that.
Cheers,
Konrad.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-09-16 16:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-13 17:33 Search path for patches Konrad Hinsen
2024-09-13 18:30 ` Ekaitz Zarraga
2024-09-13 22:05 ` Nicolas Graves
2024-09-15 8:14 ` Konrad Hinsen
2024-09-15 8:04 ` Liliana Marie Prikler
2024-09-16 16:23 ` Konrad Hinsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).