We discussed the next release during Guix Days and I volunteered to lead
the effort.

The short version:

* We need a tagged release so we can update the version in Debian and
  other distros, in CI systems, etc.
* We need a newer point-in-time for the installer.
* A new release increases interest in the project.

I've opened bug #76098 with a couple of patches but I figured it would
be better if I wrote here instead.

In the process toward a new release I took a look at the 'release' make
target and the release.scm manifest to start.

In the Makefile:
* Added riscv64-linux as a supported system
* switch the assert-binaries-available make target we've used previously
  to make sure we have substitutes for a base set of packages to point
  to the installer manifest.  If the purpose of the installer is to
  install and then everyone expected to run `guix pull` then we need the
  packages from the installer.

release.scm:
I don't have a real good use for this manifest currently, but I've made
some changes anyway:
* %base-packages already existed in (gnu system), and that seemed like a
  good list of packages that we would need.  This increased the list of
  packages.
* %system-packages: The note mentioned the installer, so I copied the
  work I did on the installer.scm to this list.  This also increased the
  list of packages.

installer.scm:
A manifest which only checks that we have substitutes for what can be
installed using the TUI installer (assuming no extra added items).  It
differs from the GUIX_SYSTEM_INSTALLER_SYSTEM variable in the Makefile
by including aarch64 as an architecture.  Ideally all the packages
should compile, which would allow someone to run the installer
successfully for x86_64-linux, i686-linux or aarch64-linux.  Currently
everything is in one big manifest, but I think it would be better if we
didn't do that, which would allow anyone to try to build the manifest
only on architectures they are interested in/able to fix.  Then we could
(using the cuirass interface) set which architectures to try to build
the manifest.

cross-compile.scm:
Ideally all the packages one would need to produce an OS image for
another architecture we support, or the same %base-packages for other
architectures we have.  Currently it only tests from x86_64-linux.

Ideally I'd like to see the installer.scm and cross-compile.scm
manifests added to Cuirass.  I'd hope we could keep 100% build on
installer.scm so we can actually offer all the options in the installer,
and the cross-compile.scm manifest might need to be split so we can
focus on cross-compiling an OS config vs cross-compiling binaries for
another architecture.


-- 
Efraim Flashner   <efr...@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
From c3cdfd2fb8c176d49a125a89ab8d27e7357f44db Mon Sep 17 00:00:00 2001
Message-ID: 
<c3cdfd2fb8c176d49a125a89ab8d27e7357f44db.1738851574.git.efr...@flashner.co.il>
In-Reply-To: <cover.1738851574.git.efr...@flashner.co.il>
References: <cover.1738851574.git.efr...@flashner.co.il>
From: Efraim Flashner <efr...@flashner.co.il>
Date: Thu, 6 Feb 2025 16:06:27 +0200
Subject: [PATCH 1/4] Makefile.am: Add riscv64-linux as a supported-system.

* Makefile.am (SUPPORTED_SYSTEMS): Add riscv64-linux.

Change-Id: Ie8a18500b73b39f0702af64a5c9cb988ffd77250
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index de884548188..ad8bb907515 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1070,7 +1070,7 @@ SOURCE_TARBALLS =                                 \
 
 # Systems supported by Guix.
 SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux \
-  powerpc64le-linux
+  powerpc64le-linux riscv64-linux
 
 # Guix binary tarballs.
 BINARY_TARBALLS =                                                      \
-- 
Efraim Flashner   <efr...@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

From ea80b4f1e6eed0d2e6cab4b3fb14294dbc864fe2 Mon Sep 17 00:00:00 2001
Message-ID: 
<ea80b4f1e6eed0d2e6cab4b3fb14294dbc864fe2.1738851574.git.efr...@flashner.co.il>
In-Reply-To: <cover.1738851574.git.efr...@flashner.co.il>
References: <cover.1738851574.git.efr...@flashner.co.il>
From: Efraim Flashner <efr...@flashner.co.il>
Date: Thu, 6 Feb 2025 16:08:00 +0200
Subject: [PATCH 2/4] etc: manifests/release: Adjust for changes in Guix.

