<commit_before>{ stdenv }:

args:

stdenv.mkDerivation ({
  name = if args ? name then args.name else baseNameOf (toString args.src);
  builder = with stdenv.lib; builtins.toFile "builder.sh" ''
    source $stdenv/setup
    set -o pipefail

    eval "$preInstall"

    args=

    cd "$src"
    echo -ne "${concatStringsSep "\\0" args.files}" | xargs -0 -n1 -I {} -- find {} -type f -print0 | while read -d "" line; do
      mkdir -p "$out/$(dirname "$line")"
      substituteAll "$line" "$out/$line"
    done
  '';
  preferLocalBuild = true;
} // args)<commit_msg>substituteAllFiles: support postInstall<commit_after>{ stdenv }:

args:

stdenv.mkDerivation ({
  name = if args ? name then args.name else baseNameOf (toString args.src);
  builder = with stdenv.lib; builtins.toFile "builder.sh" ''
    source $stdenv/setup
    set -o pipefail

    eval "$preInstall"

    args=

    pushd "$src"
    echo -ne "${concatStringsSep "\\0" args.files}" | xargs -0 -n1 -I {} -- find {} -type f -print0 | while read -d "" line; do
      mkdir -p "$out/$(dirname "$line")"
      substituteAll "$line" "$out/$line"
    done
    popd

    eval "$postInstall"
  '';
  preferLocalBuild = true;
} // args)
{'fraction_non_alphanumeric': 0.15785054575986565, 'fraction_numerical': 0.006717044500419815, 'mean_word_length': 2.7602523659305995, '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': '3631249', 'n_tokens_mistral': 422, 'n_tokens_neox': 412, 'n_words': 120}