Skip to content

Commit

Permalink
Merge pull request NixOS#98374 from knedlsepp/fix-nvtop
Browse files Browse the repository at this point in the history
nvtop: Make independent of Nvidia driver version
  • Loading branch information
WilliButz committed Sep 21, 2020
2 parents 7df8809 + 0996ac6 commit 087fe53
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 10 additions & 6 deletions pkgs/tools/system/nvtop/default.nix
@@ -1,27 +1,31 @@
{ stdenv, fetchFromGitHub, cmake, nvidia_x11, cudatoolkit, ncurses }:
{ stdenv, fetchFromGitHub, cmake, cudatoolkit, ncurses, addOpenGLRunpath }:

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

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

cmakeFlags = [
"-DNVML_INCLUDE_DIRS=${cudatoolkit}/include"
"-DNVML_LIBRARIES=${nvidia_x11}/lib/libnvidia-ml.so"
"-DNVML_LIBRARIES=${cudatoolkit}/targets/x86_64-linux/lib/stubs/libnvidia-ml.so"
"-DCMAKE_BUILD_TYPE=Release"
];

nativeBuildInputs = [ cmake ];
buildInputs = [ ncurses nvidia_x11 cudatoolkit ];
nativeBuildInputs = [ cmake addOpenGLRunpath ];
buildInputs = [ ncurses cudatoolkit ];

postFixup = ''
addOpenGLRunpath $out/bin/nvtop
'';

meta = with stdenv.lib; {
description = "A (h)top like like task monitor for NVIDIA GPUs";
description = "A (h)top like task monitor for NVIDIA GPUs";
homepage = "https://github.com/Syllo/nvtop";
license = licenses.gpl3;
platforms = platforms.linux;
Expand Down
4 changes: 1 addition & 3 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -14607,9 +14607,7 @@ in

nvidia-optical-flow-sdk = callPackage ../development/libraries/nvidia-optical-flow-sdk { };

nvtop = callPackage ../tools/system/nvtop {
nvidia_x11 = linuxPackages.nvidia_x11.override { libsOnly = true; };
};
nvtop = callPackage ../tools/system/nvtop { };

ocl-icd = callPackage ../development/libraries/ocl-icd { };

Expand Down

0 comments on commit 087fe53

Please sign in to comment.