3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/autobahn/default.nix
2021-01-04 13:38:57 +01:00

35 lines
995 B
Nix

{ lib, buildPythonPackage, fetchPypi, isPy3k,
six, txaio, twisted, zope_interface, cffi, trollius, futures,
mock, pytest, cryptography, pynacl
}:
buildPythonPackage rec {
pname = "autobahn";
version = "20.12.3";
src = fetchPypi {
inherit pname version;
sha256 = "15b8zm7jalwisfwc08szxy3bh2bnn0hd41dbsnswi0lqwbh962j1";
};
propagatedBuildInputs = [ six txaio twisted zope_interface cffi cryptography pynacl ] ++
(lib.optionals (!isPy3k) [ trollius futures ]);
checkInputs = [ mock pytest ];
checkPhase = ''
runHook preCheck
USE_TWISTED=true py.test $out
runHook postCheck
'';
# Tests do no seem to be compatible yet with pytest 5.1
# https://github.com/crossbario/autobahn-python/issues/1235
doCheck = false;
meta = with lib; {
description = "WebSocket and WAMP in Python for Twisted and asyncio.";
homepage = "https://crossbar.io/autobahn";
license = licenses.mit;
maintainers = with maintainers; [ nand0p ];
};
}