nixpkgs/pkgs/by-name/la/lazygit/package.nix

52 lines
1.1 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
lazygit,
testers,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "lazygit";
version = "0.62.0";
src = fetchFromGitHub {
owner = "jesseduffield";
repo = "lazygit";
tag = "v${finalAttrs.version}";
hash = "sha256-D0Sg6FnbashNYTxM2HymJfRR8Ozric2c/IHnHKXuC+0=";
};
vendorHash = null;
subPackages = [ "." ];
ldflags = [
"-X main.version=${finalAttrs.version}"
"-X main.buildSource=nix"
];
passthru = {
tests.version = testers.testVersion { package = lazygit; };
updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"^v([0-9.]+)$"
];
};
};
meta = {
description = "Simple terminal UI for git commands";
homepage = "https://github.com/jesseduffield/lazygit";
changelog = "https://github.com/jesseduffield/lazygit/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
equirosa
khaneliman
starsep
sigmasquadron
];
mainProgram = "lazygit";
};
})