<commit_before>{ stdenv, fetchFromGitHub, fetchpatch, automake, autoconf, libtool
, zimlib, cxxtools, tntnet
}:

stdenv.mkDerivation rec {
  name = "zimreader-0.92";

  src = fetchFromGitHub {
    owner = "wikimedia";
    repo = "openzim";
    rev = "r1.3"; # there multiple tools with different version in the repo
    sha256 = "0x529137rxy6ld64xqa6xmn93121ripxvkf3sc7hv3wg6km182sw";
  };

  patchFlags = "-p2";
  patches = [
    (fetchpatch {
      name = "zimreader_tntnet221.patch";
      url = "https://github.com/wikimedia/openzim/compare/r1.3...juliendehos:3ee5f11eaa811284d340451e6f466529c00f6ef2.patch";
      sha256 = "0rc5n20svyyndqh7hsynjyblfraphgi0f6khw6f5jq89w9i1j1hd";
    })
  ];

  enableParallelBuilding = true;
  buildInputs = [ automake autoconf libtool zimlib cxxtools tntnet ];
  setSourceRoot = ''
    sourceRoot=$(echo */zimreader)
  '';
  preConfigure = "./autogen.sh";

  meta = {
    description = "A tool to serve ZIM files using HTTP";
    homepage = http://git.wikimedia.org/log/openzim;
    maintainers = with stdenv.lib.maintainers; [ robbinch juliendehos ];
    platforms = [ "x86_64-linux" ];
  };
}<commit_msg>zimreader: add license<commit_after>{ stdenv, fetchFromGitHub, fetchpatch, automake, autoconf, libtool
, zimlib, cxxtools, tntnet
}:

stdenv.mkDerivation rec {
  name = "zimreader-0.92";

  src = fetchFromGitHub {
    owner = "wikimedia";
    repo = "openzim";
    rev = "r1.3"; # there multiple tools with different version in the repo
    sha256 = "0x529137rxy6ld64xqa6xmn93121ripxvkf3sc7hv3wg6km182sw";
  };

  patchFlags = "-p2";
  patches = [
    (fetchpatch {
      name = "zimreader_tntnet221.patch";
      url = "https://github.com/wikimedia/openzim/compare/r1.3...juliendehos:3ee5f11eaa811284d340451e6f466529c00f6ef2.patch";
      sha256 = "0rc5n20svyyndqh7hsynjyblfraphgi0f6khw6f5jq89w9i1j1hd";
    })
  ];

  enableParallelBuilding = true;
  buildInputs = [ automake autoconf libtool zimlib cxxtools tntnet ];
  setSourceRoot = ''
    sourceRoot=$(echo */zimreader)
  '';
  preConfigure = "./autogen.sh";

  meta = {
    description = "A tool to serve ZIM files using HTTP";
    homepage = http://git.wikimedia.org/log/openzim;
    license = stdenv.lib.licenses.gpl2;
    maintainers = with stdenv.lib.maintainers; [ robbinch juliendehos ];
    platforms = [ "x86_64-linux" ];
  };
}
{'fraction_non_alphanumeric': 0.12312954253954682, 'fraction_numerical': 0.07310816588285592, 'mean_word_length': 3.746450304259635, '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': '5379700', 'n_tokens_mistral': 1000, 'n_tokens_neox': 920, 'n_words': 156}