Unverified Commit c32729c0 authored by Nicky Mouha's avatar Nicky Mouha Committed by GitHub
Browse files

Patch for yt-dlp to support fixed curl-cffi 0.7.4

parent 37afe439
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -75,6 +75,14 @@ python3Packages.buildPythonApplication rec {
  # Requires network
  doCheck = false;

  # curl-cffi 0.7.2 and 0.7.3 are broken, but 0.7.4 is fixed
  # https://github.com/lexiforest/curl_cffi/issues/394
  postPatch = ''
    substituteInPlace yt_dlp/networking/_curlcffi.py \
      --replace-fail "(0, 7, 0) <= curl_cffi_version < (0, 7, 2)" \
        "((0, 7, 0) <= curl_cffi_version < (0, 7, 2)) or curl_cffi_version >= (0, 7, 4)"
  '';

  postInstall = lib.optionalString withAlias ''
    ln -s "$out/bin/yt-dlp" "$out/bin/youtube-dl"
  '';