@@ -79,45 +79,39 @@ final: prev: with final; {
79
79
# A generic, parameteric version of the workbench development environment.
80
80
workbench = pkgs . callPackage ./workbench { } ;
81
81
82
- supervisord-workbench-cabal =
83
- { workbench ? pkgs . workbench , ... } @ args : pkgs . callPackage ./workbench/backend/supervisor.nix ( args // { useCabalRun = true ; } ) ;
84
- supervisord-workbench-nix =
85
- { workbench ? pkgs . workbench , ... } @ args : pkgs . callPackage ./workbench/ backend/supervisor.nix args ;
82
+ all-profiles-json = ( workbench . all-profiles
83
+ { inherit ( workbench-instance { backendName = "supervisor" ;
84
+ profileName = "default-bage" ;
85
+ } ) backend ; } ) . JSON ;
86
86
87
- nomad-workbench =
88
- { workbench ? pkgs . workbench , ... } @args : pkgs . callPackage ./workbench/backend/nomad.nix ( args // { inherit nix2container ; } ) ;
89
-
90
- all-profiles-json = ( workbench . all-profiles { inherit ( supervisord-workbench-nix ) backend ; } ) . JSON ;
91
-
92
- # An instance of the workbench, specialised to the supervisord backend and a profile,
93
- # that can be used with nix-shell or lorri.
87
+ # A parametrisable workbench, that can be used with nix-shell or lorri.
94
88
# See https://input-output-hk.github.io/haskell.nix/user-guide/development/
95
- supervisord-workbench-for-profile =
96
- { batchName ? customConfig . localCluster . batchName
97
- , profileName ? customConfig . localCluster . profileName
98
- , useCabalRun ? false
99
- , workbenchDevMode ? false
100
- , profiled ? false
101
- , supervisord-workbench ? pkgs . callPackage ./workbench/backend/supervisor.nix { inherit useCabalRun ; }
102
- , cardano-node-rev ? null
103
- } :
104
- pkgs . callPackage ./workbench/backend/supervisor-run.nix
105
- {
106
- inherit batchName profileName supervisord-workbench cardano-node-rev ;
107
- } ;
108
-
109
- nomad-workbench-for-profile =
110
- { batchName ? customConfig . localCluster . batchName
89
+ workbench-instance =
90
+ let backendRegistry =
91
+ {
92
+ supervisor = {
93
+ backend-workbench = ./workbench/backend/supervisor.nix ;
94
+ workbench-runner = ./workbench/backend/supervisor-run.nix ;
95
+ } ;
96
+ nomad = {
97
+ backend-workbench = ./workbench/backend/nomad.nix ;
98
+ workbench-runner = ./workbench/backend/nomad-run.nix ;
99
+ } ;
100
+ } ;
101
+ in
102
+ { backendName
111
103
, profileName ? customConfig . localCluster . profileName
104
+ , batchName ? customConfig . localCluster . batchName
112
105
, useCabalRun ? false
113
106
, workbenchDevMode ? false
114
107
, profiled ? false
115
- , nomad-workbench ? pkgs . callPackage ./workbench/backend/nomad.nix { inherit nix2container ; }
108
+ , workbench ? pkgs . workbench
109
+ , backendWorkbench ? pkgs . callPackage ( backendRegistry . "${ backendName } " . backend-workbench ) { inherit useCabalRun workbench ; }
116
110
, cardano-node-rev ? null
117
111
} :
118
- pkgs . callPackage ./ workbench/backend/nomad-run.nix
112
+ pkgs . callPackage ( backendRegistry . " ${ backendName } " . workbench-runner )
119
113
{
120
- inherit batchName profileName nomad-workbench cardano-node-rev ;
114
+ inherit batchName profileName backendWorkbench cardano-node-rev ;
121
115
} ;
122
116
123
117
# Disable failing python uvloop tests
0 commit comments