nixpkgs/pkgs/development/python-modules/uvloop/default.nix

46 lines
983 B
Nix
Raw Normal View History

2019-05-07 12:53:23 +00:00
{ lib
, stdenv
2019-05-07 12:53:23 +00:00
, buildPythonPackage
, fetchPypi
, pyopenssl
, libuv
, psutil
, isPy27
, CoreServices
, ApplicationServices
2019-05-07 12:53:23 +00:00
}:
buildPythonPackage rec {
pname = "uvloop";
version = "0.14.0";
2019-05-07 12:53:23 +00:00
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "07j678z9gf41j98w72ysrnb5sa41pl5yxd7ib17lcwfxqz0cjfhj";
2019-05-07 12:53:23 +00:00
};
2019-09-13 21:11:56 +00:00
patches = lib.optional stdenv.isDarwin ./darwin_sandbox.patch;
buildInputs = [
libuv
] ++ lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ];
postPatch = ''
# Removing code linting tests, which we don't care about
rm tests/test_sourcecode.py
'';
2019-05-07 12:53:23 +00:00
checkInputs = [ pyopenssl psutil ];
2019-09-13 21:11:56 +00:00
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;
2019-05-07 12:53:23 +00:00
meta = with lib; {
description = "Fast implementation of asyncio event loop on top of libuv";
homepage = http://github.com/MagicStack/uvloop;
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}