summary refs log tree commit diff
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2019-09-04 21:01:04 +0200
committerJulien Lepiller <julien@lepiller.eu>2019-09-04 23:07:55 +0200
commitd3366a8ee8cec53cfb982855aaeb30244d3f1aa2 (patch)
tree0a351b6cdf28ee3a2c76dc05d749157d56f244da
parent11d73fb412d8728cf916eff9d9750be0bb593076 (diff)
downloadguix-d3366a8ee8cec53cfb982855aaeb30244d3f1aa2.tar.gz
import: opam: Remove initial "v" in some version numbers.
* guix/import/opam.scm (opam-fetch): Remove initial "v" in some version numbers.
-rw-r--r--guix/import/opam.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index 5dcc0e97a3..7c533a4b4e 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -238,7 +238,9 @@ path to the repository."
              (version (find-latest-version name repository))
              (file (string-append repository "/packages/" name "/" name "." version "/opam")))
     `(("metadata" ,@(get-metadata file))
-      ("version" . ,version))))
+      ("version" . ,(if (string-prefix? "v" version)
+                        (substring version 1)
+                        version)))))
 
 (define (opam->guix-package name)
   (and-let* ((opam-file (opam-fetch name))