iyzsong pushed a commit to branch master
in repository guix.

commit 5b401ed050f8a6efff5a515d497fbb460bd7628c
Author: Michael Rohleder <m...@rohleder.de>
AuthorDate: Sun Feb 14 22:50:37 2021 +0100

    gnu: bpytop: Add phase to install themes.
    
    Reported by bdju in #guix.
    
    * gnu/packages/admin.scm (bpytop)[arguments]: Add install-themes phase.
    
    Signed-off-by: 宋文武 <iyzs...@member.fsf.org>
---
 gnu/packages/admin.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 8dc6a4f..7159575 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -32,7 +32,7 @@
 ;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othac...@gmail.com>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wig...@gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <jann...@gnu.org>
-;;; Copyright © 2020 Michael Rohleder <m...@rohleder.de>
+;;; Copyright © 2020, 2021 Michael Rohleder <m...@rohleder.de>
 ;;; Copyright © 2020 Vincent Legoll <vincent.leg...@gmail.com>
 ;;; Copyright © 2020 Morgan Smith <morgan.j.sm...@outlook.com>
 ;;; Copyright © 2021 Zheng Junjie <873216...@qq.com>
@@ -591,6 +591,18 @@ memory, disks, network and processes.")
     (build-system python-build-system)
     (inputs
      `(("python-psutil" ,python-psutil)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-themes
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((themes (string-append (assoc-ref outputs "out")
+                                          "/lib/python"
+                                          ,(version-major+minor
+                                            (package-version python))
+                                          "/site-packages/bpytop-themes")))
+               (mkdir-p themes)
+               (copy-recursively "bpytop-themes" themes)))))))
     (home-page
      "https://github.com/aristocratos/bpytop";)
     (synopsis "Resource monitor")

Reply via email to