From: ludo@gnu.org (Ludovic Courtès)
To: guix-devel@gnu.org
Subject: Referencing native builds from gexps
Date: Mon, 18 Aug 2014 15:07:15 +0200 [thread overview]
Message-ID: <87tx5agd4s.fsf@gnu.org> (raw)
[-- 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 --]
reply other threads:[~2014-08-18 16:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tx5agd4s.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.