nixpkgs-suyu/pkgs/tools/system/nvtop/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
905 B
Nix
Raw Normal View History

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