diff options
author | superherointj <5861043+superherointj@users.noreply.github.com> | 2022-03-16 14:37:53 -0300 |
---|---|---|
committer | superherointj <5861043+superherointj@users.noreply.github.com> | 2022-03-16 15:37:05 -0300 |
commit | 185976d4959ab3ff3905f37b0ad0ea0334615fd4 (patch) | |
tree | a9f2715b5e891591b7dadec97e049397d5e1cdc2 /pkgs/tools/admin/berglas | |
parent | ed32ed96331c213ebc2a0c579008f96efc89dcc9 (diff) |
berglas: 0.5.1 -> 0.6.2
* Tests enabled.
Diffstat (limited to 'pkgs/tools/admin/berglas')
-rw-r--r-- | pkgs/tools/admin/berglas/default.nix | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/pkgs/tools/admin/berglas/default.nix b/pkgs/tools/admin/berglas/default.nix index 8a6bb559041bb..bf86a5c02ecf1 100644 --- a/pkgs/tools/admin/berglas/default.nix +++ b/pkgs/tools/admin/berglas/default.nix @@ -1,19 +1,44 @@ { lib, buildGoModule, fetchFromGitHub }: +let + skipTests = { + access = "Access"; + create = "Create"; + delete = "Delete"; + list = "List"; + read = "Read"; + replace = "Replace"; + resolver = "Resolve"; + revoke = "Revoke"; + update = "Update"; + }; + + skipTestsCommand = + builtins.foldl' (acc: goFileName: + let testName = builtins.getAttr goFileName skipTests; in + '' + ${acc} + substituteInPlace pkg/berglas/${goFileName}_test.go \ + --replace "TestClient_${testName}_storage" "SkipClient_${testName}_storage" \ + --replace "TestClient_${testName}_secretManager" "SkipClient_${testName}_secretManager" + '' + ) "" (builtins.attrNames skipTests); +in + buildGoModule rec { pname = "berglas"; - version = "0.5.1"; + version = "0.6.2"; src = fetchFromGitHub { owner = "GoogleCloudPlatform"; repo = pname; rev = "v${version}"; - sha256 = "0y393g36h35zzqyf5b10j6qq2jhvz83j17cmasnv6wbyrb3vnn0n"; + sha256 = "sha256-aLsrrK+z080qn7L2zggA8yD+QqLaSRJLTjWQnFKFogQ="; }; - vendorSha256 = null; + vendorSha256 = "sha256-HjZT0jezJzoEvXuzrjoTv/zSex+xDuGoP1h82CIlX14="; - doCheck = false; + postPatch = skipTestsCommand; meta = with lib; { description = "A tool for managing secrets on Google Cloud"; |