Commit | Line | Data |
---|---|---|
56fbf262 | 1 | ;;; GNU Guix --- Functional package management for GNU |
0bc02bec | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 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) | |
27 | (gnu packages emacs) | |
28 | (gnu packages make-bootstrap) | |
29 | (srfi srfi-1) | |
e348eaaf LC |
30 | (srfi srfi-26) |
31 | (ice-9 format)) | |
56fbf262 | 32 | |
619c9522 | 33 | (with-store store |
43da8f01 LC |
34 | (parameterize ((%graft? #f)) |
35 | (let* ((native (append-map (lambda (system) | |
36 | (map (cut package-derivation store <> system) | |
37 | (list %bootstrap-tarballs emacs))) | |
78bed82d | 38 | %hydra-supported-systems)) |
43da8f01 LC |
39 | (cross (map (cut package-cross-derivation store |
40 | %bootstrap-tarballs <>) | |
a7e5944e LC |
41 | '("mips64el-linux-gnu" |
42 | "arm-linux-gnueabihf"))) | |
43da8f01 | 43 | (total (append native cross))) |
56fbf262 | 44 | |
8872fc0e LC |
45 | (set-build-options store |
46 | #:use-substitutes? #t | |
47 | #:substitute-urls %default-substitute-urls) | |
e348eaaf LC |
48 | (let* ((total (map derivation->output-path total)) |
49 | (available (substitutable-paths store total)) | |
50 | (missing (lset-difference string=? total available))) | |
51 | (if (null? missing) | |
f1ebeee1 LC |
52 | (format (current-error-port) |
53 | "~a packages found substitutable on~{ ~a~}~%" | |
54 | (length total) %hydra-supported-systems) | |
e348eaaf LC |
55 | (format (current-error-port) |
56 | "~a packages are not substitutable:~%~{ ~a~%~}~%" | |
57 | (length missing) missing)) | |
58 | (exit (null? missing)))))) |