maint: Actually check for the availablility of system packages.
[jackhill/guix/guix.git] / etc / release-manifest.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
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.
10 ;;;
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.
15 ;;;
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/>.
18
19 ;;; This file returns a manifest containing release-critical bit, for all the
20 ;;; supported architectures and cross-compilation targets.
21
22 (use-modules (gnu packages)
23 (guix packages)
24 (guix profiles)
25 ((gnu ci) #:select (%cross-targets))
26 (guix utils)
27 (srfi srfi-1)
28 (srfi srfi-26))
29
30 (define* (package->manifest-entry* package system
31 #:key target)
32 "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to
33 TARGET."
34 (manifest-entry
35 (inherit (package->manifest-entry package))
36 (name (string-append (package-name package) "." system
37 (if target
38 (string-append "." target)
39 "'")))
40 (item (with-parameters ((%current-system system)
41 (%current-target-system target))
42 package))))
43
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")))
49
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"
57 "openssh" "ntp" "tor"
58 "linux-libre" "grub-hybrid"
59 ;; FIXME: Add IceCat when Rust is available on i686.
60 ;;"icecat"
61 )))
62
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>
66 ;; is fixed.
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"
71 "hello" "zlib"))))
72
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")))
76
77 (define %cross-bootstrap-targets
78 ;; Cross-compilation triplets for which 'bootstrap-tarballs' must be
79 ;; buildable.
80 '("i586-pc-gnu"
81 "arm-linux-gnueabihf"
82 "aarch64-linux-gnu"))
83
84 \f
85 ;;;
86 ;;; Manifests.
87 ;;;
88
89 (define %base-manifest
90 (manifest
91 (append-map (lambda (system)
92 (map (cut package->manifest-entry* <> system)
93 %base-packages))
94 %hydra-supported-systems)))
95
96 (define %system-manifest
97 (manifest
98 (append-map (lambda (system)
99 (map (cut package->manifest-entry* <> system)
100 %system-packages))
101 '("x86_64-linux" "i686-linux")))) ;Guix System
102
103 (define %cross-manifest
104 (manifest
105 (append-map (lambda (target)
106 (map (cut package->manifest-entry* <> "x86_64-linux"
107 #:target target)
108 (if (target-mingw? target)
109 %packages-to-cross-build-for-mingw
110 %packages-to-cross-build)))
111 ;; XXX: Important bits like libsigsegv and libffi don't support
112 ;; RISCV at the moment, so don't require RISCV support.
113 (delete "riscv64-linux-gnu" %cross-targets))))
114
115 (define %cross-bootstrap-manifest
116 (manifest
117 (map (lambda (target)
118 (package->manifest-entry*
119 (specification->package "bootstrap-tarballs")
120 "x86_64-linux" #:target target))
121 %cross-bootstrap-targets)))
122
123 ;; Return the union of all three manifests.
124 (concatenate-manifests (list %base-manifest
125 %system-manifest
126 %cross-manifest
127 %cross-bootstrap-manifest))