From 333cebead2886d70b24e3736a77ce435636841d5 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 7 Jun 2018 14:10:48 +0800 Subject: [PATCH 1/2] perlPackages.DBDsybase: init at 1.16 --- .../perl-modules/DBD-sybase/default.nix | 17 +++++++++++++++++ pkgs/top-level/perl-packages.nix | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/perl-modules/DBD-sybase/default.nix diff --git a/pkgs/development/perl-modules/DBD-sybase/default.nix b/pkgs/development/perl-modules/DBD-sybase/default.nix new file mode 100644 index 000000000000..ced458396da5 --- /dev/null +++ b/pkgs/development/perl-modules/DBD-sybase/default.nix @@ -0,0 +1,17 @@ +{ fetchurl, buildPerlPackage, DBI, freetds }: + +buildPerlPackage rec { + name = "DBD-Sybase-1.16"; + + src = fetchurl { + url = "mirror://cpan/authors/id/M/ME/MEWP/${name}.tar.gz"; + sha256 = "1k6n261nrrcll9wxn5xwi4ibpavqv1il96687k62mbpznzl2gx37"; + }; + + SYBASE = freetds; + + buildInputs = [ freetds ] ; + propagatedBuildInputs = [ DBI ]; + + doCheck = false; +} diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 4a0f258bb2da..c1a715a67f36 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -4100,6 +4100,11 @@ let self = _self // overrides; _self = with self; { inherit (pkgs) postgresql; }; + DBDsybase = import ../development/perl-modules/DBD-sybase { + inherit fetchurl buildPerlPackage DBI; + inherit (pkgs) freetds; + }; + DBFile = import ../development/perl-modules/DB_File { inherit fetchurl buildPerlPackage; inherit (pkgs) db; From d5f37d1f2e4e95693c55772917c435a929339526 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 7 Jun 2018 14:21:18 +0800 Subject: [PATCH 2/2] check-mssql-health: init at 2.6.4.14 --- .../monitoring/plugins/labs_consol_de.nix | 19 ++++++++++++++----- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/pkgs/servers/monitoring/plugins/labs_consol_de.nix b/pkgs/servers/monitoring/plugins/labs_consol_de.nix index 350728d509fb..957aee43691a 100644 --- a/pkgs/servers/monitoring/plugins/labs_consol_de.nix +++ b/pkgs/servers/monitoring/plugins/labs_consol_de.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, fetchurl, buildPerlPackage, autoreconfHook, makeWrapper -, perl, NetSNMP, coreutils, gnused, gnugrep }: +, perl, DBDsybase, NetSNMP, coreutils, gnused, gnugrep }: let glplugin = fetchFromGitHub { @@ -9,11 +9,10 @@ let sha256 = "0wb55a9pmgbilfffx0wkiikg9830qd66j635ypczqp4basslpq5b"; }; - generic = { pname, version, sha256, description, ... } @ attrs: + generic = { pname, version, sha256, description, buildInputs, ... }: let - attrs' = builtins.removeAttrs attrs [ "pname" "version" "rev" "sha256"]; name' = "${stdenv.lib.replaceStrings [ "-" ] [ "_" ] "${pname}"}-${version}"; - in perl.stdenv.mkDerivation rec { + in perl.stdenv.mkDerivation { name = "${pname}-${version}"; src = fetchurl { @@ -21,7 +20,7 @@ let inherit sha256; }; - buildInputs = [ perl NetSNMP ]; + buildInputs = [ perl ] ++ buildInputs; nativeBuildInputs = [ autoreconfHook makeWrapper ]; @@ -54,11 +53,20 @@ let }; in { + check-mssql-health = generic { + pname = "check_mssql_health"; + version = "2.6.4.14"; + sha256 = "0w6gybrs7imx169l8740s0ax3adya867fw0abrampx59mnsj5pm1"; + description = "Check plugin for Microsoft SQL Server."; + buildInputs = [ DBDsybase ]; + }; + check-nwc-health = generic { pname = "check_nwc_health"; version = "7.0.1.3"; sha256 = "0rgd6zgd7kplx3z72n8zbzwkh8vnd83361sk9ibh6ng78sds1sl5"; description = "Check plugin for network equipment."; + buildInputs = [ NetSNMP ]; }; check-ups-health = generic { @@ -66,5 +74,6 @@ in { version = "2.8.2.2"; sha256 = "1gc2wjsymay2vk5ywc1jj9cvrbhs0fs851x8l4nc75df2g75v521"; description = "Check plugin for UPSs."; + buildInputs = [ NetSNMP ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ae5da9a8a622..a0fa4cd83edc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12811,7 +12811,8 @@ with pkgs; monitoring-plugins = callPackage ../servers/monitoring/plugins { }; nagiosPluginsOfficial = monitoring-plugins; - inherit (callPackage ../servers/monitoring/plugins/labs_consol_de.nix { inherit (perlPackages) NetSNMP; }) + inherit (callPackage ../servers/monitoring/plugins/labs_consol_de.nix { inherit (perlPackages) DBDsybase NetSNMP; }) + check-mssql-health check-nwc-health check-ups-health;