[Top][All Lists]

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

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

From: Dmitry Nikolaev
Subject: Re: Using patches from intermne, not from /gnu/packages/aux-files
Date: Sat, 22 Jul 2017 23:28:18 +0300

On 29 June 2017 at 17:44, Ludovic Courtès <address@hidden> wrote:
Hi Dmitry,

Dmitry Nikolaev <address@hidden> skribis:

> I want to apply Reiser4 patch for my Linux
> 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 …)))
                                      (string-append #+(file-append gzip "/bin/gunzip")
                                                     " < " #$compressed
                                                     " > " #$output))))))

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

Thanks Ludo. It helps. Here is final code.

                (patches (list (computed-file "reiser4-for-4.11.0.patch"
                                              (let ((compressed (origin (method url-fetch)
                                                                        (uri "")
                                                                        (sha256 (base32 "1qc421bqassrxv7z5pzsnwsf9d5pz0azm96rykxh02xlrf8ig3hc")))))
                                                   (string-append #+(file-append gzip "/bin/gunzip")
                                                                  " < " #$compressed
                                                                  " > " #$output))))))))

I know I should reuse "reiser4-for-4.11.0.patch" as variable, but I still lack Lisp knowledge.


reply via email to

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