aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-main.scm
diff options
context:
space:
mode:
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)