2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, cudatoolkit, ncurses, addOpenGLRunpath }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nvtop";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "1.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Syllo";
|
2020-09-25 04:45:31 +00:00
|
|
|
repo = "nvtop";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2020-12-07 07:45:13 +00:00
|
|
|
sha256 = "1h24ppdz7l6l0znwbgir49f7r1fshzjavc6i5j33c6bvr318dpqb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DNVML_INCLUDE_DIRS=${cudatoolkit}/include"
|
2020-09-25 04:45:31 +00:00
|
|
|
"-DNVML_LIBRARIES=${cudatoolkit}/targets/x86_64-linux/lib/stubs/libnvidia-ml.so"
|
2020-04-24 23:36:52 +00:00
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ cmake addOpenGLRunpath ];
|
|
|
|
buildInputs = [ ncurses cudatoolkit ];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
addOpenGLRunpath $out/bin/nvtop
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "A (h)top like task monitor for NVIDIA GPUs";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/Syllo/nvtop";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ willibutz ];
|
|
|
|
};
|
|
|
|
}
|