depot/third_party/nixpkgs/pkgs/applications/misc/gsctl/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

43 lines
904 B
Nix

{ lib, buildGoModule, fetchFromGitHub, kubectl, stdenv }:
buildGoModule rec {
pname = "gsctl";
version = "1.1.6";
src = fetchFromGitHub {
owner = "giantswarm";
repo = pname;
rev = 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=${version}"
];
nativeCheckInputs = [
kubectl
];
doCheck = !stdenv.isDarwin;
meta = with lib; {
description = "Giant Swarm command line interface";
homepage = "https://github.com/giantswarm/gsctl";
license = licenses.asl20;
maintainers = with maintainers; [ joesalisbury ];
mainProgram = "gsctl";
};
}