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