Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.7 kB · 83 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384{ lib, stdenv, buildPythonPackage, pythonAtLeast, pythonOlder, fetchFromGitHub, replaceVars, ffmpeg, libopus, aiohttp, aiodns, audioop-lts, brotli, orjson, poetry-core, poetry-dynamic-versioning, pynacl, typing-extensions,}:
buildPythonPackage rec { pname = "nextcord"; version = "3.1.0"; pyproject = true;
disabled = pythonOlder "3.12";
src = fetchFromGitHub { owner = "nextcord"; repo = "nextcord"; tag = "v${version}"; hash = "sha256-E8vRKH2Xgva7W5qW9kJBWzVfCuSiRyoAyO72mcGvkpg="; };
patches = [ (replaceVars ./paths.patch { ffmpeg = "${ffmpeg}/bin/ffmpeg"; libopus = "${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}"; }) ];
postPatch = '' # disable dynamic versioning substituteInPlace pyproject.toml \ --replace-fail 'version = "0.0.0"' 'version = "${version}"' \ --replace-fail 'enable = true' 'enable = false' '';
build-system = [ poetry-core poetry-dynamic-versioning ];
dependencies = [ aiodns aiohttp brotli orjson pynacl typing-extensions ] ++ lib.optionals (pythonAtLeast "3.13") [ audioop-lts ];
# 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.tag}/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 ]; };}