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-09-22 19:13:42 +00:00
|
|
|
version = "2.6.0";
|
2017-08-22 13:14:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scaleway";
|
|
|
|
repo = "scaleway-cli";
|
|
|
|
rev = "v${version}";
|
2022-09-22 19:13:42 +00:00
|
|
|
sha256 = "sha256-wWyykSNSv6Fp+/f54LhYeArXXzRreHdqso28cM1/fl0=";
|
2017-08-22 13:14:37 +00:00
|
|
|
};
|
|
|
|
|
2022-09-22 19:13:42 +00:00
|
|
|
vendorSha256 = "sha256-awq4rObflJbKjZ2tJrZZMJklXBDwTjuRE8sS3iZBefk=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|