<commit_before>{ fetchurl
, python
, anki
}:

python.pkgs.buildPythonApplication rec {
  pname = "mnemosyne";
  version = "2.7.1";

  src = fetchurl {
    url    = "mirror://sourceforge/project/mnemosyne-proj/mnemosyne/mnemosyne-${version}/Mnemosyne-${version}.tar.gz";
    sha256 = "0dhvg9cxc6m6kzk75h363h1g0bl80cqz11cijh0zpz9f4w6lnqsq";
  };

  nativeBuildInputs = with python.pkgs; [ pyqtwebengine.wrapQtAppsHook ];

  buildInputs = [ anki ];

  propagatedBuildInputs = with python.pkgs; [
    googletrans
    gtts
    pyqtwebengine
    pyqt5
    matplotlib
    cherrypy
    cheroot
    webob
  ];

  prePatch = ''
    substituteInPlace setup.py --replace /usr $out
    find . -type f -exec grep -H sys.exec_prefix {} ';' | cut -d: -f1 | xargs sed -i s,sys.exec_prefix,\"$out\",
  '';

  # No tests/ directrory in tarball
  doCheck = false;

  postInstall = ''
    mkdir -p $out/share
    mv $out/${python.sitePackages}/$out/share/locale $out/share
    rm -r $out/${python.sitePackages}/nix
  '';

  dontWrapQtApps = true;

  makeWrapperArgs = [
    "\${qtWrapperArgs[@]}"
  ];
<commit_msg>mnemosyne: Add pyopengl to silence OpenGL warning<commit_after>{ fetchurl
, python
, anki
}:

python.pkgs.buildPythonApplication rec {
  pname = "mnemosyne";
  version = "2.7.1";

  src = fetchurl {
    url    = "mirror://sourceforge/project/mnemosyne-proj/mnemosyne/mnemosyne-${version}/Mnemosyne-${version}.tar.gz";
    sha256 = "0dhvg9cxc6m6kzk75h363h1g0bl80cqz11cijh0zpz9f4w6lnqsq";
  };

  nativeBuildInputs = with python.pkgs; [ pyqtwebengine.wrapQtAppsHook ];

  buildInputs = [ anki ];

  propagatedBuildInputs = with python.pkgs; [
    cheroot
    cherrypy
    googletrans
    gtts
    matplotlib
    pyopengl
    pyqt5
    pyqtwebengine
    webob
  ];

  prePatch = ''
    substituteInPlace setup.py --replace /usr $out
    find . -type f -exec grep -H sys.exec_prefix {} ';' | cut -d: -f1 | xargs sed -i s,sys.exec_prefix,\"$out\",
  '';

  # No tests/ directrory in tarball
  doCheck = false;

  postInstall = ''
    mkdir -p $out/share
    mv $out/${python.sitePackages}/$out/share/locale $out/share
    rm -r $out/${python.sitePackages}/nix
  '';

  dontWrapQtApps = true;

  makeWrapperArgs = [
    "\${qtWrapperArgs[@]}"
  ];

{'fraction_non_alphanumeric': 0.13736017897091723, 'fraction_numerical': 0.024161073825503355, 'mean_word_length': 3.050724637681159, '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': '2864936', 'n_tokens_mistral': 905, 'n_tokens_neox': 865, 'n_words': 155}