Skip to content

Commit

Permalink
Revert "wb | remove indirection / skip the workbench (bash)"
Browse files Browse the repository at this point in the history
This reverts commit ec73d74e784a89ca4eef9af4ad036786c27a130c.
  • Loading branch information
fmaste committed Sep 17, 2024
1 parent 8782427 commit c10a886
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
13 changes: 4 additions & 9 deletions nix/workbench/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,22 @@ let
${workbench}/bin/wb ${command} > $out
'';

runCardanoProfile =
name: command:
pkgs.runCommand name {} ''
${cardanoNodePackages.cardano-profile}/bin/cardano-profile ${command} > $out
'';

runJq =
name: args: query:
pkgs.runCommand name {} ''
args=(${args})
${pkgs.jq}/bin/jq '${query}' "''${args[@]}" > $out
'';

profile-names-json = runCardanoProfile "profile-names.json" "names";
profile-names-json =
runWorkbench "profile-names.json" "profiles list";

profile-names = __fromJSON (__readFile profile-names-json);
profile-names =
__fromJSON (__readFile profile-names-json);

in pkgs.lib.fix (self: {
inherit cardanoNodePackages;
inherit workbench' workbench runWorkbench;
inherit runCardanoProfile;
inherit runJq;

inherit profile-names-json profile-names;
Expand Down
4 changes: 2 additions & 2 deletions nix/workbench/profile/profile.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

let
profileJson =
workbenchNix.runCardanoProfile "profile-${profileName}.json"
"by-name ${profileName}"
workbenchNix.runWorkbench "profile-${profileName}.json"
"profile json ${profileName}"
;

topologyFiles =
Expand Down

0 comments on commit c10a886

Please sign in to comment.