Commit | Line | Data |
---|---|---|
f292c501 | 1 | ;;; GNU Guix --- Functional package management for GNU |
a363e430 | 2 | ;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
1197b8b2 | 3 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
f292c501 LC |
4 | ;;; |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
8 | ;;; under the terms of the GNU General Public License as published by | |
9 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
10 | ;;; your option) any later version. | |
11 | ;;; | |
12 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;;; GNU General Public License for more details. | |
16 | ;;; | |
17 | ;;; You should have received a copy of the GNU General Public License | |
18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
20 | ;;; This file returns a manifest containing release-critical bit, for all the | |
21 | ;;; supported architectures and cross-compilation targets. | |
22 | ||
23 | (use-modules (gnu packages) | |
24 | (guix packages) | |
25 | (guix profiles) | |
26 | ((gnu ci) #:select (%cross-targets)) | |
bab1f340 | 27 | ((gnu services xorg) #:select (%default-xorg-modules)) |
d8c8bfcc | 28 | (guix utils) |
f292c501 LC |
29 | (srfi srfi-1) |
30 | (srfi srfi-26)) | |
31 | ||
32 | (define* (package->manifest-entry* package system | |
33 | #:key target) | |
34 | "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to | |
35 | TARGET." | |
36 | (manifest-entry | |
37 | (inherit (package->manifest-entry package)) | |
38 | (name (string-append (package-name package) "." system | |
39 | (if target | |
40 | (string-append "." target) | |
41 | "'"))) | |
42 | (item (with-parameters ((%current-system system) | |
43 | (%current-target-system target)) | |
44 | package)))) | |
45 | ||
46 | (define %base-packages | |
47 | ;; Packages that must be substitutable on all the platforms Guix supports. | |
48 | (map specification->package | |
49 | '("bootstrap-tarballs" "gcc-toolchain" "nss-certs" | |
50 | "openssh" "emacs" "vim" "python" "guile" "guix"))) | |
51 | ||
42ac8da4 LC |
52 | (define %base-packages/armhf |
53 | ;; XXX: Relax requirements for armhf-linux for lack of enough build power. | |
54 | (map (lambda (package) | |
55 | (if (string=? (package-name package) "emacs") | |
56 | (specification->package "emacs-no-x") | |
57 | package)) | |
58 | %base-packages)) | |
59 | ||
19e2898c LC |
60 | (define %base-packages/hurd |
61 | ;; XXX: For now we are less demanding of "i586-gnu". | |
62 | (map specification->package | |
63 | '("coreutils" "grep" "findutils" "gawk" "make" | |
64 | "gcc-toolchain" "tar" "xz"))) | |
65 | ||
f292c501 LC |
66 | (define %system-packages |
67 | ;; Key packages proposed by the Guix System installer. | |
bab1f340 LC |
68 | (append (map specification->package |
69 | '("xorg-server" "xfce" "gnome" "mate" "enlightenment" | |
70 | "openbox" "awesome" "i3-wm" "ratpoison" | |
1197b8b2 | 71 | "emacs" "emacs-exwm" "emacs-desktop-environment" |
bab1f340 LC |
72 | "xlockmore" "slock" "libreoffice" |
73 | "connman" "network-manager" "network-manager-applet" | |
74 | "openssh" "ntp" "tor" | |
75 | "linux-libre" "grub-hybrid" | |
76 | ;; FIXME: Add IceCat when Rust is available on i686. | |
77 | ;;"icecat" | |
78 | )) | |
79 | %default-xorg-modules)) | |
f292c501 LC |
80 | |
81 | (define %packages-to-cross-build | |
82 | ;; Packages that must be cross-buildable from x86_64-linux. | |
1e6fe44d LC |
83 | ;; FIXME: Add (@ (gnu packages gcc) gcc) when <https://bugs.gnu.org/40463> |
84 | ;; is fixed. | |
b1f56712 | 85 | (append (list (@ (gnu packages guile) guile-3.0/fixed)) |
0eb799e6 LC |
86 | (map specification->package |
87 | '("coreutils" "grep" "sed" "findutils" "diffutils" "patch" | |
88 | "gawk" "gettext" "gzip" "xz" | |
89 | "hello" "zlib")))) | |
f292c501 | 90 | |
d8c8bfcc LC |
91 | (define %packages-to-cross-build-for-mingw |
92 | ;; Many things don't build for MinGW. Restrict to what's known to work. | |
93 | (map specification->package '("hello"))) | |
94 | ||
f292c501 LC |
95 | (define %cross-bootstrap-targets |
96 | ;; Cross-compilation triplets for which 'bootstrap-tarballs' must be | |
97 | ;; buildable. | |
98 | '("i586-pc-gnu" | |
99 | "arm-linux-gnueabihf" | |
100 | "aarch64-linux-gnu")) | |
101 | ||
102 | \f | |
103 | ;;; | |
104 | ;;; Manifests. | |
105 | ;;; | |
106 | ||
107 | (define %base-manifest | |
108 | (manifest | |
109 | (append-map (lambda (system) | |
110 | (map (cut package->manifest-entry* <> system) | |
a363e430 LC |
111 | (cond ((string=? system "i586-gnu") |
112 | %base-packages/hurd) | |
42ac8da4 LC |
113 | ((string=? system "armhf-linux") |
114 | ;; FIXME: Drop special case when ci.guix.gnu.org | |
115 | ;; has more ARMv7 build power. | |
116 | %base-packages/armhf) | |
a363e430 LC |
117 | ((string=? system "powerpc64le-linux") |
118 | ;; FIXME: Drop 'bootstrap-tarballs' until | |
119 | ;; <https://bugs.gnu.org/48055> is fixed. | |
120 | (drop %base-packages 1)) | |
121 | (else | |
122 | %base-packages)))) | |
76bea3f8 | 123 | %cuirass-supported-systems))) |
f292c501 | 124 | |
8e8d984f LC |
125 | (define %system-manifest |
126 | (manifest | |
127 | (append-map (lambda (system) | |
128 | (map (cut package->manifest-entry* <> system) | |
129 | %system-packages)) | |
130 | '("x86_64-linux" "i686-linux")))) ;Guix System | |
131 | ||
f292c501 LC |
132 | (define %cross-manifest |
133 | (manifest | |
134 | (append-map (lambda (target) | |
135 | (map (cut package->manifest-entry* <> "x86_64-linux" | |
136 | #:target target) | |
d8c8bfcc LC |
137 | (if (target-mingw? target) |
138 | %packages-to-cross-build-for-mingw | |
139 | %packages-to-cross-build))) | |
140 | ;; XXX: Important bits like libsigsegv and libffi don't support | |
141 | ;; RISCV at the moment, so don't require RISCV support. | |
142 | (delete "riscv64-linux-gnu" %cross-targets)))) | |
f292c501 LC |
143 | |
144 | (define %cross-bootstrap-manifest | |
145 | (manifest | |
146 | (map (lambda (target) | |
147 | (package->manifest-entry* | |
148 | (specification->package "bootstrap-tarballs") | |
149 | "x86_64-linux" #:target target)) | |
150 | %cross-bootstrap-targets))) | |
151 | ||
152 | ;; Return the union of all three manifests. | |
153 | (concatenate-manifests (list %base-manifest | |
8e8d984f | 154 | %system-manifest |
f292c501 LC |
155 | %cross-manifest |
156 | %cross-bootstrap-manifest)) |