guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: guix: Fix cross-compilation.


From: guix-commits
Subject: 01/02: gnu: guix: Fix cross-compilation.
Date: Sun, 29 Nov 2020 13:22:16 -0500 (EST)

mothacehe pushed a commit to branch master
in repository guix.

commit d9f05c70a6af1087de1717ff20036efa1afef5fb
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Sun Nov 29 17:46:55 2020 +0100

    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 8ee2f2d..7372cbe 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]