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
50 lines
1.0 KiB
Nix
50 lines
1.0 KiB
Nix
{
|
|
fetchFromGitHub,
|
|
lib,
|
|
python3,
|
|
stdenv,
|
|
sudo,
|
|
zfs,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "check-zfs";
|
|
version = "2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "zlacelle";
|
|
repo = "nagios_check_zfs_linux";
|
|
tag = version;
|
|
sha256 = "gPLCNt6hp4E94s9/PRgsnBN5XXQQ+s2MGcgRFeknXg4=";
|
|
};
|
|
|
|
buildInputs = [
|
|
python3
|
|
zfs
|
|
];
|
|
|
|
postPatch = ''
|
|
patchShebangs check_zfs.py
|
|
substituteInPlace check_zfs.py \
|
|
--replace-fail "'/usr/bin/sudo'" "'${sudo}/bin/sudo'" \
|
|
--replace-fail "'/sbin/zpool'" "'${zfs}/bin/zpool'" \
|
|
--replace-fail "'/sbin/zfs'" "'${zfs}/bin/zfs'"
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm 755 check_zfs.py $out/bin/check_zfs
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Check the health, capacity, fragmentation, and other things for use with Nagios monitoring";
|
|
homepage = "https://github.com/zlacelle/nagios_check_zfs_linux";
|
|
license = lib.licenses.gpl3Only;
|
|
mainProgram = "check_zfs";
|
|
maintainers = with lib.maintainers; [ mariaa144 ];
|
|
};
|
|
}
|