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