summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
authorAlex Sassmannshausen <alex@pompo.co>2016-11-12 17:12:53 +0100
committerAlex Sassmannshausen <alex@pompo.co>2016-11-14 00:06:09 +0100
commitc91b368e96de9446bab37e7fab7d7c8ba71af946 (patch)
tree1bb5eca4db5100e2377b7f16ed10dec3caf7c621 /guix/import
parentd9721bcf27a049a87ee54701b8cb8e38dffd1a44 (diff)
import/cpan: Maybe coerce version to string.
* guix/import/cpan.scm (cpan-module->sexp) <version>: Test if version in meta is string or number. If it is number, coerce to string.
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/cpan.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 5b7c47554a..d244969c9e 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -128,7 +128,9 @@ META."
(string-append "perl-" (string-downcase name))))
(define version
- (assoc-ref meta "version"))
+ (match (assoc-ref meta "version")
+ ((? number? vrs) (number->string vrs))
+ ((? string? vrs) vrs)))
(define core-module?
(let ((perl-version (package-version perl))