aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

;;;
;;; Check whether important binaries are available.
;;;

(use-modules (guix store)
             (guix grafts)
             (guix packages)
             (guix derivations)
             (guix ui)
             (gnu packages commencement)
             (ice-9 match)
             (srfi srfi-1)
             (srfi srfi-26))

(define (final-inputs store system)
  "Return the list of outputs directories of the final inputs for SYSTEM."
  (append-map (match-lambda
                ((or (name package) (name package _))
                 (let ((drv (package-derivation store package system)))
                   ;; Libc's 'debug' output refers to gcc-cross-boot0, but it's
                   ;; hard to avoid, so we tolerate it.  This should be the
                   ;; only exception.  Likewise, 'bash:include' depends on
                   ;; bootstrap-binaries via its 'Makefile.inc' (FIXME).
                   (filter-map (match-lambda
                                 (("debug" . directory)
                                  (if (string=? "glibc" (package-name package))
                                      #f
                                      directory))
                                 (("include" . directory)
                                  (if (string=? "bash" (package-name package))
                                      #f
                                      directory))
                                 ((_ . directory) directory))
                               (derivation->output-paths drv)))))
              %final-inputs))

(define (assert-valid-substitute substitute)
  "Make sure SUBSTITUTE does not refer to any bootstrap inputs, and bail out
if it does."
  (let ((references (substitutable-references substitute)))
    (when (any (cut string-contains <> "boot") references)
      (leave (G_ "'~a' refers to bootstrap inputs: ~s~%")
             (substitutable-path substitute) references))))

