Merge branch 'master' into staging
This commit is contained in:
30
pkgs/development/python-modules/async_timeout/default.nix
Normal file
30
pkgs/development/python-modules/async_timeout/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ lib
|
||||
, fetchurl
|
||||
, buildPythonPackage
|
||||
, pytestrunner
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "async-timeout";
|
||||
version = "1.1.0";
|
||||
in buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
||||
sha256 = "b88bd1fe001b800ec23c7bf27a81b32819e2a56668e9fba5646a7f3618143081";
|
||||
};
|
||||
|
||||
buildInputs = [ pytestrunner ];
|
||||
# Circular dependency on aiohttp
|
||||
doCheck = false;
|
||||
|
||||
disabled = pythonOlder "3.4";
|
||||
|
||||
meta = {
|
||||
description = "Timeout context manager for asyncio programs";
|
||||
homepage = https://github.com/aio-libs/async_timeout/;
|
||||
license = lib.licenses.asl20;
|
||||
};
|
||||
}
|
||||
39
pkgs/development/python-modules/discordpy/default.nix
Normal file
39
pkgs/development/python-modules/discordpy/default.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ lib
|
||||
, fetchurl
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, withVoice ? true, libopus
|
||||
, asyncio
|
||||
, aiohttp
|
||||
, websockets
|
||||
, pynacl
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "discord.py";
|
||||
version = "0.15.1";
|
||||
in buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
||||
sha256 = "01lgidvnwwva1i65853gaplamllym2nsk0jis2r6f1rzbamgk1yj";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ asyncio aiohttp websockets pynacl ];
|
||||
patchPhase = ''
|
||||
substituteInPlace "requirements.txt" \
|
||||
--replace "aiohttp>=1.0.0,<1.1.0" "aiohttp"
|
||||
'' + lib.optionalString withVoice ''
|
||||
substituteInPlace "discord/opus.py" \
|
||||
--replace "ctypes.util.find_library('opus')" "'${libopus}/lib/libopus.so.0'"
|
||||
'';
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
meta = {
|
||||
description = "A python wrapper for the Discord API";
|
||||
homepage = "https://discordpy.rtfd.org/";
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
32
pkgs/development/python-modules/multidict/default.nix
Normal file
32
pkgs/development/python-modules/multidict/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ lib
|
||||
, fetchurl
|
||||
, buildPythonPackage
|
||||
, pytest
|
||||
, isPy3k
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "multidict";
|
||||
version = "2.1.4";
|
||||
in buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
||||
sha256 = "a77aa8c9f68846c3b5db43ff8ed2a7a884dbe845d01f55113a3fba78518c4cd7";
|
||||
};
|
||||
|
||||
buildInputs = [ pytest ];
|
||||
|
||||
checkPhase = ''
|
||||
py.test
|
||||
'';
|
||||
|
||||
disabled = !isPy3k;
|
||||
|
||||
meta = {
|
||||
description = "Multidict implementation";
|
||||
homepage = https://github.com/aio-libs/multidict/;
|
||||
license = lib.licenses.asl20;
|
||||
};
|
||||
}
|
||||
26
pkgs/development/python-modules/websockets/default.nix
Normal file
26
pkgs/development/python-modules/websockets/default.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ lib
|
||||
, fetchurl
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "websockets";
|
||||
version = "3.2";
|
||||
in buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
||||
sha256 = "1dah1faywsnrlqyzagb1qc1cxrq9145srkdy118yhy9s8dyq4dmm";
|
||||
};
|
||||
|
||||
disabled = pythonOlder "3.3";
|
||||
doCheck = false; # protocol tests fail
|
||||
|
||||
meta = {
|
||||
description = "WebSocket implementation in Python 3";
|
||||
homepage = https://github.com/aaugustin/websockets;
|
||||
license = lib.licenses.bsd3;
|
||||
};
|
||||
}
|
||||
28
pkgs/development/python-modules/yarl/default.nix
Normal file
28
pkgs/development/python-modules/yarl/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ lib
|
||||
, fetchurl
|
||||
, buildPythonPackage
|
||||
, multidict
|
||||
, pytestrunner
|
||||
, pytest
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "yarl";
|
||||
version = "0.8.1";
|
||||
in buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
||||
sha256 = "9f0397ae540124bf16a8a5b89bc3ea1c07f8ae70c3e44231a40a9edd254d5712";
|
||||
};
|
||||
|
||||
buildInputs = [ pytest pytestrunner ];
|
||||
propagatedBuildInputs = [ multidict ];
|
||||
|
||||
|
||||
meta = {
|
||||
description = "Yet another URL library";
|
||||
homepage = https://github.com/aio-libs/yarl/;
|
||||
license = lib.licenses.asl20;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user