aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2019-05-07 14:38:06 +0200
committerLudovic Courtès <ludo@gnu.org>2019-05-07 15:46:53 +0200
commitd108f59761f6581bff0d405c38852688ba04961d (patch)
treebc718bae021b6c7039d4a2fdbce6162e744d406f
parentbdd30bf00b04b8d236140f865f23e44ea2a28b86 (diff)
downloadpatches-d108f59761f6581bff0d405c38852688ba04961d.tar
patches-d108f59761f6581bff0d405c38852688ba04961d.tar.gz
environment: Non ad-hoc mode also honors transformation options.
Fixes <https://bugs.gnu.org/35618>. Reported by Florent Pruvost <florent.pruvost@inria.fr>. * guix/scripts/environment.scm (options/resolve-packages): Add call to TRANSFORM in non "ad-hoc" case. * tests/guix-environment.sh: Add test.
-rw-r--r--guix/scripts/environment.scm2
-rw-r--r--tests/guix-environment.sh19
2 files changed, 20 insertions, 1 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 99c351ae43..c1341628a8 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -341,7 +341,7 @@ for the corresponding packages."
(list (package->manifest-entry* package output))))
(('package 'package (? string? spec))
(package-environment-inputs
- (specification->package+output spec)))
+ (transform (specification->package+output spec))))
(('expression mode str)
;; Add all the outputs of the package STR evaluates to.
(packages->outputs (read/eval str) mode))
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index 7ea9c200de..a670db36be 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -133,6 +133,25 @@ case "$transformed_drv" in
esac
rmdir "$tmpdir/emacs-36.8"
+# Transformation options without '--ad-hoc'.
+drv="`guix environment -n emacs-geiser 2>&1 | grep '\.drv$'`"
+transformed_drv="`guix environment -n emacs-geiser \
+ --with-input=emacs-minimal=vim 2>&1 | grep '\.drv$'`"
+test "$drv" != "$transformed_drv"
+case "$drv" in
+ *-emacs-minimal*.drv*) true;;
+ *) false;;
+esac
+case "$transformed_drv" in
+ *-emacs-minimal*.drv*) false;;
+ *) true;;
+esac
+case "$transformed_drv" in
+ *-vim*.drv*) true;;
+ *) false;;
+esac
+
+
if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
then
# Compute the build environment for the initial GNU Make.