Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 53 lines 1.1 kB view raw
1{ stdenv, buildPythonPackage, fetchFromGitHub 2, aiohttp 3, eventlet 4, iana-etc 5, libredirect 6, mock 7, requests 8, six 9, tornado 10, websocket_client 11, websockets 12}: 13 14buildPythonPackage rec { 15 pname = "python-engineio"; 16 version = "3.9.3"; 17 18 src = fetchFromGitHub { 19 owner = "miguelgrinberg"; 20 repo = "python-engineio"; 21 rev = "v${version}"; 22 sha256 = "0rwlj12d37dpw6y3bdn6rxv68xnd9ykj4fr3ly0fa143xci35d9y"; 23 }; 24 25 propagatedBuildInputs = [ 26 six 27 ]; 28 29 checkInputs = [ 30 aiohttp 31 eventlet 32 mock 33 requests 34 tornado 35 websocket_client 36 websockets 37 ]; 38 39 # make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox 40 preCheck = stdenv.lib.optionalString stdenv.isLinux '' 41 export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols \ 42 LD_PRELOAD=${libredirect}/lib/libredirect.so 43 ''; 44 postCheck = "unset NIX_REDIRECTS LD_PRELOAD"; 45 46 meta = with stdenv.lib; { 47 description = "Engine.IO server"; 48 homepage = https://github.com/miguelgrinberg/python-engineio/; 49 license = licenses.mit; 50 platforms = platforms.linux; 51 maintainers = [ maintainers.mic92 ]; 52 }; 53}