From 64afc72962a486153f2198812bfb2822e8916aa8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 22 Apr 2021 22:58:03 +0200 Subject: status: Separate downloads upon '--verbosity=2'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a followup to 1fa4aff1fbb46bbb9df8486ca12bfcfe6144458a, reintroducing the newline previously emitted by 'guix substitute' upon download completion. With this change, with '--verbosity=2', each download occupies three lines again, like so: --8<---------------cut here---------------start------------->8--- downloading from https://ci.guix.gnu.org/nar/lzip/…-jsoncpp-1.9.2 ... jsoncpp-1.9.2 93KiB 4.2MiB/s 00:00 [##################] 100.0% --8<---------------cut here---------------end--------------->8--- This makes the output more readable. * guix/status.scm (print-build-event): When PRINT-URLS? is true, print a blank line after the download. --- guix/status.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'guix/status.scm') diff --git a/guix/status.scm b/guix/status.scm index 362ae2882c..5820509b4c 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -552,12 +552,16 @@ substitutes being downloaded." (download-start download) #:transferred transferred)))))) (('substituter-succeeded item _ ...) - ;; If there are no jobs running, we already reported download completion - ;; so there's nothing left to do. - (unless (and (zero? (simultaneous-jobs status)) - (extended-build-trace-supported?)) - (format port (success (G_ "substitution of ~a complete")) item) - (newline port))) + (when (extended-build-trace-supported?) + ;; If there are no jobs running, we already reported download completion + ;; so there's nothing left to do. + (unless (zero? (simultaneous-jobs status)) + (format port (success (G_ "substitution of ~a complete")) item)) + + (when (and print-urls? (zero? (simultaneous-jobs status))) + ;; Leave a blank line after the "downloading ..." line and the + ;; progress bar (that's three lines in total). + (newline port)))) (('substituter-failed item _ ...) (format port (failure (G_ "substitution of ~a failed")) item) (newline port)) -- cgit v1.2.3 From 68228d80dd575f0042d71b4563d82a8fef577a47 Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Sat, 17 Apr 2021 19:06:16 +0200 Subject: profiles: Add hook for Emacs subdirs. * guix/profiles.scm (emacs-subdirs): New variable. (%default-profile-hooks): Add it here. * guix/status.scm (hook-message): Add a message for emacs-subdirs. --- guix/profiles.scm | 41 +++++++++++++++++++++++++++++++++++++++++ guix/status.scm | 2 ++ 2 files changed, 43 insertions(+) (limited to 'guix/status.scm') diff --git a/guix/profiles.scm b/guix/profiles.scm index 67d90532c1..26fe266a61 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1115,6 +1115,46 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx." `((type . profile-hook) (hook . ca-certificate-bundle)))) +(define (emacs-subdirs manifest) + (define build + (with-imported-modules (source-module-closure + '((guix build profiles) + (guix build utils))) + #~(begin + (use-modules (guix build utils) + (guix build profiles) + (ice-9 ftw) ; scandir + (srfi srfi-1) ; append-map + (srfi srfi-26)) + + (let ((destdir (string-append #$output "/share/emacs/site-lisp")) + (subdirs + (append-map + (lambda (dir) + (filter + file-is-directory? + (map (cute string-append dir "/" <>) + (scandir dir (negate (cute member <> '("." ".."))))))) + (filter file-exists? + (map (cute string-append <> "/share/emacs/site-lisp") + '#$(manifest-inputs manifest)))))) + (mkdir-p destdir) + (with-directory-excursion destdir + (call-with-output-file "subdirs.el" + (lambda (port) + (write + `(normal-top-level-add-to-load-path + (list ,@subdirs)) + port) + (newline port) + #t))))))) + (gexp->derivation "emacs-subdirs" build + #:local-build? #t + #:substitutable? #f + #:properties + `((type . profile-hook) + (hook . emacs-subdirs)))) + (define (glib-schemas manifest) "Return a derivation that unions all schemas from manifest entries and creates the Glib 'gschemas.compiled' file." @@ -1672,6 +1712,7 @@ MANIFEST." fonts-dir-file ghc-package-cache-file ca-certificate-bundle + emacs-subdirs glib-schemas gtk-icon-themes gtk-im-modules diff --git a/guix/status.scm b/guix/status.scm index 5820509b4c..97e4ab6284 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -379,6 +379,8 @@ the current build phase." (G_ "building GHC package cache...")) ('ca-certificate-bundle (G_ "building CA certificate bundle...")) + ('emacs-subdirs + (G_ "listing Emacs subdirs...")) ('glib-schemas (G_ "generating GLib schema cache...")) ('gtk-icon-themes -- cgit v1.2.3 From a47f40b30d295f11f4a2a19ca594258ba19c82c7 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 4 May 2021 09:26:54 +0200 Subject: status: Avoid abbreviation in messages. This is a followup to 68228d80dd575f0042d71b4563d82a8fef577a47. * guix/status.scm (hook-message): Spell out "sub-directories". --- guix/status.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix/status.scm') diff --git a/guix/status.scm b/guix/status.scm index 97e4ab6284..1164c2a6e3 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -380,7 +380,7 @@ the current build phase." ('ca-certificate-bundle (G_ "building CA certificate bundle...")) ('emacs-subdirs - (G_ "listing Emacs subdirs...")) + (G_ "listing Emacs sub-directories...")) ('glib-schemas (G_ "generating GLib schema cache...")) ('gtk-icon-themes -- cgit v1.2.3