summary refs log tree commit diff
path: root/pkgs/tools/system/nvtop/default.nix
blob: 0e7a5d4a3111e4d61e8d82825560da85bcf9a7d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchFromGitHub, cmake, nvidia_x11, cudatoolkit, ncurses }:

stdenv.mkDerivation rec {
  pname = "nvtop";
  version = "1.0.0";

  src = fetchFromGitHub {
    owner = "Syllo";
    repo  = "nvtop";
    rev = version;
    sha256 = "1b6yz54xddip1r0k8cbqg41dpyhds18fj29bj3yf40xvysklb0f4";
  };

  cmakeFlags = [
    "-DNVML_INCLUDE_DIRS=${cudatoolkit}/include"
    "-DNVML_LIBRARIES=${nvidia_x11}/lib/libnvidia-ml.so"
    "-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 ];
  };
}