nvidia-system-monitor-qt: init at 1.5 (#202844)

* maintainers: add hacker1024

* nvidia-system-monitor-qt: init at 1.5
This commit is contained in:
hacker1024 2023-08-13 01:55:08 +10:00 committed by GitHub
parent 3c77bc893f
commit dfe2f4cd0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,66 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, qtbase
, wrapQtAppsHook
, makeDesktopItem
, copyDesktopItems
}:
let
# Based in desktop files from official packages:
# https://github.com/congard/nvidia-system-monitor-qt/tree/master/package
desktopItem = makeDesktopItem {
name = "nvidia-system-monitor-qt";
desktopName = "NVIDIA System Monitor";
icon = "qnvsm";
exec = "qnvsm";
categories = [
"System"
"Utility"
"Qt"
];
};
in
stdenv.mkDerivation rec {
pname = "nvidia-system-monitor-qt";
version = "1.5";
src = fetchFromGitHub {
owner = "congard";
repo = "nvidia-system-monitor-qt";
rev = "v${version}";
sha256 = "sha256-VDw5Wp/QFDV1zKF4yz0aR0Hox9KHXZmeAKzKLSlu8Ck=";
};
buildInputs = [ qtbase ];
nativeBuildInputs = [ cmake wrapQtAppsHook copyDesktopItems ];
cmakeFlags = [
"-DIconPath=${placeholder "out"}/share/icons/hicolor/512x512/apps/qnvsm.png"
"-DVersionPrefix=(Nixpkgs)"
];
installPhase = ''
runHook preInstall
install -Dm755 qnvsm $out/bin/qnvsm
install -Dm644 $src/icon.png $out/share/icons/hicolor/512x512/apps/qnvsm.png
runHook postInstall
'';
desktopItems = [ desktopItem ];
meta = rec {
description = "Task Manager for Linux for NVIDIA graphics cards";
homepage = "https://github.com/congard/nvidia-system-monitor-qt";
downloadPage = "${homepage}/releases";
changelog = "${downloadPage}/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hacker1024 ];
mainProgram = "qnvsm";
platforms = lib.platforms.linux;
};
}

View file

@ -24054,6 +24054,8 @@ with pkgs;
nvidia-optical-flow-sdk = callPackage ../development/libraries/nvidia-optical-flow-sdk { };
nvidia-system-monitor-qt = libsForQt5.callPackage ../tools/system/nvidia-system-monitor-qt { };
nvitop = callPackage ../tools/system/nvitop { };
nvtop = callPackage ../tools/system/nvtop { };