python3Packages.discordpy: fix libopus path on Darwin
Darwin uses .dylib as the extension for dynamic libraries (unlike Linux which uses .so). Replace the hardcoded extension with stdenv.hostPlatform.extensions.sharedLibrary to fix Opus support on darwin.
This commit is contained in:
parent
a35621603c
commit
235cec51d3
|
@ -1,4 +1,5 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, aiohttp
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
|
@ -33,7 +34,7 @@ buildPythonPackage rec {
|
|||
|
||||
patchPhase = ''
|
||||
substituteInPlace "discord/opus.py" \
|
||||
--replace "ctypes.util.find_library('opus')" "'${libopus}/lib/libopus.so.0'"
|
||||
--replace "ctypes.util.find_library('opus')" "'${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
||||
'' + lib.optionalString withVoice ''
|
||||
substituteInPlace "discord/player.py" \
|
||||
--replace "executable='ffmpeg'" "executable='${ffmpeg}/bin/ffmpeg'"
|
||||
|
|
Loading…
Reference in a new issue