blob: 9e785cf487a854e543c6a37430e44743b04af08f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{ stdenv, pkgs, makeWrapper }:
stdenv.mkDerivation {
name = "check_aws_ec2_elb";
outputs = [ "out" "conf" ];
unpackPhase = ":";
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp ${./check_aws_ec2_elb} $out/bin/check_aws_ec2_elb
cp ${./check_aws_ec2_elb.conf} $conf
chmod +x "$out/bin/"*
substituteInPlace "$conf" \
--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.dnsutils}/bin"
'';
}
|