Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
883af84
commit 90b9c8e
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters