summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2020-12-08 15:03:47 +0100
committerJulien Lepiller <julien@lepiller.eu>2020-12-08 16:53:07 +0100
commitccc4d287b7bd2a3ddea7b7f2c1ea2a722e68115c (patch)
treeeae73548e3f438c6ea3af85c13564c561ce5d28c /guix
parenta8dccd4bdc1e58219d4ba08fe1649bf0b8325f44 (diff)
guix: opam: Add coq support in the importer.
* guix/import/opam.scm (get-opam-repository): Add support for coq repositories. (ocaml-name->guix-name): Properly name coq package. * doc/guix.texi (Invoking guix import): Document it.
Diffstat (limited to 'guix')
-rw-r--r--guix/import/opam.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index 6f5c95df3b..54143f83ca 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -126,12 +126,19 @@ path to the repository."
(let ((url (cond
((or (not repo) (equal? repo 'opam))
"https://github.com/ocaml/opam-repository")
+ ((string-prefix? "coq-" (symbol->string repo))
+ "https://github.com/coq/opam-coq-archive")
+ ((equal? repo 'coq) "https://github.com/coq/opam-coq-archive")
(else (throw 'unknown-repository repo)))))
(receive (location commit _)
(update-cached-checkout url)
(cond
((or (not repo) (equal? repo 'opam))
location)
+ ((equal? repo 'coq)
+ (string-append location "/released"))
+ ((string-prefix? "coq-" (symbol->string repo))
+ (string-append location "/" (substring (symbol->string repo) 4)))
(else location)))))
(define (latest-version versions)
@@ -168,6 +175,7 @@ path to the repository."
(substitute-char
(cond
((equal? name "ocamlfind") "ocaml-findlib")
+ ((equal? name "coq") name)
((string-prefix? "ocaml" name) name)
((string-prefix? "conf-" name) (substring name 5))
(else (string-append "ocaml-" name)))