pack: Fix the system value passed to build-docker-image.

Before this change, the system value would be passed as x86_64 when using a
i686-linux emulated system, e.g.:

  $ guix environment --system=i686-linux --ad-hoc  guile -- \
      guile -c '(display (utsname:machine (uname))) (newline)'
  x86_64

This change uses the Guile builtin %host-type variable, which doesn't have
this problem:

  $ guix environment --system=i686-linux --ad-hoc guile -- \
      guile -c '(display %host-type) (newline)'
  i686-unknown-linux-gnu

* guix/scripts/pack.scm (docker-image)[#:system] Use %host-type as a fall-back
when target is not defined.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Maxim Cournoyer 2021-06-16 21:34:48 -04:00
parent 20ab92719e
commit 375d5d03c9
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 1 additions and 1 deletions

View File

@ -610,7 +610,7 @@ the image."
#$profile
#:repository tag
#:database #+database
#:system (or #$target (utsname:machine (uname)))
#:system (or #$target %host-type)
#:environment environment
#:entry-point
#$(and entry-point