Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2a7e228c0c54
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 27582b603550
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jan 11, 2020

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    27582b6 View commit details
Showing with 24 additions and 13 deletions.
  1. +24 −13 pkgs/development/python-modules/discordpy/default.nix
37 changes: 24 additions & 13 deletions pkgs/development/python-modules/discordpy/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ lib
, fetchPypi
, fetchFromGitHub
, buildPythonPackage
, pythonOlder
, withVoice ? true, libopus
@@ -10,34 +10,45 @@

buildPythonPackage rec {
pname = "discord.py";
version = "1.2.4";
version = "1.2.5";
disabled = pythonOlder "3.5.3";

src = fetchPypi {
inherit pname version;
sha256 = "3e044d84f0bb275d173e2d958cb4a579e525707f90e3e8a15c59901f79e80663";
# only distributes wheels on pypi now
src = fetchFromGitHub {
owner = "Rapptz";
repo = pname;
rev = "v${version}";
sha256 = "17l6mlfi9ikqndpmi4pwlvb53g132cycyfm9nzdyiqr96k8ly4ig";
};

propagatedBuildInputs = [ aiohttp websockets pynacl ];
propagatedBuildInputs = [ aiohttp websockets ];
patchPhase = ''
substituteInPlace "requirements.txt" \
--replace "aiohttp>=1.0.0,<1.1.0" "aiohttp"
--replace "aiohttp>=3.3.0,<3.6.0" "aiohttp~=3.3" \
--replace "websockets>=6.0,<7.0" "websockets>=6"
'' + lib.optionalString withVoice ''
substituteInPlace "discord/opus.py" \
--replace "ctypes.util.find_library('opus')" "'${libopus}/lib/libopus.so.0'"
'';

disabled = pythonOlder "3.5";

# No tests in archive
# only have integration tests with discord
doCheck = false;

pythonImportsCheck = [
"discord"
"discord.file"
"discord.member"
"discord.user"
"discord.state"
"discord.guild"
"discord.webhook"
"discord.ext.commands.bot"
];

meta = {
description = "A python wrapper for the Discord API";
homepage = "https://discordpy.rtfd.org/";
license = lib.licenses.mit;

# discord.py requires websockets<4.0
# See https://github.com/Rapptz/discord.py/issues/973
broken = true;
};
}