nixpkgs/pkgs/tools/misc/gsmartcontrol/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

48 lines
1.5 KiB
Nix

{ fetchurl, lib, stdenv, smartmontools, autoreconfHook, gettext, gtkmm3, pkg-config, wrapGAppsHook3, pcre-cpp, gnome }:
stdenv.mkDerivation rec {
pname = "gsmartcontrol";
version = "1.1.4";
src = fetchurl {
url = "https://github.com/ashaduri/gsmartcontrol/releases/download/v${version}/gsmartcontrol-${version}.tar.bz2";
sha256 = "sha256-/ECfK4qEzEC7ED1sgkAbnUwBgtWjsiPJOVnHrWYZGEc=";
};
patches = [
./fix-paths.patch
];
postPatch = ''
substituteInPlace data/org.gsmartcontrol.policy --replace "/usr/sbin" $out/bin
'';
nativeBuildInputs = [ autoreconfHook gettext pkg-config wrapGAppsHook3 ];
buildInputs = [ gtkmm3 pcre-cpp gnome.adwaita-icon-theme ];
enableParallelBuilding = true;
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH : "${lib.makeBinPath [ smartmontools ]}"
)
'';
meta = {
description = "Hard disk drive health inspection tool";
longDescription = ''
GSmartControl is a graphical user interface for smartctl (from
smartmontools package), which is a tool for querying and controlling
SMART (Self-Monitoring, Analysis, and Reporting Technology) data on
modern hard disk drives.
It allows you to inspect the drive's SMART data to determine its health,
as well as run various tests on it.
'';
homepage = "https://gsmartcontrol.shaduri.dev/";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [qknight];
platforms = with lib.platforms; linux;
};
}