nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl}:
2
3stdenv.mkDerivation rec {
4 pname = "amazon-ecs-cli";
5 version = "1.18.1";
6
7 src =
8 if stdenv.hostPlatform.system == "x86_64-linux" then
9 fetchurl {
10 url = "https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-v${version}";
11 sha256 = "1q0qsvxwz6mgslwzwslddxxv45v9wmlbbkxgyfz3dfkw6n6d1a2s";
12 }
13 else if stdenv.hostPlatform.system == "x86_64-darwin" then
14 fetchurl {
15 url = "https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-darwin-amd64-v${version}";
16 sha256 = "0hik88z5xm1pw6a3mxa6zpghdv47s6bg56srxv4azjinzdi59s3b";
17 }
18 else throw "Architecture not supported";
19
20 dontUnpack = true;
21
22 installPhase =
23 ''
24 mkdir -p $out/bin
25 cp $src $out/bin/ecs-cli
26 chmod +x $out/bin/ecs-cli
27 ''; # */
28
29 meta = with stdenv.lib; {
30 homepage = "https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI.html";
31 description = "The Amazon ECS command line interface";
32 longDescription = "The Amazon Elastic Container Service (Amazon ECS) command line interface (CLI) provides high-level commands to simplify creating, updating, and monitoring clusters and tasks from a local development environment.";
33 license = licenses.asl20;
34 maintainers = with maintainers; [ Scriptkiddi ];
35 platforms = [ "x86_64-linux" "x86_64-darwin" ];
36 };
37}