Subject: bug#29296: closed (Re: bug#41120: uvesafb service is unsupported on aarch64)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 15 May 2020 22:44:02 +0000

Your bug report

#29296: [PATCH 0/2] gexp: Add 'let-system'

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
29296: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29296
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#41120: uvesafb service is unsupported on aarch64
From: Ludovic Courtès <[email-masked]>
To: Mathieu Othacehe <[email-masked]>
Cc: [email-masked], [email-masked], "pelzflorian \(Florian Pelz\)" <[email-masked]>, [email-masked]
Date: Sat, 16 May 2020 00:43:34 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Mathieu,

Mathieu Othacehe <[email-masked]> 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’.

Subject: [PATCH 0/2] gexp: Add 'let-system'
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Cc: Ludovic Courtès <[email-masked]>, Mathieu Othacehe <[email-masked]>
Date: Tue, 14 Nov 2017 17:18:41 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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