diff --git a/tribes/packages/cli.scm b/tribes/packages/cli.scm index 3db7cb0..797a601 100644 --- a/tribes/packages/cli.scm +++ b/tribes/packages/cli.scm @@ -10,6 +10,16 @@ #:use-module (gnu packages package-management) #:export (tribes-command-package)) +;; Guile must match the one (guix) was compiled with. Otherwise our build's +;; `guild compile` (and the broker at runtime) loads (guix records) etc. with +;; an incompatible bytecode version, falls back to recompiling guix from +;; source, and drags hundreds of (gnu packages …) modules through Guile's +;; user cache before our own modules can finish loading. Same idiom as +;; guix-modules — see (lookup-package-input guix "guile") in upstream +;; gnu/packages/package-management.scm. +(define guile-for-guix + (lookup-package-input guix "guile")) + ;; --------------------------------------------------------------------------- ;; Three transport binaries — all dispatch through (tribes deploy entry): ;; tribes -> entry 'shell (status command for the UI) @@ -22,20 +32,24 @@ (define tribes-shell-program (program-file "tribes" - #~(begin (use-modules (tribes deploy entry)) (main 'shell)))) + #~(begin (use-modules (tribes deploy entry)) (main 'shell)) + #:guile guile-for-guix)) (define tribes-deploy-exec-program (program-file "tribes-deploy-exec" - #~(begin (use-modules (tribes deploy entry)) (main 'cli)))) + #~(begin (use-modules (tribes deploy entry)) (main 'cli)) + #:guile guile-for-guix)) (define tribes-local-control-program (program-file "tribes-local-control" - #~(begin (use-modules (tribes deploy entry)) (main 'http)))) + #~(begin (use-modules (tribes deploy entry)) (main 'http)) + #:guile guile-for-guix)) (define tribes-guix-helper-program (program-file "tribes-guix-helper" #~(begin (use-modules (tribes deploy helper-main)) - (helper-main (cdr (command-line)))))) + (helper-main (cdr (command-line)))) + #:guile guile-for-guix)) (define tribes-modules-source (local-file ".." "tribes-modules" #:recursive? #t)) @@ -121,9 +135,9 @@ (wrap-with-paths "tribes-deploy-exec" #t) (wrap-with-paths "tribes-local-control" #t))))))) (native-inputs - (list guile-3.0)) + (list guile-for-guix guix)) (inputs - (list bash-minimal guile-3.0 guile-json-4 + (list bash-minimal guile-for-guix guile-json-4 guix guile-gcrypt guile-gnutls)) (home-page "https://git.teralink.net/tribes/guix-tribes.git") (synopsis "Tribes node administration command")