* etc/manifests/release.scm (%base-packages): Replace with
%base-packages from (gnu system).
(%system-packages): Adjust the packages which are depended upon by the
installer.  Add a set of extra packages which we expect to have
available.
(%packages-to-cross-build): Add zstd and git-minimal.
(%cross-manifest): Add riscv64-linux-gnu as a target.

Change-Id: I5806fff6bc38d14859f6d7163719841620e28d09
---
 etc/manifests/release.scm | 51 +++++++++++++++++++--------------------
 1 file changed, 25 insertions(+), 26 deletions(-)

diff --git a/etc/manifests/release.scm b/etc/manifests/release.scm
index b003f216fff..d5d86d273e7 100644
--- a/etc/manifests/release.scm
+++ b/etc/manifests/release.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2020-2022, 2024 Ludovic Courtès <l...@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <jann...@gnu.org>
 ;;; Copyright © 2023 Andreas Enge <andr...@enge.fr>
+;;; Copyright © 2025 Efraim Flashner <efr...@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,7 @@
              (guix profiles)
              ((guix platform) #:select (targets))
              ((gnu services xorg) #:select (%default-xorg-modules))
+             ((gnu system) #:prefix gnu-system: #:select (%base-packages))
              (guix utils)
              (guix gexp)
              (srfi srfi-1)
@@ -47,9 +49,9 @@ (define* (package->manifest-entry* package system
 
 (define %base-packages
   ;; Packages that must be substitutable on all the platforms Guix supports.
-  (map specification->package
-       '("bootstrap-tarballs" "gcc-toolchain" "nss-certs"
-         "openssh" "emacs" "vim" "python" "guile" "guix")))
+  ;; Use the %base-packages from (gnu system) since they are included by 
default
+  ;; in the packages field of the operating system configuration.
+  gnu-system:%base-packages)
 
 (define %base-packages/armhf
   ;; The guix package doesn't build natively on armhf due to Guile memory
@@ -67,14 +69,17 @@ (define %base-packages/hurd
 (define %system-packages
   ;; Key packages proposed by the Guix System installer.
   (append (map specification->package
-               '("xorg-server" "xfce" "gnome" "mate" "enlightenment"
-                 "openbox" "awesome" "i3-wm" "ratpoison"
+               '("gnome" "xfce" "mate" "enlightenment"
+                 "openbox" "awesome"
+                 "i3-wm" "i3status" "dmenu" "st"
+                 "ratpoison" "xterm"
                  "emacs" "emacs-exwm" "emacs-desktop-environment"
-                 "xlockmore" "slock" "libreoffice"
-                 "connman" "network-manager" "network-manager-applet"
-                 "openssh" "ntp" "tor"
-                 "linux-libre" "grub-hybrid"
-                 "icecat"))
+                 "openssh" "tor" "ntp" "gpm"
+                 "connman" "network-manager" "wpa-supplicant" "isc-dhcp" "cups"
+                 "linux-libre" "grub-hybrid"))
+          ;; Additional key packages we want to make sure are available
+          (map specification->package
+               '("emacs" "icecat" "libreoffice" "vim"))
           %default-xorg-modules))
 
 (define %packages-to-cross-build
@@ -84,11 +89,12 @@ (define %packages-to-cross-build
   (append (list (@ (gnu packages guile) guile-3.0/pinned))
           (map specification->package
                '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
-                 "gawk" "gettext" "gzip" "xz"
+                 "gawk" "gettext" "gzip" "xz" "zstd" "git-minimal"
                  "hello" "zlib"))))
 
 (define %packages-to-cross-build-for-mingw
-  ;; Many things don't build for MinGW.  Restrict to what's known to work.
+  ;; Many things don't build for MinGW.  Restrict to what's known to work
+  ;; to test that the cross-compiler itself works.
   (map specification->package '("hello")))
 
 (define %cross-bootstrap-targets
@@ -107,14 +113,10 @@ (define %base-manifest
   (manifest
    (append-map (lambda (system)
                  (map (cut package->manifest-entry* <> system)
-                      (cond ((string=? system "i586-gnu")
+                      (cond ((target-hurd? system)
                              %base-packages/hurd)
-                            ((string=? system "armhf-linux")
+                            ((target-arm32? system)
                              %base-packages/armhf)
-                            ((string=? system "powerpc64le-linux")
-                             ;; FIXME: Drop 'bootstrap-tarballs' until
-                             ;; <https://bugs.gnu.org/48055> is fixed.
-                             (drop %base-packages 1))
                             (else
                              %base-packages))))
                %cuirass-supported-systems)))
@@ -123,7 +125,7 @@ (define %system-manifest
   (manifest
    (append-map (lambda (system)
                  ;; Some of %SYSTEM-PACKAGES are currently unsupported on some
-                 ;; systems--e.g., GNOME on non-x86_64, due to Rust.  Filter
+                 ;; systems--e.g., GNOME on 32-bit, due to Rust.  Filter
                  ;; them out.
                  (filter-map (lambda (package)
                                (and (supported-package? package system)
@@ -131,6 +133,8 @@ (define %system-manifest
                              %system-packages))
                '("x86_64-linux" "i686-linux"))))  ;Guix System
 
+;; As per the Guix Survey of 2024 we only worry about cross compiling from
+;; x86_64-linux (98% of users) and not from others (aarch64 with 19%).
 (define %cross-manifest
   (manifest
    (append-map (lambda (target)
@@ -153,12 +157,7 @@ (define %cross-manifest
                        ;; Ignore bare-metal targets.
                        "avr"
                        "or1k-elf"
-                       "xtensa-ath9k-elf"
-
-                       ;; XXX: Important bits like libsigsegv and libffi don't
-                       ;; support RISCV at the moment, so don't require RISCV
-                       ;; support.
-                       "riscv64-linux-gnu")))))
+                       "xtensa-ath9k-elf")))))
 
 (define %cross-bootstrap-manifest
   (manifest
@@ -168,7 +167,7 @@ (define %cross-bootstrap-manifest
            "x86_64-linux" #:target target))
         %cross-bootstrap-targets)))
 
-;; Return the union of all three manifests.
+;; Return the union of all four manifests.
 (concatenate-manifests (list %base-manifest
                              %system-manifest
                              %cross-manifest
-- 
Efraim Flashner   <efr...@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

From 136a425368c9707e3097f7c57adb809d24a6689c Mon Sep 17 00:00:00 2001
Message-ID: 
<136a425368c9707e3097f7c57adb809d24a6689c.1738851574.git.efr...@flashner.co.il>
In-Reply-To: <cover.1738851574.git.efr...@flashner.co.il>
References: <cover.1738851574.git.efr...@flashner.co.il>
From: Efraim Flashner <efr...@flashner.co.il>
Date: Thu, 6 Feb 2025 16:12:16 +0200
Subject: [PATCH 3/4] etc: Add installer manifest.

* etc/manifests/installer.scm: New file.
* Makefile.am (GUIX_SYSTEM_SUPPORTED_SYSTEMS): Rename to
GUIX_SYSTEM_INSTALLER_SYSTEMS.
(assert-binaries-available): Check for substitutes using the installer
manifest.

Change-Id: I5c15e6916583bcd56e535733f284f3a735d7600b
---
 Makefile.am                 |  13 +++--
 etc/manifests/installer.scm | 112 ++++++++++++++++++++++++++++++++++++
 2 files changed, 119 insertions(+), 6 deletions(-)
 create mode 100644 etc/manifests/installer.scm

diff --git a/Makefile.am b/Makefile.am
index ad8bb907515..f2a5bcf5f7b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1076,8 +1076,9 @@ SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux 
aarch64-linux \
 BINARY_TARBALLS =                                                      \
   $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz)
 
-# Systems supported by Guix System.
-GUIX_SYSTEM_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux
+# Systems supported by the Guix System installer.
+# A Hurd install happens from a Linux installer image.
+GUIX_SYSTEM_INSTALLER_SYSTEMS ?= x86_64-linux i686-linux
 
 # Systems for which we build Guix VMs.
 GUIX_SYSTEM_VM_SYSTEMS ?= x86_64-linux
@@ -1138,10 +1139,10 @@ release: dist-with-updated-version all
 # Build 'current-guix' to speed things up for the next step.
        $(top_builddir)/pre-inst-env guix build                         \
              -e '((@ (gnu packages package-management) current-guix))' \
-             $(call system_flags,$(GUIX_SYSTEM_SUPPORTED_SYSTEMS))     \
+             $(call system_flags,$(GUIX_SYSTEM_INSTALLER_SYSTEMS))     \
              -v1 --no-grafts --fallback
 # Generate the ISO installation images.
-       for system in $(GUIX_SYSTEM_SUPPORTED_SYSTEMS) ; do                     
        \
+       for system in $(GUIX_SYSTEM_INSTALLER_SYSTEMS) ; do                     
        \
          GUIX_DISPLAYED_VERSION="`git describe --match=v* | sed -'es/^v//'`" ; 
        \
          image=`$(top_builddir)/pre-inst-env                                   
        \
            guix system image -t iso9660                                        
        \
@@ -1205,11 +1206,11 @@ assert-no-store-file-names:
          exit 1 ;                                                              
\
        fi
 
-# Make sure important substitutes are available.  Check only the primary
+# Make sure installer substitutes are available.  Check only the primary
 # server so that '--display-missing' doesn't print two lists.
 assert-binaries-available: $(GOBJECTS)
        $(AM_V_at)$(top_builddir)/pre-inst-env                          \
-         guix weather -m "$(top_srcdir)/etc/manifests/release.scm"     \
+         guix weather -m "$(top_srcdir)/etc/manifests/installer.scm"   \
                        --substitute-urls="https://ci.guix.gnu.org";     \
                        --display-missing
 
diff --git a/etc/manifests/installer.scm b/etc/manifests/installer.scm
new file mode 100644
index 00000000000..264cb4bab8e
--- /dev/null
+++ b/etc/manifests/installer.scm
@@ -0,0 +1,112 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020, 2021 Ludovic Courtès <l...@gnu.org>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <jann...@gnu.org>
+;;; Copyright © 2025 Efraim Flashner <efr...@flashner.co.il>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; This file returns a manifest containing packages which are needed by the
+;;; installer.
+
+(use-modules (gnu packages)
+             (guix packages)
+             (guix profiles)
+             ((guix platform) #:select (targets))
+             ((gnu services xorg) #:select (%default-xorg-modules))
+             ((gnu system) #:select (%base-packages %base-packages-linux))
+             (guix utils)
+             (guix gexp)
+             (srfi srfi-1)
+             (srfi srfi-26))
+
+(define* (package->manifest-entry* package system
+                                   #:key target)
+  "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
+TARGET."
+  (manifest-entry
+    (inherit (package->manifest-entry package))
+    (name (string-append (package-name package) "." system
+                         (if target
+                             (string-append "." target)
+                             "'")))
+    (item (with-parameters ((%current-system system)
+                            (%current-target-system target))
+            package))))
+
+(define %guix-system-installer-systems
+  ;; Only the systems listed in GUIX_SYSTEM_INSTALLER_SYSTEMS
+  '("x86_64-linux" "i686-linux"
+    ;; These would be installed from their Linux counterparts:
+    ;"x86_64-gnu" "i586-gnu"
+    ;; Not actually for the installer, but needs the same packages anyway.
+    "aarch64-linux"))
+
+(define %base-packages/hurd
+  ;; Remove the packages from %base-packages-linux and some of the packages
+  ;; from the other package sets.
+  (fold delete %base-packages
+        (append (map specification->package
+                     '("e2fsprogs" "kbd" "iproute2" "iw" "wireless-tools"))
+                %base-packages-linux)))
+
+(define %system-packages
+  ;; Key packages proposed by the Guix System installer.
+  (append (map specification->package
+               '("gnome" "xfce" "mate" "enlightenment"
+                 "openbox" "awesome"
+                 "i3-wm" "i3status" "dmenu" "st"
+                 "ratpoison" "xterm"
+                 "emacs" "emacs-exwm" "emacs-desktop-environment"
+                 "openssh" "tor" "ntp" "gpm"
+                 "connman" "network-manager" "wpa-supplicant" "isc-dhcp" "cups"
+                 "linux-libre" "grub-hybrid"))
+          %default-xorg-modules))
+
+
+;;;
+;;; Manifests.
+;;;
+
+(define %base-manifest
+  (manifest
+   (append-map (lambda (system)
+                 (map (cut package->manifest-entry* <> system)
+                      (cond ((target-hurd? system)
+                             %base-packages/hurd)
+                            (else
+                             %base-packages))))
+               %guix-system-installer-systems)))
+
+(define %system-manifest
+  (manifest
+    (cons
+      ;; linux-libre-arm64-generic is the commonly used kernel on 
aarch64-linux.
+      (package->manifest-entry* (@ (gnu packages linux)
+                                   linux-libre-arm64-generic)
+                                "aarch64-linux")
+      (append-map (lambda (system)
+                    ;; Some of %SYSTEM-PACKAGES are currently unsupported on 
some
+                    ;; systems--e.g., GNOME on 32-bit, due to Rust.  Filter
+                    ;; them out.
+                    (filter-map (lambda (package)
+                                  (and (supported-package? package system)
+                                       (package->manifest-entry* package 
system)))
+                                %system-packages))
+                  %guix-system-installer-systems))))
+
+;; Return the union of all installer manifests.
+(concatenate-manifests (list %base-manifest
+                             %system-manifest))
-- 
Efraim Flashner   <efr...@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

From 1a5c694d0b22eaf82b823d7264fae1c6c2ecfb60 Mon Sep 17 00:00:00 2001
Message-ID: 
<1a5c694d0b22eaf82b823d7264fae1c6c2ecfb60.1738851574.git.efr...@flashner.co.il>
In-Reply-To: <cover.1738851574.git.efr...@flashner.co.il>
References: <cover.1738851574.git.efr...@flashner.co.il>
From: Efraim Flashner <efr...@flashner.co.il>
Date: Thu, 6 Feb 2025 16:14:31 +0200
Subject: [PATCH 4/4] etc: Add cross-compile manifest.

* etc/manifests/cross-compile.scm: New file.

Change-Id: I63ac4014617e8d716c508a04c6da553e36a99fec
---
 etc/manifests/cross-compile.scm | 167 ++++++++++++++++++++++++++++++++
 1 file changed, 167 insertions(+)
 create mode 100644 etc/manifests/cross-compile.scm

diff --git a/etc/manifests/cross-compile.scm b/etc/manifests/cross-compile.scm
new file mode 100644
index 00000000000..8754f325564
--- /dev/null
+++ b/etc/manifests/cross-compile.scm
@@ -0,0 +1,167 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020-2022, 2024 Ludovic Courtès <l...@gnu.org>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <jann...@gnu.org>
+;;; Copyright © 2023 Andreas Enge <andr...@enge.fr>
+;;; Copyright © 2025 Efraim Flashner <efr...@flashner.co.il>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; This file returns a manifest containing packages which should all 
cross-compile.
+;;; We use the packages included by default in an OS configuration since that 
is
+;;; (probably) the most likely install method for some architectures.
+
+(use-modules (gnu packages)
+             (guix packages)
+             (guix profiles)
+             (guix platform)
+             ((gnu services xorg) #:select (%default-xorg-modules))
+             ((gnu system) #:prefix gnu-system:
+                           #:select (%base-packages %base-packages-linux))
+             (guix utils)
+             (guix gexp)
+             (srfi srfi-1)
+             (srfi srfi-26))
+
+(define* (package->manifest-entry* package system
+                                   #:key target)
+  "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
+TARGET."
+  (manifest-entry
+    (inherit (package->manifest-entry package))
+    (name (string-append (package-name package) "." system
+                         (if target
+                             (string-append "." target)
+                             "'")))
+    (item (with-parameters ((%current-system system)
+                            (%current-target-system target))
+            package))))
+
+(define %base-packages
+  ;; Packages that must be substitutable on all the platforms Guix supports.
+  ;; Use the %base-packages from (gnu system) since they are included by 
default
+  ;; in the packages field of the operating system configuration.
+  gnu-system:%base-packages)
+
+(define %base-packages/hurd
+  ;; Remove the packages from %base-packages-linux and some of the packages
+  ;; from the other package sets.
+  (fold delete %base-packages
+        (append (map specification->package
+                     '("e2fsprogs" "kbd" "iproute2" "iw" "wireless-tools"))
+                %base-packages-linux)))
+
+(define %system-packages
+  ;; Key packages proposed by the Guix System installer.
+  (map specification->package
+       '("guix" "openssh" "tor" "ntp" "gpm"
+         "connman" "network-manager" "wpa-supplicant" "isc-dhcp" "cups"
+         "linux-libre" "grub-hybrid")))
+
+(define %system-gui-packages
+  ;; Key packages proposed by the Guix System installer.
+  (append (map specification->package
+               '("enlightenment"
+                 ;; build system `python' does not support cross builds
+                 ;"gnome" "xfce" "mate" "openbox"
+                 "awesome"
+                 "i3-wm" "i3status" "dmenu" "st"
+                 "ratpoison" "xterm"
+                 ;; build system `emacs' does not support cross builds
+                 ;"emacs-exwm" "emacs-desktop-environment"
+                 "emacs"))
+          %default-xorg-modules))
+
+(define %packages-to-cross-build
+  ;; Packages that must be cross-buildable from x86_64-linux.
+  ;; FIXME: Add (@ (gnu packages gcc) gcc) when <https://bugs.gnu.org/40463>
+  ;; is fixed.
+  (append (list (@ (gnu packages guile) guile-3.0/pinned))
+          (map specification->package
+               '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
+                 "gawk" "gettext" "gzip" "xz" "zstd"
+                 "hello" "zlib"))))
+
+(define %packages-to-cross-build-for-mingw
+  ;; Many things don't build for MinGW.  Restrict to what's known to work
+  ;; to test that the cross-compiler itself works.
+  (map specification->package '("hello")))
+
+
+;;;
+;;; Manifests.
+;;;
+
+;; As per the Guix Survey of 2024 we only worry about cross compiling from
+;; x86_64-linux (98% of users) and not from others (aarch64 with 19%).
+(define %cross-manifest
+  (manifest
+    (append-map (lambda (target)
+                  (map (cut package->manifest-entry* <> "x86_64-linux"
+                            #:target target)
+                       (if (target-mingw? target)
+                           %packages-to-cross-build-for-mingw
+                           %packages-to-cross-build)))
+                (fold delete (targets)
+                      '(;; Disable cross-compilation to self:
+                        "x86_64-linux-gnu"
+
+                        ;; mips64el commonly targets a different architecture
+                        ;; revision than we targeted in Guix.
+                        "mips64el-linux-gnu"
+
+                        ;; Ignore bare-metal targets.
+                        "avr"
+                        "or1k-elf"
+                        "xtensa-ath9k-elf")))))
+
+(define %cross-system
+  (manifest
+    (cons*
+      ;; Include a couple of extra kernels that are commonly used:
+      (package->manifest-entry* (@ (gnu packages linux)
+                                   linux-libre-arm64-generic)
+                                "x86_64-linux"
+                                #:target "aarch64-linux-gnu")
+      (package->manifest-entry* (@ (gnu packages linux)
+                                   linux-libre-arm-generic)
+                                "x86_64-linux"
+                                #:target "arm-linux-gnueabihf")
+      (package->manifest-entry* (@ (gnu packages linux)
+                                   linux-libre-riscv64-generic)
+                                "x86_64-linux"
+                                #:target "riscv64-linux-gnu")
+      (append-map (lambda (target)
+                    (map (cut package->manifest-entry* <> "x86_64-linux"
+                              #:target target)
+                         (cond
+                           ;; With a graphical environment:
+                           ((or (target-x86-32? target)
+                                (target-aarch64? target))
+                            (append %base-packages
+                                    %system-packages
+                                    %system-gui-packages))
+                           (else (append %base-packages %system-packages)))))
+                  (fold delete (map platform-system->target (systems))
+                        '(;; Disable cross-compilation to self:
+                          "x86_64-linux-gnu"
+
+                          ;; Ignore obsolete systems, as in (gnu ci).
+                          "mips64el-linux-gnu"
+                          "powerpc-linux-gnu"))))))
+
+;; Return the union of all the manifests.
+(concatenate-manifests (list %cross-manifest
+                             %cross-system))
-- 
Efraim Flashner   <efr...@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature

Reply via email to