From: ludo@gnu.org (Ludovic Courtès)
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: 29296@debbugs.gnu.org
Subject: [bug#29296] [PATCH 2/2] gexp: Add 'let-system'.
Date: Thu, 16 Nov 2017 10:10:58 +0100 [thread overview]
Message-ID: <87mv3mk2ql.fsf@gnu.org> (raw)
In-Reply-To: <87fu9fsrxn.fsf@gmail.com> (Mathieu Othacehe's message of "Wed, 15 Nov 2017 12:27:16 +0100")
[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]
Hi Mathieu,
Mathieu Othacehe <m.othacehe@gmail.com> 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 …) …), as is
used to compute the kernel file name, doesn’t work due to the way the
<file-append> expander works.
I’ll see what I can do.
Thanks,
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 829 bytes --]
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."
next prev parent reply other threads:[~2017-11-16 9:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 16:18 [bug#29296] [PATCH 0/2] gexp: Add 'let-system' Ludovic Courtès
2017-11-14 16:25 ` [bug#29296] [PATCH 1/2] gexp: Compilers can now return lowerable objects Ludovic Courtès
2017-11-14 16:25 ` [bug#29296] [PATCH 2/2] gexp: Add 'let-system' Ludovic Courtès
2017-11-15 11:27 ` Mathieu Othacehe
2017-11-16 9:10 ` Ludovic Courtès [this message]
2020-05-22 22:44 ` Danny Milosavljevic
2020-05-22 23:01 ` Marius Bakke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mv3mk2ql.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=29296@debbugs.gnu.org \
--cc=m.othacehe@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.