<commit_before>{ stdenv, fetchurl, python, libxml2Python }:

stdenv.mkDerivation rec {
  name = "itstool-1.1.1";

  src = fetchurl {
    url = "http://files.itstool.org/itstool/${name}.tar.bz2";
    sha256 = "1jchgcgxvqwkhr61q0j08adl1k8hw86dzbl207gzmns9fa7vmzqg";
  };

  buildInputs = [ python ];
  
  patchPhase =
    ''
      sed -e '/import libxml2/i import sys\
      sys.path.append("${libxml2Python}/lib/${python.libPrefix}/site-packages")' \
      -i itstool.in
    '';

  meta = {<commit_msg>itstool: update<commit_after>{ stdenv, fetchurl, python, libxml2Python }:

stdenv.mkDerivation rec {
  name = "itstool-1.2.0";

  src = fetchurl {
    url = "http://files.itstool.org/itstool/${name}.tar.bz2";
    sha256 = "1akq75aflihm3y7js8biy7b5mw2g11vl8yq90gydnwlwp0zxdzj6";
  };

  buildInputs = [ python ];

  patchPhase =
    ''
      sed -e '/import libxml2/i import sys\
      sys.path.append("${libxml2Python}/lib/${python.libPrefix}/site-packages")' \
      -i itstool.in
    '';

  meta = {
{'fraction_non_alphanumeric': 0.16067864271457086, 'fraction_numerical': 0.05089820359281437, 'mean_word_length': 3.0772357723577235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '3513247', 'n_tokens_mistral': 441, 'n_tokens_neox': 419, 'n_words': 57}