From a521fec1bf292ba1909a19b15bbc678aae6a5703 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 23:04:07 +0100 Subject: [PATCH 01/15] nagiosPlugins: init from pkgs/servers/monitoring/nagios/plugins --- .../check_esxi_hardware/default.nix} | 0 .../check_openvpn/default.nix} | 2 +- .../check_smartmon/default.nix} | 0 .../check_ssl_cert/default.nix} | 0 .../check_systemd/default.nix} | 0 .../check_uptime/default.nix} | 2 +- .../check_wmi_plus}/default.nix | 2 +- .../check_wmi_plus}/wmiplus_fix_manpage.patch | 0 .../check_zfs/default.nix} | 0 .../monitoring/nagios-plugins/default.nix | 7 ++++++ .../labs_consol_de/default.nix} | 6 ++--- .../monitoring/nagios-plugins/plugins.nix | 14 +++++++++++ pkgs/top-level/aliases.nix | 11 +++++++++ pkgs/top-level/all-packages.nix | 23 ++----------------- 14 files changed, 40 insertions(+), 27 deletions(-) rename pkgs/servers/monitoring/{plugins/esxi.nix => nagios-plugins/check_esxi_hardware/default.nix} (100%) rename pkgs/servers/monitoring/{plugins/openvpn.nix => nagios-plugins/check_openvpn/default.nix} (95%) rename pkgs/servers/monitoring/{nagios/plugins/smartmon.nix => nagios-plugins/check_smartmon/default.nix} (100%) rename pkgs/servers/monitoring/{nagios/plugins/check_ssl_cert.nix => nagios-plugins/check_ssl_cert/default.nix} (100%) rename pkgs/servers/monitoring/{nagios/plugins/check_systemd.nix => nagios-plugins/check_systemd/default.nix} (100%) rename pkgs/servers/monitoring/{plugins/uptime.nix => nagios-plugins/check_uptime/default.nix} (96%) rename pkgs/servers/monitoring/{plugins/wmiplus => nagios-plugins/check_wmi_plus}/default.nix (98%) rename pkgs/servers/monitoring/{plugins/wmiplus => nagios-plugins/check_wmi_plus}/wmiplus_fix_manpage.patch (100%) rename pkgs/servers/monitoring/{nagios/plugins/zfs.nix => nagios-plugins/check_zfs/default.nix} (100%) create mode 100644 pkgs/servers/monitoring/nagios-plugins/default.nix rename pkgs/servers/monitoring/{plugins/labs_consol_de.nix => nagios-plugins/labs_consol_de/default.nix} (95%) create mode 100644 pkgs/servers/monitoring/nagios-plugins/plugins.nix diff --git a/pkgs/servers/monitoring/plugins/esxi.nix b/pkgs/servers/monitoring/nagios-plugins/check_esxi_hardware/default.nix similarity index 100% rename from pkgs/servers/monitoring/plugins/esxi.nix rename to pkgs/servers/monitoring/nagios-plugins/check_esxi_hardware/default.nix diff --git a/pkgs/servers/monitoring/plugins/openvpn.nix b/pkgs/servers/monitoring/nagios-plugins/check_openvpn/default.nix similarity index 95% rename from pkgs/servers/monitoring/plugins/openvpn.nix rename to pkgs/servers/monitoring/nagios-plugins/check_openvpn/default.nix index 1bf6584abfdd..c285a3cd760c 100644 --- a/pkgs/servers/monitoring/plugins/openvpn.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_openvpn/default.nix @@ -1,7 +1,7 @@ { lib, fetchFromGitHub, python3Packages }: python3Packages.buildPythonApplication rec { - pname = "check-openvpn"; + pname = "check_openvpn"; version = "0.0.1"; src = fetchFromGitHub { diff --git a/pkgs/servers/monitoring/nagios/plugins/smartmon.nix b/pkgs/servers/monitoring/nagios-plugins/check_smartmon/default.nix similarity index 100% rename from pkgs/servers/monitoring/nagios/plugins/smartmon.nix rename to pkgs/servers/monitoring/nagios-plugins/check_smartmon/default.nix diff --git a/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix b/pkgs/servers/monitoring/nagios-plugins/check_ssl_cert/default.nix similarity index 100% rename from pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix rename to pkgs/servers/monitoring/nagios-plugins/check_ssl_cert/default.nix diff --git a/pkgs/servers/monitoring/nagios/plugins/check_systemd.nix b/pkgs/servers/monitoring/nagios-plugins/check_systemd/default.nix similarity index 100% rename from pkgs/servers/monitoring/nagios/plugins/check_systemd.nix rename to pkgs/servers/monitoring/nagios-plugins/check_systemd/default.nix diff --git a/pkgs/servers/monitoring/plugins/uptime.nix b/pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix similarity index 96% rename from pkgs/servers/monitoring/plugins/uptime.nix rename to pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix index 04a3ba18aa79..2434599ac1f3 100644 --- a/pkgs/servers/monitoring/plugins/uptime.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook }: stdenv.mkDerivation { - pname = "check-uptime"; + pname = "check_uptime"; version = "20161112"; src = fetchFromGitHub { diff --git a/pkgs/servers/monitoring/plugins/wmiplus/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix similarity index 98% rename from pkgs/servers/monitoring/plugins/wmiplus/default.nix rename to pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix index 5ad284da002c..fc0976116820 100644 --- a/pkgs/servers/monitoring/plugins/wmiplus/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix @@ -3,7 +3,7 @@ , wmic-bin ? null }: stdenv.mkDerivation rec { - pname = "check-wmiplus"; + pname = "check_wmi_plus"; version = "1.65"; # We fetch from github.com instead of the proper upstream as nix-build errors diff --git a/pkgs/servers/monitoring/plugins/wmiplus/wmiplus_fix_manpage.patch b/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/wmiplus_fix_manpage.patch similarity index 100% rename from pkgs/servers/monitoring/plugins/wmiplus/wmiplus_fix_manpage.patch rename to pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/wmiplus_fix_manpage.patch diff --git a/pkgs/servers/monitoring/nagios/plugins/zfs.nix b/pkgs/servers/monitoring/nagios-plugins/check_zfs/default.nix similarity index 100% rename from pkgs/servers/monitoring/nagios/plugins/zfs.nix rename to pkgs/servers/monitoring/nagios-plugins/check_zfs/default.nix diff --git a/pkgs/servers/monitoring/nagios-plugins/default.nix b/pkgs/servers/monitoring/nagios-plugins/default.nix new file mode 100644 index 000000000000..d388c3c58688 --- /dev/null +++ b/pkgs/servers/monitoring/nagios-plugins/default.nix @@ -0,0 +1,7 @@ +{ newScope, pkgs }: + +let + callPackage = newScope (pkgs // plugins); + plugins = import ./plugins.nix { inherit callPackage; }; +in +plugins diff --git a/pkgs/servers/monitoring/plugins/labs_consol_de.nix b/pkgs/servers/monitoring/nagios-plugins/labs_consol_de/default.nix similarity index 95% rename from pkgs/servers/monitoring/plugins/labs_consol_de.nix rename to pkgs/servers/monitoring/nagios-plugins/labs_consol_de/default.nix index 255fd01f71f2..12089090d3bd 100644 --- a/pkgs/servers/monitoring/plugins/labs_consol_de.nix +++ b/pkgs/servers/monitoring/nagios-plugins/labs_consol_de/default.nix @@ -51,7 +51,7 @@ let }; in { - check-mssql-health = generic { + check_mssql_health = generic { pname = "check_mssql_health"; version = "2.6.4.15"; sha256 = "12z0b3c2p18viy7s93r6bbl8fvgsqh80136d07118qhxshp1pwxg"; @@ -59,7 +59,7 @@ in { buildInputs = [ perlPackages.DBDsybase ]; }; - check-nwc-health = generic { + check_nwc_health = generic { pname = "check_nwc_health"; version = "7.10.0.6"; sha256 = "092rhaqnk3403z0y60x38vgh65gcia3wrd6gp8mr7wszja38kxv2"; @@ -67,7 +67,7 @@ in { buildInputs = [ perlPackages.NetSNMP ]; }; - check-ups-health = generic { + check_ups_health = generic { pname = "check_ups_health"; version = "2.8.3.3"; sha256 = "0qc2aglppwr9ms4p53kh9nr48625sqrbn46xs0k9rx5sv8hil9hm"; diff --git a/pkgs/servers/monitoring/nagios-plugins/plugins.nix b/pkgs/servers/monitoring/nagios-plugins/plugins.nix new file mode 100644 index 000000000000..e4adccaa10e0 --- /dev/null +++ b/pkgs/servers/monitoring/nagios-plugins/plugins.nix @@ -0,0 +1,14 @@ +{ callPackage }: + +{ + check_esxi_hardware = callPackage ./check_esxi_hardware { }; + check_openvpn = callPackage ./check_openvpn { }; + check_smartmon = callPackage ./check_smartmon { }; + check_ssl_cert = callPackage ./check_ssl_cert { }; + check_systemd = callPackage ./check_systemd { }; + check_uptime = callPackage ./check_uptime { }; + check_wmi_plus = callPackage ./check_wmi_plus { }; + check_zfs = callPackage ./check_zfs { }; + + inherit (callPackage ./labs_consol_de { }) check_mssql_health check_nwc_health check_ups_health; +} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 972743705c9f..2f54642e3632 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -231,6 +231,17 @@ mapAliases { ccloud-cli = throw "ccloud-cli has been removed, please use confluent-cli instead"; # Added 2023-06-09 certmgr-selfsigned = certmgr; # Added 2023-11-30 challenger = taler-challenger; # Added 2024-09-04 + check_smartmon = throw "'check_smartmon' has been renamed to 'nagiosPlugins.check_smartmon'"; # Added 2024-05-03 + check_systemd = throw "'check_systemd' has been renamed to 'nagiosPlugins.check_systemd'"; # Added 2024-05-03 + check_zfs = throw "'check_zfs' has been renamed to 'nagiosPlugins.check_zfs'"; # Added 2024-05-03 + check-esxi-hardware = throw "'check-esxi-hardware' has been renamed to 'nagiosPlugins.check_esxi_hardware'"; # Added 2024-05-03 + check-mssql-health = throw "'check-mssql-health' has been renamed to 'nagiosPlugins.check_mssql_health'"; # Added 2024-05-03 + check-nwc-health = throw "'check-nwc-health' has been renamed to 'nagiosPlugins.check_nwc_health'"; # Added 2024-05-03 + check-openvpn = throw "'check-openvpn' has been renamed to 'nagiosPlugins.check_openvpn'"; # Added 2024-05-03 + check-ups-health = throw "'check-ups-health' has been renamed to 'nagiosPlugins.check_ups_health'"; # Added 2024-05-03 + check-uptime = throw "'check-uptime' has been renamed to 'nagiosPlugins.check_uptime'"; # Added 2024-05-03 + check-wmiplus = throw "'check-wmiplus' has been renamed to 'nagiosPlugins.check_wmi_plus'"; # Added 2024-05-03 + checkSSLCert = throw "'checkSSLCert' has been renamed to 'nagiosPlugins.check_ssl_cert'"; # Added 2024-05-03 chefdk = throw "chefdk has been removed due to being deprecated upstream by Chef Workstation"; # Added 2023-03-22 chia = throw "chia has been removed. see https://github.com/NixOS/nixpkgs/pull/270254"; # Added 2023-11-30 chia-dev-tools = throw "chia-dev-tools has been removed. see https://github.com/NixOS/nixpkgs/pull/270254"; # Added 2023-11-30 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8630eb31bed5..ee60ffcc5ec1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24965,29 +24965,14 @@ with pkgs; nagios = callPackage ../servers/monitoring/nagios { }; + nagiosPlugins = callPackages ../servers/monitoring/nagios-plugins { }; + monitoring-plugins = callPackage ../servers/monitoring/plugins { }; - inherit (callPackage ../servers/monitoring/plugins/labs_consol_de.nix { }) - check-mssql-health - check-nwc-health - check-ups-health; - - check-openvpn = callPackage ../servers/monitoring/plugins/openvpn.nix { }; - - check_smartmon = callPackage ../servers/monitoring/nagios/plugins/smartmon.nix { }; - - checkSSLCert = callPackage ../servers/monitoring/nagios/plugins/check_ssl_cert.nix { }; - - check_systemd = callPackage ../servers/monitoring/nagios/plugins/check_systemd.nix { }; - - check_zfs = callPackage ../servers/monitoring/nagios/plugins/zfs.nix { }; - neo4j = callPackage ../servers/nosql/neo4j { }; neo4j-desktop = callPackage ../applications/misc/neo4j-desktop { }; - check-esxi-hardware = callPackage ../servers/monitoring/plugins/esxi.nix { }; - net-snmp = callPackage ../servers/monitoring/net-snmp { }; newrelic-sysmond = callPackage ../servers/monitoring/newrelic-sysmond { }; @@ -25278,8 +25263,6 @@ with pkgs; sensu-go-backend sensu-go-cli; - check-wmiplus = callPackage ../servers/monitoring/plugins/wmiplus { }; - shishi = callPackage ../servers/shishi { pam = if stdenv.hostPlatform.isLinux then pam else null; # see also openssl, which has/had this same trick @@ -38627,8 +38610,6 @@ with pkgs; wmic-bin = callPackage ../servers/monitoring/plugins/wmic-bin.nix { }; - check-uptime = callPackage ../servers/monitoring/plugins/uptime.nix { }; - ghc-standalone-archive = callPackage ../os-specific/darwin/ghc-standalone-archive { }; vdr = callPackage ../applications/video/vdr { }; From bfe3013989b96f1fa4665bd26974db3774e0ab43 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 22:55:16 +0100 Subject: [PATCH 02/15] nagiosPlugins.check_systemd: format with nixfmt-rfc-style --- .../nagios-plugins/check_systemd/default.nix | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_systemd/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_systemd/default.nix index fe1500d53f54..8ca3de991cb1 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_systemd/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_systemd/default.nix @@ -1,4 +1,8 @@ -{ fetchFromGitHub, python3Packages, lib }: +{ + fetchFromGitHub, + lib, + python3Packages, +}: python3Packages.buildPythonApplication rec { pname = "check_systemd"; @@ -7,11 +11,13 @@ python3Packages.buildPythonApplication rec { src = fetchFromGitHub { owner = "Josef-Friedrich"; repo = pname; - rev = "v${version}"; + rev = "refs/tags/v${version}"; sha256 = "11sc0gycxzq1vfvin501jnwnky2ky6ns64yjiw8vq9vmkbf8nni6"; }; - propagatedBuildInputs = with python3Packages; [ nagiosplugin ]; + dependencies = with python3Packages; [ + nagiosplugin + ]; postInstall = '' # check_systemd is only a broken stub calling check_systemd.py @@ -24,15 +30,18 @@ python3Packages.buildPythonApplication rec { find test -name "*.py" -execdir sed -i "s@./check_systemd.py@$out/bin/check_systemd@" '{}' ";" export PATH=$PATH:$out/bin ''; - nativeCheckInputs = [ python3Packages.pytestCheckHook ]; - meta = with lib; { - description = "Nagios / Icinga monitoring plugin to check systemd for failed units"; - mainProgram = "check_systemd"; - inherit (src.meta) homepage; + nativeCheckInputs = with python3Packages; [ + pytestCheckHook + ]; + + meta = { changelog = "https://github.com/Josef-Friedrich/check_systemd/releases"; - maintainers = with maintainers; [ symphorien ]; - license = licenses.lgpl2Only; - platforms = platforms.linux; + description = "Nagios / Icinga monitoring plugin to check systemd for failed units"; + homepage = "https://github.com/Josef-Friedrich/check_systemd"; + license = lib.licenses.lgpl2Only; + mainProgram = "check_systemd"; + maintainers = with lib.maintainers; [ symphorien ]; + platforms = lib.platforms.linux; }; } From 1b96b4289ec43563c0abdf88c907498dba42f732 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 23:00:34 +0100 Subject: [PATCH 03/15] nagiosPlugins.check_zfs: format with nixfmt-rfc-style --- .../nagios-plugins/check_zfs/default.nix | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_zfs/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_zfs/default.nix index 0ec84722d201..bb0187543fc2 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_zfs/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_zfs/default.nix @@ -1,30 +1,34 @@ -{ lib -, stdenv -, fetchFromGitHub -, python3 -, zfs -, sudo +{ + fetchFromGitHub, + lib, + python3, + stdenv, + sudo, + zfs, }: stdenv.mkDerivation rec { - pname = "check_zfs"; + pname = "check-zfs"; version = "2.0"; src = fetchFromGitHub { owner = "zlacelle"; repo = "nagios_check_zfs_linux"; - rev = version; + rev = "refs/tags/${version}"; sha256 = "gPLCNt6hp4E94s9/PRgsnBN5XXQQ+s2MGcgRFeknXg4="; }; - buildInputs = [ python3 zfs sudo ]; + buildInputs = [ + python3 + zfs + ]; postPatch = '' patchShebangs check_zfs.py substituteInPlace check_zfs.py \ - --replace "'/usr/bin/sudo'" "'${sudo}/bin/sudo'" \ - --replace "'/sbin/zpool'" "'${zfs}/bin/zpool'" \ - --replace "'/sbin/zfs'" "'${zfs}/bin/zfs'" + --replace-fail "'/usr/bin/sudo'" "'${sudo}/bin/sudo'" \ + --replace-fail "'/sbin/zpool'" "'${zfs}/bin/zpool'" \ + --replace-fail "'/sbin/zfs'" "'${zfs}/bin/zfs'" ''; installPhase = '' @@ -35,11 +39,11 @@ stdenv.mkDerivation rec { runHook postInstall ''; - meta = with lib; { + meta = { description = "Check the health, capacity, fragmentation, and other things for use with Nagios monitoring"; - mainProgram = "check_zfs"; homepage = "https://github.com/zlacelle/nagios_check_zfs_linux"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ mariaa144 ]; + license = lib.licenses.gpl3Only; + mainProgram = "check_zfs"; + maintainers = with lib.maintainers; [ mariaa144 ]; }; } From 96cf86c9bc8bf9714771778084f81ca67ccae58f Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 23:01:30 +0100 Subject: [PATCH 04/15] nagiosPlugins.check_smartmon: format with nixfmt-rfc-style --- .../nagios-plugins/check_smartmon/default.nix | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_smartmon/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_smartmon/default.nix index ddf13f97a58c..6d658b00803c 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_smartmon/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_smartmon/default.nix @@ -1,18 +1,19 @@ -{ lib -, stdenv -, fetchFromGitHub -, python3 -, smartmontools +{ + fetchFromGitHub, + lib, + python3, + smartmontools, + stdenv, }: stdenv.mkDerivation rec { - pname = "check_smartmon"; + pname = "check-smartmon"; version = "1.0.1"; src = fetchFromGitHub { - owner = "driehuis"; - repo = "Nagios_check_smartmon"; - rev = version; + owner = "driehuis"; + repo = "Nagios_check_smartmon"; + rev = "refs/tags/${version}"; sha256 = "tiIeFiHdDgqoeznk9XdCE7owIMnnsQ0fmtj8foFoUD8="; }; @@ -24,7 +25,7 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs check_smartmon.py substituteInPlace check_smartmon.py \ - --replace '"/usr/sbin/smartctl"' '"${smartmontools}/bin/smartctl"' + --replace-fail '"/usr/sbin/smartctl"' '"${smartmontools}/bin/smartctl"' ''; installPhase = '' @@ -33,11 +34,11 @@ stdenv.mkDerivation rec { runHook postInstall ''; - meta = with lib; { + 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 = licenses.gpl2Plus; - maintainers = with maintainers; [ mariaa144 ]; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ mariaa144 ]; }; } From 1d8986b021e81fee962c6da835046d1ba0170ad2 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 23:03:16 +0100 Subject: [PATCH 05/15] nagiosPlugins.check_ssl_cert: format with nixfmt-rfc-style --- .../nagios-plugins/check_ssl_cert/default.nix | 67 ++++++++++++------- 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_ssl_cert/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_ssl_cert/default.nix index a8043d57148a..c31f28dbfdc9 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_ssl_cert/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_ssl_cert/default.nix @@ -1,18 +1,19 @@ -{ lib -, stdenv -, bc -, bind # host and dig binary -, coreutils # date and timeout binary -, curl -, fetchFromGitHub -, file -, iproute2 -, makeWrapper -, netcat-gnu -, nmap -, openssl -, python3 -, which +{ + bc, + bind, + coreutils, + curl, + fetchFromGitHub, + file, + iproute2, + lib, + makeWrapper, + netcat-gnu, + nmap, + openssl, + python3, + stdenv, + which, }: stdenv.mkDerivation rec { @@ -26,9 +27,7 @@ stdenv.mkDerivation rec { hash = "sha256-HVif2pjVumrf2YFSHbNiL9pfXy8XNeXHRgaIlx/Tzds="; }; - nativeBuildInputs = [ - makeWrapper - ]; + nativeBuildInputs = [ makeWrapper ]; makeFlags = [ "DESTDIR=$(out)/bin" @@ -37,16 +36,32 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram $out/bin/check_ssl_cert \ - --prefix PATH : "${lib.makeBinPath ([ openssl file which curl bc coreutils bind nmap netcat-gnu python3 ] ++ lib.optional stdenv.hostPlatform.isLinux iproute2) }" + --prefix PATH : "${ + lib.makeBinPath ( + [ + bc + bind # host and dig binary + coreutils # date and timeout binary + curl + file + netcat-gnu + nmap + openssl + python3 + which + ] + ++ lib.optional stdenv.hostPlatform.isLinux iproute2 + ) + }" ''; - meta = with lib; { - description = "Nagios plugin to check the CA and validity of an X.509 certificate"; - mainProgram = "check_ssl_cert"; - homepage = "https://github.com/matteocorti/check_ssl_cert"; + meta = { changelog = "https://github.com/matteocorti/check_ssl_cert/releases/tag/v${version}"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ fab ]; - platforms = platforms.all; + description = "Nagios plugin to check the CA and validity of an X.509 certificate"; + homepage = "https://github.com/matteocorti/check_ssl_cert"; + license = lib.licenses.gpl3Plus; + mainProgram = "check_ssl_cert"; + maintainers = with lib.maintainers; [ fab ]; + platforms = lib.platforms.all; }; } From e81cfdb20ba3d23a3bf326d80d904ec6b12103d9 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 23:18:14 +0100 Subject: [PATCH 06/15] nagiosPlugins.check_systemd: 2.3.1 -> 4.1.0 https://github.com/Josef-Friedrich/check_systemd/compare/v2.3.1...v4.1.0 --- .../nagios-plugins/check_systemd/default.nix | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_systemd/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_systemd/default.nix index 8ca3de991cb1..40a7fb7a2f5c 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_systemd/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_systemd/default.nix @@ -5,29 +5,32 @@ }: python3Packages.buildPythonApplication rec { - pname = "check_systemd"; - version = "2.3.1"; + pname = "check-systemd"; + version = "4.1.0"; + pyproject = true; src = fetchFromGitHub { owner = "Josef-Friedrich"; - repo = pname; + repo = "check_systemd"; rev = "refs/tags/v${version}"; - sha256 = "11sc0gycxzq1vfvin501jnwnky2ky6ns64yjiw8vq9vmkbf8nni6"; + hash = "sha256-1e1WtWRTmOxozuOP2ndfsozuiy9LCT/Lsvb+yKH+8eY="; }; + postPatch = '' + substituteInPlace tests/test_argparse.py \ + --replace-fail "./check_systemd.py" "check_systemd" + ''; + + build-system = with python3Packages; [ + poetry-core + ]; + dependencies = with python3Packages; [ nagiosplugin ]; - postInstall = '' - # check_systemd is only a broken stub calling check_systemd.py - mv $out/bin/check_systemd{.py,} - ''; - - # the test scripts run ./check_systemd.py and check_systemd. Patch to - # the installed, patchShebanged executable in $out/bin + # needs to be able to run check_systemd from PATH preCheck = '' - find test -name "*.py" -execdir sed -i "s@./check_systemd.py@$out/bin/check_systemd@" '{}' ";" export PATH=$PATH:$out/bin ''; From 82d261a67dccedc793bde8825ed2f1b40d74a693 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 23:58:24 +0100 Subject: [PATCH 07/15] nagiosPlugins.check_esxi_hardware: format with nixfmt-rfc-style --- .../check_esxi_hardware/default.nix | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_esxi_hardware/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_esxi_hardware/default.nix index 85192c0174d1..b54198a132bc 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_esxi_hardware/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_esxi_hardware/default.nix @@ -1,37 +1,44 @@ -{ lib, fetchFromGitHub, python3Packages }: +{ + lib, + fetchFromGitHub, + python3Packages, +}: -let - bName = "check_esxi_hardware"; - -in python3Packages.buildPythonApplication rec { - pname = lib.replaceStrings [ "_" ] [ "-" ] bName; +python3Packages.buildPythonApplication rec { + pname = "check_esxi_hardware"; version = "20200710"; format = "other"; src = fetchFromGitHub { - owner = "Napsty"; - repo = bName; - rev = version; + owner = "Napsty"; + repo = "check_esxi_hardware"; + rev = "refs/tags/${version}"; sha256 = "EC6np/01S+5SA2H9z5psJ9Pq/YoEyGdHL9wHUKKsNas="; }; dontBuild = true; + + dependencies = with python3Packages; [ + pywbem + requests + setuptools + ]; + doCheck = false; installPhase = '' runHook preInstall - install -Dm755 ${bName}.py $out/bin/${bName} + install -Dm755 check_esxi_hardware.py $out/bin/check_esxi_hardware install -Dm644 -t $out/share/doc/${pname} README.md runHook postInstall ''; - propagatedBuildInputs = with python3Packages; [ pywbem requests setuptools ]; - - meta = with lib; { + meta = { homepage = "https://www.claudiokuenzler.com/nagios-plugins/"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ peterhoeg ]; + license = lib.licenses.gpl2Plus; + mainProgram = "check_esxi_hardware"; + maintainers = with lib.maintainers; [ peterhoeg ]; }; } From 7d7546cf420d3c2c5fd5e3734d335f8f898e6faa Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 23:58:42 +0100 Subject: [PATCH 08/15] nagiosPlugins.check_openvpn: format --- .../nagios-plugins/check_openvpn/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_openvpn/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_openvpn/default.nix index c285a3cd760c..6fec9f0f0077 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_openvpn/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_openvpn/default.nix @@ -1,7 +1,11 @@ -{ lib, fetchFromGitHub, python3Packages }: +{ + lib, + fetchFromGitHub, + python3Packages, +}: python3Packages.buildPythonApplication rec { - pname = "check_openvpn"; + pname = "check-openvpn"; version = "0.0.1"; src = fetchFromGitHub { @@ -14,10 +18,10 @@ python3Packages.buildPythonApplication rec { # no tests doCheck = false; - meta = with lib; { + meta = { description = "Nagios/icinga/sensu check plugin for OpenVPN"; + license = lib.licenses.mit; mainProgram = "check_openvpn"; - license = licenses.mit; - maintainers = with maintainers; [ peterhoeg ]; + maintainers = with lib.maintainers; [ peterhoeg ]; }; } From 548a22da048390aabfeda21c7c7d4915077821f5 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 23:59:27 +0100 Subject: [PATCH 09/15] nagiosPlugins.check_uptime: format with nixfmt-rfc-style --- .../nagios-plugins/check_uptime/default.nix | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix index 2434599ac1f3..8b16f38ccdd5 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix @@ -1,13 +1,18 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook }: +{ + autoreconfHook, + fetchFromGitHub, + lib, + stdenv, +}: stdenv.mkDerivation { pname = "check_uptime"; version = "20161112"; src = fetchFromGitHub { - owner = "madrisan"; - repo = "nagios-plugins-uptime"; - rev = "51822dacd1d404b3eabf3b4984c64b2475ed6f3b"; + owner = "madrisan"; + repo = "nagios-plugins-uptime"; + rev = "51822dacd1d404b3eabf3b4984c64b2475ed6f3b"; sha256 = "18q9ibzqn97dsyr9xs3w9mqk80nmmfw3kcjidrdsj542amlsycyk"; }; @@ -17,10 +22,11 @@ stdenv.mkDerivation { postInstall = "ln -sr $out/libexec $out/bin"; - meta = with lib; { + meta = { description = "Uptime check plugin for Sensu/Nagios/others"; - homepage = "https://github.com/madrisan/nagios-plugins-uptime"; - license = licenses.gpl3; - maintainers = with maintainers; [ peterhoeg ]; + homepage = "https://github.com/madrisan/nagios-plugins-uptime"; + license = lib.licenses.gpl3; + mainProgram = "check_uptime"; + maintainers = with lib.maintainers; [ peterhoeg ]; }; } From 859502142082b319e0758b22399a099d6bc340f4 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 23:59:44 +0100 Subject: [PATCH 10/15] nagiosPlugins.check_wmi_plus: format with nixfmt-rfc-style --- .../nagios-plugins/check_wmi_plus/default.nix | 69 +++++++++++++------ 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix index fc0976116820..2c0ee634c2a6 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix @@ -1,9 +1,16 @@ -{ lib, stdenv, fetchFromGitHub, makeWrapper, perlPackages, txt2man -, monitoring-plugins -, wmic-bin ? null }: +{ + fetchFromGitHub, + lib, + makeWrapper, + monitoring-plugins, + perlPackages, + stdenv, + txt2man, + wmic-bin ? null, +}: stdenv.mkDerivation rec { - pname = "check_wmi_plus"; + pname = "check-wmi-plus"; version = "1.65"; # We fetch from github.com instead of the proper upstream as nix-build errors @@ -11,24 +18,45 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "speartail"; repo = "checkwmiplus"; - rev = "v${version}"; + rev = "refs/tags/v${version}"; sha256 = "1as0iyhy4flpm37mb7lvah7rnd6ax88appjm1icwhy7iq03wi8pl"; }; - patches = [ - ./wmiplus_fix_manpage.patch - ]; + patches = [ ./wmiplus_fix_manpage.patch ]; propagatedBuildInputs = with perlPackages; [ - BHooksEndOfScope ClassDataInheritable ClassInspector ClassSingleton - ConfigIniFiles DateTime DateTimeLocale DateTimeTimeZone DevelStackTrace - EvalClosure ExceptionClass FileShareDir ModuleImplementation ModuleRuntime - MROCompat namespaceautoclean namespaceclean NumberFormat PackageStash - ParamsValidate ParamsValidationCompiler RoleTiny Specio - SubExporterProgressive SubIdentify TryTiny + BHooksEndOfScope + ClassDataInheritable + ClassInspector + ClassSingleton + ConfigIniFiles + DateTime + DateTimeLocale + DateTimeTimeZone + DevelStackTrace + EvalClosure + ExceptionClass + FileShareDir + ModuleImplementation + ModuleRuntime + MROCompat + namespaceautoclean + namespaceclean + NumberFormat + PackageStash + ParamsValidate + ParamsValidationCompiler + RoleTiny + Specio + SubExporterProgressive + SubIdentify + TryTiny ]; - nativeBuildInputs = [ makeWrapper txt2man ]; + nativeBuildInputs = [ + makeWrapper + txt2man + ]; dontConfigure = true; dontBuild = true; @@ -36,11 +64,11 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace check_wmi_plus.pl \ - --replace /usr/bin/wmic ${wmic-bin}/bin/wmic \ - --replace /etc/check_wmi_plus $out/etc/check_wmi_plus \ - --replace /opt/nagios/bin/plugins $out/etc/check_wmi_plus \ - --replace /usr/lib/nagios/plugins ${monitoring-plugins}/libexec \ - --replace '$base_dir/check_wmi_plus_help.pl' "$out/bin/check_wmi_plus_help.pl" + --replace-fail /usr/bin/wmic ${wmic-bin}/bin/wmic \ + --replace-fail /etc/check_wmi_plus $out/etc/check_wmi_plus \ + --replace-fail /opt/nagios/bin/plugins $out/etc/check_wmi_plus \ + --replace-fail /usr/lib/nagios/plugins ${monitoring-plugins}/libexec \ + --replace-fail '$base_dir/check_wmi_plus_help.pl' "$out/bin/check_wmi_plus_help.pl" for f in *.pl ; do substituteInPlace $f --replace /usr/bin/perl ${perlPackages.perl}/bin/perl @@ -72,6 +100,7 @@ stdenv.mkDerivation rec { description = "Sensu/nagios plugin using WMI to query Windows hosts"; homepage = "http://edcint.co.nz/checkwmiplus"; license = licenses.gpl2Plus; + mainProgram = "check_wmi_plus"; maintainers = with maintainers; [ peterhoeg ]; }; } From 6dd98fa5038c92adc3aa3f76d3a34591f8ecfe87 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 25 Mar 2024 00:14:20 +0100 Subject: [PATCH 11/15] nagiosPlugins.labs_consol_de: format with nixfmt-rfc-style --- .../nagios-plugins/labs_consol_de/default.nix | 127 +++++++++++------- 1 file changed, 75 insertions(+), 52 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/labs_consol_de/default.nix b/pkgs/servers/monitoring/nagios-plugins/labs_consol_de/default.nix index 12089090d3bd..0a421e95b976 100644 --- a/pkgs/servers/monitoring/nagios-plugins/labs_consol_de/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/labs_consol_de/default.nix @@ -1,76 +1,99 @@ -{ lib, stdenv, fetchFromGitHub, fetchurl, autoreconfHook, makeWrapper -, perlPackages, coreutils, gnused, gnugrep }: +{ + autoreconfHook, + coreutils, + fetchFromGitHub, + fetchurl, + gnugrep, + gnused, + lib, + makeWrapper, + perlPackages, + stdenv, +}: let glplugin = fetchFromGitHub { owner = "lausser"; - repo = "GLPlugin"; - rev = "ef3107f01afe55fad5452e64ac5bbea00b18a8d5"; + repo = "GLPlugin"; + rev = "ef3107f01afe55fad5452e64ac5bbea00b18a8d5"; sha256 = "047fwrycsl2vmpi4wl46fs6f8y191d6qc9ms5rvmrj1dm2r828ws"; }; - generic = { pname, version, sha256, description, buildInputs, ... }: - stdenv.mkDerivation { - inherit pname version; + generic = + { + pname, + version, + sha256, + description, + buildInputs, + }: + stdenv.mkDerivation { + inherit pname version; - src = fetchurl { - url = "https://labs.consol.de/assets/downloads/nagios/${pname}-${version}.tar.gz"; - inherit sha256; + src = fetchurl { + url = "https://labs.consol.de/assets/downloads/nagios/${pname}-${version}.tar.gz"; + inherit sha256; + }; + + buildInputs = [ perlPackages.perl ] ++ buildInputs; + + nativeBuildInputs = [ + autoreconfHook + makeWrapper + ]; + + prePatch = '' + rm -rf GLPlugin + ln -s ${glplugin} GLPlugin + substituteInPlace plugins-scripts/Makefile.am \ + --replace-fail /bin/cat ${lib.getExe' coreutils "cat"} \ + --replace-fail /bin/echo ${lib.getExe' coreutils "echo"} \ + --replace-fail /bin/grep ${lib.getExe gnugrep} \ + --replace-fail /bin/sed ${lib.getExe gnused} + ''; + + postInstall = '' + if [[ -d $out/libexec ]]; then + ln -sr $out/libexec $out/bin + fi + ''; + + postFixup = '' + for f in $out/bin/* ; do + wrapProgram $f --prefix PERL5LIB : $PERL5LIB + done + ''; + + meta = { + homepage = "https://labs.consol.de/"; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ peterhoeg ]; + inherit description; + }; }; - buildInputs = [ perlPackages.perl ] ++ buildInputs; - - nativeBuildInputs = [ autoreconfHook makeWrapper ]; - - prePatch = '' - rm -rf GLPlugin - ln -s ${glplugin} GLPlugin - substituteInPlace plugins-scripts/Makefile.am \ - --replace /bin/cat ${lib.getBin coreutils}/bin/cat \ - --replace /bin/echo ${lib.getBin coreutils}/bin/echo \ - --replace /bin/grep ${lib.getBin gnugrep}/bin/grep \ - --replace /bin/sed ${lib.getBin gnused}/bin/sed - ''; - - postInstall = '' - test -d $out/libexec && ln -sr $out/libexec $out/bin - ''; - - postFixup = '' - for f in $out/bin/* ; do - wrapProgram $f --prefix PERL5LIB : $PERL5LIB - done - ''; - - meta = { - homepage = "https://labs.consol.de/"; - license = lib.licenses.gpl2Only; - maintainers = with lib.maintainers; [ peterhoeg ]; - inherit description; - }; - }; - -in { +in +{ check_mssql_health = generic { - pname = "check_mssql_health"; - version = "2.6.4.15"; - sha256 = "12z0b3c2p18viy7s93r6bbl8fvgsqh80136d07118qhxshp1pwxg"; + pname = "check-mssql-health"; + version = "2.6.4.15"; + sha256 = "12z0b3c2p18viy7s93r6bbl8fvgsqh80136d07118qhxshp1pwxg"; description = "Check plugin for Microsoft SQL Server"; buildInputs = [ perlPackages.DBDsybase ]; }; check_nwc_health = generic { - pname = "check_nwc_health"; - version = "7.10.0.6"; - sha256 = "092rhaqnk3403z0y60x38vgh65gcia3wrd6gp8mr7wszja38kxv2"; + pname = "check-nwc-health"; + version = "7.10.0.6"; + sha256 = "092rhaqnk3403z0y60x38vgh65gcia3wrd6gp8mr7wszja38kxv2"; description = "Check plugin for network equipment"; buildInputs = [ perlPackages.NetSNMP ]; }; check_ups_health = generic { - pname = "check_ups_health"; - version = "2.8.3.3"; - sha256 = "0qc2aglppwr9ms4p53kh9nr48625sqrbn46xs0k9rx5sv8hil9hm"; + pname = "check-ups-health"; + version = "2.8.3.3"; + sha256 = "0qc2aglppwr9ms4p53kh9nr48625sqrbn46xs0k9rx5sv8hil9hm"; description = "Check plugin for UPSs"; buildInputs = [ perlPackages.NetSNMP ]; }; From 8715f2d25ba41d1c4f784e51de194d5b96b70b48 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 25 Mar 2024 00:19:58 +0100 Subject: [PATCH 12/15] nagiosPlugins.check_esxi_hardware: 20200710 -> 20221230 https://github.com/Napsty/check_esxi_hardware/compare/20200710...20221230 --- .../nagios-plugins/check_esxi_hardware/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_esxi_hardware/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_esxi_hardware/default.nix index b54198a132bc..8d5c94fb17aa 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_esxi_hardware/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_esxi_hardware/default.nix @@ -5,15 +5,15 @@ }: python3Packages.buildPythonApplication rec { - pname = "check_esxi_hardware"; - version = "20200710"; + pname = "check-esxi-hardware"; + version = "20221230"; format = "other"; src = fetchFromGitHub { owner = "Napsty"; repo = "check_esxi_hardware"; rev = "refs/tags/${version}"; - sha256 = "EC6np/01S+5SA2H9z5psJ9Pq/YoEyGdHL9wHUKKsNas="; + hash = "sha256-u0LklUrzj92mzSzD61C/lxA37bx6nWlRzE1+1fcTL14="; }; dontBuild = true; @@ -36,7 +36,8 @@ python3Packages.buildPythonApplication rec { ''; meta = { - homepage = "https://www.claudiokuenzler.com/nagios-plugins/"; + homepage = "https://github.com/Napsty/check_esxi_hardware"; + changelog = "https://github.com/Napsty/check_esxi_hardware/releases/tag/${version}"; license = lib.licenses.gpl2Plus; mainProgram = "check_esxi_hardware"; maintainers = with lib.maintainers; [ peterhoeg ]; From ca12846a5903bbb6a413a6ff98c31e678d7d4b83 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 25 Mar 2024 00:22:42 +0100 Subject: [PATCH 13/15] nagiosPlugins.check_uptime: 20161112 -> unstable-2016-11-12 --- .../nagios-plugins/check_uptime/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix index 8b16f38ccdd5..7f6913794d02 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_uptime/default.nix @@ -6,26 +6,28 @@ }: stdenv.mkDerivation { - pname = "check_uptime"; - version = "20161112"; + pname = "check-uptime"; + version = "unstable-2016-11-12"; src = fetchFromGitHub { owner = "madrisan"; repo = "nagios-plugins-uptime"; rev = "51822dacd1d404b3eabf3b4984c64b2475ed6f3b"; - sha256 = "18q9ibzqn97dsyr9xs3w9mqk80nmmfw3kcjidrdsj542amlsycyk"; + hash = "sha256-0zOvaVWCFKlbblGyObir1QI0cU186J6y1+0ki/+KCaM="; }; nativeBuildInputs = [ autoreconfHook ]; enableParallelBuilding = true; - postInstall = "ln -sr $out/libexec $out/bin"; + postInstall = '' + ln -sr $out/libexec $out/bin + ''; meta = { description = "Uptime check plugin for Sensu/Nagios/others"; homepage = "https://github.com/madrisan/nagios-plugins-uptime"; - license = lib.licenses.gpl3; + license = lib.licenses.gpl3Plus; mainProgram = "check_uptime"; maintainers = with lib.maintainers; [ peterhoeg ]; }; From 5c6326e5ba24bd12087db92220ce8800bb15814a Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 25 Mar 2024 00:25:55 +0100 Subject: [PATCH 14/15] nagiosPlugins.check_wmi_plus: fix meta.{homepage,license} --- .../monitoring/nagios-plugins/check_wmi_plus/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix b/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix index 2c0ee634c2a6..f43df1b85650 100644 --- a/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix +++ b/pkgs/servers/monitoring/nagios-plugins/check_wmi_plus/default.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { pname = "check-wmi-plus"; version = "1.65"; - # We fetch from github.com instead of the proper upstream as nix-build errors - # out with 406 when trying to fetch the sources + # Upstream has been moved from Github to tarballs on the author's website. + # See https://edcint.co.nz/checkwmiplus/releases/ src = fetchFromGitHub { owner = "speartail"; repo = "checkwmiplus"; @@ -98,7 +98,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Sensu/nagios plugin using WMI to query Windows hosts"; - homepage = "http://edcint.co.nz/checkwmiplus"; + homepage = "https://edcint.co.nz/checkwmiplus/"; license = licenses.gpl2Plus; mainProgram = "check_wmi_plus"; maintainers = with maintainers; [ peterhoeg ]; From d5d83eaed02983db9775a65d7b31f293c3d4dd84 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 25 Mar 2024 00:34:38 +0100 Subject: [PATCH 15/15] wmic-bin: move to pkgs/servers/monitoring/wmic-bin --- .../monitoring/{plugins/wmic-bin.nix => wmic-bin/default.nix} | 0 pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/servers/monitoring/{plugins/wmic-bin.nix => wmic-bin/default.nix} (100%) diff --git a/pkgs/servers/monitoring/plugins/wmic-bin.nix b/pkgs/servers/monitoring/wmic-bin/default.nix similarity index 100% rename from pkgs/servers/monitoring/plugins/wmic-bin.nix rename to pkgs/servers/monitoring/wmic-bin/default.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ee60ffcc5ec1..2590b94c86de 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -38608,7 +38608,7 @@ with pkgs; hy = with python3Packages; toPythonApplication hy; - wmic-bin = callPackage ../servers/monitoring/plugins/wmic-bin.nix { }; + wmic-bin = callPackage ../servers/monitoring/wmic-bin { }; ghc-standalone-archive = callPackage ../os-specific/darwin/ghc-standalone-archive { };