import: opam: Remove initial "v" in some version numbers.

* guix/import/opam.scm (opam-fetch): Remove initial "v" in some version numbers.
This commit is contained in:
Julien Lepiller 2019-09-04 21:01:04 +02:00
parent 11d73fb412
commit d3366a8ee8
No known key found for this signature in database
GPG Key ID: 43111F4520086A0C
1 changed files with 3 additions and 1 deletions

View File

@ -238,7 +238,9 @@ path to the repository."
(version (find-latest-version name repository)) (version (find-latest-version name repository))
(file (string-append repository "/packages/" name "/" name "." version "/opam"))) (file (string-append repository "/packages/" name "/" name "." version "/opam")))
`(("metadata" ,@(get-metadata file)) `(("metadata" ,@(get-metadata file))
("version" . ,version)))) ("version" . ,(if (string-prefix? "v" version)
(substring version 1)
version)))))
(define (opam->guix-package name) (define (opam->guix-package name)
(and-let* ((opam-file (opam-fetch name)) (and-let* ((opam-file (opam-fetch name))