2022-08-12 12:06:08 +00:00
|
|
|
{ lib, buildGoModule, installShellFiles, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gum";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.13.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "charmbracelet";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-NgMEgSfHVLCEKZ3MmNV571ySMUD8wj+kq5EccGrxtZc=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
vendorHash = "sha256-fmc6nbS/Xmn/YRwToRH7EhP4SFRMf8hjZ/rLtaP/USo=";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
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 ];
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "gum";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
}
|