summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-01-29 17:53:17 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-02-03 16:11:01 -0500
commit4b7ad2e3382dcc06107619a3f183e9e22df7ba03 (patch)
tree009aa443617e01ae8200c49df97d32471a3397fb
parent5ce93d9ade22861eac492f98f66199c77761cd04 (diff)
downloadguix-4b7ad2e3382dcc06107619a3f183e9e22df7ba03.tar.gz
guix: environment: Consider all package outputs.
* guix/scripts/environment.scm (for-each-search-path): Iterate over all
  derivation output paths.
  (packages->transitive-inputs): Process inputs that specify an output, too.
-rw-r--r--guix/scripts/environment.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index ffa3a09799..bb2ce53caf 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -40,7 +40,12 @@
 Use the output paths of DERIVATIONS to build each search path.  When PURE? is
 #t, the existing search path value is ignored.  Otherwise, the existing search
 path value is appended."
-  (let ((paths (map derivation->output-path derivations)))
+  (let ((paths (append-map (lambda (drv)
+                             (map (match-lambda
+                                   ((_ . output)
+                                    (derivation-output-path output)))
+                                  (derivation-outputs drv)))
+                           derivations)))
     (for-each (match-lambda
                (($ <search-path-specification>
                    variable directories separator)
@@ -177,7 +182,9 @@ packages."
   "Return a list of the transitive inputs for all PACKAGES."
   (define (transitive-inputs package)
     (filter-map (match-lambda
-                 ((_ (? package? package)) package)
+                 ((or (_ (? package? package))
+                      (_ (? package? package) _))
+                  package)
                  (_ #f))
                 (bag-transitive-inputs
                  (package->bag package))))