<commit_before>{stdenv, fetchgit, mercurial, coreutils, git, makeWrapper, subversion}:

stdenv.mkDerivation {
  name = "fast-export";

  src = fetchgit {
    url = "git://repo.or.cz/fast-export.git";
    rev = "aaccfba";
    sha256 = "c9d1498e31d32b8271c1e651175794718611f93b4843dea569d831005de0a750";
  };

  buildInputs = [mercurial.python mercurial makeWrapper subversion];

  buildPhase="true"; # skip svn for now

  # TODO also support svn stuff
  # moving .py files into lib directory so that you can't pick the wrong file from PATH.
  # This requires redefining ROOT
  installPhase = ''
    sed -i "s@/usr/bin/env.*@$(type -p python)@" *.py
    l=$out/libexec/git-fast-export
    mkdir -p $out/{bin,doc/git-fast-export} $l
    sed -i "s@ROOT=.*@ROOT=$l@" *.sh
    mv *.sh $out/bin
    mv *.py $l
    for p in $out/bin/*.sh; do
      wrapProgram $p \
        --prefix PYTHONPATH : "$(echo ${mercurial}/lib/python*/site-packages):$(echo ${mercurial.python}/lib/python*/site-packages)${stdenv.lib.concatMapStrings (x: ":$(echo ${x}/lib/python*/site-packages)") mercurial.pythonPackages}" \
        --prefix PATH : "$(dirname $(type -p python))":$l
    done
  '';

  # usage:
  meta = {
      description = "import svn, mercurial into git";
      homepage = "http://repo.or.cz/w/fast-export.git";
      license = stdenv.lib.licenses.gpl2;
  };<commit_msg>fast-export: update to last revision from upstream<commit_after>{stdenv, fetchgit, mercurial, coreutils, git, makeWrapper, subversion}:

with stdenv.lib;
stdenv.mkDerivation {
  name = "fast-export";

  src = fetchgit {
    url = git://repo.or.cz/fast-export.git;
    rev = "d202200fd9daa75cdb37d4cf067d4ca00e269535";
    sha256 = "1ci0jbprs7hqqzq4mqi5b9vlc43lmk2bn2kjx49bdjkqajvlicd7";
  };

  buildInputs = [mercurial.python mercurial makeWrapper subversion];

  buildPhase="true"; # skip svn for now

  # TODO also support svn stuff
  # moving .py files into lib directory so that you can't pick the wrong file from PATH.
  # This requires redefining ROOT
  installPhase = ''
    sed -i "s@/usr/bin/env.*@$(type -p python)@" *.py
    l=$out/libexec/git-fast-export
    mkdir -p $out/{bin,doc/git-fast-export} $l
    sed -i "s@ROOT=.*@ROOT=$l@" *.sh
    mv *.sh $out/bin
    mv *.py $l
    for p in $out/bin/*.sh; do
      wrapProgram $p \
        --prefix PYTHONPATH : "$(echo ${mercurial}/lib/python*/site-packages):$(echo ${mercurial.python}/lib/python*/site-packages)${stdenv.lib.concatMapStrings (x: ":$(echo ${x}/lib/python*/site-packages)") mercurial.pythonPackages}" \
        --prefix PATH : "$(dirname $(type -p python))":$l
    done
  '';

  meta = {
    description = "Import svn, mercurial into git";
    homepage = http://repo.or.cz/w/fast-export.git;
    license = licenses.gpl2;
    maintainers = [ maintainers.koral ];
  };
{'fraction_non_alphanumeric': 0.15892857142857142, 'fraction_numerical': 0.03321428571428572, 'mean_word_length': 3.2763358778625955, 'pattern_counts': {'":': 4, '<': 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': '3022659', 'n_tokens_mistral': 1107, 'n_tokens_neox': 1026, 'n_words': 229}