nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 lazygit,
6 testers,
7 nix-update-script,
8}:
9buildGoModule rec {
10 pname = "lazygit";
11 version = "0.58.1";
12
13 src = fetchFromGitHub {
14 owner = "jesseduffield";
15 repo = "lazygit";
16 tag = "v${version}";
17 hash = "sha256-J1r5WSEo1OleSFtobVCkvedHt21up+3q5TpYtfzvfos=";
18 };
19
20 vendorHash = null;
21 subPackages = [ "." ];
22
23 ldflags = [
24 "-X main.version=${version}"
25 "-X main.buildSource=nix"
26 ];
27
28 passthru = {
29 tests.version = testers.testVersion { package = lazygit; };
30
31 updateScript = nix-update-script {
32 extraArgs = [
33 "--version-regex"
34 "^v([0-9.]+)$"
35 ];
36 };
37 };
38
39 meta = {
40 description = "Simple terminal UI for git commands";
41 homepage = "https://github.com/jesseduffield/lazygit";
42 changelog = "https://github.com/jesseduffield/lazygit/releases/tag/v${version}";
43 license = lib.licenses.mit;
44 maintainers = with lib.maintainers; [
45 equirosa
46 khaneliman
47 starsep
48 sigmasquadron
49 ];
50 mainProgram = "lazygit";
51 };
52}