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

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

40 lines
1.0 KiB
Nix
Raw Normal View History

2022-07-30 03:09:07 +03:00
{ lib, buildGoModule, installShellFiles, fetchFromGitHub }:
buildGoModule rec {
pname = "gum";
2024-08-23 18:12:05 +03:00
version = "0.14.4";
2022-07-30 03:09:07 +03:00
src = fetchFromGitHub {
owner = "charmbracelet";
repo = pname;
rev = "v${version}";
2024-08-23 18:12:05 +03:00
hash = "sha256-kR/DNNWCFj/ott31bcppA2gkpNK5OY+SsjYcQak5CK8=";
2022-07-30 03:09:07 +03:00
};
2024-08-23 18:12:05 +03:00
vendorHash = "sha256-pjWaAeBXIBG+g3TPxioIG9Cl4rvEf4QjyinAtCBYSug=";
2022-07-30 03:09:07 +03: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-08-25 17:20:02 +03:00
mainProgram = "gum";
2022-07-30 03:09:07 +03:00
};
}