summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-engineio
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/python-engineio')
-rw-r--r--pkgs/development/python-modules/python-engineio/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-engineio/default.nix b/pkgs/development/python-modules/python-engineio/default.nix
new file mode 100644
index 000000000000..1ea6dd89f2a4
--- /dev/null
+++ b/pkgs/development/python-modules/python-engineio/default.nix
@@ -0,0 +1,49 @@
+{ stdenv
+, lib
+, buildPythonPackage
+, fetchFromGitHub
+, six
+, eventlet
+, mock
+, iana-etc
+, libredirect
+, aiohttp
+, tornado
+}:
+
+buildPythonPackage rec {
+ pname = "python-engineio";
+ version = "3.0.0";
+
+ src = fetchFromGitHub {
+ owner = "miguelgrinberg";
+ repo = "python-engineio";
+ rev = "v${version}";
+ sha256 = "1v510fhn0li808ar2cmwh5nijacy5x60q9x4gm0b34j6mkmc59ph";
+ };
+
+ propagatedBuildInputs = [
+ six
+ ];
+
+ checkInputs = [
+ eventlet
+ mock
+ aiohttp
+ tornado
+ ];
+
+ # make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox
+ preCheck = stdenv.lib.optionalString stdenv.isLinux ''
+ export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols \
+ LD_PRELOAD=${libredirect}/lib/libredirect.so
+ '';
+ postCheck = "unset NIX_REDIRECTS LD_PRELOAD";
+
+ meta = with stdenv.lib; {
+ description = "Engine.IO server";
+ homepage = http://github.com/miguelgrinberg/python-engineio/;
+ license = licenses.mit;
+ maintainers = [ maintainers.mic92 ];
+ };
+}