2021-10-04 03:17:06 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
2022-03-28 06:41:01 +00:00
|
|
|
pname = "rancher";
|
2024-08-21 11:11:52 +00:00
|
|
|
version = "2.9.0";
|
2021-10-04 03:17:06 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rancher";
|
|
|
|
repo = "cli";
|
|
|
|
rev = "v${version}";
|
2024-08-21 11:11:52 +00:00
|
|
|
hash = "sha256-YyNzqihoQNMmROLeD7/KOU6mTe/UMKgRwGPxCjIglDM=";
|
2021-10-04 03:17:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-w"
|
|
|
|
"-s"
|
|
|
|
"-X main.VERSION=${version}"
|
|
|
|
"-extldflags"
|
|
|
|
"-static"
|
|
|
|
];
|
|
|
|
|
2024-08-21 11:11:52 +00:00
|
|
|
vendorHash = "sha256-BvT5Awn4o8AbCSaUPLuAIsayC2oj2to4VSZpxQlKKSM=";
|
2021-10-04 03:17:06 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/cli $out/bin/rancher
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/rancher | grep ${version} > /dev/null
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Rancher Command Line Interface (CLI) is a unified tool for interacting with your Rancher Server";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "rancher";
|
2021-10-04 03:17:06 +00:00
|
|
|
homepage = "https://github.com/rancher/cli";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ bryanasdev000 ];
|
|
|
|
};
|
|
|
|
}
|