<commit_before>{ localLib ? import ./../../../lib.nix
, config ? {}
, system ? builtins.currentSystem
, pkgs ? import localLib.fetchNixPkgs { inherit system config; }
, gitrev ? localLib.commitIdFromGitRepo ../../../.git
, stateDir ? localLib.maybeEnv "CARDANO_STATE_DIR" "./state-acceptance-test-${environment}"
, environment ? "mainnet"
, resume ? true
}:

with localLib;

let
  iohkPkgs = import ./../../.. { inherit config system pkgs gitrev; };

  cardanoDeps = with iohkPkgs; [ cardano-sl-tools cardano-sl-wallet-new ];
  demoClusterDeps = with pkgs; [ jq coreutils curl gnused openssl time ];
  allDeps =  demoClusterDeps ++ cardanoDeps;

  wallet = pkgs.callPackage ../../launch/connect-to-cluster {
    inherit gitrev stateDir environment;
    # This will limit heap size to 1GB, along with the usual RTS options.
    ghcRuntimeArgs = "-N2 -qg -A1m -I0 -T -M1G";
  };

in
  pkgs.writeScript "acceptance-tests-${environment}" ''<commit_msg>[CBR-420] tests: use --legacy-wallet for mainnet sync test<commit_after>{ localLib ? import ./../../../lib.nix
, config ? {}
, system ? builtins.currentSystem
, pkgs ? import localLib.fetchNixPkgs { inherit system config; }
, gitrev ? localLib.commitIdFromGitRepo ../../../.git
, stateDir ? localLib.maybeEnv "CARDANO_STATE_DIR" "./state-acceptance-test-${environment}"
, environment ? "mainnet"
, resume ? true
}:

with localLib;

let
  iohkPkgs = import ./../../.. { inherit config system pkgs gitrev; };

  cardanoDeps = with iohkPkgs; [ cardano-sl-tools cardano-sl-wallet-new ];
  demoClusterDeps = with pkgs; [ jq coreutils curl gnused openssl time ];
  allDeps =  demoClusterDeps ++ cardanoDeps;

  wallet = pkgs.callPackage ../../launch/connect-to-cluster {
    inherit gitrev stateDir environment;

    # This will limit heap size to 1GB, along with the usual RTS options.
    ghcRuntimeArgs = "-N2 -qg -A1m -I0 -T -M1G";

    # Temporarily run the old wallet code until CBR-420 is resolved.
    additionalNodeArgs = "--legacy-wallet";
  };

in
  pkgs.writeScript "acceptance-tests-${environment}" ''
{'fraction_non_alphanumeric': 0.14348249027237353, 'fraction_numerical': 0.007782101167315175, 'mean_word_length': 3.367303609341826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '955970', 'n_tokens_mistral': 716, 'n_tokens_neox': 686, 'n_words': 181}