1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 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/>.
20 ;;; Check whether important binaries are available.
23 (use-modules (guix store)
30 (gnu packages make-bootstrap)
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
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"
48 ;; FIXME: Add IceCat when Rust is available on i686.
54 (parameterize ((%graft? #f))
55 (let* ((native (append-map (lambda (system)
56 (map (cut package-derivation store <> system)
57 (packages-for-system system)))
58 %hydra-supported-systems))
59 (cross (map (cut package-cross-derivation store
60 %bootstrap-tarballs <>)
61 '("mips64el-linux-gnu"
62 "arm-linux-gnueabihf")))
63 (total (append native cross)))
65 (set-build-options store
67 #:substitute-urls %default-substitute-urls)
68 (let* ((total (map derivation->output-path total))
69 (available (substitutable-paths store total))
70 (missing (lset-difference string=? total available)))
72 (format (current-error-port)
73 "~a packages found substitutable on~{ ~a~}~%"
74 (length total) %hydra-supported-systems)
75 (format (current-error-port)
76 "~a packages are not substitutable:~%~{ ~a~%~}~%"
77 (length missing) missing))
78 (exit (null? missing))))))