summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-03-08 11:38:46 +0100
committerLudovic Courtès <ludo@gnu.org>2016-03-08 11:38:46 +0100
commit95cd4971d07fe312a4e0d21b72e7bf1bba493753 (patch)
tree430b9456a45417dd6adbf8d553deb1ee86b01f9b /gnu
parent7befee308b773b78a1039315203f71e57eca763d (diff)
downloadgnu-guix-95cd4971d07fe312a4e0d21b72e7bf1bba493753.tar
gnu-guix-95cd4971d07fe312a4e0d21b72e7bf1bba493753.tar.gz
packages: Support the deprecated "NAME-VERSION" syntax.
Fixes a typo introduced in 1b846da8c372bee78851439fd9e72b2499115e5a that would lead to a backtrace when using the deprecated syntax. * gnu/packages.scm (%find-package): Turn the first argument to 'call-with-values' into a thunk. Use #:select instead of '@' to select the right 'package-name->name+version' procedure.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages.scm10
1 files changed, 7 insertions, 3 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm
index 307f21f057..5a76e9b9ef 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -24,6 +24,9 @@
#:use-module (guix packages)
#:use-module (guix ui)
#:use-module (guix utils)
+ #:use-module ((guix build utils)
+ #:select ((package-name->name+version
+ . hyphen-separated-name->name+version)))
#:use-module (ice-9 ftw)
#:use-module (ice-9 vlist)
#:use-module (ice-9 match)
@@ -300,9 +303,10 @@ use NAME@VERSION instead~%")))
(or fallback?
;; XXX: Fallback to the older specification style with an hyphen
;; between NAME and VERSION, for backward compatibility.
- (let ((proc (@ (guix build utils) package-name->name+version)))
- (call-with-values (proc name)
- (cut %find-package spec <> <> #:fallback? #t)))
+ (call-with-values
+ (lambda ()
+ (hyphen-separated-name->name+version name))
+ (cut %find-package spec <> <> #:fallback? #t))
(leave (_ "~A: unknown package~%") name))))))
(define (specification->package spec)