Subject: [bug#48314] [PATCH v3] Install guix system on Raspberry Pi

From: phodina <[email-masked]>
Date: Sat, 16 Apr 2022 08:53:53 +0000

> > guile-fibers are now fixed, but the cross compile build fails now on shepherd-0.9 due to guile-fibers not being available.
>
>
> Fixed as suggested by Maxime in commit
> 6e174c4edd4786d93c1e424c45052f70b2bb3fb0.
>
> Let us know what the next issue is. :-)
>
> Ludo’.

Thanks Maxime for the advice and for Ludo' for applying the change!

I've rebased the patches from Stefan and there are only two packages that don't cross-compile - nss-certs and ntp.

I attempted to do guix pull on Raspberry Pi 3, but it failed due to running of memory - I'll attempt to test it with a swap file/partition.

Or is it possible to do guix pull using a substitute so that the computation wouldn't be done locally? This offloading would be really great for these embedded platforms.

----
Petr

From deab687c2b0540a944b48c68fa00cac4bac99b80 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Sat, 16 Apr 2022 10:22:14 +0200
Subject: [PATCH 1/2] gnu: nss-certs: Support cross-compilation.

* gnu/packages/certs.scm (nss-certs)[arguments]: Fix unresolved
  variable - output.

diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm
index 28c2f84f98..63486b596c 100644
--- a/gnu/packages/certs.scm
+++ b/gnu/packages/certs.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2021 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2021 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2021 Raghav Gururajan <[email-masked]>
+;;; Copyright © 2022 Petr Hodina <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -168,8 +169,8 @@ (define-public nss-certs
            (map (cut assq <> %standard-phases)
                 '(set-paths install-locale unpack))
          (add-after 'unpack 'install
-           (lambda _
-             (let ((certsdir (string-append %output "/etc/ssl/certs/")))
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((certsdir (string-append (assoc-ref outputs "out") "/etc/ssl/certs/")))
                (with-directory-excursion "nss/lib/ckfw/builtins/"
                  (unless (file-exists? "blacklist.txt")
                    (call-with-output-file "blacklist.txt" (const #t)))
-- 
2.35.1

From 98ad94f6282d8ff3a244181ecc32946ea281aa03 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Sat, 16 Apr 2022 10:24:46 +0200
Subject: [PATCH 2/2] gnu: ntp: Support cross-compilation.

* gnu/packages/ntp.scm (ntp)[arguments]: Add configuration flag.

diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 7a3c033b2e..a64861d7fd 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2019 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2021 Marius Bakke <[email-masked]>
 ;;; Copyright © 2021 Brice Waegeneire <[email-masked]>
+;;; Copyright © 2022 Petr Hodina <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -153,7 +154,8 @@ (define-public ntp
             `(("libcap" ,libcap))
             '())))
    (arguments
-    `(#:phases
+    `(#:configure-flags (list "--with-yielding-select=yes")
+      #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'disable-network-test
                    (lambda _
-- 
2.35.1