@@ -4,6 +4,7 @@ let defaultCustomConfig = import ./nix/custom-config.nix defaultCustomConfig;
4
4
in
5
5
{ withHoogle ? defaultCustomConfig . withHoogle
6
6
, profileName ? defaultCustomConfig . localCluster . profileName
7
+ , backendName ? defaultCustomConfig . localCluster . backendName
7
8
, workbenchDevMode ? defaultCustomConfig . localCluster . workbenchDevMode
8
9
, useCabalRun ? true
9
10
, customConfig ? {
55
56
56
57
haveGlibcLocales = pkgs . glibcLocales != null && stdenv . hostPlatform . libc == "glibc" ;
57
58
58
- workbench-shell = with customConfig . localCluster ;
59
- import ./nix/workbench/shell.nix
60
- { inherit pkgs lib haskellLib project ;
61
- inherit setLocale haveGlibcLocales commandHelp ;
62
- inherit cardano-mainnet-mirror ;
63
- inherit profileName workbenchDevMode useCabalRun ;
64
- inherit profiled withHoogle ;
65
- } ;
59
+ workbench-shell =
60
+ let
61
+ workbenchRun =
62
+ if backendName == "nomad"
63
+ then pkgs . nomad-workbench-for-profile
64
+ { inherit profileName useCabalRun profiled ; }
65
+ # Supervidor by default.
66
+ else pkgs . supervisord-workbench-for-profile
67
+ { inherit profileName useCabalRun profiled ; }
68
+ ;
69
+ in with customConfig . localCluster ;
70
+ import ./nix/workbench/shell.nix
71
+ { inherit pkgs lib haskellLib project ;
72
+ inherit setLocale haveGlibcLocales commandHelp ;
73
+ inherit cardano-mainnet-mirror ;
74
+ inherit workbenchRun workbenchDevMode ;
75
+ inherit profiled withHoogle ;
76
+ } ;
66
77
67
78
devops =
68
- let devopsShellParams =
69
- { inherit workbenchDevMode profiled ;
70
- profileName = "devops-bage" ;
71
- withMainnet = false ;
79
+ let profileName = "devops-bage" ;
80
+ workbenchRun = pkgs . supervisord-workbench-for-profile
81
+ {
82
+ inherit profileName ;
72
83
useCabalRun = false ;
73
84
} ;
74
- cluster = pkgs . supervisord-workbench-for-profile
75
- {
76
- inherit ( devopsShellParams ) profileName useCabalRun ;
85
+ devopsShellParams =
86
+ { inherit profileName ;
87
+ backend = workbenchRun . backend ;
88
+ inherit workbenchDevMode profiled ;
89
+ withMainnet = false ;
77
90
} ;
91
+ devopsShell = with customConfig . localCluster ;
92
+ import ./nix/workbench/shell.nix
93
+ { inherit pkgs lib haskellLib project ;
94
+ inherit setLocale haveGlibcLocales commandHelp ;
95
+ inherit cardano-mainnet-mirror ;
96
+ inherit workbenchRun workbenchDevMode ;
97
+ inherit profiled withHoogle ;
98
+ } ;
78
99
in project . shellFor {
79
100
name = "devops-shell" ;
80
101
94
115
pkgs . graphviz
95
116
python3Packages . supervisor
96
117
python3Packages . ipython
97
- cluster . interactive-start
98
- cluster . interactive-stop
99
- cluster . interactive-restart
118
+ workbenchRun . interactive-start
119
+ workbenchRun . interactive-stop
120
+ workbenchRun . interactive-restart
100
121
cardanolib-py
101
- cluster . workbench . workbench
122
+ workbenchRun . workbench . workbench
102
123
pstree
103
124
pkgs . time
104
125
] ;
@@ -108,10 +129,10 @@ let
108
129
| ${ figlet } /bin/figlet -f banner -c \
109
130
| ${ lolcat } /bin/lolcat
110
131
111
- ${ workbench-shell . shellHook devopsShellParams }
132
+ ${ devopsShell . shellHook devopsShellParams }
112
133
113
134
# Socket path default to first node launched by "start-cluster":
114
- export CARDANO_NODE_SOCKET_PATH=$(wb backend get-node-socket-path ${ cluster . stateDir } 'node-0')
135
+ export CARDANO_NODE_SOCKET_PATH=$(wb backend get-node-socket-path ${ workbenchRun . stateDir } 'node-0')
115
136
116
137
${ setLocale }
117
138
0 commit comments