--- Begin Message ---
Subject: |
[PATCH 0/2] gexp: Add 'let-system' |
Date: |
Tue, 14 Nov 2017 17:18:41 +0100 |
Hello!
This patch adds the ‘let-system’ form to (guix gexp), as discussed with
Mathieu at <https://bugs.gnu.org/29281>. It allows you to insert
system-dependent code inside a gexp, as in this example:
#~(system*
#+(let-system system
(cond ((string-prefix? "armhf-" system)
(file-append qemu "/bin/qemu-system-arm"))
((string-prefix? "x86_64-" system)
(file-append qemu "/bin/qemu-system-x86_64"))
(else
(error "dunno!"))))
"-net" "user" #$image)
(Using (%current-system) and (%current-target-system) does *not* achieve
this, in case you’re wondering, because at the time the gexp is defined
they carry their default value.)
Feedback welcome!
Ludo’.
Ludovic Courtès (2):
gexp: Compilers can now return lowerable objects.
gexp: Add 'let-system'.
doc/guix.texi | 26 ++++++++++++++
guix/gexp.scm | 105 ++++++++++++++++++++++++++++++++++++++++++++++++---------
tests/gexp.scm | 50 +++++++++++++++++++++++++++
3 files changed, 165 insertions(+), 16 deletions(-)
--
2.15.0
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#41120: uvesafb service is unsupported on aarch64 |
Date: |
Sat, 16 May 2020 00:43:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi Mathieu,
Mathieu Othacehe <address@hidden> skribis:
> Here's a rebased version of Ludo's patch. I'm not sure about the merge
> resolution in "lower-object", but otherwise it works fine!
I took another look, and you’re right, it does the job. There were a
couple of issues: returning a self-quoting value as in
(let-system s s)
wouldn’t work, and also caching wasn’t quite right (could be seen by
comparing GUIX_PROFILING="add-data-to-store-cache object-cache" before
and after).
Anyway, it took me much more time than I thought, but it’s here now:
502f609d05 vm: Use 'let-system'.
300a54bb98 utils: 'target-arm32?' & co. take an optional parameter.
644cb40cd8 gexp: Add 'let-system'.
d03001a31a gexp: Compilers can now return lowerable objects.
Let me know how it goes!
Ludo’.
--- End Message ---