depot/pkgs/applications/misc/gsctl/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

43 lines
917 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.hostPlatform.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";
};
}