Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
installShellFiles,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "gum";
|
|
version = "0.17.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "charmbracelet";
|
|
repo = "gum";
|
|
rev = "v${version}";
|
|
hash = "sha256-TbheGevUrUKwT97JayW7rfAEgAfRnpOvHyvAxt27sIg=";
|
|
};
|
|
|
|
vendorHash = "sha256-9vHlQuJA5g5sonfxe+whXDdkROuE3lZzOPYq74tJZtE=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=main.Version=${version}"
|
|
]
|
|
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic) [
|
|
"-linkmode=external"
|
|
"-extldflags"
|
|
"-static"
|
|
];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
$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 = {
|
|
description = "Tasty Bubble Gum for your shell";
|
|
homepage = "https://github.com/charmbracelet/gum";
|
|
changelog = "https://github.com/charmbracelet/gum/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ maaslalani ];
|
|
mainProgram = "gum";
|
|
};
|
|
}
|