<commit_before>{stdenv, fetchurl, gawk}:

stdenv.mkDerivation {
  name = "noweb-2.11b";
  src = fetchurl {
    urls = [ "http://ftp.de.debian.org/debian/pool/main/n/noweb/noweb_2.11b.orig.tar.gz"
             "ftp://www.eecs.harvard.edu/pub/nr/noweb.tgz"
          ];
    sha256 = "10hdd6mrk26kyh4bnng4ah5h1pnanhsrhqa7qwqy6dyv3rng44y9";
  };
  preBuild = ''
    cd src
    makeFlags="BIN=$out/bin LIB=$out/lib MAN=$out/share/man TEXINPUTS=$out/share/texmf/tex/latex"
  '';
  preInstall=''mkdir -p $out/share/texmf/tex/latex'';
  postInstall= ''
    substituteInPlace $out/bin/cpif --replace "PATH=/bin:/usr/bin" ""
    for f in $out/bin/{noweb,nountangle,noroots,noroff,noindex} $out/lib/*; do
      substituteInPlace $f --replace "nawk" "${gawk}/bin/awk"
    done
  '';
  patches = [ ./no-FAQ.patch ];
}
<commit_msg>noweb: some fixes<commit_after>{stdenv, fetchurl, gawk}:

stdenv.mkDerivation {
  name = "noweb-2.11b";
  src = fetchurl {
    urls = [ "http://ftp.de.debian.org/debian/pool/main/n/noweb/noweb_2.11b.orig.tar.gz"
             "ftp://www.eecs.harvard.edu/pub/nr/noweb.tgz"
          ];
    sha256 = "10hdd6mrk26kyh4bnng4ah5h1pnanhsrhqa7qwqy6dyv3rng44y9";
  };
  preBuild = ''
    ensureDir $out/lib/noweb
    cd src
    makeFlags="BIN=$out/bin LIB=$out/lib/noweb MAN=$out/share/man TEXINPUTS=$out/share/texmf/tex/latex"
  '';
  preInstall=''mkdir -p $out/share/texmf/tex/latex'';
  postInstall= ''
    substituteInPlace $out/bin/cpif --replace "PATH=/bin:/usr/bin" ""
    for f in $out/bin/{noweb,nountangle,noroots,noroff,noindex} \
             $out/lib/noweb/{toroff,btdefn,totex,pipedoc,noidx,unmarkup,toascii,tohtml,emptydefn}; do
      substituteInPlace $f --replace "nawk" "${gawk}/bin/awk"
    done
  '';
  patches = [ ./no-FAQ.patch ];
}

{'fraction_non_alphanumeric': 0.1793416572077185, 'fraction_numerical': 0.02724177071509648, 'mean_word_length': 3.197619047619048, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4822284', 'n_tokens_mistral': 783, 'n_tokens_neox': 755, 'n_words': 88}