mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
import: stackage: Avoid using (guix ui) in importer code.
* guix/import/stackage.scm (stackage->guix-package, stackage-lts-info-fetch): Raise 'message' condition instead of using 'leave' from (guix ui). * guix/scripts/import/stackage.scm (guix-import-stackage): Handle conditions.
This commit is contained in:
parent
4fc282b32a
commit
57075ade97
2 changed files with 17 additions and 12 deletions
|
@ -98,15 +98,16 @@ Import and convert the LTS Stackage package for PACKAGE-NAME.\n"))
|
|||
(reverse opts))))
|
||||
(match args
|
||||
((package-name)
|
||||
(let ((sexp (stackage->guix-package
|
||||
package-name
|
||||
#:include-test-dependencies?
|
||||
(assoc-ref opts 'include-test-dependencies?)
|
||||
#:lts-version (assoc-ref opts 'lts-version))))
|
||||
(unless sexp
|
||||
(leave (_ "failed to download cabal file for package '~a'~%")
|
||||
package-name))
|
||||
sexp))
|
||||
(with-error-handling
|
||||
(let ((sexp (stackage->guix-package
|
||||
package-name
|
||||
#:include-test-dependencies?
|
||||
(assoc-ref opts 'include-test-dependencies?)
|
||||
#:lts-version (assoc-ref opts 'lts-version))))
|
||||
(unless sexp
|
||||
(leave (_ "failed to download cabal file for package '~a'~%")
|
||||
package-name))
|
||||
sexp)))
|
||||
(()
|
||||
(leave (_ "too few arguments~%")))
|
||||
((many ...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue