nixpkgs/pkgs/development/python-modules/nextcord/default.nix
Martin Weinelt 1bd4b71a35 python310Packages.cchardet: Drop in favor of faust-cchardet
The former packages has seen its last release in 2020-10 and can be
considered abandoned. Meanwhile a new fork has appeared in
faust-cchardet, that we're going to use in its place.

Co-Authored-By: Robert Schütz <nix@dotlambda.de>
2023-03-03 23:59:29 +01:00

66 lines
1.2 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, substituteAll
, ffmpeg
, libopus
, aiohttp
, aiodns
, brotli
, faust-cchardet
, orjson
, pynacl
}:
buildPythonPackage rec {
pname = "nextcord";
version = "2.4.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "nextcord";
repo = "nextcord";
rev = "refs/tags/v${version}";
hash = "sha256-TePUsyQ4DCuvfRQD4KAUs94o3MJRmZmu6jMPv4lJtHE=";
};
patches = [
(substituteAll {
src = ./paths.patch;
ffmpeg = "${ffmpeg}/bin/ffmpeg";
libopus = "${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];
propagatedBuildInputs = [
aiodns
aiohttp
brotli
faust-cchardet
orjson
pynacl
];
# upstream has no tests
doCheck = false;
pythonImportsCheck = [
"nextcord"
"nextcord.ext.commands"
"nextcord.ext.tasks"
];
meta = with lib; {
changelog = "https://github.com/nextcord/nextcord/blob/${src.rev}/docs/whats_new.rst";
description = "Python wrapper for the Discord API forked from discord.py";
homepage = "https://github.com/nextcord/nextcord";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}