Files
nixpkgs/pkgs/development/python-modules/disnake/default.nix
T
Martin Weinelt e7412dad4d python3Packages.disnake: 2.10.1 -> 2.11.0
https://github.com/DisnakeDev/disnake/blob/v2.11.0/docs/whats_new.rst

This commit was automatically generated using update-python-libraries.
2026-02-01 16:42:58 +01:00

65 lines
1.4 KiB
Nix

{
lib,
setuptools,
aiohttp,
buildPythonPackage,
fetchFromGitHub,
libopus,
pynacl,
withVoice ? true,
ffmpeg,
}:
buildPythonPackage rec {
pname = "disnake";
version = "2.11.0";
pyproject = true;
src = fetchFromGitHub {
owner = "DisnakeDev";
repo = "disnake";
tag = "v${version}";
hash = "sha256-pwhUX5lzqSPik/rPsT42M3AMjzWWeqFN+0mVHA84cCo=";
};
build-system = [ setuptools ];
dependencies = [
aiohttp
]
++ lib.optionals withVoice [
libopus
pynacl
ffmpeg
];
postPatch = lib.optionalString withVoice ''
substituteInPlace "disnake/opus.py" \
--replace-fail 'ctypes.util.find_library("opus")' "'${libopus}/lib/libopus.so.0'"
substituteInPlace "disnake/player.py" \
--replace-fail 'executable: str = "ffmpeg"' 'executable: str="${ffmpeg}/bin/ffmpeg"'
'';
# Only have integration tests with discord
doCheck = false;
pythonImportsCheck = [
"disnake"
"disnake.file"
"disnake.member"
"disnake.user"
"disnake.state"
"disnake.guild"
"disnake.webhook"
"disnake.ext.commands.bot"
];
meta = {
description = "API wrapper for Discord written in Python";
homepage = "https://disnake.dev/";
changelog = "https://github.com/DisnakeDev/disnake/blob/${src.tag}/docs/whats_new.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ infinidoge ];
};
}