diff --git a/autobahn.nix b/autobahn.nix
index 3cc1df2138e783f7bb212b50ba09435773233b88..df026096799d6b65bf34ad7700b6a726e9252f68 100644
--- a/autobahn.nix
+++ b/autobahn.nix
@@ -1,6 +1,7 @@
 { lib, buildPythonPackage, fetchFromGitHub, isPy3k,
   six, txaio, twisted, zope_interface, cffi, trollius, futures, cryptography,
-  mock, pytest
+  mock, pytest,
+  supportAsyncio ? false
 }:
 buildPythonPackage rec {
   pname = "autobahn";
@@ -14,7 +15,9 @@ buildPythonPackage rec {
   };
 
   propagatedBuildInputs = [ six txaio twisted zope_interface cffi cryptography ] ++
-    (lib.optionals (!isPy3k) [ trollius futures ]);
+    (lib.optionals (!isPy3k) [ futures ]) ++
+    (lib.optionals (supportAsyncio && !isPy3k) [ trollius ])
+    ;
 
   checkInputs = [ mock pytest ];
   checkPhase = ''