2021-10-25 17:34:31 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "metal-cli";
|
2022-06-26 04:02:05 +00:00
|
|
|
version = "0.9.0";
|
2021-10-25 17:34:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "equinix";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-06-26 04:02:05 +00:00
|
|
|
sha256 = "sha256-ivO4YFFDTza20WgTGEaSGUcIEvXVtwKKVGyKWe8d9bA=";
|
2021-10-25 17:34:31 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 04:02:05 +00:00
|
|
|
vendorSha256 = "sha256-rf0EWMVvuoPUMTQKi/FnUbE2ZAs0C7XosHAzCgwB5wg=";
|
2022-04-20 16:48:11 +00:00
|
|
|
|
2022-02-09 16:01:32 +00:00
|
|
|
ldflags = [
|
2022-04-20 16:48:11 +00:00
|
|
|
"-s" "-w"
|
2022-02-09 16:01:32 +00:00
|
|
|
"-X github.com/equinix/metal-cli/cmd.Version=${version}"
|
|
|
|
];
|
|
|
|
|
2021-10-25 17:34:31 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-04-20 16:48:11 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/metal --version | grep ${version}
|
|
|
|
'';
|
|
|
|
|
2021-10-25 17:34:31 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Official Equinix Metal CLI";
|
|
|
|
homepage = "https://github.com/equinix/metal-cli/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ Br1ght0ne nshalman ];
|
2022-04-01 19:34:55 +00:00
|
|
|
mainProgram = "metal";
|
2021-10-25 17:34:31 +00:00
|
|
|
};
|
|
|
|
}
|