2016-12-31 09:02:30 +00:00
|
|
|
{ lib
|
2017-05-01 09:06:20 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
2016-12-31 09:02:30 +00:00
|
|
|
, transmission
|
|
|
|
, deluge
|
|
|
|
, config
|
|
|
|
}:
|
|
|
|
|
2017-05-01 09:06:20 +01:00
|
|
|
with python.pkgs;
|
2016-12-31 09:02:30 +00:00
|
|
|
|
2017-05-01 09:06:20 +01:00
|
|
|
buildPythonApplication rec {
|
2017-09-05 10:16:41 +01:00
|
|
|
version = "2.10.82";
|
2016-12-31 09:02:30 +00:00
|
|
|
name = "FlexGet-${version}";
|
|
|
|
|
2017-05-01 09:06:20 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Flexget";
|
|
|
|
repo = "Flexget";
|
|
|
|
rev = version;
|
2017-09-05 10:16:41 +01:00
|
|
|
sha256 = "15508ihswfjbkzhf1f0qhn2ar1aiibz2ggp5d6r33icy8xwhpv09";
|
2016-12-31 09:02:30 +00:00
|
|
|
};
|
|
|
|
|
2017-03-31 03:37:07 +01:00
|
|
|
doCheck = true;
|
|
|
|
# test_regexp requires that HOME exist, test_filesystem requires a
|
|
|
|
# unicode-capable filesystem (and setting LC_ALL doesn't work).
|
|
|
|
# setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
|
2017-05-01 09:06:20 +01:00
|
|
|
postPatch = ''
|
2017-03-31 03:37:07 +01:00
|
|
|
sed -i '/def test_non_ascii/i\ import pytest\
|
|
|
|
@pytest.mark.skip' flexget/tests/test_filesystem.py
|
2017-05-01 09:06:20 +01:00
|
|
|
|
2017-09-05 10:16:41 +01:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "chardet==3.0.3" "chardet" \
|
|
|
|
--replace "rebulk==0.8.2" "rebulk" \
|
|
|
|
--replace "cherrypy==10.2.2" "cherrypy" \
|
|
|
|
--replace "portend==1.8" "portend" \
|
|
|
|
--replace "sqlalchemy==1.1.10" "sqlalchemy" \
|
|
|
|
--replace "zxcvbn-python==4.4.15" "zxcvbn-python" \
|
|
|
|
--replace "flask-cors==3.0.2" "flask-cors" \
|
|
|
|
--replace "certifi==2017.4.17" "certifi"
|
2017-03-31 03:37:07 +01:00
|
|
|
'';
|
2017-05-01 09:06:20 +01:00
|
|
|
|
2017-01-04 08:34:16 +00:00
|
|
|
checkPhase = ''
|
2017-03-31 03:37:07 +01:00
|
|
|
export HOME=.
|
2017-09-05 10:16:41 +01:00
|
|
|
py.test --disable-pytest-warnings -k "not test_quality_failures \
|
|
|
|
and not test_group_quality \
|
|
|
|
and not crash_report \
|
|
|
|
and not test_multi_episode \
|
|
|
|
and not test_double_episodes \
|
|
|
|
and not test_inject_force \
|
|
|
|
and not test_double_prefered \
|
|
|
|
and not test_double"
|
2017-01-04 08:34:16 +00:00
|
|
|
'';
|
2016-12-31 09:02:30 +00:00
|
|
|
|
2017-03-31 03:37:07 +01:00
|
|
|
buildInputs = [ pytest mock vcrpy pytest-catchlog boto3 ];
|
2016-12-31 09:02:30 +00:00
|
|
|
propagatedBuildInputs = [
|
2017-09-05 10:16:41 +01:00
|
|
|
feedparser sqlalchemy pyyaml chardet
|
2017-05-01 09:06:20 +01:00
|
|
|
beautifulsoup4 html5lib PyRSS2Gen pynzb
|
2017-09-05 10:16:41 +01:00
|
|
|
rpyc jinja2 jsonschema requests dateutil jsonschema
|
|
|
|
pathpy guessit_2_0 APScheduler
|
2017-01-04 08:34:16 +00:00
|
|
|
terminaltables colorclass
|
2017-09-05 10:16:41 +01:00
|
|
|
cherrypy flask flask-restful flask-restplus
|
2017-01-04 08:34:16 +00:00
|
|
|
flask-compress flask_login flask-cors
|
2017-09-05 10:16:41 +01:00
|
|
|
pyparsing safe future zxcvbn-python
|
|
|
|
werkzeug tempora cheroot rebulk portend
|
|
|
|
] ++ lib.optional (pythonOlder "3.4") pathlib
|
|
|
|
# enable deluge and transmission plugin support, if they're installed
|
|
|
|
++ lib.optional (config.deluge or false) deluge
|
|
|
|
++ lib.optional (transmission != null) transmissionrpc;
|
2016-12-31 09:02:30 +00:00
|
|
|
|
|
|
|
meta = {
|
2017-08-02 22:50:51 +01:00
|
|
|
homepage = https://flexget.com/;
|
2016-12-31 09:02:30 +00:00
|
|
|
description = "Multipurpose automation tool for content like torrents";
|
2016-12-31 09:09:16 +00:00
|
|
|
license = lib.licenses.mit;
|
2017-01-04 08:34:16 +00:00
|
|
|
maintainers = with lib.maintainers; [ domenkozar tari ];
|
2016-12-31 09:02:30 +00:00
|
|
|
};
|
2017-01-04 08:34:16 +00:00
|
|
|
}
|