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
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
stdenv,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "glow";
|
|
version = "2.1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "charmbracelet";
|
|
repo = "glow";
|
|
rev = "v${version}";
|
|
hash = "sha256-lDGCRtwCpW/bZlfcb100g7tMXN2dlCPnCY7qVFyayUo=";
|
|
};
|
|
|
|
vendorHash = "sha256-JqQnLwkxRt+CiP90F+1i4MAiOw3akMQ5BeQXCplZdxA=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=main.Version=${version}"
|
|
];
|
|
|
|
doCheck = false;
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd glow \
|
|
--bash <($out/bin/glow completion bash) \
|
|
--fish <($out/bin/glow completion fish) \
|
|
--zsh <($out/bin/glow completion zsh)
|
|
'';
|
|
|
|
meta = {
|
|
description = "Render markdown on the CLI, with pizzazz";
|
|
homepage = "https://github.com/charmbracelet/glow";
|
|
changelog = "https://github.com/charmbracelet/glow/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
Br1ght0ne
|
|
penguwin
|
|
];
|
|
mainProgram = "glow";
|
|
};
|
|
}
|