summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/helmfile/default.nix
blob: 2de07e9fdc7d012ec89ff17860b677515d9c34ee (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
29
30
31
32
33
34
35
36
37
{ stdenv, buildGoModule, fetchFromGitHub, makeWrapper, kubernetes-helm, Security }:

buildGoModule rec {
  pname = "helmfile";
  version = "0.102.0";

  src = fetchFromGitHub {
    owner = "roboll";
    repo = "helmfile";
    rev = "v${version}";
    sha256 = "0v7mhsnhswiqd62wrmkcpzsg9nfi6wvkh9danngs5rqjiz1zffhy";
  };

  modSha256 = "0s7j7jbgr8gdc0s9dnl6zjwkpywqj05xyb7mkcank54kgrz0g5vq";

  nativeBuildInputs = [ makeWrapper ];

  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

  buildFlagsArray = ''
    -ldflags=
    -X main.Version=${version}
  '';

  postInstall = ''
    wrapProgram $out/bin/helmfile \
      --prefix PATH : ${stdenv.lib.makeBinPath [ kubernetes-helm ]}
  '';

  meta = with stdenv.lib; {
    description = "Deploy Kubernetes Helm charts";
    homepage = "https://github.com/roboll/helmfile";
    license = licenses.mit;
    maintainers = with maintainers; [ pneumaticat yurrriq ];
    platforms = platforms.unix;
  };
}