aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-09-02 17:57:58 +0300
committerAlex Kost <alezost@gmail.com>2015-09-04 16:01:35 +0300
commit00f34aaafe9547185c9eb200bb4533bf3534c124 (patch)
tree10f1d2a7f7371eb2d16f854ed9e273a62d2001f2 /emacs
parent02615bfa2f450d8acfd9d9013d460e30399338d5 (diff)
downloadpatches-00f34aaafe9547185c9eb200bb4533bf3534c124.tar
patches-00f34aaafe9547185c9eb200bb4533bf3534c124.tar.gz
emacs: Add support for "triplet" package inputs.
Fixes <http://bugs.gnu.org/21399>. * emacs/guix-main.scm (full-name->name+version): Adjust to handle "name-version:output" string. (package-inputs-names): Support ("name" package "output") inputs.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/guix-main.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm
index 8d3a88152d..623da884f6 100644
--- a/emacs/guix-main.scm
+++ b/emacs/guix-main.scm
@@ -71,7 +71,14 @@
(define (list-maybe obj)
(if (list? obj) obj (list obj)))
-(define full-name->name+version package-name->name+version)
+(define (full-name->name+version spec)
+ "Given package specification SPEC with or without output,
+return two values: name and version. For example, for SPEC
+\"foo-0.9.1b:lib\", return \"foo\" and \"0.9.1b\"."
+ (let-values (((name version output)
+ (package-specification->name+version+output spec)))
+ (values name version)))
+
(define (name+version->full-name name version)
(string-append name "-" version))
@@ -247,6 +254,10 @@ Example:
(filter-map (match-lambda
((_ (? package? package))
(package-full-name package))
+ ((_ (? package? package) output)
+ (make-package-specification (package-name package)
+ (package-version package)
+ output))
(_ #f))
inputs))