From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Using patches from intermne, not from /gnu/packages/aux-files Date: Thu, 29 Jun 2017 16:44:23 +0200 Message-ID: <87injen9a0.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQagI-0002VH-Oi for help-guix@gnu.org; Thu, 29 Jun 2017 10:44:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQagE-0004J9-O2 for help-guix@gnu.org; Thu, 29 Jun 2017 10:44:30 -0400 In-Reply-To: (Dmitry Nikolaev's message of "Wed, 28 Jun 2017 17:41:50 +0300") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Dmitry Nikolaev Cc: help-guix Hi Dmitry, Dmitry Nikolaev 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/reis= er4-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 =E2=80=A6) (sha256 =E2=80=A6)))) There are a few instances of this pattern I think. I think it won=E2=80=99t handle gzip though. So perhaps you need something= like this (untested): (patches (list (computed-file "reiser4.patch" (let ((compressed (origin =E2=80=A6))) #~(system (string-append #+(file-append gzip "/= bin/gunzip") " < " #$compressed " > " #$output)))))) Note that you need the (guix gexp) module for this to work. HTH! Ludo=E2=80=99.