(define (test-final-inputs store system)
  "Check whether the final inputs for SYSTEM are clean---i.e., they don't
refer to the bootstrap tools."
  (format #t "checking final inputs for '~a'...~%" system)
  (let* ((inputs    (final-inputs store system))
         (available (substitutable-path-info store inputs)))
    (for-each (lambda (dir)
                (unless (find (lambda (substitute)
                                (string=? (substitutable-path substitute)
                                          dir))
                              available)
                  (leave (G_ "~a (system: ~a) has no substitute~%")
                         dir system)))
              inputs)

    (for-each assert-valid-substitute available)))

;; Entry point.
(with-store store
  (parameterize ((%graft? #f))
    (set-build-options store #:use-substitutes? #t)

    (for-each (cut test-final-inputs store <>)
              %cuirass-supported-systems)))
11-24gnu: cmake: Update to 3.19.0....* gnu/packages/cmake.scm (cmake): Update to 3.19.0. [source]: Modify inherited source to adjust the hash as well as the snippet so that the "Utilities/cm3p" sub-directory is preserved. [phases]{patch-bin-sh, check}: Temporarily overrides until the next rebuild cycle. Maxim Cournoyer 2020-11-19gnu: cmake-minimal: Remove some documentation....These files are still available in the user-facing cmake package. * gnu/packages/cmake.scm (cmake-minimal)[arguments]: Add phase to remove help documentation. Efraim Flashner 2020-11-19gnu: cmake: Only build ccmake on user facing cmake....* gnu/packages/cmake.scm (cmake-bootstrap)[inputs]: Remove ncurses. (cmake)[inputs]: Add ncurses. Efraim Flashner 2020-11-08gnu: cmake: Update source URI....* gnu/packages/cmake.scm (cmake-bootstrap)[source]: Update to new source URI. Efraim Flashner 2020-04-20gnu: cmake: Remove "libuv" dependency for the Hurd....* gnu/packages/cmake.scm (cmake-bootstrap)[inputs]: When compiling for the Hurd, remove "libuv". Jan (janneke) Nieuwenhuizen 2020-03-05gnu: CMake: Update to 3.16.5....* gnu/packages/cmake.scm (cmake-bootstrap): Update to 3.16.5. Marius Bakke 2020-02-15gnu: CMake: Update to 3.16.4....* gnu/packages/cmake.scm (cmake-bootstrap): Update to 3.16.4. Marius Bakke 2020-02-15gnu: CMake: Do not use source files from system libarchive....* gnu/packages/cmake.scm (%common-build-phases): Remove phase 'use-system-libarchive'. (%preserved-third-party-files): New variable. (cmake-bootstrap)[native-inputs]: Remove. [source](snippet): Rewrite in terms of FILE-SYSTEM-FOLD, and preserve two files from the bundled libarchive. (cmake-minimal)[source](snippet): Adjust accordingly. Marius Bakke 2020-01-26gnu: cmake: Fix cross-compilation....* gnu/packages/cmake.scm (cmake-bootstrap)[native-inputs]: Move everything except (PACKAGE-SOURCE LIBARCHIVE) ... [inputs]: ... here. * gnu/packages/cmake.scm (cmake-minimal)[native-inputs, inputs]: Adjust accordingly. Marius Bakke 2020-01-26gnu: cmake: Enable debugging information....* gnu/packages/cmake.scm (cmake)[arguments]: Set #:build-type. Marius Bakke 2020-01-26gnu: cmake: Remove bundled LibUV....* gnu/packages/cmake.scm (cmake-minimal)[source](snippet): Delete 'Utilities/cmlibuv'. Marius Bakke 2020-01-26gnu: cmake, cmake-minimal: Use cmake-build-system....This allows removing the bundled LibUV in a subsequent commit. This commit alone makes no functional changes apart from the build system adjustments. * gnu/packages/cmake.scm (%common-build-phases, %common-disabled-tests): New variables. (cmake-bootstrap)[arguments]: Refactor to use the shared phases and tests. (cmake-minimal)[build-system]: Change to CMAKE-BUILD-SYSTEM. [arguments]: Adjust accordingly. (cmake)[arguments]: Likewise. Marius Bakke 2020-01-25gnu: CMake: Remove most bundled libraries....* gnu/packages/cmake.scm (cmake-bootstrap)[source](modules): Add (ice-9 ftw). [source](snippet): Change to a whitelist approach, keeping "jsoncpp" and "libuv". [arguments]: Add phase "use-system-libarchive". Remove substitution of deleted file. [native-inputs]: Add (PACKAGE-SOURCE LIBARCHIVE) [license]: Remove LICENSE:BSD-4 and LICENSE:BSD-2. Marius Bakke 2020-01-25gnu: cmake-minimal: Remove bundled jsoncpp....* gnu/packages/cmake.scm (cmake-minimal)[source](snippet): New field. Purge bundled jsoncpp. [inputs]: Add JSONCPP. [arguments]: Adjust accordingly. * gnu/packages/serialization.scm (jsoncpp)[arguments]: For native builds, use CMAKE-BOOTSTRAP. Marius Bakke 2020-01-25gnu: cmake-minimal-bootstrap: Rename to cmake-bootstrap.......and change the inheritance order while at it, to prepare for the next commit. * gnu/packages/cmake.scm (cmake-minimal): Rename to ... (cmake-bootstrap): ... this. [name]: Set to "cmake-bootstrap". [native-inputs]: Change from CURL to CURL-MINIMAL. (cmake-minimal-bootstrap): Remove variable. (cmake-minimal): New variable, inherits from CMAKE-BOOTSTRAP. * gnu/packages/image.scm (libjpeg-turbo)[arguments]: Change from CMAKE-MINIMAL-BOOTSTRAP to CMAKE-BOOTSTRAP. Marius Bakke 2020-01-25gnu: cmake: Build an optimized executable....* gnu/packages/cmake.scm (cmake-bootstrap)[arguments]: Pass "-DCMAKE_BUILD_TYPE" in #:configure-flags. Marius Bakke 2020-01-22gnu: libjpeg-turbo: Build with a minimal variant of CMake....This is necessary to avoid a circular dependency in the next commit. * gnu/packages/curl.scm (curl-minimal): New public variable. * gnu/packages/cmake.scm (cmake-minimal-bootstrap): New public variable. * gnu/packages/image.scm (libjpeg-turbo)[arguments]: Add #:cmake. Marius Bakke 2020-01-22gnu: cmake: Update to 3.16.3....* gnu/packages/cmake.scm (cmake-minimal): Update to 3.16.3. Marius Bakke 2020-01-15Merge branch 'master' into core-updatesMarius Bakke 2020-01-12gnu: cmake@3.15.5: Honor 'SSL_CERT_DIR' and 'SSL_CERT_FILE'....* gnu/packages/cmake.scm (cmake-3.15.5)[native-search-paths]: New field. Ludovic Courtès 2020-01-12gnu: cmake@3.15.5: Apply "cmake-curl-certificates.patch"....* gnu/packages/cmake.scm (cmake-3.15.5)[source]: Add 'patches' field. (cmake/fixed): Turn into a deprecated alias for CMAKE-3.15.5. Ludovic Courtès