1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 git,
6}:
7
8buildGoModule rec {
9 pname = "gitbatch";
10 version = "0.6.1";
11
12 src = fetchFromGitHub {
13 owner = "isacikgoz";
14 repo = "gitbatch";
15 rev = "v${version}";
16 sha256 = "sha256-ovmdbyPRSebwmW6AW55jBgBKaNdY6w5/wrpUF2cMKw8=";
17 };
18
19 vendorHash = "sha256-wwpaJO5cXMsvqFXj+qGiIm4zg/SL4YCm2mNnG/qdilw=";
20
21 ldflags = [
22 "-s"
23 "-w"
24 ];
25
26 nativeCheckInputs = [
27 git # required by unit tests
28 ];
29
30 preCheck = ''
31 HOME=$(mktemp -d)
32 '';
33
34 checkFlags = [
35 # Disable tests requiring network access to gitlab.com
36 "-skip=Test(Run|Start|(Fetch|Pull)With(Go|)Git)"
37 ];
38
39 meta = with lib; {
40 description = "Running git UI commands";
41 homepage = "https://github.com/isacikgoz/gitbatch";
42 license = licenses.mit;
43 maintainers = with maintainers; [ teto ];
44 platforms = with platforms; linux;
45 mainProgram = "gitbatch";
46 };
47}