Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

45 lines
1.0 KiB
Nix

{
fetchFromGitHub,
lib,
python3,
smartmontools,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "check-smartmon";
version = "1.0.1";
src = fetchFromGitHub {
owner = "driehuis";
repo = "Nagios_check_smartmon";
tag = version;
sha256 = "tiIeFiHdDgqoeznk9XdCE7owIMnnsQ0fmtj8foFoUD8=";
};
buildInputs = [
(python3.withPackages (pp: [ pp.psutil ]))
smartmontools
];
postPatch = ''
patchShebangs check_smartmon.py
substituteInPlace check_smartmon.py \
--replace-fail '"/usr/sbin/smartctl"' '"${smartmontools}/bin/smartctl"'
'';
installPhase = ''
runHook preInstall
install -Dm 755 check_smartmon.py $out/bin/check_smartmon
runHook postInstall
'';
meta = {
description = "Nagios-Plugin that uses smartmontools to check disk health status and temperature";
mainProgram = "check_smartmon";
homepage = "https://github.com/driehuis/Nagios_check_smartmon";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ mariaa144 ];
};
}