Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildGoModule 3, fetchFromGitHub 4, installShellFiles 5}: 6 7buildGoModule rec { 8 pname = "eksctl"; 9 version = "0.157.0"; 10 11 src = fetchFromGitHub { 12 owner = "weaveworks"; 13 repo = pname; 14 rev = version; 15 hash = "sha256-OTWCTpxVBTJHaVmnuiGQEmRezDLLUnJKKKWYo+J5fLk="; 16 }; 17 18 vendorHash = "sha256-gOQ//+DJXn+5Ip0Ii1j08LD+op5WgHaPg/Wqz8Nwt1w="; 19 20 doCheck = false; 21 22 subPackages = [ "cmd/eksctl" ]; 23 24 tags = [ "netgo" "release" ]; 25 26 ldflags = [ 27 "-s" 28 "-w" 29 "-X github.com/weaveworks/eksctl/pkg/version.gitCommit=${src.rev}" 30 "-X github.com/weaveworks/eksctl/pkg/version.buildDate=19700101-00:00:00" 31 ]; 32 33 nativeBuildInputs = [ installShellFiles ]; 34 35 postInstall = '' 36 installShellCompletion --cmd eksctl \ 37 --bash <($out/bin/eksctl completion bash) \ 38 --fish <($out/bin/eksctl completion fish) \ 39 --zsh <($out/bin/eksctl completion zsh) 40 ''; 41 42 meta = with lib; { 43 description = "A CLI for Amazon EKS"; 44 homepage = "https://github.com/weaveworks/eksctl"; 45 license = licenses.asl20; 46 maintainers = with maintainers; [ xrelkd Chili-Man ]; 47 mainProgram = "eksctl"; 48 }; 49}