13 buildPythonPackage rec {
16 format = "setuptools";
18 disabled = pythonOlder "3.8";
20 src = fetchFromGitHub {
23 rev = "refs/tags/v${version}";
24 hash = "sha256-bZoYdDpk34x+Vw1pAZ3EcTFp2JJ/Ow0Jfof/XjqeRmY=";
27 propagatedBuildInputs = [
29 ] ++ lib.optionals withVoice [
36 substituteInPlace "discord/opus.py" \
37 --replace "ctypes.util.find_library('opus')" "'${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}'"
38 '' + lib.optionalString withVoice ''
39 substituteInPlace "discord/player.py" \
40 --replace "executable='ffmpeg'" "executable='${ffmpeg}/bin/ffmpeg'"
43 # Only have integration tests with discord
46 pythonImportsCheck = [
54 "discord.ext.commands.bot"
58 description = "Python wrapper for the Discord API";
59 homepage = "https://discordpy.rtfd.org/";
60 changelog = "https://github.com/Rapptz/discord.py/blob/v${version}/docs/whats_new.rst";
61 license = licenses.mit;
62 maintainers = with maintainers; [ ivar ];