Merge pull request #243765 from al3xtjames/discordpy-dylib

python3Packages.discordpy: fix libopus path on Darwin
This commit is contained in:
Nikolay Korotkiy 2023-07-25 00:53:27 +04:00 committed by GitHub
commit 6a228e77ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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'"