guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specifying package patches in a more convenient form


From: Alex Kost
Subject: Re: Specifying package patches in a more convenient form
Date: Sat, 09 Apr 2016 11:22:08 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ludovic Courtès (2016-04-08 00:54 +0300) wrote:

> Alex Kost <address@hidden> skribis:
[...]
>> Talking about how we specify package patches currently, I think it would
>> be better to do it in a more clean and general way.  What about adding
>> the following macro to (gnu packages)?
>>
>>   (define-syntax-rule (search-patches file-name ...)
>>     "Return a list of patches for each FILE-NAME."
>>     (list (search-patch file-name) ...))
>>
>> So instead of things like this:
>>
>>   (list (search-patch "foo.patch")
>>         (search-patch "bar.patch"))
>>
>> or this:
>>
>>   (map search-patch '("foo.patch"
>>                       "bar.patch"))
>>
>> we'll have:
>>
>>   (search-patches "foo.patch"
>>                   "bar.patch")
>
> I like it!

OK, I've sent the patches for this change.

> Andy Wingo <address@hidden> skribis:
>
>> What if the "patches" field just applied `search-path' to each of the
>> items in the list if the path is not absolute?  Use
>> `absolute-file-name?' to check if this is needed or not.
>
> FWIW I have a preference for keeping things explicit.

Another argument is 'glibc-locales' packages which has:

  (patches (cons (search-patch "glibc-locales.patch")
                 (origin-patches (package-source glibc))))

-- 
Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]