2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
, makeWrapper
|
|
|
|
, jre
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "ec2-api-tools";
|
|
|
|
version = "1.7.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-08-12 12:06:08 +00:00
|
|
|
url = "http://s3.amazonaws.com/ec2-downloads/${pname}-${version}.zip";
|
|
|
|
sha256 = "sha256-hRq+MEA+4chqPr3d9bS//X70tYcRBTD+rfAJVNmuLzo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper unzip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
installPhase = ''
|
|
|
|
d=$out/libexec/ec2-api-tools
|
|
|
|
mkdir -p $d
|
|
|
|
mv * $d
|
|
|
|
rm $d/bin/*.cmd # Windows stuff
|
|
|
|
for i in $d/bin/*; do
|
|
|
|
b=$(basename $i)
|
|
|
|
if [ $b = "ec2-cmd" ]; then continue; fi
|
|
|
|
makeWrapper $i $out/bin/$(basename $i) \
|
|
|
|
--set EC2_HOME $d \
|
|
|
|
--set JAVA_HOME ${jre}
|
|
|
|
done
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351";
|
|
|
|
description = "Command-line tools to create and manage Amazon EC2 virtual machines";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.amazonsl;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|