aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm9
1 files changed, 2 insertions, 7 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 4dbe2b7b63..941b2cdca7 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -323,13 +323,8 @@ version; if SPEC does not specify an output, return OUTPUT."
(package-full-name p)
sub-drv)))
- (let*-values (((name sub-drv)
- (match (string-rindex spec #\:)
- (#f (values spec output))
- (colon (values (substring spec 0 colon)
- (substring spec (+ 1 colon))))))
- ((name version)
- (package-name->name+version name)))
+ (let-values (((name version sub-drv)
+ (package-specification->name+version+output spec)))
(match (find-best-packages-by-name name version)
((p)
(values p (ensure-output p sub-drv)))