diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-09-19 16:59:00 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-09-19 16:59:00 +0300 |
commit | 48322807bcba8f7934a0682f21226436da9b46b8 (patch) | |
tree | 924435c53283189f5badb4c6994b7cde24597dba | |
parent | fbf880e395343acddcedd27459fd30be5c9a0d91 (diff) | |
download | nixsap-48322807bcba8f7934a0682f21226436da9b46b8.tar.gz |
Update check_aws_rds & check_aws_ec2_elb
* `dig` now lives in bind.dnsutils
(See https://github.com/NixOS/nixpkgs/commit/fa405aa26425e3632032d732edc0b85c8a23a074)
* Use wrappers instead of in-place substitution (dangerous).
* Update pmp-check-aws-rds.py: ignore UNKNOWN status by default
(See https://github.com/percona/percona-monitoring-plugins/commit/7f4a9852a0e470698d90afc0036d2738a4906477)
-rw-r--r-- | modules/pkgs/check_aws_ec2_elb/default.nix | 2 | ||||
-rw-r--r-- | modules/pkgs/check_aws_rds/default.nix | 17 |
2 files changed, 10 insertions, 9 deletions
diff --git a/modules/pkgs/check_aws_ec2_elb/default.nix b/modules/pkgs/check_aws_ec2_elb/default.nix index 5162c9d..9e785cf 100644 --- a/modules/pkgs/check_aws_ec2_elb/default.nix +++ b/modules/pkgs/check_aws_ec2_elb/default.nix @@ -17,6 +17,6 @@ stdenv.mkDerivation { --replace check_aws_ec2_elb "$out/bin/check_aws_ec2_elb" wrapProgram "$out/bin/check_aws_ec2_elb" \ - --prefix PATH : "${pkgs.awscli}/bin:${pkgs.gnused}/bin:${pkgs.jq}/bin:${pkgs.bind}/bin" + --prefix PATH : "${pkgs.awscli}/bin:${pkgs.gnused}/bin:${pkgs.jq}/bin:${pkgs.bind.dnsutils}/bin" ''; } diff --git a/modules/pkgs/check_aws_rds/default.nix b/modules/pkgs/check_aws_rds/default.nix index 5e91b33..916cdf6 100644 --- a/modules/pkgs/check_aws_rds/default.nix +++ b/modules/pkgs/check_aws_rds/default.nix @@ -1,13 +1,13 @@ { stdenv, pkgs, fetchurl, python27Packages }: let - rev = "556191f6d775f0505fb142c02f13a60ba7829ed9"; + rev = "7f4a9852a0e470698d90afc0036d2738a4906477"; pmp-check-aws-rds = stdenv.mkDerivation rec { name = "pmp-check-aws-rds"; src = fetchurl { url = "https://raw.githubusercontent.com/percona/percona-monitoring-plugins/${rev}/nagios/bin/pmp-check-aws-rds.py"; - sha256 = "0ghq6nl2529llxz1icf5hyg75k2hjzdkzfwgrs0d69r3f62w4q5y"; + sha256 = "1ps7ag2hmbbzg3w6h76l6j4ijigfhlvmirj8h7v9qyrdcgzlsjma"; }; buildInputs = with python27Packages; [ python wrapPython ]; @@ -26,21 +26,22 @@ let in stdenv.mkDerivation { name = "check_aws_rds"; outputs = [ "out" "conf" ]; - unpackPhase = ":"; + + phases = [ "installPhase" "fixupPhase" ]; + nativeBuildInputs = with pkgs; [ makeWrapper ]; + installPhase = '' mkdir -p $out/bin cp ${./check_aws_rds} $out/bin/check_aws_rds cp ${./check_aws_rds.conf} $conf - substituteInPlace "$out/bin/"* \ - --replace pmp-check-aws-rds '${pmp-check-aws-rds}/bin/pmp-check-aws-rds' \ - --replace dig '${pkgs.bind}/bin/dig' + chmod +x "$out/bin/"* substituteInPlace "$conf" \ --replace check_aws_rds "$out/bin/check_aws_rds" - chmod +x "$out/bin/"* - + wrapProgram "$out/bin/check_aws_rds" \ + --prefix PATH : "${pmp-check-aws-rds}/bin:${pkgs.bind.dnsutils}/bin" ''; } |