nixpkgs/pkgs/applications/networking/flexget/default.nix

62 lines
1.8 KiB
Nix
Raw Normal View History

{ lib
2017-05-01 08:06:20 +00:00
, fetchFromGitHub
, python
, transmission
, deluge
, config
}:
2017-05-01 08:06:20 +00:00
with python.pkgs;
2017-05-01 08:06:20 +00:00
buildPythonApplication rec {
version = "2.10.40";
name = "FlexGet-${version}";
2017-05-01 08:06:20 +00:00
src = fetchFromGitHub {
owner = "Flexget";
repo = "Flexget";
rev = version;
sha256 = "0hh21yv1lvdfi198snwjabfsdh04fnpjszpgg28wvg5pd1qq8lqv";
};
2017-03-31 02:37:07 +00: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 08:06:20 +00:00
postPatch = ''
2017-03-31 02:37:07 +00:00
sed -i '/def test_non_ascii/i\ import pytest\
@pytest.mark.skip' flexget/tests/test_filesystem.py
2017-05-01 08:06:20 +00:00
substituteInPlace requirements.txt --replace "guessit<=2.0.4" "guessit"
2017-03-31 02:37:07 +00:00
'';
2017-05-01 08:06:20 +00:00
# Disable 3 failing tests caused by guessit upgrade
# https://github.com/Flexget/Flexget/issues/1804
2017-01-04 08:34:16 +00:00
checkPhase = ''
2017-03-31 02:37:07 +00:00
export HOME=.
2017-05-01 08:06:20 +00:00
py.test --disable-pytest-warnings -k "not test_date_options and not test_ep_as_quality and not testFromGroup"
2017-01-04 08:34:16 +00:00
'';
2017-03-31 02:37:07 +00:00
buildInputs = [ pytest mock vcrpy pytest-catchlog boto3 ];
propagatedBuildInputs = [
2017-01-04 08:34:16 +00:00
feedparser sqlalchemy pyyaml
2017-05-01 08:06:20 +00:00
beautifulsoup4 html5lib PyRSS2Gen pynzb
rpyc jinja2 requests dateutil jsonschema
2017-05-01 08:06:20 +00:00
pathpy guessit APScheduler
2017-01-04 08:34:16 +00:00
terminaltables colorclass
2017-05-01 08:06:20 +00:00
cherrypy flask flask-restful flask-restplus_0_8
2017-01-04 08:34:16 +00:00
flask-compress flask_login flask-cors
2017-05-01 08:06:20 +00:00
pyparsing safe future zxcvbn-python ]
++ 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;
meta = {
homepage = https://flexget.com/;
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 ];
};
2017-01-04 08:34:16 +00:00
}