1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 ;;; This file returns a manifest containing release-critical bit, for all the
20 ;;; supported architectures and cross-compilation targets.
22 (use-modules (gnu packages)
25 ((gnu ci) #:select (%cross-targets))
30 (define* (package->manifest-entry* package system
32 "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
35 (inherit (package->manifest-entry package))
36 (name (string-append (package-name package) "." system
38 (string-append "." target)
40 (item (with-parameters ((%current-system system)
41 (%current-target-system target))
44 (define %base-packages
45 ;; Packages that must be substitutable on all the platforms Guix supports.
46 (map specification->package
47 '("bootstrap-tarballs" "gcc-toolchain" "nss-certs"
48 "openssh" "emacs" "vim" "python" "guile" "guix")))
50 (define %system-packages
51 ;; Key packages proposed by the Guix System installer.
52 (map specification->package
53 '("xorg-server" "xfce" "gnome" "mate" "enlightenment"
54 "openbox" "awesome" "i3-wm" "ratpoison"
55 "xlockmore" "slock" "libreoffice"
56 "connman" "network-manager" "network-manager-applet"
58 "linux-libre" "grub-hybrid"
59 ;; FIXME: Add IceCat when Rust is available on i686.
63 (define %packages-to-cross-build
64 ;; Packages that must be cross-buildable from x86_64-linux.
65 ;; FIXME: Add (@ (gnu packages gcc) gcc) when <https://bugs.gnu.org/40463>
67 (append (list (@ (gnu packages guile) guile-2.2/fixed))
68 (map specification->package
69 '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
70 "gawk" "gettext" "gzip" "xz"
73 (define %packages-to-cross-build-for-mingw
74 ;; Many things don't build for MinGW. Restrict to what's known to work.
75 (map specification->package '("hello")))
77 (define %cross-bootstrap-targets
78 ;; Cross-compilation triplets for which 'bootstrap-tarballs' must be
89 (define %base-manifest
91 (append-map (lambda (system)
92 (map (cut package->manifest-entry* <> system)
94 %hydra-supported-systems)))
96 (define %cross-manifest
98 (append-map (lambda (target)
99 (map (cut package->manifest-entry* <> "x86_64-linux"
101 (if (target-mingw? target)
102 %packages-to-cross-build-for-mingw
103 %packages-to-cross-build)))
104 ;; XXX: Important bits like libsigsegv and libffi don't support
105 ;; RISCV at the moment, so don't require RISCV support.
106 (delete "riscv64-linux-gnu" %cross-targets))))
108 (define %cross-bootstrap-manifest
110 (map (lambda (target)
111 (package->manifest-entry*
112 (specification->package "bootstrap-tarballs")
113 "x86_64-linux" #:target target))
114 %cross-bootstrap-targets)))
116 ;; Return the union of all three manifests.
117 (concatenate-manifests (list %base-manifest
119 %cross-bootstrap-manifest))