From d01ebd05d11775dea7c8d0a084c3ab02b958e18b Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sun, 8 May 2016 23:27:42 +0300 Subject: 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'. --- emacs/guix-main.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'emacs/guix-main.scm') 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 @@ (define (package-location-string id-or-name) ((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) -- cgit v1.2.3