I’m pushing a commit that adds support for new unquote forms for
g-expressions: ‘ungexp-native’ or #+, and ‘ungexp-native-splicing’ or
#+@.

Note that this changes the ABI so make sure to run:

  make clean-go && make

The rationale is given in the manual:

--8<---------------cut here---------------start------------->8---
   In a cross-compilation context, it is useful to distinguish between
references to the _native_ build of a package—that can run on the
host—versus references to cross builds of a package.  To that end, the
‘#+’ plays the same role as ‘#$’, but is a reference to a native package
build:

     (gexp->derivation "vi"
        #~(begin
            (mkdir #$output)
            (system* (string-append #+coreutils "/bin/ln")
                     "-s"
                     (string-append #$emacs "/bin/emacs")
                     (string-append #$output "/bin/vi")))
        #:target "mips64el-linux")

In the example above, the native build of COREUTILS is used, so that
‘ln’ can actually run on the host; but then the cross-compiled build of
EMACS is referenced.
--8<---------------cut here---------------end--------------->8---

With this feature in place, we can start updating (guix packages) and
related APIs to use gexps.

Comments welcome!

Ludo’.

Attachment: signature.asc
Description: PGP signature

Reply via email to