python3Packages.discordpy: patch ffmpeg usage
Update pkgs/development/python-modules/discordpy/default.nix Co-authored-by: Jonathan Ringer <jonringer@users.noreply.github.com>
This commit is contained in:
parent
f276ef7519
commit
b99f465bd3
1 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
, pynacl
|
, pynacl
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, withVoice ? true
|
, withVoice ? true
|
||||||
|
, ffmpeg
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -24,9 +25,10 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
aiohttp
|
aiohttp
|
||||||
] ++ lib.optionalString withVoice [
|
] ++ lib.optionals withVoice [
|
||||||
libopus
|
libopus
|
||||||
pynacl
|
pynacl
|
||||||
|
ffmpeg
|
||||||
];
|
];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
|
@ -34,6 +36,9 @@ buildPythonPackage rec {
|
||||||
--replace "ctypes.util.find_library('opus')" "'${libopus}/lib/libopus.so.0'"
|
--replace "ctypes.util.find_library('opus')" "'${libopus}/lib/libopus.so.0'"
|
||||||
substituteInPlace requirements.txt \
|
substituteInPlace requirements.txt \
|
||||||
--replace "aiohttp>=3.6.0,<3.8.0" "aiohttp>=3.6.0,<4"
|
--replace "aiohttp>=3.6.0,<3.8.0" "aiohttp>=3.6.0,<4"
|
||||||
|
'' + lib.optionalString withVoice ''
|
||||||
|
substituteInPlace "discord/player.py" \
|
||||||
|
--replace "executable='ffmpeg'" "executable='${ffmpeg}/bin/ffmpeg'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Only have integration tests with discord
|
# Only have integration tests with discord
|
||||||
|
|
Loading…
Reference in a new issue