From 4b41bb45ca1f63259c4cfa20bdb4db93184eda8c Mon Sep 17 00:00:00 2001 From: kashw2 Date: Sun, 24 Dec 2023 07:00:52 +1000 Subject: [PATCH 1/4] scaleway-cli: 2.25.0 -> 2.26.0 --- pkgs/tools/admin/scaleway-cli/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/admin/scaleway-cli/default.nix b/pkgs/tools/admin/scaleway-cli/default.nix index b27c95793ca2..4b1b4ae8f1fa 100644 --- a/pkgs/tools/admin/scaleway-cli/default.nix +++ b/pkgs/tools/admin/scaleway-cli/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "scaleway-cli"; - version = "2.25.0"; + version = "2.26.0"; src = fetchFromGitHub { owner = "scaleway"; repo = "scaleway-cli"; rev = "v${version}"; - sha256 = "sha256-wx/247ZNbdNdRiGLTfCig1JAjmXZX0aCHbOgelzMcyw="; + sha256 = "sha256-RfXNwuynlELT7gVWjlhjaX5nKuBJM+v6eAD/JCuRyck="; }; - vendorHash = "sha256-FftJsXM9sexRqBKrIeTdWh5Z0eYIK3acDNtptqqILD8="; + vendorHash = "sha256-hBfEQtuBkU2fKoCd78dpp+I19lTOycItqjlcA6KByLY="; ldflags = [ "-w" From 6a64808fc877bb901aceca2143a9e4cbb8995dcc Mon Sep 17 00:00:00 2001 From: kashw2 Date: Sun, 24 Dec 2023 07:21:12 +1000 Subject: [PATCH 2/4] scaleway-cli: re-enabled `checkPhase` --- pkgs/tools/admin/scaleway-cli/default.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/scaleway-cli/default.nix b/pkgs/tools/admin/scaleway-cli/default.nix index 4b1b4ae8f1fa..55ded4e067b2 100644 --- a/pkgs/tools/admin/scaleway-cli/default.nix +++ b/pkgs/tools/admin/scaleway-cli/default.nix @@ -23,8 +23,24 @@ buildGoModule rec { "-X main.BuildDate=unknown" ]; - # some tests require network access to scaleway's API, failing when sandboxed - doCheck = false; + doCheck = true; + + # Some tests require access to scaleway's API, failing when sandboxed + preCheck = '' + substituteInPlace internal/core/bootstrap_test.go \ + --replace "TestInterruptError" "SkipInterruptError" + substituteInPlace internal/e2e/errors_test.go \ + --replace "TestStandardErrors" "SkipStandardErrors" + substituteInPlace internal/e2e/human_test.go \ + --replace "TestTestCommand" "SkipTestCommand" \ + --replace "TestHumanCreate" "SkipHumanCreate" \ + --replace "TestHumanList" "SkipHumanList" \ + --replace "TestHumanUpdate" "SkipHumanUpdate" \ + --replace "TestHumanGet" "SkipHumanGet" \ + --replace "TestHumanDelete" "SkipHumanDelete" + substituteInPlace internal/e2e/sdk_errors_test.go \ + --replace "TestSdkStandardErrors" "SkipSdkStandardErrors" + ''; meta = with lib; { description = "Interact with Scaleway API from the command line"; From da84afe312230ca7c2ddf604df7f273a5a60cd43 Mon Sep 17 00:00:00 2001 From: kashw2 Date: Sun, 24 Dec 2023 07:22:59 +1000 Subject: [PATCH 3/4] scaleway-cli: configured `installCheckPhase` --- pkgs/tools/admin/scaleway-cli/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/tools/admin/scaleway-cli/default.nix b/pkgs/tools/admin/scaleway-cli/default.nix index 55ded4e067b2..893b72447754 100644 --- a/pkgs/tools/admin/scaleway-cli/default.nix +++ b/pkgs/tools/admin/scaleway-cli/default.nix @@ -42,6 +42,16 @@ buildGoModule rec { --replace "TestSdkStandardErrors" "SkipSdkStandardErrors" ''; + doInstallCheck = true; + + installCheckPhase = '' + runHook preInstallCheck + + $out/bin/scw --help + + runHook postInstallCheck + ''; + meta = with lib; { description = "Interact with Scaleway API from the command line"; homepage = "https://github.com/scaleway/scaleway-cli"; From 9f46de92e8f2713600cdd86f59a264030c976a20 Mon Sep 17 00:00:00 2001 From: kashw2 Date: Sun, 24 Dec 2023 07:25:23 +1000 Subject: [PATCH 4/4] scaleway-cli: added `kashw2` as a maintainer --- pkgs/tools/admin/scaleway-cli/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/admin/scaleway-cli/default.nix b/pkgs/tools/admin/scaleway-cli/default.nix index 893b72447754..c33f720ebad0 100644 --- a/pkgs/tools/admin/scaleway-cli/default.nix +++ b/pkgs/tools/admin/scaleway-cli/default.nix @@ -56,6 +56,6 @@ buildGoModule rec { description = "Interact with Scaleway API from the command line"; homepage = "https://github.com/scaleway/scaleway-cli"; license = licenses.mit; - maintainers = with maintainers; [ nickhu techknowlogick ]; + maintainers = with maintainers; [ nickhu techknowlogick kashw2 ]; }; }