blob: 5162c9df8374441617f018adee087e2c9e1cfa5f (
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}/bin"
'';
}
|