Skip to content

Commit

Permalink
Add mithril-client to shells and test environments
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Jan 16, 2024
1 parent 1024875 commit 74c9d60
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 20 deletions.
117 changes: 117 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
flake = false;
};
cardano-node.url = "github:input-output-hk/cardano-node/8.7.2";
mithril.url = "github:input-output-hk/mithril/2347.0";
};

outputs =
Expand All @@ -31,7 +32,7 @@
inherit system nixpkgs;
};
hydraPackages = import ./nix/hydra/packages.nix {
inherit hydraProject system pkgs cardano-node;
inherit hydraProject system pkgs inputs;
gitRev = self.rev or "dirty";
};
hydraImages = import ./nix/hydra/docker.nix {
Expand All @@ -52,12 +53,10 @@
};

devShells = (import ./nix/hydra/shell.nix {
inherit (inputs) cardano-node;
inherit hydraProject system;
inherit inputs hydraProject system;
}) // {
ci = (import ./nix/hydra/shell.nix {
inherit (inputs) cardano-node;
inherit hydraProject system;
inherit inputs hydraProject system;
withoutDevTools = true;
}).default;
};
Expand Down
13 changes: 7 additions & 6 deletions nix/hydra/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{ hydraProject # as defined in default.nix
, system ? builtins.currentSystem
, pkgs
, cardano-node
, inputs
, gitRev ? "unknown"
}:
let
Expand Down Expand Up @@ -132,9 +132,10 @@ rec {
[
nativePkgs.hydra-cluster.components.tests.tests
hydra-node
cardano-node.packages.${system}.cardano-node
cardano-node.packages.${system}.cardano-cli
hydra-chain-observer
inputs.cardano-node.packages.${system}.cardano-node
inputs.cardano-node.packages.${system}.cardano-cli
inputs.mithril.packages.${system}.mithril-client-cli
pkgs.check-jsonschema
];
};
Expand All @@ -144,7 +145,7 @@ rec {
[
nativePkgs.hydra-tui.components.tests.tests
hydra-node
cardano-node.packages.${system}.cardano-node
inputs.cardano-node.packages.${system}.cardano-node
];
};
};
Expand All @@ -163,8 +164,8 @@ rec {
[
nativePkgs.hydra-cluster.components.benchmarks.bench-e2e
hydra-node
cardano-node.packages.${system}.cardano-node
cardano-node.packages.${system}.cardano-cli
inputs.cardano-node.packages.${system}.cardano-node
inputs.cardano-node.packages.${system}.cardano-cli
];
};
plutus-merkle-tree = pkgs.mkShellNoCC {
Expand Down
22 changes: 13 additions & 9 deletions nix/hydra/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Used in CI to have a smaller closure
withoutDevTools ? false
, hydraProject
, cardano-node
, inputs
, system ? builtins.currentSystem
}:
let
Expand Down Expand Up @@ -49,7 +49,11 @@ let
# For plotting results of hydra-cluster benchmarks
pkgs.gnuplot
# For integration tests
cardano-node.packages.${system}.cardano-node
inputs.cardano-node.packages.${system}.cardano-node
# To interact with cardano-node and integration tests
inputs.cardano-node.packages.${system}.cardano-cli
# To interact with mithril and integration tests
inputs.mithril.packages.${system}.mithril-client-cli
];

devInputs = if withoutDevTools then [ ] else [
Expand All @@ -66,8 +70,6 @@ let
# For docs/ (i.e. Docusaurus, Node.js & React)
pkgs.yarn
pkgs.nodejs
# To interact with cardano-node and testing out things
cardano-node.packages.${system}.cardano-cli
];

haskellNixShell = hsPkgs.shellFor {
Expand Down Expand Up @@ -117,15 +119,17 @@ let
STACK_IN_NIX_SHELL = "true";
};

# A shell which does provide hydra-node and hydra-cluster executables.
# A shell which does provide hydra-node and hydra-cluster executables along
# with cardano-node, cardano-cli and mithril-client.
exeShell = pkgs.mkShell {
name = "hydra-node-exe-shell";

buildInputs = [
hsPkgs.hydra-node.components.exes.hydra-node
hsPkgs.hydra-cluster.components.exes.hydra-cluster
cardano-node.packages.${system}.cardano-node
cardano-node.packages.${system}.cardano-cli
inputs.cardano-node.packages.${system}.cardano-node
inputs.cardano-node.packages.${system}.cardano-cli
inputs.mithril.packages.${system}.mithril-client-cli
];
};

Expand All @@ -136,8 +140,8 @@ let
hsPkgs.hydra-node.components.exes.hydra-node
hsPkgs.hydra-tui.components.exes.hydra-tui
run-tmux
cardano-node.packages.${system}.cardano-node
cardano-node.packages.${system}.cardano-cli
inputs.cardano-node.packages.${system}.cardano-node
inputs.cardano-node.packages.${system}.cardano-cli
];
};

Expand Down

0 comments on commit 74c9d60

Please sign in to comment.