guix-commits
[Top][All Lists]
Advanced

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

03/52: gnu: elogind: Fix cross-compilation.


From: guix-commits
Subject: 03/52: gnu: elogind: Fix cross-compilation.
Date: Mon, 20 Sep 2021 07:19:26 -0400 (EDT)

mothacehe pushed a commit to branch core-updates-frozen
in repository guix.

commit 04380925eae70f1a2f27eb09669f4ca241d3ae2a
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Tue Aug 24 09:33:08 2021 +0200

    gnu: elogind: Fix cross-compilation.
    
    %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 3d4bc63..9df7fef 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -583,12 +583,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"))



reply via email to

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