diff --git a/pkgs/by-name/yt/yt-dlp/package.nix b/pkgs/by-name/yt/yt-dlp/package.nix index 2590f7136eb9..c3149189b538 100644 --- a/pkgs/by-name/yt/yt-dlp/package.nix +++ b/pkgs/by-name/yt/yt-dlp/package.nix @@ -30,17 +30,25 @@ python3Packages.buildPythonApplication rec { hatchling ]; - dependencies = with python3Packages; [ - brotli - certifi - curl-cffi - mutagen - pycryptodomex - requests - secretstorage # "optional", as in not in requirements.txt, needed for `--cookies-from-browser` - urllib3 - websockets - ]; + # expose optional-dependencies, but provide all features + dependencies = lib.flatten (lib.attrValues optional-dependencies); + + optional-dependencies = { + default = with python3Packages; [ + brotli + certifi + mutagen + pycryptodomex + requests + urllib3 + websockets + ]; + curl-cffi = [ python3Packages.curl-cffi ]; + secretstorage = with python3Packages; [ + cffi + secretstorage + ]; + }; pythonRelaxDeps = [ "websockets" ];