[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/40: import: opam: Work around janestreet version numbers.
From: |
guix-commits |
Subject: |
05/40: import: opam: Work around janestreet version numbers. |
Date: |
Tue, 5 Feb 2019 16:34:52 -0500 (EST) |
roptat pushed a commit to branch master
in repository guix.
commit c3a191fafd88e1ecd8bf0ab0adc0cb959c038c94
Author: Julien Lepiller <address@hidden>
Date: Fri Feb 1 15:35:45 2019 +0100
import: opam: Work around janestreet version numbers.
janestreet reversionned its packages and prefixed them with "v". Let the
importer know about that and choose "v" versions first.
* guix/import/opam.scm (find-latest-version): Work around version
rewrite from janestreet.
(opam->guix-package): Do not pass "v" to version number.
---
guix/import/opam.scm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index fa8dc86..7b2e832 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -1,4 +1,3 @@
-;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Julien Lepiller <address@hidden>
;;;
;;; This file is part of GNU Guix.
@@ -117,7 +116,11 @@ path to the repository."
(lambda (dir)
(string-join (cdr (string-split dir #\.)) "."))
versions)))
- (latest-version versions))
+ ;; Workaround for janestreet re-versionning
+ (let ((v-versions (filter (lambda (version) (string-prefix? "v"
version)) versions)))
+ (if (null? v-versions)
+ (latest-version versions)
+ (string-append "v" (latest-version (map (lambda (version)
(substring version 1)) v-versions))))))
(begin
(format #t (G_ "Package not found in opam repository: ~a~%") package)
#f))))
@@ -239,7 +242,9 @@ path to the repository."
(values
`(package
(name ,(ocaml-name->guix-name name))
- (version ,version)
+ (version ,(if (string-prefix? "v" version)
+ (substring version 1)
+ version))
(source
(origin
(method url-fetch)
- 20/40: gnu: Add ocaml-typerep., (continued)
- 20/40: gnu: Add ocaml-typerep., guix-commits, 2019/02/05
- 11/40: gnu: Add ocaml-ppx-sexp-conv., guix-commits, 2019/02/05
- 13/40: gnu: Add ocaml-ppx-custom-printf., guix-commits, 2019/02/05
- 07/40: gnu: Add ocaml-ppx-compare., guix-commits, 2019/02/05
- 04/40: gnu: ocaml-ppx-derivers: Add upstream-name., guix-commits, 2019/02/05
- 14/40: gnu: Add ocaml-bin-prot., guix-commits, 2019/02/05
- 10/40: gnu: Add ocaml-ppx-fields-conv., guix-commits, 2019/02/05
- 02/40: import: opam: Fix conditions., guix-commits, 2019/02/05
- 03/40: import: opam: Replace "_" with "-" in imported names., guix-commits, 2019/02/05
- 01/40: gnu: unison: Update to 2.51.1., guix-commits, 2019/02/05
- 05/40: import: opam: Work around janestreet version numbers.,
guix-commits <=