<commit_before>{ lib, appleDerivation, xcbuildHook, llvmPackages }:

appleDerivation {
  nativeBuildInputs = [ xcbuildHook ];

  patches = [
    # The following copied from
    # https://github.com/Homebrew/homebrew-core/commit/712ed3e948868e17f96b7e59972b5f45d4faf688
    # is needed to build libvirt.
    ./rpcgen-support-hyper-and-quad-types.patch
  ];

  postPatch = ''
    substituteInPlace rpcgen/rpc_main.c \
      --replace "/usr/bin/cpp" "${llvmPackages.clang-unwrapped}/bin/clang-cpp"
  '';

  # temporary install phase until xcodebuild has "install" support
  installPhase = ''
    for f in Products/Release/*; do
      if [ -f $f ]; then
        install -D $f $out/bin/$(basename $f)
      fi
    done

    for n in 1; do
      mkdir -p $out/share/man/man$n
      install */*.$n $out/share/man/man$n
    done
  '';

  meta = {
    platforms = lib.platforms.darwin;
    maintainers = with lib.maintainers; [ matthewbauer ];
  };
}<commit_msg>darwin.developer_cmds: wrap clang -E from clang-wrapped as clang-cpp<commit_after>{ lib, appleDerivation, xcbuildHook, llvmPackages, makeWrapper }:

appleDerivation {
  nativeBuildInputs = [ xcbuildHook makeWrapper ];

  patches = [
    # The following copied from
    # https://github.com/Homebrew/homebrew-core/commit/712ed3e948868e17f96b7e59972b5f45d4faf688
    # is needed to build libvirt.
    ./rpcgen-support-hyper-and-quad-types.patch
  ];

  postPatch = ''
    makeWrapper ${llvmPackages.clang}/bin/clang $out/bin/clang-cpp --add-flags "--driver-mode=cpp"
    substituteInPlace rpcgen/rpc_main.c \
      --replace "/usr/bin/cpp" "$out/bin/clang-cpp"
  '';

  # temporary install phase until xcodebuild has "install" support
  installPhase = ''
    for f in Products/Release/*; do
      if [ -f $f ]; then
        install -D $f $out/bin/$(basename $f)
      fi
    done

    for n in 1; do
      mkdir -p $out/share/man/man$n
      install */*.$n $out/share/man/man$n
    done
  '';

  meta = {
    platforms = lib.platforms.darwin;
    maintainers = with lib.maintainers; [ matthewbauer ];
  };
}
{'fraction_non_alphanumeric': 0.13070942662779397, 'fraction_numerical': 0.027210884353741496, 'mean_word_length': 2.8059149722735675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6080432', 'n_tokens_mistral': 769, 'n_tokens_neox': 734, 'n_words': 154}