* Referencing native builds from gexps
@ 2014-08-18 13:07 Ludovic Courtès
0 siblings, 0 replies; only message in thread
From: Ludovic Courtès @ 2014-08-18 13:07 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-18 16:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18 13:07 Referencing native builds from gexps Ludovic Courtès
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.