Merge pull request #329015 from eclairevoyant/yt-dlp-cffi

This commit is contained in:
Sandro 2024-07-26 20:54:42 +02:00 committed by GitHub
commit 2f0c10a073
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 26 deletions

View File

@ -1,18 +1,9 @@
{ lib { lib
, buildPythonPackage , python3Packages
, fetchPypi , fetchPypi
, brotli , ffmpeg-headless
, hatchling
, certifi
, ffmpeg
, rtmpdump , rtmpdump
, atomicparsley , atomicparsley
, pycryptodomex
, websockets
, mutagen
, requests
, secretstorage
, urllib3
, atomicparsleySupport ? true , atomicparsleySupport ? true
, ffmpegSupport ? true , ffmpegSupport ? true
, rtmpSupport ? true , rtmpSupport ? true
@ -20,7 +11,7 @@
, update-python-libraries , update-python-libraries
}: }:
buildPythonPackage rec { python3Packages.buildPythonApplication rec {
pname = "yt-dlp"; pname = "yt-dlp";
# The websites yt-dlp deals with are a very moving target. That means that # The websites yt-dlp deals with are a very moving target. That means that
# downloads break constantly. Because of that, updates should always be backported # downloads break constantly. Because of that, updates should always be backported
@ -34,13 +25,14 @@ buildPythonPackage rec {
hash = "sha256-dYeqJeI2z3sUvbk3i7//9RIC2QGwQgK+DPYsu1bTtSw="; hash = "sha256-dYeqJeI2z3sUvbk3i7//9RIC2QGwQgK+DPYsu1bTtSw=";
}; };
build-system = [ build-system = with python3Packages; [
hatchling hatchling
]; ];
dependencies = [ dependencies = with python3Packages; [
brotli brotli
certifi certifi
curl-cffi
mutagen mutagen
pycryptodomex pycryptodomex
requests requests
@ -57,7 +49,7 @@ buildPythonPackage rec {
let let
packagesToBinPath = [] packagesToBinPath = []
++ lib.optional atomicparsleySupport atomicparsley ++ lib.optional atomicparsleySupport atomicparsley
++ lib.optional ffmpegSupport ffmpeg ++ lib.optional ffmpegSupport ffmpeg-headless
++ lib.optional rtmpSupport rtmpdump; ++ lib.optional rtmpSupport rtmpdump;
in lib.optionals (packagesToBinPath != []) in lib.optionals (packagesToBinPath != [])
[ ''--prefix PATH : "${lib.makeBinPath packagesToBinPath}"'' ]; [ ''--prefix PATH : "${lib.makeBinPath packagesToBinPath}"'' ];

View File

@ -35306,9 +35306,11 @@ with pkgs;
youki = callPackage ../applications/virtualization/youki { }; youki = callPackage ../applications/virtualization/youki { };
yt-dlp = with python3Packages; toPythonApplication yt-dlp; yt-dlp-light = yt-dlp.override {
atomicparsleySupport = false;
yt-dlp-light = with python3Packages; toPythonApplication yt-dlp-light; ffmpegSupport = false;
rtmpSupport = false;
};
youtube-viewer = perlPackages.WWWYoutubeViewer; youtube-viewer = perlPackages.WWWYoutubeViewer;

View File

@ -17634,15 +17634,13 @@ self: super: with self; {
yoyo-migrations = callPackage ../development/python-modules/yoyo-migrations { }; yoyo-migrations = callPackage ../development/python-modules/yoyo-migrations { };
yt-dlp = callPackage ../tools/misc/yt-dlp { yt-dlp = toPythonModule (pkgs.yt-dlp.override {
ffmpeg = pkgs.ffmpeg-headless; python3Packages = self;
}; });
yt-dlp-light = callPackage ../tools/misc/yt-dlp { yt-dlp-light = toPythonModule (pkgs.yt-dlp-light.override {
atomicparsleySupport = false; python3Packages = self;
ffmpegSupport = false; });
rtmpSupport = false;
};
youtube-search = callPackage ../development/python-modules/youtube-search { }; youtube-search = callPackage ../development/python-modules/youtube-search { };