1{ lib, stdenv, fetchurl}: 2 3stdenv.mkDerivation rec { 4 pname = "amazon-ecs-cli"; 5 version = "1.21.0"; 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 = "sEHwhirU2EYwtBRegiIvN4yr7VKtmy7e6xx5gZOkuY0="; 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 = "1viala49sifpcmgn3jw24h5bkrlm4ffadjiqagbxj3lr0r78i9nm"; 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 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 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 34 license = licenses.asl20; 35 maintainers = with maintainers; [ Scriptkiddi ]; 36 platforms = [ "x86_64-linux" "x86_64-darwin" ]; 37 }; 38}