mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 11:53:27 +00:00
dfe2f4cd0f
* maintainers: add hacker1024 * nvidia-system-monitor-qt: init at 1.5
67 lines
1.6 KiB
Nix
67 lines
1.6 KiB
Nix
{ 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;
|
|
};
|
|
}
|