openai: add withOptionalDependencies option

This commit is contained in:
Malo Bourgon
2023-01-23 20:59:59 -08:00
parent 20c25e3794
commit 460bec3492
@@ -18,6 +18,7 @@
, tqdm
, typing-extensions
, wandb
, withOptionalDependencies ? false
}:
buildPythonPackage rec {
@@ -40,7 +41,9 @@ buildPythonPackage rec {
tqdm
] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
];
] ++ lib.optionals withOptionalDependencies (builtins.attrValues {
inherit (passthru.optional-dependencies) embeddings wandb;
});
passthru.optional-dependencies = {
datalib = [