summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliButz <wbutz@cyberfnord.de>2018-07-21 19:04:04 +0200
committerRobin Gloster <mail@glob.in>2018-08-06 22:44:29 +0200
commit354a477f0ffcae9b9edae606f71d3f58f5ea0312 (patch)
tree54033a8a5e2867ef13d639e57af59756fc3afb2c
parentea36b975abb14bde0fbd11a58ad7768680e5823d (diff)
downloadnixlib-354a477f0ffcae9b9edae606f71d3f58f5ea0312.tar
nixlib-354a477f0ffcae9b9edae606f71d3f58f5ea0312.tar.gz
nixlib-354a477f0ffcae9b9edae606f71d3f58f5ea0312.tar.bz2
nixlib-354a477f0ffcae9b9edae606f71d3f58f5ea0312.tar.lz
nixlib-354a477f0ffcae9b9edae606f71d3f58f5ea0312.tar.xz
nixlib-354a477f0ffcae9b9edae606f71d3f58f5ea0312.tar.zst
nixlib-354a477f0ffcae9b9edae606f71d3f58f5ea0312.zip
nvtop: init at 0.2.2
-rw-r--r--pkgs/tools/system/nvtop/default.nix30
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/tools/system/nvtop/default.nix b/pkgs/tools/system/nvtop/default.nix
new file mode 100644
index 000000000000..054de73c080f
--- /dev/null
+++ b/pkgs/tools/system/nvtop/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, cmake, nvidia_x11, cudatoolkit, ncurses }:
+
+stdenv.mkDerivation rec {
+  name = "nvtop-${version}";
+  version = "0.2.2";
+
+  src = fetchFromGitHub {
+    owner = "Syllo";
+    repo  = "nvtop";
+    rev = version;
+    sha256 = "0gampikzmd1l0vdhvarl0hckl6kmjh2rwcllpg6rrm2p75njw7hv";
+  };
+
+  cmakeFlags = [
+    "-DNVML_INCLUDE_DIRS=${cudatoolkit}/include"
+    "-DNVML_LIBRARIES=${nvidia_x11}/lib/libnvidia-ml.so.390.67"
+    "-DCMAKE_BUILD_TYPE=Release"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ ncurses nvidia_x11 cudatoolkit ];
+
+  meta = with stdenv.lib; {
+    description = "A (h)top like like task monitor for NVIDIA GPUs";
+    homepage = https://github.com/Syllo/nvtop;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ willibutz ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 7e94689a3489..8d5ad5d3e8a9 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11174,6 +11174,10 @@ with pkgs;
 
   nvidia-video-sdk = callPackage ../development/libraries/nvidia-video-sdk { };
 
+  nvtop = callPackage ../tools/system/nvtop {
+    nvidia_x11 = linuxPackages.nvidia_x11.override { libsOnly = true; };
+  };
+
   ocl-icd-oclhGen = oclh: callPackage ../development/libraries/ocl-icd { opencl-headers = oclh; };
   ocl-icd-oclh_1_2 = ocl-icd-oclhGen opencl-headers_1_2;
   ocl-icd-oclh_2_2 = ocl-icd-oclhGen opencl-headers_2_2;