Skip to content

Commit

Permalink
Make shell packages backend dependent
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaste committed Nov 3, 2022
1 parent b01cb6f commit 6fd229d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
18 changes: 18 additions & 0 deletions nix/workbench/backend/supervisor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ let

services-config = import ./services-config.nix {inherit lib workbench basePort stateDir useCabalRun enableEKG;};

extraShellPkgs = with pkgs; [
python3Packages.supervisor
]
++ lib.optionals ( useCabalRun)
(with haskellPackages; [
cabalWrapped
ghcid
haskellBuildUtils
cabal-plan
])
## Workbench's main script is called directly in dev mode.
++ lib.optionals (!useCabalRun)
[
cardano-node
cardano-tracer
tx-generator
];

materialise-profile =
{ profileNix }:
pkgs.runCommand "workbench-backend-output-${profileNix.name}-${name}d"
Expand Down
22 changes: 6 additions & 16 deletions nix/workbench/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ let cluster = pkgs.nomad-workbench-for-profile {
inherit profileName useCabalRun profiled;
};

useCabalRun = false;

inherit (cluster) backend profile;

shellHook = { workbenchDevMode, useCabalRun, profiled, profileName, withMainnet }: ''
Expand Down Expand Up @@ -97,19 +99,14 @@ in project.shellFor {
# These programs will be available inside the nix-shell.
nativeBuildInputs = with pkgs; with haskellPackages; with cardanoNodePackages; [
cardano-ping
cabalWrapped
db-analyser
ghcid
haskellBuildUtils
pkgs.graphviz
graphmod
cabal-plan
weeder
nixWrapped
pkgconfig
profiteur
profiterole
python3Packages.supervisor
ghc-prof-flamegraph
sqlite-interactive
tmux
Expand All @@ -122,20 +119,13 @@ in project.shellFor {
cluster.interactive-stop
cluster.interactive-restart
] ++ lib.optional haveGlibcLocales pkgs.glibcLocales
## Workbench's main script is called directly in dev mode.
++ lib.optionals (!useCabalRun)
[
cardano-cli
cardano-node
cardano-topology
cardano-tracer
locli
tx-generator
]
++ lib.optionals (!useCabalRun) [cardano-topology cardano-cli locli]
++ backend.extraShellPkgs
++ lib.optionals (!workbenchDevMode)
[
cluster.workbench.workbench
];
]
;

} // { inherit shellHook;
}

0 comments on commit 6fd229d

Please sign in to comment.