aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016-2018, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@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/>.

;;; This program replicates the behavior of Cuirass's 'evaluate' process.
;;; It displays the evaluated jobs on the standard output.

(use-modules (guix channels)
             (guix derivations)
             (guix git-download)
             (guix inferior)
             (guix packages)
             (guix store)
             (guix ui)
             ((guix ui) #:select (build-notifier))
             (ice-9 match)
             (ice-9 threads))

(define %top-srcdir
  (and=> (assq-ref (current-source-location) 'filename)
         (lambda (file)
           (canonicalize-path
            (string-append (dirname file) "/../..")))))

(match (command-line)
  ((command directory)
   (let ((real-build-things build-things))
     (with-store store
       ;; Make sure we don't resort to substitutes.
       (set-build-options store
                          #:use-substitutes? #f
                          #:substitute-urls '())

       ;; The evaluation of Guix itself requires building a "trampoline"
       ;; program, and possibly everything it depends on.  Thus, allow builds
       ;; but print a notification.
       (with-build-handler (build-notifier #:use-substitutes? #f)

         ;; Add %TOP-SRCDIR to the store with a proper Git predicate so we
         ;; work from a clean checkout.
         (let ((source (add-to-store store "guix-source" #t
                                     "sha256" %top-srcdir
                                     #:select? (git-predicate %top-srcdir))))
           (define instances
             (list (checkout->channel-instance source)))

           (define channels
             (map channel-instance-channel instances))

           (define derivation
             ;; Compute the derivation of Guix for COMMIT.
             (run-with-store store
               (channel-instances->derivation instances)))

           ;; TODO: Remove 'show-what-to-build' call when Cuirass' 'evaluate'
           ;; scripts uses 'with-build-handler'.
           (show-what-to-build store (list derivation))
           (build-derivations store (list derivation))


           ;; Evaluate jobs on a per-system basis for two reasons.  It speeds
           ;; up the evaluation speed as the evaluations can be performed
           ;; concurrently.  It also decreases the amount of memory needed per
           ;; evaluation process.
           ;;
           ;; Fork inferior processes upfront before we have created any
           ;; threads.
           (let ((inferiors (map (lambda _
                                   (open-inferior (derivation->output-path derivation)))
                                 %cuirass-supported-systems)))
             (n-par-for-each
              (min (length %cuirass-supported-systems)
                   (current-processor-count))
              (lambda (system inferior)
                (with-store store
                  (let ((channels (map channel-instance->sexp instances)))
                    (inferior-eval '(use-modules (gnu ci)) inferior)
                    (let ((jobs
                           (inferior-eval-with-store
                            inferior store
                            `(lambda (store)
                               (cuirass-jobs store
                                             '((subset . all)
                                               (systems . ,(list system))
                                               (channels . ,channels))))))
                          (file
                           (string-append directory "/jobs-" system ".scm")))
                      (close-inferior inferior)
                      (call-with-output-file file
                        (lambda (port)
                          (write jobs port)))))))
              %cuirass-supported-systems
              inferiors)))))))
  (x
   (format (current-error-port) "Wrong command: ~a~%." x)
   (exit 1)))
a href='/guix/commit/?id=7d7ad3c946897014cc1ccb7094382b21a8f7b45c'>gnu: Add python-outcome.Vinicius Monego * gnu/packages/python-xyz.scm (python-outcome): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> 2020-08-09gnu: monero: Update to 0.16.0.3.Guillaume Le Vaillant * gnu/packages/finance.scm (monero): Update to 0.16.0.3. 2020-08-08gnu: lib2geom: Update to commit 17e0d21f.Maxim Cournoyer * gnu/packages/patches/lib2geom-enable-assertions.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Unregister it. * gnu/packages/graphics.scm (lib2geom): Update to commit 17e0d21f0afc8489656f9184bff7ad024a42394a, and remove obsolete patch. 2020-08-08gnu: Add linux-libre@5.8 source and headers.Mark H Weaver Note that this commit adds only the deblobbed source and headers. The kernel packages for 5.8 will be provided in later commit(s). * gnu/packages/linux.scm (deblob-scripts-5.8, linux-libre-5.8-version) (linux-libre-5.8-pristine-source, linux-libre-5.8-source) (linux-libre-headers-5.8): New variables. 2020-08-08gnu: Add python-pep517.Efraim Flashner * gnu/packages/python-xyz.scm (python-pep517): New variable. 2020-08-08gnu: flint: Add a comment about the licence.Tobias Geerinckx-Rice * gnu/packages/algebra.scm (flint): Note the upstream licence change/fix. Reported by Max Horn <max@quendi.de>. 2020-08-08gnu: josm: Update to 16731.Julien Lepiller * gnu/packages/geo.scm (josm): Update to 16731. 2020-08-08gnu: public-inbox: Update to 1.5.0.Arun Isaac * gnu/packages/mail.scm (public-inbox): Update to 1.5.0. 2020-08-08gnu: flint: Update to 2.6.2.Tobias Geerinckx-Rice * gnu/packages/algebra.scm (flint): Update to 2.6.2. 2020-08-08gnu: Add xdialog.Oleg Pykhalov * gnu/packages/xorg.scm (xdialog): New variable. 2020-08-08gnu: Add idesk.Oleg Pykhalov * gnu/packages/wm.scm (idesk): New variable. 2020-08-08gnu: emacs-helm-selector: Update to 0.3.Pierre Neidhardt * gnu/packages/emacs-xyz.scm (emacs-helm-selector): Update to 0.3. 2020-08-08gnu: emacs-emms: Fix build of emms-print-metadata.Pierre Neidhardt * gnu/packages/emacs-xyz.scm (emacs-emms): Inherit from emacs-emms-print-metadata. [inputs]: Add emms-print-metadata. [arguments]: Fix path to emms-print-metadata. 2020-08-08gnu: emacs-csound-mode: Fix typo in description.Pierre Neidhardt * gnu/packages/emacs-xyz.scm (emacs-multi)[description]: Fix sonud -> sound typo. 2020-08-07gnu: emacs-doom-themes: Update to 2.1.6-5.Jack Hill * gnu/packages/emacs-xyz.scm (emacs-doom-themes): Update to 2.1.6-5. [arguments]: Remove disable-breaking-compilation phase. Signed-off-by: Brett Gilio <brettg@gnu.org> 2020-08-07gnu: emacs-telega: Remove comment about libtgvoip linkage.Brett Gilio * gnu/packages/emacs-xyz.scm (emacs-telega)[arguments]: Remove no-longer relevant portions of comment. 2020-08-07gnu: libtgvoip: Fix loading of shared libraries.Diego Nicola Barbato * gnu/packages/telephony.scm (libtgvoip)[arguments]<#:phases>[patch-dlopen]: New phase. Fixes <https://debbugs.gnu.org/40408>. Signed-off-by: Brett Gilio <brettg@gnu.org> 2020-08-07gnu: swi-prolog: Update to 8.3.5.Brett Gilio * gnu/packages/prolog.scm (swi-prolog): Update to 8.3.5. 2020-08-07gnu: linux-libre: Update to 5.7.14.Mark H Weaver * gnu/packages/linux.scm (linux-libre-5.7-version): Update to 5.7.14. (linux-libre-5.7-pristine-source): Update hash. (deblob-scripts-5.7): Update to 5.7.14. 2020-08-07gnu: linux-libre@5.4: Update to 5.4.57.Mark H Weaver * gnu/packages/linux.scm (linux-libre-5.4-version): Update to 5.4.57. (linux-libre-5.4-pristine-source): Update hash. (deblob-scripts-5.4): Update to 5.4.57. 2020-08-07gnu: linux-libre@4.19: Update to 4.19.138.Mark H Weaver * gnu/packages/linux.scm (linux-libre-4.19-version): Update to 4.19.138. (linux-libre-4.19-pristine-source): Update hash. (deblob-scripts-4.19): Update to 4.19.138. 2020-08-07gnu: linux-libre@4.14: Update to 4.14.193.Mark H Weaver * gnu/packages/linux.scm (linux-libre-4.14-version): Update to 4.14.193. (linux-libre-4.14-pristine-source): Update hash. (deblob-scripts-4.14): Update to 4.14.193. 2020-08-07gnu: Add emacs-csound-mode.Brett Gilio * gnu/packages/emacs-xyz.scm (emacs-csound-mode): New variable. 2020-08-07gnu: Add emacs-multi.Brett Gilio * gnu/packages/emacs-xyz.scm (emacs-multi): New variable. 2020-08-07gnu: Add emacs-highlight.Brett Gilio * gnu/packages/emacs-xyz.scm (emacs-highlight): New variable. 2020-08-07gnu: emacs-helm-swoop: Update to 3.0.0.Michael Rohleder * gnu/packages/emacs-xyz.scm (emacs-helm-swoop): Update to 3.0.0. Signed-off-by: Brett Gilio <brettg@gnu.org> 2020-08-07gnu: emacs-cider: Update to 0.26.0.Michael Rohleder * gnu/packages/emacs-xyz.scm (emacs-cider): Update to 0.26.0. Signed-off-by: Brett Gilio <brettg@gnu.org> 2020-08-07Revert "gnu: python-pyfakefs: Update to 4.1.0."Efraim Flashner This update breaks diffoscope. This reverts commit 6ff6912de94c4b707fbf865b871f27f9844a25a8. 2020-08-07gnu: python-astroid: Update to 2.4.2.Efraim Flashner * gnu/packages/python-xyz.scm (python-astroid): Update to 2.4.2. [source]: Add snippet to loosen version requirements of dependants. 2020-08-07gnu: python-lazy-object-proxy: Update to 1.5.1.Efraim Flashner * gnu/packages/python-xyz.scm (python-lazy-object-proxy): Update to 1.5.1. 2020-08-07gnu: python-pyfakefs: Update to 4.1.0.Efraim Flashner * gnu/packages/check.scm (python-pyfakefs.scm): Update to 4.1.0. 2020-08-07gnu: Add hu.dwim.defclass-star.Pierre Neidhardt * gnu/packages/lisp-xyz.scm (cl-hu.dwim.defclass-star, ecl-hu.dwim.defclass-star, sbcl-hu.dwim.defclass-star): New variables. 2020-08-07gnu: Add hu.dwim.common.Pierre Neidhardt * gnu/packages/lisp-xyz.scm (cl-hu.dwim.common, ecl-hu.dwim.common, sbcl-hu.dwim.common): New variables. 2020-08-07gnu: Add hu.dwim.common-lisp.Pierre Neidhardt * gnu/packages/lisp-xyz.scm (cl-hu.dwim.common-lisp, ecl-hu.dwim.common-lisp, sbcl-hu.dwim.common-lisp): New variables. 2020-08-07gnu: clipper: Update to 2.0.Ricardo Wurmus * gnu/packages/bioinformatics.scm (clipper): Update to 2.0. [source]: Remove snippet. [arguments]: Build with Python 3; remove phase "fix-typo", add phase "make-files-writable". [inputs]: Replace all Python 2 variants with Python 3 variants. [native-inputs]: Add python-setuptools-git. 2020-08-07ssh: Really report Guile setup errors in 'send-files'.Ludovic Courtès This is a followup to commit 8f53d73493a2949e2db28cd7d689a690b2d9479a, which did not have the desired effect: the 'resolve-module' call was bound to succeed since the inferior runs 'guix repl'. * guix/ssh.scm (store-import-channel)[import]: Add call to 'resolve-module' and write '(module-error) upon error. Write '(importing) when we're ready. (send-files)[inferior-remote-eval*]: Remove. [missing]: Remove call to 'resolve-module'. Call 'handle-import/export-channel-error' when PORT doesn't return '(importing). (handle-import/export-channel-error): New procedure. (retrieve-files*): Use it. 2020-08-07gnu: emacs-ample-regexps: Update to 0.1-2.Jack Hill * gnu/packages/emacs-xyz.scm (emacs-ample-regexps): Update to 0.1-2. This commit revision adds support for Emacs 27. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2020-08-07gnu: parlatype: Update to 2.1.Nicolas Goaziou * gnu/packages/gnome.scm (parlatype): Update to 2.1.