tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
berglas: 0.5.1 -> 0.6.2
* Tests enabled.
superherointj
3 years ago
185976d4
ed32ed96
+29
-4
1 changed file
expand all
collapse all
unified
split
pkgs
tools
admin
berglas
default.nix
+29
-4
pkgs/tools/admin/berglas/default.nix
···
1
{ lib, buildGoModule, fetchFromGitHub }:
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
buildGoModule rec {
4
pname = "berglas";
5
-
version = "0.5.1";
6
7
src = fetchFromGitHub {
8
owner = "GoogleCloudPlatform";
9
repo = pname;
10
rev = "v${version}";
11
-
sha256 = "0y393g36h35zzqyf5b10j6qq2jhvz83j17cmasnv6wbyrb3vnn0n";
12
};
13
14
-
vendorSha256 = null;
15
16
-
doCheck = false;
17
18
meta = with lib; {
19
description = "A tool for managing secrets on Google Cloud";
···
1
{ lib, buildGoModule, fetchFromGitHub }:
2
3
+
let
4
+
skipTests = {
5
+
access = "Access";
6
+
create = "Create";
7
+
delete = "Delete";
8
+
list = "List";
9
+
read = "Read";
10
+
replace = "Replace";
11
+
resolver = "Resolve";
12
+
revoke = "Revoke";
13
+
update = "Update";
14
+
};
15
+
16
+
skipTestsCommand =
17
+
builtins.foldl' (acc: goFileName:
18
+
let testName = builtins.getAttr goFileName skipTests; in
19
+
''
20
+
${acc}
21
+
substituteInPlace pkg/berglas/${goFileName}_test.go \
22
+
--replace "TestClient_${testName}_storage" "SkipClient_${testName}_storage" \
23
+
--replace "TestClient_${testName}_secretManager" "SkipClient_${testName}_secretManager"
24
+
''
25
+
) "" (builtins.attrNames skipTests);
26
+
in
27
+
28
buildGoModule rec {
29
pname = "berglas";
30
+
version = "0.6.2";
31
32
src = fetchFromGitHub {
33
owner = "GoogleCloudPlatform";
34
repo = pname;
35
rev = "v${version}";
36
+
sha256 = "sha256-aLsrrK+z080qn7L2zggA8yD+QqLaSRJLTjWQnFKFogQ=";
37
};
38
39
+
vendorSha256 = "sha256-HjZT0jezJzoEvXuzrjoTv/zSex+xDuGoP1h82CIlX14=";
40
41
+
postPatch = skipTestsCommand;
42
43
meta = with lib; {
44
description = "A tool for managing secrets on Google Cloud";