persepolis: replace youtube-dl with yt-dlp

This fixes the upstream issue
https://github.com/persepolisdm/persepolis/issues/930

authored by Felix Uhl and committed by Weijia Wang bf623483 10438abd

+13 -3
+13 -3
pkgs/tools/networking/persepolis/default.nix
··· 13 13 , setuptools 14 14 , sound-theme-freedesktop 15 15 , wrapQtAppsHook 16 - , youtube-dl 16 + , yt-dlp 17 17 }: 18 18 19 19 buildPythonApplication rec { ··· 30 30 # see: https://github.com/persepolisdm/persepolis/blob/3.2.0/setup.py#L130 31 31 doCheck = false; 32 32 33 - preBuild='' 33 + preBuild= 34 + # Make setup automatic 35 + '' 34 36 substituteInPlace setup.py --replace "answer = input(" "answer = 'y'#" 37 + '' + 38 + # Replace abandoned youtube-dl with maintained fork yt-dlp. Fixes https://github.com/persepolisdm/persepolis/issues/930, 39 + # can be removed if that issue is fixed and/or https://github.com/persepolisdm/persepolis/pull/936 is merged 40 + '' 41 + substituteInPlace setup.py ./persepolis/scripts/video_finder_addlink.py --replace \ 42 + "import youtube_dl" "import yt_dlp as youtube_dl" 35 43 ''; 36 44 37 45 patches = lib.optionals stdenv.isDarwin [ 46 + # Upstream is abandonware, the last commit to master was on 2021-08-26. 47 + # If it is forked or picked up again, consider upstreaming these patches. 38 48 ./0001-Allow-building-on-darwin.patch 39 49 ./0002-Fix-startup-crash-on-darwin.patch 40 50 ./0003-Search-PATH-for-aria2c-on-darwin.patch ··· 69 79 setproctitle 70 80 setuptools 71 81 sound-theme-freedesktop 72 - youtube-dl 82 + yt-dlp 73 83 ]; 74 84 75 85 meta = with lib; {