From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFGDQ-00011K-PE for guix-patches@gnu.org; Thu, 16 Nov 2017 04:12:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFGDL-0001p8-JT for guix-patches@gnu.org; Thu, 16 Nov 2017 04:12:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:33863) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eFGDL-0001nj-Cn for guix-patches@gnu.org; Thu, 16 Nov 2017 04:12:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eFGDK-0007kQ-8k for guix-patches@gnu.org; Thu, 16 Nov 2017 04:12:03 -0500 Subject: [bug#29296] [PATCH 2/2] gexp: Add 'let-system'. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20171114162515.8743-1-ludo@gnu.org> <20171114162515.8743-2-ludo@gnu.org> <87fu9fsrxn.fsf@gmail.com> Date: Thu, 16 Nov 2017 10:10:58 +0100 In-Reply-To: <87fu9fsrxn.fsf@gmail.com> (Mathieu Othacehe's message of "Wed, 15 Nov 2017 12:27:16 +0100") Message-ID: <87mv3mk2ql.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Mathieu Othacehe Cc: 29296@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Mathieu, Mathieu Othacehe skribis: > I must admit i don't have a perfect understanding of what is going on in > gexp.scm but your serie LGTM. > > When diffing with the initial patch it seems that the entry in > .dir-locals.el is gone but it is a minor point. Oops. > About the integration of let-system in "system-disk-image", i'm not sure > how to proceed. let-system is meant to be used in a gexp but the > operating-system is not defined in a gexp. > > Do you have any advice on how to turn os declaration into a gexp so that > i can use let-system to parameterize kernel field ? The idea is that you can write: (kernel (let-system system (if (string-prefix? "arm-" system) linux-libre-arm linux-libre))) and things will just work. Now I found a couple of issues. First one is addressed with the patch below. Second one is trickier: (file-append (let-system =E2=80=A6) =E2=80= =A6), as is used to compute the kernel file name, doesn=E2=80=99t work due to the way t= he expander works. I=E2=80=99ll see what I can do. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/system.scm b/gnu/system.scm index 9e05c4b21..a4804cf86 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -876,10 +876,12 @@ listed in OS. The C library expects to find it under (define (kernel->boot-label kernel) "Return a label for the bootloader menu entry that boots KERNEL." - (string-append "GNU with " - (string-titlecase (package-name kernel)) " " - (package-version kernel) - " (beta)")) + (if (package? kernel) + (string-append "GNU with " + (string-titlecase (package-name kernel)) " " + (package-version kernel) + " (beta)") + "GNU GuixSD (beta)")) (define (store-file-system file-systems) "Return the file system object among FILE-SYSTEMS that contains the store." --=-=-=--