gexp: 'program-file' honors the current system and cross-compilation target.
authorLudovic Courtès <ludo@gnu.org>
Fri, 26 Jul 2019 21:48:03 +0000 (23:48 +0200)
committerLudovic Courtès <ludo@gnu.org>
Fri, 26 Jul 2019 21:50:12 +0000 (23:50 +0200)
commit2e8cabb8d630a8423e2e5a3bf150c1c0310b945d
tree246681e13528c29ef1ff9e2f30283ff043f7cb83
parent2cc5ec7f0d64e9e94f6ae637e1f9573d4b948f0a
gexp: 'program-file' honors the current system and cross-compilation target.

Fixes <https://bugs.gnu.org/36813>.
Reported by Jakob L. Kreuze <zerodaysfordays.sdf.org@sdf.org>.

* guix/gexp.scm (program-file-compiler): Pass #:system and #:target to
'gexp->script'.
(load-path-expression): Add #:system and #:target and honor them.
(gexp->script): Likewise.
* tests/gexp.scm ("program-file #:system"): New test.
* doc/guix.texi (G-Expressions): Adjust accordingly.
doc/guix.texi
guix/gexp.scm
tests/gexp.scm