Skip to content

Commit 4fb7fb3

Browse files
committed
freqtrade: add params for requiring optional-dependencies of pyproject.toml
1 parent 329daf7 commit 4fb7fb3

1 file changed

Lines changed: 78 additions & 44 deletions

File tree

‎pkgs/by-name/fr/freqtrade/package.nix‎

Lines changed: 78 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
fetchFromGitHub,
44
python3Packages,
55
withFreqUI ? true,
6+
withPlot ? false,
7+
withFreqAI ? false,
8+
withFreqAIRL ? false,
9+
withHyperopt ? false,
610
}:
711

812
let
@@ -25,50 +29,80 @@ python3Packages.buildPythonApplication (finalAttrs: {
2529
setuptools
2630
wheel
2731
];
28-
dependencies = with python3Packages; [
29-
ccxt
30-
sqlalchemy
31-
python-telegram-bot
32-
humanize
33-
cachetools
34-
requests
35-
httpx
36-
urllib3
37-
jsonschema
38-
scipy
39-
numpy
40-
pandas
41-
ta-lib
42-
ft-pandas-ta
43-
technical
44-
tabulate
45-
pycoingecko
46-
python-rapidjson
47-
orjson
48-
jinja2
49-
questionary
50-
prompt-toolkit
51-
joblib
52-
rich
53-
pyarrow
54-
fastapi
55-
pydantic
56-
pyjwt
57-
websockets
58-
uvicorn
59-
psutil
60-
schedule
61-
janus
62-
ast-comments
63-
aiofiles
64-
aiohttp
65-
cryptography
66-
sdnotify
67-
python-dateutil
68-
pytz
69-
packaging
70-
freqtrade-client
71-
];
32+
dependencies =
33+
with python3Packages;
34+
[
35+
ccxt
36+
sqlalchemy
37+
python-telegram-bot
38+
humanize
39+
cachetools
40+
requests
41+
httpx
42+
urllib3
43+
jsonschema
44+
scipy
45+
numpy
46+
pandas
47+
ta-lib
48+
ft-pandas-ta
49+
technical
50+
tabulate
51+
pycoingecko
52+
python-rapidjson
53+
orjson
54+
jinja2
55+
questionary
56+
prompt-toolkit
57+
joblib
58+
rich
59+
pyarrow
60+
fastapi
61+
pydantic
62+
pyjwt
63+
websockets
64+
uvicorn
65+
psutil
66+
schedule
67+
janus
68+
ast-comments
69+
aiofiles
70+
aiohttp
71+
cryptography
72+
sdnotify
73+
python-dateutil
74+
pytz
75+
packaging
76+
freqtrade-client
77+
]
78+
++ lib.optional withPlot finalAttrs.optional-dependencies.plot
79+
++ lib.optional withFreqAI finalAttrs.optional-dependencies.freqAI
80+
++ lib.optional withFreqAIRL finalAttrs.optional-dependencies.freqAIRL
81+
++ lib.optional withHyperopt finalAttrs.optional-dependencies.hyperopt;
82+
optional-dependencies = with python3Packages; {
83+
plot = [ plotly ];
84+
freqAI = [
85+
scikit-learn
86+
joblib
87+
lightgbm
88+
xgboost
89+
tensorboard
90+
datasieve
91+
];
92+
freqAIRL = [
93+
torch
94+
gymnasium
95+
stable-baselines3
96+
sb3-contrib
97+
tqdm
98+
];
99+
hyperopt = [
100+
scikit-learn
101+
filelock
102+
optuna
103+
cmaes
104+
];
105+
};
72106
postInstall = lib.optionalString withFreqUI ''
73107
# https://github.com/freqtrade/freqtrade/blob/064e67c42af3c4026d123990f992ac42f7ee3cde/freqtrade/commands/deploy_commands.py#L117
74108
ln -s ${frequi} $out/${python3Packages.python.sitePackages}/freqtrade/rpc/api_server/ui/installed

0 commit comments

Comments
 (0)