2021-11-22 19:06:18 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoModule }:
|
2017-08-22 13:14:37 +00:00
|
|
|
|
2021-11-22 19:06:18 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "scaleway-cli";
|
2022-04-09 19:08:52 +00:00
|
|
|
version = "2.5.1";
|
2017-08-22 13:14:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scaleway";
|
|
|
|
repo = "scaleway-cli";
|
|
|
|
rev = "v${version}";
|
2022-04-09 19:08:52 +00:00
|
|
|
sha256 = "sha256-a8imZN3APQEb9ntQOzOKGBEiPKmb5ZYC9ZKnOuLiElc=";
|
2017-08-22 13:14:37 +00:00
|
|
|
};
|
|
|
|
|
2022-04-09 19:08:52 +00:00
|
|
|
vendorSha256 = "sha256-aaYS0WqNa8997kdV38blUsYovtUHHtEUXCTG9vwv2ko=";
|
2021-11-22 19:06:18 +00:00
|
|
|
|
2022-04-18 04:15:02 +00:00
|
|
|
ldflags = [
|
|
|
|
"-w"
|
|
|
|
"-extldflags"
|
|
|
|
"-static"
|
|
|
|
"-X main.Version=${version}"
|
|
|
|
"-X main.GitCommit=ref/tags/${version}"
|
|
|
|
"-X main.GitBranch=HEAD"
|
|
|
|
"-X main.BuildDate=unknown"
|
|
|
|
];
|
|
|
|
|
2021-11-22 19:06:18 +00:00
|
|
|
# some tests require network access to scaleway's API, failing when sandboxed
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-08-22 13:14:37 +00:00
|
|
|
description = "Interact with Scaleway API from the command line";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/scaleway/scaleway-cli";
|
2017-08-22 13:14:37 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nickhu ];
|
|
|
|
};
|
|
|
|
}
|