Skip to content

Commit

Permalink
Update nix derivations with validator cmd path
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbertra committed Sep 19, 2023
1 parent 1821b87 commit a8edb26
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 4 additions & 1 deletion nix/marlowe-cardano/compose.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
let
inherit (pkgs) z3 sqitchPg postgresql runCommand writeShellScriptBin writeText glibcLocales;
network = inputs'.self.networks.preview;
inherit (inputs') marlowe-plutus;

mkSqitchRunner = name: path: writeShellScriptBin name ''
export PATH="$PATH:${l.makeBinPath [ sqitchPg postgresql ]}"
Expand Down Expand Up @@ -48,7 +49,7 @@ let

run-runtime = writeShellScriptBin "run-marlowe-runtime" ''
set -e
export PATH="$PATH:${l.makeBinPath [ z3 ]}"
export PATH="$PATH:${l.makeBinPath [ z3 marlowe-plutus.packages.marlowe-minting-validator ]}"
PROG=${l.escapeShellArg "marlowe-runtime"}
PKG=${l.escapeShellArg "marlowe-runtime"}-${l.escapeShellArg marloweRuntimeVersion}
cd /src
Expand Down Expand Up @@ -301,6 +302,8 @@ let
network.nodeConfig.ByronGenesisHash
"--shelley-genesis-config-file"
network.nodeConfig.ShelleyGenesisFile
"--minting-policy-cmd"
"marlowe-minting-validator"
];
environment = [
"TZ=UTC"
Expand Down
12 changes: 8 additions & 4 deletions nix/marlowe-cardano/deploy/operables.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ inputs', pkgs, l, ... }:

let
inherit (inputs') self std;
inherit (inputs') self std marlowe-plutus;
inherit (pkgs)
jq
sqitchPg
Expand Down Expand Up @@ -334,7 +334,7 @@ in

marlowe-tx = mkOperableWithProbes {
package = marlowe-tx;
runtimeInputs = [ z3 ];
runtimeInputs = [ z3, marlowe-plutus.packages.marlowe-minting-validator ];
runtimeScript = ''
#################
# REQUIRED VARS #
Expand Down Expand Up @@ -373,7 +373,8 @@ in
--chain-sync-host "$MARLOWE_CHAIN_SYNC_HOST" \
--contract-host "$CONTRACT_HOST" \
--contract-query-port "$CONTRACT_QUERY_PORT" \
--http-port "$HTTP_PORT"
--http-port "$HTTP_PORT" \
--minting-policy-cmd marlowe-minting-validator
'';
};

Expand Down Expand Up @@ -474,6 +475,7 @@ in

marlowe-runtime = mkOperableWithProbes {
package = marlowe-runtime;
runtimeInputs = [ z3, marlowe-plutus.packages.marlowe-minting-validator ];
runtimeScript = ''
#################
# REQUIRED VARS #
Expand Down Expand Up @@ -542,7 +544,9 @@ in
--host "$HOST" \
--port "$PORT" \
--port-traced "$TRACED_PORT" \
--http-port "$HTTP_PORT"
--http-port "$HTTP_PORT" \
--minting-policy-cmd marlowe-minting-validator
'';
};

Expand Down
3 changes: 2 additions & 1 deletion nix/marlowe-cardano/integration-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ let
cardano-node = inputs'.cardano-node.packages.cardano-node;
marlowe-runtime-cli = projects.default.hsPkgs.marlowe-runtime-cli.components.exes.marlowe-runtime-cli;
marlowe-integration-tests = projects.default.hsPkgs.marlowe-integration-tests.components.exes.marlowe-integration-tests;
marlowe-minting-validator = inputs'.marlowe-plutus.packages.marlowe-minting-validator;
in
pkgs.writeScriptBin "marlowe-integration-tests" ''
export PATH="${l.makeBinPath [ cardano-cli cardano-node marlowe-runtime-cli pkgs.z3 pkgs.sqitchPg pkgs.postgresql ]}:$PATH"
export PATH="${l.makeBinPath [ cardano-cli cardano-node marlowe-runtime-cli pkgs.z3 pkgs.sqitchPg pkgs.postgresql marlowe-minting-validator ]}:$PATH"
export PGUSER=postgres
${marlowe-integration-tests}/bin/marlowe-integration-tests "$@"
''

0 comments on commit a8edb26

Please sign in to comment.