summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/admin/eksctl/default.nix
blob: e04e49c62e74099224d4e10218e9b9916052358c (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
{ lib, buildGoPackage, fetchFromGitHub }:

buildGoPackage rec {
  pname = "eksctl";
  version = "0.1.35";

  src = fetchFromGitHub {
    owner = "weaveworks";
    repo = "eksctl";
    rev = version;
    sha256 = "0b3s7vh85k68wawmsdp96q9l4yhikwhyjn1c7cwxys0aia4i8wkv";
  };

  goPackagePath = "github.com/weaveworks/eksctl";

  subPackages = [ "cmd/eksctl" ];

  buildFlags =
  ''
    -ldflags=-s
    -ldflags=-w
    -tags netgo
    -tags release
  '';

  postInstall =
  ''
    mkdir -p "$bin/share/"{bash-completion/completions,zsh/site-functions}
    $bin/bin/eksctl completion bash > "$bin/share/bash-completion/completions/eksctl"
    $bin/bin/eksctl completion zsh > "$bin/share/zsh/site-functions/_eksctl"
  '';

  meta = with lib; {
    description = "A CLI for Amazon EKS";
    homepage = "https://github.com/weaveworks/eksctl";
    license = licenses.asl20;
    platforms = platforms.all;
    maintainers = with maintainers; [ xrelkd ];
  };
}