about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2023-08-25 20:01:45 +0200
committerGitHub <noreply@github.com>2023-08-25 20:01:45 +0200
commitc0967315ff3bcc29413e151aa2667b9b66aba4ae (patch)
tree4676462aa1b26f48f1855db36f07118fbd20d784
parent39e95f3c649e1a4e02f9d605e3c372d3a29eb8bd (diff)
parent6a98b124b3a7b92e44deadf5f427f240a4cca445 (diff)
Merge pull request #249600 from anthonyroussel/nvtop_3_0_2
nvtop: 3.0.1 -> 3.0.2
-rw-r--r--pkgs/tools/system/nvtop/default.nix24
-rw-r--r--pkgs/top-level/all-packages.nix26
2 files changed, 38 insertions, 12 deletions
diff --git a/pkgs/tools/system/nvtop/default.nix b/pkgs/tools/system/nvtop/default.nix
index 44ecbd39d4714..1ab520cefac45 100644
--- a/pkgs/tools/system/nvtop/default.nix
+++ b/pkgs/tools/system/nvtop/default.nix
@@ -11,14 +11,15 @@
 , udev
 , addOpenGLRunpath
 , amd ? true
+, intel ? true
+, msm ? true
 , nvidia ? true
 }:
 
 let
-  pname-suffix = if amd && nvidia then "" else if amd then "-amd" else "-nvidia";
   nvidia-postFixup = "addOpenGLRunpath $out/bin/nvtop";
   libPath = lib.makeLibraryPath [ libdrm ncurses udev ];
-  amd-postFixup = ''
+  drm-postFixup = ''
     patchelf \
       --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
       --set-rpath "${libPath}" \
@@ -26,14 +27,14 @@ let
   '';
 in
 stdenv.mkDerivation rec {
-  pname = "nvtop" + pname-suffix;
-  version = "3.0.1";
+  pname = "nvtop";
+  version = "3.0.2";
 
   src = fetchFromGitHub {
     owner = "Syllo";
     repo = "nvtop";
     rev = version;
-    hash = "sha256-vLvt2sankpQWAVZBPo3OePs4LDy7YfVnMkZLfN6ERAc=";
+    hash = "sha256-SHKdjzbc3ZZfOW2p8RLFRKKBfLnO+Z8/bKVxcdLLqxw=";
   };
 
   cmakeFlags = with lib; [
@@ -43,17 +44,19 @@ stdenv.mkDerivation rec {
   ] ++ optional nvidia "-DNVML_INCLUDE_DIRS=${cudatoolkit}/include"
   ++ optional nvidia "-DNVML_LIBRARIES=${cudatoolkit}/targets/x86_64-linux/lib/stubs/libnvidia-ml.so"
   ++ optional (!amd) "-DAMDGPU_SUPPORT=OFF"
+  ++ optional (!intel) "-DINTEL_SUPPORT=OFF"
+  ++ optional (!msm) "-DMSM_SUPPORT=OFF"
   ++ optional (!nvidia) "-DNVIDIA_SUPPORT=OFF"
-  ++ optional amd "-DLibdrm_INCLUDE_DIRS=${libdrm}/lib/stubs/libdrm.so.2"
+  ++ optional (amd || msm) "-DLibdrm_INCLUDE_DIRS=${libdrm}/lib/stubs/libdrm.so.2"
   ;
   nativeBuildInputs = [ cmake gtest ] ++ lib.optional nvidia addOpenGLRunpath;
   buildInputs = with lib; [ ncurses udev ]
     ++ optional nvidia cudatoolkit
-    ++ optional amd libdrm
+    ++ optional (amd || msm) libdrm
   ;
 
   # ordering of fixups is important
-  postFixup = (lib.optionalString amd amd-postFixup) + (lib.optionalString nvidia nvidia-postFixup);
+  postFixup = (lib.optionalString (amd || msm) drm-postFixup) + (lib.optionalString nvidia nvidia-postFixup);
 
   doCheck = true;
 
@@ -66,9 +69,10 @@ stdenv.mkDerivation rec {
   };
 
   meta = with lib; {
-    description = "A (h)top like task monitor for AMD, Intel and NVIDIA GPUs";
+    description = "A (h)top like task monitor for AMD, Adreno, Intel and NVIDIA GPUs";
     longDescription = ''
-      Nvtop stands for Neat Videocard TOP, a (h)top like task monitor for AMD, Intel and NVIDIA GPUs. It can handle multiple GPUs and print information about them in a htop familiar way.
+      Nvtop stands for Neat Videocard TOP, a (h)top like task monitor for AMD, Adreno, Intel and NVIDIA GPUs.
+      It can handle multiple GPUs and print information about them in a htop familiar way.
     '';
     homepage = "https://github.com/Syllo/nvtop";
     changelog = "https://github.com/Syllo/nvtop/releases/tag/${version}";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index b46d8f8ea8afe..9e451ba0c98d8 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -24268,8 +24268,30 @@ with pkgs;
   nvitop = callPackage ../tools/system/nvitop { };
 
   nvtop = callPackage ../tools/system/nvtop { };
-  nvtop-nvidia = callPackage ../tools/system/nvtop { amd = false; };
-  nvtop-amd = callPackage ../tools/system/nvtop { nvidia = false; };
+  nvtop-amd = (callPackage ../tools/system/nvtop {
+    amd = true;
+    intel = false;
+    msm = false;
+    nvidia = false;
+  }).overrideAttrs { pname = "nvtop-amd"; };
+  nvtop-intel = (callPackage ../tools/system/nvtop {
+    amd = false;
+    intel = true;
+    msm = false;
+    nvidia = false;
+  }).overrideAttrs { pname = "nvtop-intel"; };
+  nvtop-msm = (callPackage ../tools/system/nvtop {
+    amd = false;
+    intel = false;
+    msm = true;
+    nvidia = false;
+  }).overrideAttrs { pname = "nvtop-msm"; };
+  nvtop-nvidia = (callPackage ../tools/system/nvtop {
+    amd = false;
+    intel = false;
+    msm = false;
+    nvidia = true;
+  }).overrideAttrs { pname = "nvtop-nvidia"; };
 
   ocl-icd = callPackage ../development/libraries/ocl-icd { };