GNU bug report logs - #50201
[PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors

Previous Next

Package: guix-patches;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Wed, 25 Aug 2021 17:59:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 50201 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: 50201 <at> debbugs.gnu.org
Cc: Maxime Devos <maximedevos <at> telenet.be>
Subject: [PATCH 03/52] gnu: elogind: Fix cross-compilation.
Date: Wed, 25 Aug 2021 20:02:43 +0200
%build-inputs and friends don't exist when cross-compiling,
so use some G-expology instead.

* gnu/packages/freedesktop.scm (elogind)[arguments]<#:configure-flags>:
  Don't use '%outputs' or '%build-inputs' when cross-compiling.
---
 gnu/packages/freedesktop.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e0f5623805..0f6bb72a1f 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -580,12 +580,20 @@ the freedesktop.org XDG Base Directory specification.")
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags
-       ,#~(let* ((out (assoc-ref %outputs "out"))
+       ;; TODO(core-updates): Use #$output unconditionally.
+       ,#~(let* ((out #$(if (%current-target-system)
+                            #~#$output
+                            #~(assoc-ref %outputs "out")))
                  (sysconf (string-append out "/etc"))
                  (libexec (string-append out "/libexec/elogind"))
                  (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
-                 (shadow (assoc-ref %build-inputs "shadow"))
-                 (shepherd (assoc-ref %build-inputs "shepherd"))
+                 ;; TODO(core-updates): use this-package-input unconditionally.
+                 (shadow #$(if (%current-target-system)
+                               (this-package-input "shadow")
+                               #~(assoc-ref %build-inputs "shadow")))
+                 (shepherd #$(if (%current-target-system)
+                                 (this-package-input "shepherd")
+                                 #~(assoc-ref %build-inputs "shepherd")))
                  (halt-path (string-append shepherd "/sbin/halt"))
                  (kexec-path "")           ;not available in Guix yet
                  (nologin-path (string-append shadow "/sbin/nologin"))
-- 
2.33.0





This bug report was last modified 3 years and 239 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.