2022-04-05 20:52:55 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, kubectl, stdenv }:
|
2019-06-30 19:00:21 +00:00
|
|
|
|
2022-02-18 16:42:24 +00:00
|
|
|
buildGoModule rec {
|
2019-06-30 19:00:21 +00:00
|
|
|
pname = "gsctl";
|
2022-07-28 13:55:12 +00:00
|
|
|
version = "1.1.6";
|
2019-06-30 19:00:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "giantswarm";
|
|
|
|
repo = pname;
|
2022-02-18 16:42:24 +00:00
|
|
|
rev = version;
|
2022-07-28 13:55:12 +00:00
|
|
|
sha256 = "sha256-eemPsrSFwgUR1Jz7283jjwMkoJR38QiaiilI9G0IQuo=";
|
2019-06-30 19:00:21 +00:00
|
|
|
};
|
|
|
|
|
2023-09-13 04:44:46 +00:00
|
|
|
vendorHash = "sha256-6b4H8YAY8d/qIGnnGPYZoXne1LXHLsc0OEq0lCeqivo=";
|
2022-02-18 16:42:24 +00:00
|
|
|
|
2024-01-18 04:20:00 +00:00
|
|
|
patches = [
|
|
|
|
./go120-compatibility.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# fails on sandbox
|
|
|
|
rm commands/root_test.go
|
|
|
|
'';
|
|
|
|
|
2022-04-05 20:52:55 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w"
|
|
|
|
"-X github.com/giantswarm/gsctl/buildinfo.Version=${version}"
|
|
|
|
];
|
2022-02-18 16:42:24 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-05 20:52:55 +00:00
|
|
|
kubectl
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2022-02-18 16:42:24 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2024-06-07 08:04:29 +00:00
|
|
|
description = "Giant Swarm command line interface";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/giantswarm/gsctl";
|
2019-06-30 19:00:21 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ joesalisbury ];
|
2024-02-11 02:19:15 +00:00
|
|
|
mainProgram = "gsctl";
|
2019-06-30 19:00:21 +00:00
|
|
|
};
|
|
|
|
}
|