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))
26 ((gnu services xorg) #:select (%default-xorg-modules))
31 (define* (package->manifest-entry* package system
33 "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
36 (inherit (package->manifest-entry package))
37 (name (string-append (package-name package) "." system
39 (string-append "." target)
41 (item (with-parameters ((%current-system system)
42 (%current-target-system target))
45 (define %base-packages
46 ;; Packages that must be substitutable on all the platforms Guix supports.
47 (map specification->package
48 '("bootstrap-tarballs" "gcc-toolchain" "nss-certs"
49 "openssh" "emacs" "vim" "python" "guile" "guix")))
51 (define %system-packages
52 ;; Key packages proposed by the Guix System installer.
53 (append (map specification->package
54 '("xorg-server" "xfce" "gnome" "mate" "enlightenment"
55 "openbox" "awesome" "i3-wm" "ratpoison"
56 "xlockmore" "slock" "libreoffice"
57 "connman" "network-manager" "network-manager-applet"
59 "linux-libre" "grub-hybrid"
60 ;; FIXME: Add IceCat when Rust is available on i686.
63 %default-xorg-modules))
65 (define %packages-to-cross-build
66 ;; Packages that must be cross-buildable from x86_64-linux.
67 ;; FIXME: Add (@ (gnu packages gcc) gcc) when <https://bugs.gnu.org/40463>
69 (append (list (@ (gnu packages guile) guile-3.0/fixed))
70 (map specification->package
71 '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
72 "gawk" "gettext" "gzip" "xz"
75 (define %packages-to-cross-build-for-mingw
76 ;; Many things don't build for MinGW. Restrict to what's known to work.
77 (map specification->package '("hello")))
79 (define %cross-bootstrap-targets
80 ;; Cross-compilation triplets for which 'bootstrap-tarballs' must be
91 (define %base-manifest
93 (append-map (lambda (system)
94 (map (cut package->manifest-entry* <> system)
96 %hydra-supported-systems)))
98 (define %system-manifest
100 (append-map (lambda (system)
101 (map (cut package->manifest-entry* <> system)
103 '("x86_64-linux" "i686-linux")))) ;Guix System
105 (define %cross-manifest
107 (append-map (lambda (target)
108 (map (cut package->manifest-entry* <> "x86_64-linux"
110 (if (target-mingw? target)
111 %packages-to-cross-build-for-mingw
112 %packages-to-cross-build)))
113 ;; XXX: Important bits like libsigsegv and libffi don't support
114 ;; RISCV at the moment, so don't require RISCV support.
115 (delete "riscv64-linux-gnu" %cross-targets))))
117 (define %cross-bootstrap-manifest
119 (map (lambda (target)
120 (package->manifest-entry*
121 (specification->package "bootstrap-tarballs")
122 "x86_64-linux" #:target target))
123 %cross-bootstrap-targets)))
125 ;; Return the union of all three manifests.
126 (concatenate-manifests (list %base-manifest
129 %cross-bootstrap-manifest))