From 481d66052762c292798e123482e5b8f7358d1876 Mon Sep 17 00:00:00 2001 From: Steve Sprang Date: Tue, 9 Jan 2018 14:10:04 -0800 Subject: package: Improve output appearance when listing packages. * guix/scripts/package.scm (process-query): Use pretty-print-table when listing installed and available packages. Modified-by: Maxim Cournoyer Signed-off-by: Maxim Cournoyer --- guix/scripts/package.scm | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 694959d326..a34ecdcb54 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; Copyright © 2020 Ricardo Wurmus ;;; Copyright © 2020 Simon Tournier +;;; Copyright © 2018 Steve Sprang ;;; ;;; This file is part of GNU Guix. ;;; @@ -831,15 +832,14 @@ processed, #f otherwise." (map profile-manifest profiles))) (installed (manifest-entries manifest))) (leave-on-EPIPE - (for-each (match-lambda - (($ name version output path _) - (when (or (not regexp) - (regexp-exec regexp name)) - (format #t "~a\t~a\t~a\t~a~%" - name (or version "?") output path)))) - - ;; Show most recently installed packages last. - (reverse installed)))) + (let ((rows (filter-map + (match-lambda + (($ name version output path _) + (and (regexp-exec regexp name) + (list name (or version "?") output path)))) + installed))) + ;; Show most recently installed packages last. + (pretty-print-table (reverse rows))))) #t) (('list-available regexp) @@ -862,16 +862,15 @@ processed, #f otherwise." result)) '()))) (leave-on-EPIPE - (for-each (match-lambda - ((name version outputs location) - (format #t "~a\t~a\t~a\t~a~%" - name version - (string-join outputs ",") - (location->string location)))) - (sort available - (match-lambda* - (((name1 . _) (name2 . _)) - (stringstring location)))) + (sort available + (match-lambda* + (((name1 . _) (name2 . _)) + (stringgnu: rocm: Update to 5.1.3....All packages updated at the same time as they have a shared version. rocclr is no longer a stand-alone package, so the previous version is kept as rocclr-4 and the current version is just the source, rocclr-src, needed by rocm-opencl-runtime. * gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch, gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. * gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch, gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch, gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch: Update patches. * gnu/packages/rocm.scm (rocm-cmake, rocm-device-libs, rocm-comgr, roct-thunk-interface, rocr-runtime, rocm-opencl-runtime, rocminfo, rocm-bandwidth-test): Update to 5.1.3. (roct-thunk-interface)[inputs]: Add libdrm. [native-inputs]: Add gcc:lib and pkg-config. (rocclr-src): New variable. (rocclr-4): New variable (previous version of the package). (rocm-opencl-runtime)[source]: Remove obsolete patches. [arguments]: Rewrite with gexps. Add needed #:configure-flags. [inputs]: Remove rocclr, add numactl. Signed-off-by: Ludovic Courtès <ludo@gnu.org> John Kehayias