lol

python3Packages.discordpy: patch ffmpeg usage

Update pkgs/development/python-modules/discordpy/default.nix

Co-authored-by: Jonathan Ringer <jonringer@users.noreply.github.com>

authored by

Tristan Gosselin-Hane
Jonathan Ringer
and committed by
Jonathan Ringer
b99f465b f276ef75

+6 -1
+6 -1
pkgs/development/python-modules/discordpy/default.nix
··· 6 , pynacl 7 , pythonOlder 8 , withVoice ? true 9 }: 10 11 buildPythonPackage rec { ··· 24 25 propagatedBuildInputs = [ 26 aiohttp 27 - ] ++ lib.optionalString withVoice [ 28 libopus 29 pynacl 30 ]; 31 32 patchPhase = '' ··· 34 --replace "ctypes.util.find_library('opus')" "'${libopus}/lib/libopus.so.0'" 35 substituteInPlace requirements.txt \ 36 --replace "aiohttp>=3.6.0,<3.8.0" "aiohttp>=3.6.0,<4" 37 ''; 38 39 # Only have integration tests with discord
··· 6 , pynacl 7 , pythonOlder 8 , withVoice ? true 9 + , ffmpeg 10 }: 11 12 buildPythonPackage rec { ··· 25 26 propagatedBuildInputs = [ 27 aiohttp 28 + ] ++ lib.optionals withVoice [ 29 libopus 30 pynacl 31 + ffmpeg 32 ]; 33 34 patchPhase = '' ··· 36 --replace "ctypes.util.find_library('opus')" "'${libopus}/lib/libopus.so.0'" 37 substituteInPlace requirements.txt \ 38 --replace "aiohttp>=3.6.0,<3.8.0" "aiohttp>=3.6.0,<4" 39 + '' + lib.optionalString withVoice '' 40 + substituteInPlace "discord/player.py" \ 41 + --replace "executable='ffmpeg'" "executable='${ffmpeg}/bin/ffmpeg'" 42 ''; 43 44 # Only have integration tests with discord