This is an automated email from the git hooks/post-receive script.

guix_mirror_bot pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new f1412aefebf gnu: packages: Add nvtop-amd and nvtop-intel.
f1412aefebf is described below

commit f1412aefebf6a0b37b9bac6a149cae4f49b1068d
Author: Joan V. C. <[email protected]>
AuthorDate: Tue Jul 28 18:38:55 2026 +0200

    gnu: packages: Add nvtop-amd and nvtop-intel.
    
    * gnu/packages/admin.scm (nvtop-base, nvtop-amd, nvtop-intel):
      New variables.
    
    Co-authored-by: Ahmad Draidi <[email protected]>
    Merges: https://codeberg.org/guix/guix/pulls/9054
    Signed-off-by: Nguyễn Gia Phong <[email protected]>
---
 gnu/packages/admin.scm | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 46557567f9c..e4ef7781142 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -85,6 +85,8 @@
 ;;; Copyright © 2026 Luis Guilherme Coelho <[email protected]>
 ;;; Copyright © 2026 Andy Tai <[email protected]>
 ;;; Copyright © 2026 marderbot <[email protected]>
+;;; Copyright © 2026 Ahmad Draidi <[email protected]>
+;;; Copyright © 2026 Joan Vilardaga Castro <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1242,6 +1244,86 @@ memory, disks, network and processes.  It's a Python 
port and continuation of
 @command{bashtop}.")
     (license license:asl2.0)))
 
+(define nvtop-base
+  (package
+    (name "nvtop")
+    (version "3.3.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Syllo/nvtop";)
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0b390h0xnjs3kkbbdw789g7pg3zm3xqh90f622mmmkyravskyy63"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:build-type "Release"
+      #:configure-flags #~'("-DBUILD_TESTING=ON"
+                            "-DNVIDIA_SUPPORT=OFF"
+                            "-DAMDGPU_SUPPORT=OFF"
+                            "-DINTEL_SUPPORT=OFF"
+                            "-DMSM_SUPPORT=OFF"
+                            "-DAPPLE_SUPPORT=OFF"
+                            "-DPANFROST_SUPPORT=OFF"
+                            "-DPANTHOR_SUPPORT=OFF"
+                            "-DASCEND_SUPPORT=OFF"
+                            "-DV3D_SUPPORT=OFF"
+                            "-DTPU_SUPPORT=OFF"
+                            "-DROCKCHIP_SUPPORT=OFF"
+                            "-DMETAX_SUPPORT=OFF"
+                            "-DENFLAME_SUPPORT=OFF")))
+    (native-inputs (list googletest pkg-config))
+    (inputs (list ncurses eudev))
+    (home-page "https://github.com/Syllo/nvtop";)
+    (synopsis "GPU & Accelerator process monitoring")
+    (description
+     "A (h)top like task monitor for GPUs and
+accelerators.  It can handle multiple GPUs and print information
+about them in a htop-familiar way.")
+    (license license:gpl3+)))
+
+(define-public nvtop-amd
+  (package
+    (inherit nvtop-base)
+    (name "nvtop-amd")
+    (arguments
+     (substitute-keyword-arguments arguments
+       ((#:configure-flags flags)
+        #~(append #$flags
+                  '("-DAMDGPU_SUPPORT=ON")))
+       ((#:phases phases
+         #~%standard-phases)
+        #~(modify-phases #$phases
+            (add-after 'unpack 'patch-dlopen
+              (lambda* (#:key inputs #:allow-other-keys)
+                (substitute* "src/extract_gpuinfo_amdgpu.c"
+                  (("dlopen\\(\"libdrm\\.so")
+                   (string-append "dlopen(\""
+                                  (search-input-file inputs "/lib/libdrm.so")))
+                  (("dlopen\\(\"libdrm_amdgpu\\.so")
+                   (string-append "dlopen(\""
+                                  (search-input-file inputs
+                                                     
"/lib/libdrm_amdgpu.so"))))))))))
+    (inputs (modify-inputs (package-inputs nvtop-base)
+              (prepend libdrm)))
+    (synopsis "GPU & Accelerator process monitoring (AMDGPU only)")))
+
+(define-public nvtop-intel
+  (package
+    (inherit nvtop-base)
+    (name "nvtop-intel")
+    (arguments
+     (substitute-keyword-arguments arguments
+       ((#:configure-flags flags)
+        #~(append #$flags
+                  '("-DINTEL_SUPPORT=ON")))))
+    (inputs (modify-inputs (package-inputs nvtop-base)
+              (prepend libdrm)))
+    (synopsis "GPU & Accelerator process monitoring (Intel GPUs only)")))
+
 (define-public pies
   (package
     (name "pies")

Reply via email to