nixpkgs/pkgs/applications/misc/gum/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.0 KiB
Nix
Raw Normal View History

2022-07-30 00:09:07 +00:00
{ lib, buildGoModule, installShellFiles, fetchFromGitHub }:
buildGoModule rec {
pname = "gum";
2022-10-12 17:51:51 +00:00
version = "0.8.0";
2022-07-30 00:09:07 +00:00
src = fetchFromGitHub {
owner = "charmbracelet";
repo = pname;
rev = "v${version}";
2022-10-12 17:51:51 +00:00
sha256 = "sha256-6x1t/PLs1dqlY5XQ1F0PDqZ/TofZ0h1hTc0C1sjn3fA=";
2022-07-30 00:09:07 +00:00
};
2022-10-12 17:51:51 +00:00
vendorSha256 = "sha256-rOBwhPXo4sTSI3j3rn3c5qWGnGFgkpeFUKgtzKBltbg=";
2022-07-30 00:09:07 +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 ];
};
}