me
/
guix
Archived
1
0
Fork 0

import: opam: opam->guix-package: Fix default repo argument.

* guix/import/opam.scm (opam->guix-package): Make default repo a list of
strings.  Update docstring.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
master
Csepp 2023-03-21 23:59:52 +01:00 committed by Maxim Cournoyer
parent 29e2e7135d
commit 571907c362
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 3 additions and 4 deletions

View File

@ -336,10 +336,9 @@ path to the repository."
(sha256 (base32 ,(guix-hash-url temp)))))))
'no-source-information)))
(define* (opam->guix-package name #:key (repo 'opam) version #:allow-other-keys)
"Import OPAM package NAME from REPOSITORY (a directory name) or, if
REPOSITORY is #f, from the official OPAM repository. Return a 'package' sexp
or #f on failure."
(define* (opam->guix-package name #:key (repo '("opam")) version #:allow-other-keys)
"Import OPAM package NAME from REPO, a list of repository names, URLs, or
file names. Return a 'package' sexp or #f on failure."
(and-let* ((with-opam (if (member "opam" repo) repo (cons "opam" repo)))
(opam-file (opam-fetch name with-opam))
(version (assoc-ref opam-file "version"))