aboutsummaryrefslogtreecommitdiff
path: root/pkgs/servers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/consul/default.nix4
-rw-r--r--pkgs/servers/dante/default.nix8
-rw-r--r--pkgs/servers/dns/knot-dns/default.nix4
-rw-r--r--pkgs/servers/monitoring/plugins/openvpn.nix22
-rw-r--r--pkgs/servers/monitoring/plugins/wmiplus/default.nix77
-rw-r--r--pkgs/servers/monitoring/plugins/wmiplus/wmiplus_fix_manpage.patch40
6 files changed, 147 insertions, 8 deletions
diff --git a/pkgs/servers/consul/default.nix b/pkgs/servers/consul/default.nix
index b7c2e01e97a..e993f70b105 100644
--- a/pkgs/servers/consul/default.nix
+++ b/pkgs/servers/consul/default.nix
@@ -2,7 +2,7 @@
buildGoPackage rec {
pname = "consul";
- version = "1.6.0";
+ version = "1.6.1";
rev = "v${version}";
goPackagePath = "github.com/hashicorp/consul";
@@ -19,7 +19,7 @@ buildGoPackage rec {
owner = "hashicorp";
repo = pname;
inherit rev;
- sha256 = "16rngyv9dp19gjbjwfvnmlfxbq67fxs55hgvvcyn9mplm1j0bb52";
+ sha256 = "00dvvxi7y80v2b6wzwyfzhxv1ksnl1m0nmdjl98dhq5ikb0v7p28";
};
preBuild = ''
diff --git a/pkgs/servers/dante/default.nix b/pkgs/servers/dante/default.nix
index 24e607f4b00..ae083f17ada 100644
--- a/pkgs/servers/dante/default.nix
+++ b/pkgs/servers/dante/default.nix
@@ -11,15 +11,15 @@ stdenv.mkDerivation rec {
buildInputs = [ pam libkrb5 cyrus_sasl miniupnpc ];
- configureFlags = [
- "--with-libc=libc.so.6"
- ];
+ configureFlags = ["--with-libc=libc${stdenv.targetPlatform.extensions.sharedLibrary}"];
+
+ dontAddDisableDepTrack = stdenv.isDarwin;
meta = with stdenv.lib; {
description = "A circuit-level SOCKS client/server that can be used to provide convenient and secure network connectivity.";
homepage = "https://www.inet.no/dante/";
maintainers = [ maintainers.arobyn ];
license = licenses.bsdOriginal;
- platforms = platforms.linux;
+ platforms = platforms.linux ++ platforms.darwin;
};
}
diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix
index 8191bf5acbf..ad1bb26a54d 100644
--- a/pkgs/servers/dns/knot-dns/default.nix
+++ b/pkgs/servers/dns/knot-dns/default.nix
@@ -7,11 +7,11 @@ let inherit (stdenv.lib) optional optionals; in
# Note: ATM only the libraries have been tested in nixpkgs.
stdenv.mkDerivation rec {
pname = "knot-dns";
- version = "2.8.3";
+ version = "2.8.4";
src = fetchurl {
url = "https://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
- sha256 = "8a62d81e5cf3df938f469b60ed4e46d9161007c2b89fbf7ae07525fa68368bad";
+ sha256 = "541e7e43503765c91405c5797b3838103bb656154712e69b3f959c6ab0e700a9";
};
outputs = [ "bin" "out" "dev" ];
diff --git a/pkgs/servers/monitoring/plugins/openvpn.nix b/pkgs/servers/monitoring/plugins/openvpn.nix
new file mode 100644
index 00000000000..2b7e69ab8f0
--- /dev/null
+++ b/pkgs/servers/monitoring/plugins/openvpn.nix
@@ -0,0 +1,22 @@
+{ lib, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+ pname = "check-openvpn";
+ version = "0.0.1";
+
+ src = fetchFromGitHub {
+ owner = "liquidat";
+ repo = "nagios-icinga-openvpn";
+ rev = version;
+ sha256 = "1vz3p7nckc5k5f06nm1xfzpykhyndh2dzyagmifrzg5k478p1lpm";
+ };
+
+ # no tests
+ doCheck = false;
+
+ meta = with lib; {
+ description = "A nagios/icinga/sensu check plugin for OpenVPN";
+ license = licenses.mit;
+ maintainers = with maintainers; [ peterhoeg ];
+ };
+}
diff --git a/pkgs/servers/monitoring/plugins/wmiplus/default.nix b/pkgs/servers/monitoring/plugins/wmiplus/default.nix
new file mode 100644
index 00000000000..9a4e5d706e9
--- /dev/null
+++ b/pkgs/servers/monitoring/plugins/wmiplus/default.nix
@@ -0,0 +1,77 @@
+{ stdenv, fetchFromGitHub, makeWrapper, perlPackages, txt2man
+, monitoring-plugins
+, wmic-bin ? null }:
+
+stdenv.mkDerivation rec {
+ pname = "check-wmiplus";
+ version = "1.64";
+
+ # We fetch from github.com instead of the proper upstream as nix-build errors
+ # out with 406 when trying to fetch the sources
+ src = fetchFromGitHub {
+ owner = "speartail";
+ repo = "checkwmiplus";
+ rev = "v${version}";
+ sha256 = "1m36rd2wnc5dk4mm9q4ch67w19144dl112p9s6lhc1sh6h25ln6r";
+ };
+
+ 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
+ ];
+
+ nativeBuildInputs = [ makeWrapper txt2man ];
+
+ dontConfigure = true;
+ dontBuild = true;
+ doCheck = false; # no checks
+
+ 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"
+
+ for f in *.pl ; do
+ substituteInPlace $f --replace /usr/bin/perl ${perlPackages.perl}/bin/perl
+ done
+ '';
+
+ installPhase = ''
+ runHook preInstall
+
+ install -Dm755 -t $out/bin *.pl
+ install -Dm644 -t $out/share/doc/${pname} *.txt
+ cp -r etc $out/
+
+ runHook postInstall
+ '';
+
+ # 1. we need to wait until the main binary has been fixed up with proper perl paths before we can run it to generate the man page
+ # 2. txt2man returns exit code 3 even if it works, so we add the || true bit
+ postFixup = ''
+ wrapProgram $out/bin/check_wmi_plus.pl \
+ --set PERL5LIB "${perlPackages.makePerlPath propagatedBuildInputs}"
+
+ mkdir -p $out/share/man/man1
+ $out/bin/check_wmi_plus.pl --help | txt2man -d 1970-01-01 -s 1 -t check_wmi_plus -r "Check WMI Plus ${version}" > $out/share/man/man1/check_wmi_plus.1 || true
+ gzip $out/share/man/man1/check_wmi_plus.1
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A sensu/nagios plugin using WMI to query Windows hosts";
+ homepage = "http://edcint.co.nz/checkwmiplus";
+ license = licenses.gpl2;
+ maintainers = with maintainers; [ peterhoeg ];
+ };
+}
diff --git a/pkgs/servers/monitoring/plugins/wmiplus/wmiplus_fix_manpage.patch b/pkgs/servers/monitoring/plugins/wmiplus/wmiplus_fix_manpage.patch
new file mode 100644
index 00000000000..16e81d1014d
--- /dev/null
+++ b/pkgs/servers/monitoring/plugins/wmiplus/wmiplus_fix_manpage.patch
@@ -0,0 +1,40 @@
+diff --git a/check_wmi_plus.makeman.sh b/check_wmi_plus.makeman.sh
+index 38dc7a4..3fe4369 100755
+--- a/check_wmi_plus.makeman.sh
++++ b/check_wmi_plus.makeman.sh
+@@ -19,15 +19,6 @@ mkdir -p "$manpage_dir/man1"
+ # the full path to the manpage file
+ manfile="$manpage_dir/man1/check_wmi_plus.1"
+
+-# if we are not running in a terminal then only show the text-based help
+-if [ ! -t 0 ]; then
+- # we are not running in a terminal
+- echo "Not running in a terminal - showing text-based help"
+- echo
+- exec $check_wmi_plus_text_help
+-fi
+-
+-
+ usage()
+ {
+ cat << EOT
+diff --git a/check_wmi_plus_help.pl b/check_wmi_plus_help.pl
+index 3440db2..2982da2 100755
+--- a/check_wmi_plus_help.pl
++++ b/check_wmi_plus_help.pl
+@@ -24,7 +24,7 @@ if ($opt_help) {
+ # we have the script to make the manpage and have not been asked to show text only help
+ exec ("$make_manpage_script \"$0 --itexthelp\" \"$manpage_dir\"") or print STDERR "couldn't exec $make_manpage_script: $!";
+ } else {
+- print "Warning: Can not access/execute Manpage script ($make_manpage_script).\nShowing help in text-only format.\n\n";
++ # print "Warning: Can not access/execute Manpage script ($make_manpage_script).\nShowing help in text-only format.\n\n";
+ }
+ }
+
+@@ -692,4 +692,4 @@ show_ini_help_overview(1);
+ finish_program($ERRORS{'UNKNOWN'});
+ }
+
+-1;
+\ No newline at end of file
++1;