[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/04: profiles: 'profile-derivation' now honors #:system.
From: |
Ludovic Courtès |
Subject: |
04/04: profiles: 'profile-derivation' now honors #:system. |
Date: |
Sat, 4 Jun 2016 22:06:58 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 40d71e44f5068b28f48bd131940260cc0ab2e2d1
Author: Ludovic Courtès <address@hidden>
Date: Sun Jun 5 00:04:05 2016 +0200
profiles: 'profile-derivation' now honors #:system.
Fixes <http://bugs.gnu.org/23682>.
Reported by Ander GM <address@hidden>.
* guix/profiles.scm (profile-derivation): Pass #:system to
'gexp->derivation'.
* tests/guix-environment.sh: Add 'guix environment -s' test.
---
guix/profiles.scm | 1 +
tests/guix-environment.sh | 15 +++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 8355af7..ce8a11f 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -811,6 +811,7 @@ the monadic procedures listed in HOOKS--such as an Info
'dir' file, etc."
#:search-paths search-paths)))
(gexp->derivation "profile" builder
+ #:system system
#:modules '((guix build profiles)
(guix build union)
(guix build utils)
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index 5ad8dfa..0b5123a 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -57,6 +57,21 @@ else
test $? = 42
fi
+case "`uname -m`" in
+ x86_64)
+ # On x86_64, we should be able to create a 32-bit environment.
+ guix environment --bootstrap --ad-hoc guile-bootstrap --pure \
+ -- guile -c '(exit (string-prefix? "x86_64" %host-type))'
+ guix environment --bootstrap --ad-hoc guile-bootstrap --pure \
+ -s i686-linux \
+ -- guile -c '(exit (string-prefix? "i686" %host-type))'
+ ;;
+ *)
+ echo "nothing to do" >&2
+ ;;
+esac
+
+
# Same as above, but with deprecated -E flag.
if guix environment --bootstrap --ad-hoc guile-bootstrap --pure \
-E "guile -c '(exit 42)'"