diff options
Diffstat (limited to 'pkgs/applications/networking/cluster/weave-gitops/default.nix')
-rw-r--r-- | pkgs/applications/networking/cluster/weave-gitops/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/weave-gitops/default.nix b/pkgs/applications/networking/cluster/weave-gitops/default.nix new file mode 100644 index 000000000000..3133fdb3ca53 --- /dev/null +++ b/pkgs/applications/networking/cluster/weave-gitops/default.nix @@ -0,0 +1,37 @@ +{ lib, fetchFromGitHub, buildGoModule, stdenv, installShellFiles }: + +buildGoModule rec { + pname = "weave-gitops"; + version = "0.23.0"; + + src = fetchFromGitHub { + owner = "weaveworks"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-nXFR+X63yp9IFTeW41ncBt77bCD3QFTs4phJMMLWrxs="; + }; + + ldflags = [ "-s" "-w" "-X github.com/weaveworks/weave-gitops/cmd/gitops/version.Version=${version}" ]; + + vendorSha256 = "sha256-3CgR9F3Bz4k1MVOufaF/E2GD6+bTOnnUqOXkNO9ZFrc="; + + subPackages = [ "cmd/gitops" ]; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd gitops \ + --bash <($out/bin/gitops completion bash 2>/dev/null) \ + --fish <($out/bin/gitops completion fish 2>/dev/null) \ + --zsh <($out/bin/gitops completion zsh 2>/dev/null) + ''; + + meta = with lib; { + homepage = "https://docs.gitops.weave.works"; + description = "Weave Gitops CLI"; + license = licenses.mpl20; + platforms = platforms.linux; + maintainers = with maintainers; [ nullx76 ]; + mainProgram = "gitops"; + }; +} |