From d9f05c70a6af1087de1717ff20036efa1afef5fb Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sun, 29 Nov 2020 17:46:55 +0100 Subject: gnu: guix: Fix cross-compilation. This is a follow-up of 375cc7dea20da7117c9459e4a4d15144095e015b. Avahi requires "glib" which doesn't cross-compile yet. * gnu/packages/package-management.scm (guix)[arguments]: Remove "guile-avahi" from the wrapper when cross-compiling. [native-inputs]: Remove "guile-avahi" when cross-compiling. [propagated-inputs]: Ditto. --- gnu/packages/package-management.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 8ee2f2d1d4..7372cbe62e 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -306,8 +306,11 @@ $(prefix)/etc/init.d\n"))) (ssh (assoc-ref inputs "guile-ssh")) (gnutls (assoc-ref inputs "gnutls")) (locales (assoc-ref inputs "glibc-utf8-locales")) - (deps (list avahi gcrypt json sqlite gnutls - git bs ssh zlib lzlib)) + (deps (list gcrypt json sqlite gnutls git + bs ssh zlib lzlib)) + (deps* ,@(if (%current-target-system) + '(deps) + '((cons avahi deps)))) (effective (read-line (open-pipe* OPEN_READ @@ -317,13 +320,13 @@ $(prefix)/etc/init.d\n"))) (map (cut string-append <> "/share/guile/site/" effective) - (delete #f deps)) + (delete #f deps*)) ":")) (gopath (string-join (map (cut string-append <> "/lib/guile/" effective "/site-ccache") - (delete #f deps)) + (delete #f deps*)) ":")) (locpath (string-append locales "/lib/locale"))) @@ -350,7 +353,9 @@ $(prefix)/etc/init.d\n"))) ;; cross-compilation. ("guile" ,guile-3.0-latest) ;for faster builds ("gnutls" ,gnutls) - ("guile-avahi" ,guile-avahi) + ,@(if (%current-target-system) + '() + `(("guile-avahi" ,guile-avahi))) ("guile-gcrypt" ,guile-gcrypt) ("guile-json" ,guile-json-4) ("guile-sqlite3" ,guile-sqlite3) @@ -401,7 +406,10 @@ $(prefix)/etc/init.d\n"))) ("glibc-utf8-locales" ,glibc-utf8-locales))) (propagated-inputs `(("gnutls" ,(if (%current-target-system) gnutls-3.6.14 gnutls)) - ("guile-avahi" ,guile-avahi) + ;; Avahi requires "glib" which doesn't cross-compile yet. + ,@(if (%current-target-system) + '() + `(("guile-avahi" ,guile-avahi))) ("guile-gcrypt" ,guile-gcrypt) ("guile-json" ,guile-json-4) ("guile-sqlite3" ,guile-sqlite3) -- cgit 1.4.1