depot/third_party/nixpkgs/pkgs/applications/misc/gum/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

38 lines
1 KiB
Nix

{ lib, buildGoModule, installShellFiles, fetchFromGitHub }:
buildGoModule rec {
pname = "gum";
version = "0.11.0";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = pname;
rev = "v${version}";
hash = "sha256-qPo7PmxNCEjrGWNZ/CBpGrbjevbcmnDGy/C1F1TT9zA=";
};
vendorHash = "sha256-47rrSj2bI8oe62CSlxrSBsEPM4I6ybDKzrctTB2MFB0=";
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 ];
};
}