blob: 1c6248e37ccc49435912ae93513a0ba038b0727b (
plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{
lib,
buildGoModule,
fetchFromGitHub,
kubectl,
stdenv,
}:
buildGoModule (finalAttrs: {
pname = "gsctl";
version = "1.1.6";
src = fetchFromGitHub {
owner = "giantswarm";
repo = "gsctl";
rev = finalAttrs.version;
sha256 = "sha256-eemPsrSFwgUR1Jz7283jjwMkoJR38QiaiilI9G0IQuo=";
};
vendorHash = "sha256-6b4H8YAY8d/qIGnnGPYZoXne1LXHLsc0OEq0lCeqivo=";
patches = [
./go120-compatibility.patch
];
postPatch = ''
# fails on sandbox
rm commands/root_test.go
'';
ldflags = [
"-s"
"-w"
"-X github.com/giantswarm/gsctl/buildinfo.Version=${finalAttrs.version}"
];
nativeCheckInputs = [
kubectl
];
doCheck = !stdenv.hostPlatform.isDarwin;
meta = {
description = "Giant Swarm command line interface";
homepage = "https://github.com/giantswarm/gsctl";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ joesalisbury ];
mainProgram = "gsctl";
};
})
|