diff --git a/pkgs/development/python-modules/discordpy/default.nix b/pkgs/development/python-modules/discordpy/default.nix index 7d34a75a23c2..cd06f9df5da9 100644 --- a/pkgs/development/python-modules/discordpy/default.nix +++ b/pkgs/development/python-modules/discordpy/default.nix @@ -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'"