at master 50 lines 1.2 kB view raw
1{ 2 fetchFromGitHub, 3 lib, 4 python3Packages, 5}: 6 7python3Packages.buildPythonApplication rec { 8 pname = "check-systemd"; 9 version = "5.0.0"; 10 pyproject = true; 11 12 src = fetchFromGitHub { 13 owner = "Josef-Friedrich"; 14 repo = "check_systemd"; 15 tag = "v${version}"; 16 hash = "sha256-i9lMF8SZwTxVCQaHQcEWqdKiOQ4ghcp5H/S+frfZXRw="; 17 }; 18 19 postPatch = '' 20 substituteInPlace tests/test_argparse.py \ 21 --replace-fail "./check_systemd.py" "check_systemd" 22 ''; 23 24 build-system = with python3Packages; [ 25 poetry-core 26 ]; 27 28 dependencies = with python3Packages; [ 29 nagiosplugin 30 ]; 31 32 # needs to be able to run check_systemd from PATH 33 preCheck = '' 34 export PATH=$PATH:$out/bin 35 ''; 36 37 nativeCheckInputs = with python3Packages; [ 38 pytestCheckHook 39 ]; 40 41 meta = { 42 changelog = "https://github.com/Josef-Friedrich/check_systemd/releases"; 43 description = "Nagios / Icinga monitoring plugin to check systemd for failed units"; 44 homepage = "https://github.com/Josef-Friedrich/check_systemd"; 45 license = lib.licenses.lgpl2Only; 46 mainProgram = "check_systemd"; 47 maintainers = with lib.maintainers; [ symphorien ]; 48 platforms = lib.platforms.linux; 49 }; 50}