1{ lib, fetchFromGitHub, buildGoModule }:
2
3buildGoModule rec {
4 pname = "scaleway-cli";
5 version = "2.24.0";
6
7 src = fetchFromGitHub {
8 owner = "scaleway";
9 repo = "scaleway-cli";
10 rev = "v${version}";
11 sha256 = "sha256-Q65X2lsR5jyWXxxmkvUA0yG4miD+KUSBGRFXvH4KBGY=";
12 };
13
14 vendorHash = "sha256-mZ2XFZS5tqtRUhdo6AOCY4xSaYgxUEy1OFbyzsbCEnU=";
15
16 ldflags = [
17 "-w"
18 "-extldflags"
19 "-static"
20 "-X main.Version=${version}"
21 "-X main.GitCommit=ref/tags/${version}"
22 "-X main.GitBranch=HEAD"
23 "-X main.BuildDate=unknown"
24 ];
25
26 # some tests require network access to scaleway's API, failing when sandboxed
27 doCheck = false;
28
29 meta = with lib; {
30 description = "Interact with Scaleway API from the command line";
31 homepage = "https://github.com/scaleway/scaleway-cli";
32 license = licenses.mit;
33 maintainers = with maintainers; [ nickhu techknowlogick ];
34 };
35}