2021-12-06 16:07:01 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoModule }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "scaleway-cli";
|
2023-03-27 19:17:25 +00:00
|
|
|
version = "2.13.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scaleway";
|
|
|
|
repo = "scaleway-cli";
|
|
|
|
rev = "v${version}";
|
2023-03-27 19:17:25 +00:00
|
|
|
sha256 = "sha256-C8Yeq2Mwyc3oPQSby8NiNrSNHle7Mc7uexg+G17Cl3M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
vendorHash = "sha256-1OwzvGngSv8N5IFlB+vOKyPAaPnY4h2i0vKQAcQHt5o=";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-04-27 09:35:20 +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-12-06 16:07:01 +00:00
|
|
|
# some tests require network access to scaleway's API, failing when sandboxed
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Interact with Scaleway API from the command line";
|
|
|
|
homepage = "https://github.com/scaleway/scaleway-cli";
|
|
|
|
license = licenses.mit;
|
2022-10-30 15:09:59 +00:00
|
|
|
maintainers = with maintainers; [ nickhu techknowlogick ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|