summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-and-tools/scmpuff/default.nix
blob: 65ca1b476d4d6e949d8d77ca1993b7ffb48779bc (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
{ lib, buildGoModule, fetchFromGitHub, testers, scmpuff }:

buildGoModule rec {
  pname = "scmpuff";
  version = "0.5.0";

  src = fetchFromGitHub {
    owner = "mroth";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-+L0W+M8sZdUSCWj9Ftft1gkRRfWMHdxon2xNnotx8Xs=";
  };

  vendorSha256 = "sha256-7WHVSEz3y1nxWfbxkzkfHhINLC8+snmWknHyUUpNy7c=";

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

  passthru.tests.version = testers.testVersion {
    package = scmpuff;
    command = "scmpuff version";
  };

  meta = with lib; {
    description = "Add numbered shortcuts to common git commands";
    homepage = "https://github.com/mroth/scmpuff";
    license = licenses.mit;
    maintainers = with maintainers; [ cpcloud ];
  };
}