help-guix
[Top][All Lists]
Advanced

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

Re: Using patches from intermne, not from /gnu/packages/aux-files


From: Ludovic Courtès
Subject: Re: Using patches from intermne, not from /gnu/packages/aux-files
Date: Thu, 29 Jun 2017 16:44:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi Dmitry,

Dmitry Nikolaev <address@hidden> skribis:

> I want to apply Reiser4 patch for my Linux
>
> https://reiser4.wiki.kernel.org/index.php/Main_Page
> https://sourceforge.net/projects/reiser4/files/reiser4-for-linux-4.x/reiser4-for-4.11.0.patch.gz
>
> But all code examples in guix repository use code like this
>
> (patches (search-patches "somepackage-CVE-fix.patch"))
>
> which uses patches from /gnu/packages/aux-files
>
> What code should I write in package definition to download file, unzip it
> and apply patch?

You can do:

  (patches (list (origin
                   (method url-fetch)
                   (uri …)
                   (sha256 …))))

There are a few instances of this pattern I think.

I think it won’t handle gzip though.  So perhaps you need something like
this (untested):

  (patches (list (computed-file "reiser4.patch"
                                (let ((compressed (origin …)))
                                  #~(system
                                      (string-append #+(file-append gzip 
"/bin/gunzip")
                                                     " < " #$compressed
                                                     " > " #$output))))))

Note that you need the (guix gexp) module for this to work.

HTH!

Ludo’.



reply via email to

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