summary refs log tree commit diff
path: root/pkgs/tools/networking/persepolis
diff options
context:
space:
mode:
authorFelix Uhl <felix.uhl@netlight.com>2023-11-07 15:58:22 +0100
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-11-10 21:53:11 +0100
commitbf623483abda4fdb09b5e1b5fe1cb5bca14365c2 (patch)
tree1c1ed4676a6acf3e859c7ded68148500bc27d65e /pkgs/tools/networking/persepolis
parent10438abd0ba837e17896bec70cd6f1590dee83eb (diff)
downloadnixpkgs-bf623483abda4fdb09b5e1b5fe1cb5bca14365c2.tar
nixpkgs-bf623483abda4fdb09b5e1b5fe1cb5bca14365c2.tar.gz
nixpkgs-bf623483abda4fdb09b5e1b5fe1cb5bca14365c2.tar.bz2
nixpkgs-bf623483abda4fdb09b5e1b5fe1cb5bca14365c2.tar.lz
nixpkgs-bf623483abda4fdb09b5e1b5fe1cb5bca14365c2.tar.xz
nixpkgs-bf623483abda4fdb09b5e1b5fe1cb5bca14365c2.tar.zst
nixpkgs-bf623483abda4fdb09b5e1b5fe1cb5bca14365c2.zip
persepolis: replace youtube-dl with yt-dlp
This fixes the upstream issue
https://github.com/persepolisdm/persepolis/issues/930
Diffstat (limited to 'pkgs/tools/networking/persepolis')
-rw-r--r--pkgs/tools/networking/persepolis/default.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/tools/networking/persepolis/default.nix b/pkgs/tools/networking/persepolis/default.nix
index ac8f4bd3ee9..35727c13e69 100644
--- a/pkgs/tools/networking/persepolis/default.nix
+++ b/pkgs/tools/networking/persepolis/default.nix
@@ -13,7 +13,7 @@
 , setuptools
 , sound-theme-freedesktop
 , wrapQtAppsHook
-, youtube-dl
+, yt-dlp
 }:
 
 buildPythonApplication rec {
@@ -30,11 +30,21 @@ buildPythonApplication rec {
   # see: https://github.com/persepolisdm/persepolis/blob/3.2.0/setup.py#L130
   doCheck = false;
 
-  preBuild=''
+  preBuild=
+  # Make setup automatic
+  ''
     substituteInPlace setup.py --replace "answer = input(" "answer = 'y'#"
+  '' +
+  # Replace abandoned youtube-dl with maintained fork yt-dlp. Fixes https://github.com/persepolisdm/persepolis/issues/930,
+  # can be removed if that issue is fixed and/or https://github.com/persepolisdm/persepolis/pull/936 is merged
+  ''
+    substituteInPlace setup.py ./persepolis/scripts/video_finder_addlink.py --replace \
+        "import youtube_dl" "import yt_dlp as youtube_dl"
   '';
 
   patches = lib.optionals stdenv.isDarwin [
+    # Upstream is abandonware, the last commit to master was on 2021-08-26.
+    # If it is forked or picked up again, consider upstreaming these patches.
     ./0001-Allow-building-on-darwin.patch
     ./0002-Fix-startup-crash-on-darwin.patch
     ./0003-Search-PATH-for-aria2c-on-darwin.patch
@@ -69,7 +79,7 @@ buildPythonApplication rec {
     setproctitle
     setuptools
     sound-theme-freedesktop
-    youtube-dl
+    yt-dlp
   ];
 
   meta = with lib; {