1{
2 lib,
3 python3Packages,
4 fetchFromGitHub,
5 stdenv,
6}:
7
8python3Packages.buildPythonApplication rec {
9 pname = "flexget";
10 version = "3.17.1";
11 pyproject = true;
12
13 src = fetchFromGitHub {
14 owner = "Flexget";
15 repo = "Flexget";
16 tag = "v${version}";
17 hash = "sha256-9Ba7VgVmy5FOnqzAB/ebTFeI892Y1G0R/UcNpkbNdGA=";
18 };
19
20 pythonRelaxDeps = true;
21
22 build-system = with python3Packages; [
23 hatchling
24 hatch-requirements-txt
25 ];
26
27 dependencies = with python3Packages; [
28 # See https://github.com/Flexget/Flexget/blob/master/pyproject.toml
29 # and https://github.com/Flexget/Flexget/blob/develop/requirements.txt
30 apscheduler
31 beautifulsoup4
32 colorama
33 feedparser
34 guessit
35 html5lib
36 jinja2
37 jsonschema
38 loguru
39 psutil
40 pydantic
41 pynzb
42 pyrss2gen
43 python-dateutil
44 pyyaml
45 rarfile
46 rebulk
47 requests
48 rich
49 rpyc
50 sqlalchemy
51 zstandard
52 pillow
53
54 # WebUI requirements
55 cherrypy
56 flask-compress
57 flask-cors
58 flask-login
59 flask-restx
60 flask
61 packaging
62 pyparsing
63 werkzeug
64 zxcvbn
65 pendulum
66
67 # Plugins requirements
68 transmission-rpc
69 qbittorrent-api
70 deluge-client
71 cloudscraper
72 python-telegram-bot
73 boto3
74 libtorrent-rasterbar
75 ];
76
77 pythonImportsCheck = [
78 "flexget"
79 "flexget.api.core.authentication"
80 "flexget.api.core.database"
81 "flexget.api.core.plugins"
82 "flexget.api.core.schema"
83 "flexget.api.core.server"
84 "flexget.api.core.tasks"
85 "flexget.api.core.user"
86 "flexget.components.thetvdb.api"
87 "flexget.components.tmdb.api"
88 "flexget.components.trakt.api"
89 "flexget.components.tvmaze.api"
90 "flexget.plugins.clients.aria2"
91 "flexget.plugins.clients.deluge"
92 "flexget.plugins.clients.nzbget"
93 "flexget.plugins.clients.pyload"
94 "flexget.plugins.clients.qbittorrent"
95 "flexget.plugins.clients.rtorrent"
96 "flexget.plugins.clients.transmission"
97 "flexget.plugins.services.kodi_library"
98 "flexget.plugins.services.myepisodes"
99 "flexget.plugins.services.pogcal_acquired"
100 ];
101
102 nativeCheckInputs = [
103 python3Packages.pytestCheckHook
104 python3Packages.pytest-vcr
105 python3Packages.pytest-xdist
106 python3Packages.paramiko
107 ];
108
109 doCheck = !stdenv.hostPlatform.isDarwin;
110
111 disabledTests = [
112 # reach the Internet
113 "TestExistsMovie"
114 "TestImdb"
115 "TestImdbLookup"
116 "TestImdbParser"
117 "TestInputHtml"
118 "TestInputSites"
119 "TestNfoLookupWithMovies"
120 "TestNpoWatchlistInfo"
121 "TestNpoWatchlistLanguageTheTVDBLookup"
122 "TestNpoWatchlistPremium"
123 "TestPlex"
124 "TestRadarrListActions"
125 "TestRssOnline"
126 "TestSeriesRootAPI"
127 "TestSftpDownload"
128 "TestSftpList"
129 "TestSonarrListActions"
130 "TestSubtitleList"
131 "TestTMDBMovieLookupAPI"
132 "TestTVDBEpisodeABSLookupAPI"
133 "TestTVDBEpisodeAirDateLookupAPI"
134 "TestTVDBEpisodeLookupAPI"
135 "TestTVDBExpire"
136 "TestTVDBFavorites"
137 "TestTVDBLanguages"
138 "TestTVDBList"
139 "TestTVDBLookup"
140 "TestTVDBLookup"
141 "TestTVDBSeriesActorsLookupAPI"
142 "TestTVDBSeriesLookupAPI"
143 "TestTVDSearchIMDBLookupAPI"
144 "TestTVDSearchNameLookupAPI"
145 "TestTVDSearchZAP2ITLookupAPI"
146 "TestTVMAzeSeriesLookupAPI"
147 "TestTVMazeSeasonLookup"
148 "TestTVMazeShowLookup"
149 "TestTVMazeUnicodeLookup"
150 "TestTaskParsing::test_selected_parser_cleared"
151 "TestTheTVDBLanguages"
152 "TestTheTVDBList"
153 "TestTmdbLookup"
154 "TestURLRewriters"
155 "TestURLRewriters::test_ettv"
156 # others
157 "TestRegexp"
158 "TestYamlLists"
159 ];
160
161 meta = {
162 homepage = "https://flexget.com/";
163 changelog = "https://github.com/Flexget/Flexget/releases/tag/${src.tag}";
164 description = "Multipurpose automation tool for all of your media";
165 license = lib.licenses.mit;
166 maintainers = with lib.maintainers; [ pbsds ];
167 };
168}