1{ lib 2, stdenv 3, buildPythonPackage 4, pythonOlder 5, fetchFromGitHub 6, substituteAll 7, ffmpeg 8, libopus 9, aiohttp 10, aiodns 11, brotli 12, faust-cchardet 13, orjson 14, pynacl 15}: 16 17buildPythonPackage rec { 18 pname = "nextcord"; 19 version = "2.6.1"; 20 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "nextcord"; 27 repo = "nextcord"; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-bv4I+Ol/N4kbp/Ch7utaUpo0GmF+Mpx4zWmHL7uIveM="; 30 }; 31 32 patches = [ 33 (substituteAll { 34 src = ./paths.patch; 35 ffmpeg = "${ffmpeg}/bin/ffmpeg"; 36 libopus = "${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}"; 37 }) 38 ]; 39 40 propagatedBuildInputs = [ 41 aiodns 42 aiohttp 43 brotli 44 faust-cchardet 45 orjson 46 pynacl 47 ]; 48 49 # upstream has no tests 50 doCheck = false; 51 52 pythonImportsCheck = [ 53 "nextcord" 54 "nextcord.ext.commands" 55 "nextcord.ext.tasks" 56 ]; 57 58 meta = with lib; { 59 changelog = "https://github.com/nextcord/nextcord/blob/${src.rev}/docs/whats_new.rst"; 60 description = "Python wrapper for the Discord API forked from discord.py"; 61 homepage = "https://github.com/nextcord/nextcord"; 62 license = licenses.mit; 63 maintainers = with maintainers; [ dotlambda ]; 64 }; 65}