Skip to content

Commit 430c2b3

Browse files
committed
workbench: get rid of the profileOverrides
1 parent f269c2b commit 430c2b3

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

nix/workbench/profiles/default.nix

+6-18
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,11 @@
55
, backend
66

77
, profileName
8-
, profileOverride ? {}
98
}:
109

1110
let
12-
baseJSON = runWorkbenchJqOnly "profile-${profileName}.json"
13-
"profile json ${profileName}";
14-
JSON =
15-
if profileOverride == {}
16-
then baseJSON
17-
else
18-
runJq "profile-${profileName}-overridden.json"
19-
''--slurpfile profile ${baseJSON}
20-
--slurpfile override ${writeText "profile-override.json" profileOverride}
21-
--null-input
22-
''
23-
"($profile[0] * $override[0])";
11+
JSON = runWorkbenchJqOnly "profile-${profileName}.json"
12+
"profile json ${profileName}";
2413

2514
value = __fromJSON (__readFile JSON);
2615

@@ -31,14 +20,13 @@ let
3120
inherit JSON value;
3221

3322
topology.files =
34-
runCommand "topology-${profile.name}" {}
35-
"${workbench}/bin/wb topology make ${profile.JSON} $out";
23+
runCommand "topology-${profileName}" {}
24+
"${workbench}/bin/wb topology make ${JSON} $out";
3625

3726
node-specs =
3827
rec {
39-
JSON = runWorkbenchJqOnly
40-
"node-specs-${profile.name}.json"
41-
"profile node-specs ${profile.JSON}";
28+
JSON = runWorkbenchJqOnly "node-specs-${profileName}.json"
29+
"profile node-specs ${JSON}";
4230

4331
value = __fromJSON (__readFile JSON);
4432
};

0 commit comments

Comments
 (0)