summary refs log tree commit diff
path: root/emacs/guix-main.scm
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2016-05-08 23:27:42 +0300
committerAlex Kost <alezost@gmail.com>2016-05-31 23:51:54 +0300
commitd01ebd05d11775dea7c8d0a084c3ab02b958e18b (patch)
treefe2fb9ddb62700d93962bccc7f3be46d0a759855 /emacs/guix-main.scm
parent7a0094a5f29cd6f49213c020ac55cb2f17f5d8cb (diff)
downloadguix-d01ebd05d11775dea7c8d0a084c3ab02b958e18b.tar.gz
emacs: Show built output directories in Package Info.
* emacs/guix-main.scm (package-store-path): New procedure.
* emacs/guix-base.el (guix-package-store-path): New procedure.
* emacs/guix-ui-package.el (guix-package-info-auto-find-package): New
variable.
(guix-package-info-show-store-path, guix-package-info-insert-misc): New
procedures.
(guix-package-info-format, guix-output-info-format): Add
'guix-package-info-insert-misc'.
Diffstat (limited to 'emacs/guix-main.scm')
-rw-r--r--emacs/guix-main.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm
index e645a85e7d..c4f1b4ada0 100644
--- a/emacs/guix-main.scm
+++ b/emacs/guix-main.scm
@@ -953,6 +953,17 @@ GENERATIONS is a list of generation numbers."
                ((package _ ...) package)))
          (compose location->string package-location)))
 
+(define (package-store-path package-id)
+  "Return a list of store directories of outputs of package PACKAGE-ID."
+  (match (package-by-id package-id)
+    (#f '())
+    (package
+      (with-store store
+        (map (match-lambda
+               ((_ . drv)
+                (derivation-output-path drv)))
+             (derivation-outputs (package-derivation store package)))))))
+
 (define (package-source-derivation->store-path derivation)
   "Return a store path of the package source DERIVATION."
   (match (derivation-outputs derivation)