summary refs log tree commit diff
path: root/pkgs/tools/virtualization/aws/default.nix
blob: d3a5cbf10e1a4e6ed678d0e394ff7580b6c0e182 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ lib, stdenv, fetchurl, perl, curl }:

stdenv.mkDerivation {
  name = "aws-2019.06.18";

  src = fetchurl {
    url = "https://raw.github.com/timkay/aws/ac68eb5191c52f069b9aa0c9a99808f8a4430833/aws";
    sha256 = "02bym9wicqpdr7mdim13zw5ssh97xfswzab9q29rsbg7058ddbil";
  };

  buildInputs = [ perl ];

  dontUnpack = true;

  installPhase =
    ''
      mkdir -p $out/bin
      sed 's|\[curl|[${curl.bin}/bin/curl|g' $src > $out/bin/aws
      chmod +x $out/bin/aws
    '';

  meta = {
    homepage = "https://www.timkay.com/aws/";
    description = "Command-line utility for working with Amazon EC2, S3, SQS, ELB, IAM and SDB";
    license = lib.licenses.gpl3Plus;
    platforms = lib.platforms.unix;
  };
}