1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 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 at hydra.gnu.org.
23 (use-modules (guix store)
28 (gnu packages make-bootstrap)
34 (parameterize ((%graft? #f))
35 (let* ((native (append-map (lambda (system)
36 (map (cut package-derivation store <> system)
37 (list %bootstrap-tarballs emacs)))
38 %hydra-supported-systems))
39 (cross (map (cut package-cross-derivation store
40 %bootstrap-tarballs <>)
41 '("mips64el-linux-gnu"
42 "arm-linux-gnueabihf")))
43 (total (append native cross)))
45 (set-build-options store
47 #:substitute-urls %default-substitute-urls)
48 (let* ((total (map derivation->output-path total))
49 (available (substitutable-paths store total))
50 (missing (lset-difference string=? total available)))
52 (format (current-error-port)
53 "~a packages found substitutable on~{ ~a~}~%"
54 (length total) %hydra-supported-systems)
55 (format (current-error-port)
56 "~a packages are not substitutable:~%~{ ~a~%~}~%"
57 (length missing) missing))
58 (exit (null? missing))))))