Commit | Line | Data |
---|---|---|
56fbf262 | 1 | ;;; GNU Guix --- Functional package management for GNU |
762ba22e | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> |
56fbf262 LC |
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 | ;;; | |
0bc02bec | 20 | ;;; Check whether important binaries are available. |
56fbf262 LC |
21 | ;;; |
22 | ||
23 | (use-modules (guix store) | |
5c7e1a32 | 24 | (guix grafts) |
56fbf262 LC |
25 | (guix packages) |
26 | (guix derivations) | |
762ba22e LC |
27 | (gnu packages) |
28 | (gnu packages certs) | |
56fbf262 LC |
29 | (gnu packages emacs) |
30 | (gnu packages make-bootstrap) | |
762ba22e | 31 | (gnu packages ssh) |
56fbf262 | 32 | (srfi srfi-1) |
e348eaaf LC |
33 | (srfi srfi-26) |
34 | (ice-9 format)) | |
56fbf262 | 35 | |
762ba22e LC |
36 | (define (packages-for-system system) |
37 | "Return the list of packages to check for SYSTEM." | |
38 | (let ((base (list %bootstrap-tarballs emacs nss-certs openssh))) | |
39 | ;; On Intel systems, make sure key packages proposed by the installer are | |
40 | ;; available. | |
41 | (if (member system '("x86_64-linux" "i686-linux")) | |
42 | (append (map specification->package | |
43 | '("xfce" "gnome" "mate" "enlightenment" | |
44 | "openbox" "awesome" "i3-wm" "ratpoison" | |
45 | "network-manager-applet" "xlockmore" | |
46 | "linux-libre" "grub-hybrid" "xorg-server" | |
47 | "libreoffice" | |
48 | ;; FIXME: Add IceCat when Rust is available on i686. | |
49 | #;"icecat")) | |
50 | base) | |
51 | base))) | |
52 | ||
619c9522 | 53 | (with-store store |
43da8f01 LC |
54 | (parameterize ((%graft? #f)) |
55 | (let* ((native (append-map (lambda (system) | |
56 | (map (cut package-derivation store <> system) | |
762ba22e | 57 | (packages-for-system system))) |
78bed82d | 58 | %hydra-supported-systems)) |
43da8f01 LC |
59 | (cross (map (cut package-cross-derivation store |
60 | %bootstrap-tarballs <>) | |
a7e5944e LC |
61 | '("mips64el-linux-gnu" |
62 | "arm-linux-gnueabihf"))) | |
43da8f01 | 63 | (total (append native cross))) |
56fbf262 | 64 | |
8872fc0e LC |
65 | (set-build-options store |
66 | #:use-substitutes? #t | |
67 | #:substitute-urls %default-substitute-urls) | |
e348eaaf LC |
68 | (let* ((total (map derivation->output-path total)) |
69 | (available (substitutable-paths store total)) | |
70 | (missing (lset-difference string=? total available))) | |
71 | (if (null? missing) | |
f1ebeee1 LC |
72 | (format (current-error-port) |
73 | "~a packages found substitutable on~{ ~a~}~%" | |
74 | (length total) %hydra-supported-systems) | |
e348eaaf LC |
75 | (format (current-error-port) |
76 | "~a packages are not substitutable:~%~{ ~a~%~}~%" | |
77 | (length missing) missing)) | |
78 | (exit (null? missing)))))) |