guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Referencing native builds from gexps


From: Ludovic Courtès
Subject: Referencing native builds from gexps
Date: Mon, 18 Aug 2014 15:07:15 +0200
User-agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)

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

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

[Prev in Thread] Current Thread [Next in Thread]