fix(tubesync): add tools called by yt-dlp to PATH

This commit is contained in:
514fpv 2024-02-23 10:45:54 +08:00
parent f1f1254562
commit df90ae4f05
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw

View file

@ -1,6 +1,8 @@
{ lib { lib
, stdenvNoCC , stdenvNoCC
, ffmpeg , ffmpeg
, rtmpdump
, atomicparsley
, callPackage , callPackage
, fetchFromGitHub , fetchFromGitHub
, fetchPypi , fetchPypi
@ -98,17 +100,22 @@ in stdenvNoCC.mkDerivation {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
unpackPhase = "true"; unpackPhase = "true";
installPhase = '' installPhase = let
prefix = ''--prefix PATH : "${lib.makeBinPath [
ffmpeg rtmpdump atomicparsley
]}"'';
in ''
mkdir -p "$out/bin" mkdir -p "$out/bin"
makeWrapper "${python}/bin/python3" "$out/bin/tubesync-worker" \ makeWrapper "${python}/bin/python3" "$out/bin/tubesync-worker" \
--chdir ${app}/app --add-flags \ --chdir ${app}/app --add-flags \
"${app}/app/manage.py process_tasks" \ "${app}/app/manage.py process_tasks" \
--set PATH ${lib.makeBinPath [ ffmpeg ]} ${prefix}
makeWrapper "${gunicorn}/bin/gunicorn" "$out/bin/tubesync-gunicorn" \ makeWrapper "${gunicorn}/bin/gunicorn" "$out/bin/tubesync-gunicorn" \
--chdir ${app}/app --add-flags \ --chdir ${app}/app --add-flags \
"-c ${app}/app/tubesync/gunicorn.py --capture-output tubesync.wsgi:application" "-c ${app}/app/tubesync/gunicorn.py --capture-output tubesync.wsgi:application" \
${prefix}
makeWrapper "${python}/bin/python3" "$out/bin/tubesync-migrate" \ makeWrapper "${python}/bin/python3" "$out/bin/tubesync-migrate" \
--chdir "${app}/app" --add-flags \ --chdir "${app}/app" --add-flags \