diff options
Diffstat (limited to 'guix/status.scm')
-rw-r--r-- | guix/status.scm | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/guix/status.scm b/guix/status.scm index 2928733257..93e119bed1 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +27,7 @@ #:select (nar-uri-abbreviation)) #:use-module (guix store) #:use-module (guix derivations) + #:use-module (guix memoization) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (srfi srfi-19) @@ -229,22 +230,27 @@ build-log\" traces." (and (current-store-protocol-version) (>= (current-store-protocol-version) #x163))) +(define isatty?* + (mlambdaq (port) + (isatty? port))) + (define spin! (let ((steps (circular-list "\\" "|" "/" "-"))) (lambda (port) "Display a spinner on PORT." - (match steps - ((first . rest) - (set! steps rest) - (display "\r\x1b[K" port) - (display first port) - (force-output port)))))) + (when (isatty?* port) + (match steps + ((first . rest) + (set! steps rest) + (display "\r\x1b[K" port) + (display first port) + (force-output port))))))) (define (color-output? port) "Return true if we should write colored output to PORT." (and (not (getenv "INSIDE_EMACS")) (not (getenv "NO_COLOR")) - (isatty? port))) + (isatty?* port))) (define-syntax color-rules (syntax-rules () @@ -312,8 +318,12 @@ on." (G_ "building XDG MIME database...")) ('fonts-dir (G_ "building fonts directory...")) + ('texlive-configuration + (G_ "building TeX Live configuration...")) ('manual-database (G_ "building database for manual pages...")) + ('package-cache ;package cache generated by 'guix pull' + (G_ "building package cache...")) (_ #f))) (define* (print-build-event event old-status status |