diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/system/nvtop/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/system/nvtop/default.nix | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/tools/system/nvtop/default.nix b/nixpkgs/pkgs/tools/system/nvtop/default.nix index 9b3ac780099e..44ecbd39d471 100644 --- a/nixpkgs/pkgs/tools/system/nvtop/default.nix +++ b/nixpkgs/pkgs/tools/system/nvtop/default.nix @@ -6,6 +6,9 @@ , cudatoolkit , libdrm , ncurses +, nvtop +, testers +, udev , addOpenGLRunpath , amd ? true , nvidia ? true @@ -14,7 +17,7 @@ let pname-suffix = if amd && nvidia then "" else if amd then "-amd" else "-nvidia"; nvidia-postFixup = "addOpenGLRunpath $out/bin/nvtop"; - libPath = lib.makeLibraryPath [ libdrm ncurses ]; + libPath = lib.makeLibraryPath [ libdrm ncurses udev ]; amd-postFixup = '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ @@ -24,18 +27,19 @@ let in stdenv.mkDerivation rec { pname = "nvtop" + pname-suffix; - version = "2.0.2"; + version = "3.0.1"; src = fetchFromGitHub { owner = "Syllo"; repo = "nvtop"; rev = version; - sha256 = "sha256-TlhCU7PydzHG/YMlk922mxEJ3CZw40784U0w1YawI3I="; + hash = "sha256-vLvt2sankpQWAVZBPo3OePs4LDy7YfVnMkZLfN6ERAc="; }; cmakeFlags = with lib; [ "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_TESTING=ON" + "-DUSE_LIBUDEV_OVER_LIBSYSTEMD=ON" ] ++ optional nvidia "-DNVML_INCLUDE_DIRS=${cudatoolkit}/include" ++ optional nvidia "-DNVML_LIBRARIES=${cudatoolkit}/targets/x86_64-linux/lib/stubs/libnvidia-ml.so" ++ optional (!amd) "-DAMDGPU_SUPPORT=OFF" @@ -43,7 +47,7 @@ stdenv.mkDerivation rec { ++ optional amd "-DLibdrm_INCLUDE_DIRS=${libdrm}/lib/stubs/libdrm.so.2" ; nativeBuildInputs = [ cmake gtest ] ++ lib.optional nvidia addOpenGLRunpath; - buildInputs = with lib; [ ncurses ] + buildInputs = with lib; [ ncurses udev ] ++ optional nvidia cudatoolkit ++ optional amd libdrm ; @@ -53,14 +57,24 @@ stdenv.mkDerivation rec { doCheck = true; + passthru = { + tests.version = testers.testVersion { + inherit version; + package = nvtop; + command = "nvtop --version"; + }; + }; + meta = with lib; { - description = "A (h)top like task monitor for AMD and NVIDIA GPUs"; + description = "A (h)top like task monitor for AMD, Intel and NVIDIA GPUs"; longDescription = '' - Nvtop stands for Neat Videocard TOP, a (h)top like task monitor for AMD and NVIDIA GPUs. It can handle multiple GPUs and print information about them in a htop familiar way. + Nvtop stands for Neat Videocard TOP, a (h)top like task monitor for AMD, Intel and NVIDIA GPUs. It can handle multiple GPUs and print information about them in a htop familiar way. ''; homepage = "https://github.com/Syllo/nvtop"; - license = licenses.gpl3; + changelog = "https://github.com/Syllo/nvtop/releases/tag/${version}"; + license = licenses.gpl3Only; platforms = platforms.linux; - maintainers = with maintainers; [ willibutz gbtb ]; + maintainers = with maintainers; [ willibutz gbtb anthonyroussel ]; + mainProgram = "nvtop"; }; } |