Skip to content

Commit

Permalink
workbench: remove duplicate code/file
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaste committed Nov 30, 2022
1 parent 68087d4 commit 169d114
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 168 deletions.
19 changes: 7 additions & 12 deletions nix/pkgs.nix
Expand Up @@ -88,16 +88,10 @@ final: prev: with final; {
# See https://input-output-hk.github.io/haskell.nix/user-guide/development/
workbench-instance =
let backendRegistry =
{
supervisor = {
backend-workbench = ./workbench/backend/supervisor.nix;
workbench-runner = ./workbench/backend/supervisor-run.nix;
};
nomad = {
backend-workbench = ./workbench/backend/nomad.nix;
workbench-runner = ./workbench/backend/nomad-run.nix;
};
};
{
supervisor = ./workbench/backend/supervisor.nix;
nomad = ./workbench/backend/nomad.nix;
};
in
{ backendName
, profileName ? customConfig.localCluster.profileName
Expand All @@ -106,10 +100,11 @@ final: prev: with final; {
, workbenchDevMode ? false
, profiled ? false
, workbench ? pkgs.workbench
, backendWorkbench ? pkgs.callPackage (backendRegistry."${backendName}".backend-workbench) { inherit useCabalRun workbench; }
, backendWorkbench ? pkgs.callPackage (backendRegistry."${backendName}")
{ inherit useCabalRun workbench; }
, cardano-node-rev ? null
}:
pkgs.callPackage (backendRegistry."${backendName}".workbench-runner)
pkgs.callPackage ./workbench/backend/run.nix
{
inherit batchName profileName backendWorkbench cardano-node-rev;
};
Expand Down
153 changes: 0 additions & 153 deletions nix/workbench/backend/nomad-run.nix

This file was deleted.

Expand Up @@ -17,6 +17,8 @@ let

backendName = backendWorkbench.backend.name;

useCabalRun = backendWorkbench.backend.useCabalRun;

with-backend-profile =
{ envArgsOverride ? {} }: ## TODO: envArgsOverride is not used!
workbench.with-profile
Expand Down Expand Up @@ -47,7 +49,7 @@ in
--profile ${profile} \
--cache-dir ${cacheDir} \
--base-port ${toString basePort} \
''${WB_MODE_CABAL:+--cabal} \
${pkgs.lib.optionalString useCabalRun ''--cabal \''}
"$@"
'';

Expand Down Expand Up @@ -87,10 +89,12 @@ in
moreutils
nixWrapped
pstree
python3Packages.supervisor
workbench.workbench
zstd
];
]
++
backendWorkbench.backend.extraShellPkgs
;
}
''
mkdir -p $out/{cache,nix-support}
Expand Down

0 comments on commit 169d114

Please sign in to comment.