diff options
author | Luc Perkins <luc@blockfi.com> | 2020-07-25 11:58:00 -0700 |
---|---|---|
committer | Luc Perkins <lucperkins@gmail.com> | 2020-07-29 18:47:18 -0700 |
commit | 90b9c8e098548550f498494b0fec7ed1b56c5e3c (patch) | |
tree | 6f61d1188a05127adde4c933753b5547fe3332c7 /pkgs/applications/logging/humioctl/default.nix | |
parent | 883af843c3de213045a2b2fbb74426c3427da40a (diff) |
humioctl: init at 0.25.0
Diffstat (limited to 'pkgs/applications/logging/humioctl/default.nix')
-rw-r--r-- | pkgs/applications/logging/humioctl/default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/applications/logging/humioctl/default.nix b/pkgs/applications/logging/humioctl/default.nix new file mode 100644 index 000000000000..28bda827204f --- /dev/null +++ b/pkgs/applications/logging/humioctl/default.nix @@ -0,0 +1,38 @@ +{ buildGoModule, fetchFromGitHub, installShellFiles, stdenv }: + +let + humioCtlVersion = "0.25.0"; + sha256 = "1x8354m410nf9g167v0i1c77s5w2by7smdlyjwl89ixgdjw04ay3"; + vendorSha256 = "14bysjgvahr56hvd8walym11hh721i1q2g503n8m68wdzrrym4qy"; +in buildGoModule { + name = "humioctl-${humioCtlVersion}"; + pname = "humioctl"; + version = humioCtlVersion; + + vendorSha256 = vendorSha256; + + src = fetchFromGitHub { + owner = "humio"; + repo = "cli"; + rev = "v${humioCtlVersion}"; + sha256 = sha256; + }; + + buildFlagsArray = "-ldflags=-X main.version=${humioCtlVersion}"; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + mv $out/bin/cli $out/bin/humioctl + $out/bin/humioctl completion bash > humioctl.bash + $out/bin/humioctl completion zsh > humioctl.zsh + installShellCompletion humioctl.{bash,zsh} + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/humio/cli"; + description = "A CLI for managing and sending data to Humio"; + license = licenses.asl20; + maintainers = with maintainers; [ lucperkins ]; + }; + } |