7
7
##
8
8
, cardano-mainnet-mirror
9
9
##
10
- , profileName
10
+ , workbenchRun
11
11
, workbenchDevMode ? false
12
- , useCabalRun ? false
13
12
##
14
13
, profiled ? false
15
14
, withHoogle ? true
18
17
19
18
with lib ;
20
19
21
- let cluster = pkgs . supervisord-workbench-for-profile {
22
- inherit profileName useCabalRun profiled ;
23
- } ;
24
-
25
- inherit ( cluster ) profile ;
20
+ let
21
+ inherit ( workbenchRun ) profileName backend profile ;
26
22
27
- shellHook = { workbenchDevMode , useCabalRun , profiled , profileName , withMainnet } : ''
23
+ shellHook = { profileName , backend , workbenchDevMode , profiled , withMainnet } : ''
28
24
while test $# -gt 0
29
25
do shift; done ## Flush argv[]
30
26
31
- echo 'workbench shellHook: workbenchDevMode =${ toString workbenchDevMode } useCabalRun=${ toString useCabalRun } profiled =${ toString profiled } profileName =${ profileName } '
32
- export WB_BACKEND=supervisor
27
+ echo 'workbench shellHook: profileName =${ profileName } backendName= ${ backend . name } useCabalRun=${ toString backend . useCabalRun } workbenchDevMode =${ toString workbenchDevMode } profiled =${ toString profiled } '
28
+ export WB_BACKEND=${ backend . name }
33
29
export WB_SHELL_PROFILE=${ profileName }
34
30
export WB_SHELL_PROFILE_DIR=${ profile }
35
31
@@ -46,7 +42,7 @@ let cluster = pkgs.supervisord-workbench-for-profile {
46
42
'' }
47
43
48
44
${ optionalString
49
- useCabalRun
45
+ backend . useCabalRun
50
46
''
51
47
. nix/workbench/lib.sh
52
48
. nix/workbench/lib-cabal.sh ${ optionalString profiled "--profiled" }
@@ -74,7 +70,7 @@ let cluster = pkgs.supervisord-workbench-for-profile {
74
70
in project . shellFor {
75
71
name = "workbench-shell" ;
76
72
77
- shellHook = shellHook { inherit workbenchDevMode useCabalRun profiled profileName withMainnet ; } ;
73
+ shellHook = shellHook { inherit profileName backend workbenchDevMode profiled withMainnet ; } ;
78
74
79
75
inherit withHoogle ;
80
76
@@ -97,19 +93,14 @@ in project.shellFor {
97
93
# These programs will be available inside the nix-shell.
98
94
nativeBuildInputs = with pkgs ; with haskellPackages ; with cardanoNodePackages ; [
99
95
cardano-ping
100
- cabalWrapped
101
96
db-analyser
102
- ghcid
103
- haskellBuildUtils
104
97
pkgs . graphviz
105
98
graphmod
106
- cabal-plan
107
99
weeder
108
100
nixWrapped
109
101
pkgconfig
110
102
profiteur
111
103
profiterole
112
- python3Packages . supervisor
113
104
ghc-prof-flamegraph
114
105
sqlite-interactive
115
106
tmux
@@ -118,24 +109,17 @@ in project.shellFor {
118
109
pkgs . moreutils
119
110
pkgs . pstree
120
111
pkgs . time
121
- cluster . interactive-start
122
- cluster . interactive-stop
123
- cluster . interactive-restart
112
+ workbenchRun . interactive-start
113
+ workbenchRun . interactive-stop
114
+ workbenchRun . interactive-restart
124
115
] ++ lib . optional haveGlibcLocales pkgs . glibcLocales
125
- ## Workbench's main script is called directly in dev mode.
126
- ++ lib . optionals ( ! useCabalRun )
127
- [
128
- cardano-cli
129
- cardano-node
130
- cardano-topology
131
- cardano-tracer
132
- locli
133
- tx-generator
134
- ]
116
+ ++ lib . optionals ( ! backend . useCabalRun ) [ cardano-topology cardano-cli locli ]
117
+ ++ backend . extraShellPkgs
135
118
++ lib . optionals ( ! workbenchDevMode )
136
119
[
137
- cluster . workbench . workbench
138
- ] ;
120
+ workbenchRun . workbench . workbench
121
+ ]
122
+ ;
139
123
140
124
} // { inherit shellHook ;
141
125
}
0 commit comments