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-04 12:14:45 +00:00
|
|
|
version = "2.11.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scaleway";
|
|
|
|
repo = "scaleway-cli";
|
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-tE2r2d3dagMvfPq/2G61KMPZyz6YQG3jAD+MjQ3uYbg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
vendorHash = "sha256-eqVAX6l7wsHqFjzwLiTSwryLHxl0aJqQOmjyGeM+1co=";
|
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
|
|
|
};
|
|
|
|
}
|