<commit_before>{ stdenv, fetchurl, makeWrapper, pkgconfig, MMA, libjack2, libsmf, python, pyGtkGlade, pygtksourceview }:

stdenv.mkDerivation rec {
  version = "12.02.1";
  name = "linuxband-${version}";

  src = fetchurl {
    url = "http://linuxband.org/assets/sources/${name}.tar.gz";
    sha256 = "1r71h4yg775m4gax4irrvygmrsclgn503ykmc2qwjsxa42ri4n2n";
  };

  buildInputs = [ makeWrapper pkgconfig MMA libjack2 libsmf python pyGtkGlade pygtksourceview ];

  patchPhase = ''
    sed -i 's@/usr/@${MMA}/@g' src/main/config/linuxband.rc.in
    cat src/main/config/linuxband.rc.in
  '';

  postFixup = ''
    PYTHONPATH=$pyGtkGlade/share/:pygtksourceview/share/:$PYTHONPATH
    for f in $out/bin/*; do
      wrapProgram $f \
      --prefix PYTHONPATH : $PYTHONPATH<commit_msg>linuxband: do not use top-level python packages<commit_after>{ stdenv, fetchurl, makeWrapper, pkgconfig, MMA, libjack2, libsmf, pythonPackages }:

let
  inherit (pythonPackages) pyGtkGlade pygtksourceview python;
in stdenv.mkDerivation rec {
  version = "12.02.1";
  name = "linuxband-${version}";

  src = fetchurl {
    url = "http://linuxband.org/assets/sources/${name}.tar.gz";
    sha256 = "1r71h4yg775m4gax4irrvygmrsclgn503ykmc2qwjsxa42ri4n2n";
  };

  buildInputs = [ makeWrapper pkgconfig MMA libjack2 libsmf python pyGtkGlade pygtksourceview ];

  patchPhase = ''
    sed -i 's@/usr/@${MMA}/@g' src/main/config/linuxband.rc.in
    cat src/main/config/linuxband.rc.in
  '';

  postFixup = ''
    PYTHONPATH=$pyGtkGlade/share/:pygtksourceview/share/:$PYTHONPATH
    for f in $out/bin/*; do
      wrapProgram $f \
      --prefix PYTHONPATH : $PYTHONPATH
{'fraction_non_alphanumeric': 0.1363080684596577, 'fraction_numerical': 0.03300733496332518, 'mean_word_length': 3.857566765578635, 'pattern_counts': {'":': 0, '<': 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': '3739547', 'n_tokens_mistral': 676, 'n_tokens_neox': 641, 'n_words': 112}