From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 11/17] gnu: Add make-linux-libre-source. Date: Sun, 11 Sep 2016 23:21:01 +0200 Message-ID: <87k2eigmki.fsf@gnu.org> References: <20160909013641.GA9202@jasmine> <20160909123426.18499-1-david@craven.ch> <20160909123426.18499-11-david@craven.ch> 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]:43897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjCBZ-0003yl-P1 for guix-devel@gnu.org; Sun, 11 Sep 2016 17:21:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjCBV-00054m-Gl for guix-devel@gnu.org; Sun, 11 Sep 2016 17:21:08 -0400 In-Reply-To: <20160909123426.18499-11-david@craven.ch> (David Craven's message of "Fri, 9 Sep 2016 14:34:20 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: David Craven Cc: guix-devel@gnu.org David Craven skribis: > * gnu/packages/linux-libre.scm (make-linux-libre-source): New variable. > (linux-libre, linux-libre-4.4, linux-libre-4.1): Use > make-linux-libre-source. > (linux-libre-urls): Remove. [...] > -(define (linux-libre-urls version) > - "Return a list of URLs for Linux-Libre VERSION." I would keep it=E2=80=A6 > +(define-public (make-linux-libre-source version hash) > + (origin > + (method url-fetch) > + (uri (list (string-append > + "http://linux-libre.fsfla.org/pub/linux-libre/releases/" > + version "-gnu/linux-libre-" version "-gnu.tar.xz") > + > + ;; XXX: Work around . > + (string-append > + "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-" > + version "-gnu.tar.xz") > + > + ;; Maybe this URL will become valid eventually. > + (string-append > + "mirror://gnu/linux-libre/" version "-gnu/linux-libre-" > + version "-gnu.tar.xz"))) > + (sha256 (base32 hash)) > + (patches (origin-patches %boot-logo-patch)))) =E2=80=A6 and make it a macro instead (and drop =E2=80=98make-=E2=80=99): (define-syntax-rule (linux-libre-source version hash) (origin ;; =E2=80=A6 (sha256 (base32 hash)))) Since it=E2=80=99s a macro, we=E2=80=99d still have the compile-time behavi= or of =E2=80=98base32=E2=80=99 that we discussed earlier. WDYT? Ludo=E2=80=99.