nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 smartmontools,
6 cmake,
7 gtkmm3,
8 pkg-config,
9 wrapGAppsHook3,
10 pcre-cpp,
11 adwaita-icon-theme,
12}:
13
14stdenv.mkDerivation (finalAttrs: {
15 pname = "gsmartcontrol";
16 version = "2.0.2";
17
18 src = fetchFromGitHub {
19 owner = "ashaduri";
20 repo = "gsmartcontrol";
21 tag = "v${finalAttrs.version}";
22 hash = "sha256-eLzwFZ1PYqijFTxos9Osf7A2v4C8toM+TGV4/bU82NE=";
23 };
24
25 postPatch = ''
26 substituteInPlace data/gsmartcontrol.in.desktop \
27 --replace-fail "@CMAKE_INSTALL_FULL_BINDIR@/" ""
28 '';
29
30 nativeBuildInputs = [
31 cmake
32 pkg-config
33 wrapGAppsHook3
34 ];
35
36 buildInputs = [
37 gtkmm3
38 pcre-cpp
39 adwaita-icon-theme
40 ];
41
42 enableParallelBuilding = true;
43
44 preFixup = ''
45 gappsWrapperArgs+=(
46 --prefix PATH : "${lib.makeBinPath [ smartmontools ]}"
47 )
48 '';
49
50 meta = {
51 description = "Hard disk drive health inspection tool";
52 longDescription = ''
53 GSmartControl is a graphical user interface for smartctl (from
54 smartmontools package), which is a tool for querying and controlling
55 SMART (Self-Monitoring, Analysis, and Reporting Technology) data on
56 modern hard disk drives.
57
58 It allows you to inspect the drive's SMART data to determine its health,
59 as well as run various tests on it.
60 '';
61 homepage = "https://gsmartcontrol.shaduri.dev";
62 mainProgram = "gsmartcontrol";
63 license = lib.licenses.gpl2Plus;
64 maintainers = with lib.maintainers; [ qknight ];
65 platforms = lib.platforms.linux;
66 };
67})