<commit_before>{ stdenv, fetchgit, opencflite, clang, libcxx }:

stdenv.mkDerivation {
  name = "maloader-0git";

  src = fetchgit {
    url = "git://github.com/shinh/maloader.git";
    rev = "5f220393e0b7b9ad0cf1aba0e89df2b42a1f0442";
    sha256 = "07j9b7n0grrbxxyn2h8pnk6pa8b370wq5z5zwbds8dlhi7q37rhn";
  };

  postPatch = ''
    sed -i \
      -e '/if.*loadLibMac.*mypath/s|mypath|"'"$out/lib/"'"|' \
      -e 's|libCoreFoundation\.so|${opencflite}/lib/&|' \
      ld-mac.cc
  '';

  NIX_CFLAGS_COMPILE = "-I${libcxx}/include/c++/v1";
  buildInputs = [ clang libcxx ];
  buildFlags = [ "USE_LIBCXX=1" "release" ];

  installPhase = ''
    install -vD libmac.so "$out/lib/libmac.so"
<commit_msg>maloader: fix hash (currently broken)<commit_after>{ stdenv, fetchgit, opencflite, clang, libcxx }:

stdenv.mkDerivation {
  name = "maloader-0git";

  src = fetchgit {
    url = "git://github.com/shinh/maloader.git";
    rev = "5f220393e0b7b9ad0cf1aba0e89df2b42a1f0442";
    sha256 = "0dd1pn07x1y8pyn5wz8qcl1c1xwghyya4d060m3y9vx5dhv9xmzw";
  };

  postPatch = ''
    sed -i \
      -e '/if.*loadLibMac.*mypath/s|mypath|"'"$out/lib/"'"|' \
      -e 's|libCoreFoundation\.so|${opencflite}/lib/&|' \
      ld-mac.cc
  '';

  NIX_CFLAGS_COMPILE = "-I${libcxx}/include/c++/v1";
  buildInputs = [ clang libcxx ];
  buildFlags = [ "USE_LIBCXX=1" "release" ];

  installPhase = ''
    install -vD libmac.so "$out/lib/libmac.so"

{'fraction_non_alphanumeric': 0.1770098730606488, 'fraction_numerical': 0.06629055007052186, 'mean_word_length': 3.4205607476635516, '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': '123791', 'n_tokens_mistral': 697, 'n_tokens_neox': 648, 'n_words': 80}