depot/third_party/nixpkgs/pkgs/tools/virtualization/ec2-api-tools/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

34 lines
915 B
Nix

{ stdenv, fetchurl, unzip, makeWrapper, jre }:
stdenv.mkDerivation rec {
name = "ec2-api-tools-1.7.5.1";
src = fetchurl {
url = "http://tarballs.nixos.org/${name}.zip";
sha256 = "0figmvcm82ghmpz3018ihysz8zpxpysgbpdx7rmciq9y80qbw6l5";
};
buildInputs = [ unzip makeWrapper ];
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
''; # */
meta = {
homepage = "http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351";
description = "Command-line tools to create and manage Amazon EC2 virtual machines";
license = stdenv.lib.licenses.amazonsl;
};
}