From f930cc44e9c2772fda3195be9c5ec2ee24c2d111 Mon Sep 17 00:00:00 2001 From: Jamie Bertram Date: Tue, 19 Sep 2023 12:44:40 -0400 Subject: [PATCH] Update nix derivations with validator cmd path --- nix/marlowe-cardano/compose.nix | 5 ++++- nix/marlowe-cardano/deploy/operables.nix | 12 ++++++++---- nix/marlowe-cardano/integration-tests.nix | 3 ++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/nix/marlowe-cardano/compose.nix b/nix/marlowe-cardano/compose.nix index 0d2208b72f..157af7b216 100644 --- a/nix/marlowe-cardano/compose.nix +++ b/nix/marlowe-cardano/compose.nix @@ -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 ]}" @@ -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 @@ -301,6 +302,8 @@ let network.nodeConfig.ByronGenesisHash "--shelley-genesis-config-file" network.nodeConfig.ShelleyGenesisFile + "--minting-policy-cmd" + "marlowe-minting-validator" ]; environment = [ "TZ=UTC" diff --git a/nix/marlowe-cardano/deploy/operables.nix b/nix/marlowe-cardano/deploy/operables.nix index 7a7fa64f59..bea43d15fc 100644 --- a/nix/marlowe-cardano/deploy/operables.nix +++ b/nix/marlowe-cardano/deploy/operables.nix @@ -1,7 +1,7 @@ { inputs', pkgs, l, ... }: let - inherit (inputs') self std; + inherit (inputs') self std marlowe-plutus; inherit (pkgs) jq sqitchPg @@ -334,7 +334,7 @@ in marlowe-tx = mkOperableWithProbes { package = marlowe-tx; - runtimeInputs = [ z3 ]; + runtimeInputs = [ z3 marlowe-plutus.packages.marlowe-minting-validator ]; runtimeScript = '' ################# # REQUIRED VARS # @@ -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 ''; }; @@ -474,6 +475,7 @@ in marlowe-runtime = mkOperableWithProbes { package = marlowe-runtime; + runtimeInputs = [ z3 marlowe-plutus.packages.marlowe-minting-validator ]; runtimeScript = '' ################# # REQUIRED VARS # @@ -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 + ''; }; diff --git a/nix/marlowe-cardano/integration-tests.nix b/nix/marlowe-cardano/integration-tests.nix index 50d3c31e1e..c0183b9a22 100644 --- a/nix/marlowe-cardano/integration-tests.nix +++ b/nix/marlowe-cardano/integration-tests.nix @@ -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 "$@" ''