summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-sizer/default.nix
blob: ed7239b80cb3318e3b85030b34a0cb9d61de84cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ lib, buildGoModule, fetchFromGitHub, testers, git-sizer }:

buildGoModule rec {
  pname = "git-sizer";
  version = "1.5.0";

  src = fetchFromGitHub {
    owner = "github";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-On7QBTzKfnuuzwMQ8m1odxGqfIKL+EDg5V05Kxuhmqw=";
  };

  vendorSha256 = "sha256-oRlsD99XiI/0ZWibjyRcycmGab+vMbXrV5hIdIyUDYg=";

  ldflags = [ "-s" "-w" "-X main.BuildVersion=${version}" ];

  doCheck = false;

  passthru.tests.vesion = testers.testVersion {
    package = git-sizer;
  };

  meta = with lib; {
    description = "Compute various size metrics for a Git repository";
    homepage = "https://github.com/github/git-sizer";
    license = licenses.mit;
    maintainers = with maintainers; [ matthewbauer ];
  };
}