<commit_before>{stdenv, fetchurl, autoconf, automake, libtool, gettext, perl}:

let
  asIfPatch = ./recode-3.6-as-if.patch;

  gettextPatch = ./recode-3.6-gettextfix.diff;

  debianPatch = fetchurl {
    url = "http://ftp.de.debian.org/debian/pool/main/r/recode/recode_3.6-15.diff.gz";
    sha256 = "114qxm29wk95w5760bswgd46d5p00g5kbfai5wchjvcbi722p5qf";
  };
in
stdenv.mkDerivation {
  name = "recode-3.6";

  src = fetchurl {
    url = "ftp://ftp.halifax.rwth-aachen.de/gnu/recode/recode-3.6.tar.gz";
    sha256 = "1krgjqfhsxcls4qvxhagc45sm1sd0w69jm81nwm0bip5z3rs9rp3";
  };

  buildInputs = [ autoconf automake libtool gettext perl ];

  patchPhase = ''
    patch -Np1 -i ${asIfPatch}
    patch -Np1 -i ${gettextPatch}
    gunzip <${debianPatch} | patch -Np1 -i -
    sed -i '1i#include <stdlib.h>' src/argmatch.c
    rm -f acinclude.m4
    autoreconf -fi
    libtoolize
  '';

  configureFlags = "--without-included-gettext";

  doCheck = true;

  meta = {
    homepage = "http://www.gnu.org/software/recode/";
    description = "Converts files between various character sets and usages";

    license = "GPLv2+";

    platforms = stdenv.lib.platforms.unix;
    maintainers = [];
  };
}<commit_msg>recode-3.7-git<commit_after>{stdenv, fetchgit}:

stdenv.mkDerivation rec {
  name = "recode-3.7-pff85fdbd";

  src = fetchgit {
    url = https://github.com/pinard/Recode.git;
    rev = "2fd8385658e5a08700e3b916053f6680ff85fdbd";
    sha256 = "1xhlfmqld6af16l444jli9crj9brym2jihg1n6lkxh2gar68f5l7";
  };

  meta = {
    homepage = "http://www.gnu.org/software/recode/";
    description = "Converts files between various character sets and usages";
    platforms = stdenv.lib.platforms.unix;
    license = stdenv.lib.licenses.gpl2Plus;
    maintainers = with stdenv.lib.maintainers; [ jcumming ];
  };
}
{'fraction_non_alphanumeric': 0.14079822616407983, 'fraction_numerical': 0.06374722838137473, 'mean_word_length': 3.359903381642512, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 1, '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': '2117963', 'n_tokens_mistral': 816, 'n_tokens_neox': 747, 'n_words': 114}