12 , atomicparsleySupport ? true
13 , ffmpegSupport ? true
15 , withAlias ? false # Provides bin/youtube-dl for backcompat
18 buildPythonPackage rec {
20 # The websites yt-dlp deals with are a very moving target. That means that
21 # downloads break constantly. Because of that, updates should always be backported
22 # to the latest stable release.
23 version = "2022.10.4";
26 inherit pname version;
27 sha256 = "sha256-F3Ki5vMrlxtNAm3q4wRPV2uAUgNSVco0DzRc/pDTjTg=";
30 propagatedBuildInputs = [ brotli certifi mutagen pycryptodomex websockets ];
32 # Ensure these utilities are available in $PATH:
33 # - ffmpeg: post-processing & transcoding support
34 # - rtmpdump: download files over RTMP
35 # - atomicparsley: embedding thumbnails
38 packagesToBinPath = []
39 ++ lib.optional atomicparsleySupport atomicparsley
40 ++ lib.optional ffmpegSupport ffmpeg
41 ++ lib.optional rtmpSupport rtmpdump;
42 in lib.optionalString (packagesToBinPath != [])
43 [ ''--prefix PATH : "${lib.makeBinPath packagesToBinPath}"'' ];
46 "build_lazy_extractors"
52 postInstall = lib.optionalString withAlias ''
53 ln -s "$out/bin/yt-dlp" "$out/bin/youtube-dl"
57 homepage = "https://github.com/yt-dlp/yt-dlp/";
58 description = "Command-line tool to download videos from YouTube.com and other sites (youtube-dl fork)";
60 yt-dlp is a youtube-dl fork based on the now inactive youtube-dlc.
62 youtube-dl is a small, Python-based command-line program
63 to download videos from YouTube.com and a few more sites.
64 youtube-dl is released to the public domain, which means
65 you can modify it, redistribute it or use it however you like.
67 license = licenses.unlicense;
68 maintainers = with maintainers; [ mkg20001 SuperSandro2000 marsam ];