nixpkgs/pkgs/by-name/gs/gsmartcontrol/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

48 lines
1.5 KiB
Nix

{ fetchurl, lib, stdenv, smartmontools, autoreconfHook, gettext, gtkmm3, pkg-config, wrapGAppsHook3, pcre-cpp, adwaita-icon-theme }:
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 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;
};
}