02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
38 lines
1 KiB
Nix
38 lines
1 KiB
Nix
{ lib, buildGoModule, installShellFiles, fetchFromGitHub }:
|
|
|
|
buildGoModule rec {
|
|
pname = "gum";
|
|
version = "0.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "charmbracelet";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-zFw2Lf+N8jxrw6JYqzsDMXIMchFc2bxAofELrgIMquk=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-8MqBGMcYR/kbExfXBeQrO8p7a/uawUk2hLmnQtarWEw=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
ldflags = [ "-s" "-w" "-X=main.Version=${version}" ];
|
|
|
|
postInstall = ''
|
|
$out/bin/gum man > gum.1
|
|
installManPage gum.1
|
|
installShellCompletion --cmd gum \
|
|
--bash <($out/bin/gum completion bash) \
|
|
--fish <($out/bin/gum completion fish) \
|
|
--zsh <($out/bin/gum completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tasty Bubble Gum for your shell";
|
|
homepage = "https://github.com/charmbracelet/gum";
|
|
changelog = "https://github.com/charmbracelet/gum/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ maaslalani ];
|
|
};
|
|
}
|