<commit_before>{ stdenv
, buildPythonPackage
, config
, fetchPyPi
, pythonPackages

, apscheduler
, beautifulsoup
, cherrypy
, deluge
, feedparser
, flask
, flask-compress
, flask-cors
, flask-login
, flask-restful
, flask-restplus
, future
, guessit
, html5lib
, jinja2
, jsonschema
, pathlib
, pathpy
, pkgs
#, progressbar
, pynzb
, pyparsing
, pyrss2gen
, python-dateutil
, pyyaml
, requests
, rpyc
, safe
, sqlalchemy
, transmissionrpc
}:

let
  inherit (stdenv.lib)
    optionals;
  inherit (pythonPackages)
    isPy3k
    pythonOlder;
in

buildPythonPackage rec {
  name = "flexget-${version}";
  version = "2.0.40";

  src = fetchPyPi {
    package = "FlexGet";
    inherit version;
    sha256 = "d94486b534c52be70e6d12efe3eb4792bb1b7cc96861fbf4b48801f5d44c8391";
  };

  postPatch =
    /* Allow using newer dependencies */ ''
      sed -i requirements.txt \
        -e 's/, !=3.1.0//' \
        -e 's/flask-restplus==0.8.6/flask-restplus>=0.8.6/' \
        -e 's/guessit<=2.0.4/guessit>=2.0.4/'
    '';

  propagatedBuildInputs = [
    apscheduler
    beautifulsoup<commit_msg>flexget: 2.0.40 -> 2.2.11<commit_after>{ stdenv
, buildPythonPackage
, config
, fetchPyPi
, pythonPackages

, apscheduler
, beautifulsoup
, cherrypy
, deluge
, feedparser
, flask
, flask-compress
, flask-cors
, flask-login
, flask-restful
, flask-restplus
, future
, guessit
, html5lib
, jinja2
, jsonschema
, pathlib
, pathpy
, pkgs
#, progressbar
, pynzb
, pyparsing
, pyrss2gen
, python-dateutil
, pyyaml
, requests
, rpyc
, safe
, sqlalchemy
, transmissionrpc
}:

let
  inherit (stdenv.lib)
    optionals;
  inherit (pythonPackages)
    isPy3k
    pythonOlder;
in

buildPythonPackage rec {
  name = "flexget-${version}";
  version = "2.2.11";

  src = fetchPyPi {
    package = "FlexGet";
    inherit version;
    sha256 = "c4dfcbb1cf983d5dec2a571bbe21c781cbb2720aa4d2275808c9c9cbeffc1ccd";
  };

  postPatch =
    /* Allow using newer dependencies */ ''
      sed -i requirements.txt \
        -e 's/,.*<.*//' \
        -e 's/<.*//' \
        -e 's/!=.*//' \
        -e 's/==.*//'
    '';

  propagatedBuildInputs = [
    apscheduler
    beautifulsoup
{'fraction_non_alphanumeric': 0.13445378151260504, 'fraction_numerical': 0.05368814192343604, 'mean_word_length': 2.9611829944547137, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '3202384', 'n_tokens_mistral': 923, 'n_tokens_neox': 857, 'n_words': 156}