Files
nixpkgs/pkgs/development/python-modules/websockets/default.nix
T

38 lines
844 B
Nix
Raw Normal View History

2016-12-14 19:10:14 +01:00
{ lib
2019-09-16 13:24:14 -07:00
, fetchFromGitHub
2016-12-14 19:10:14 +01:00
, buildPythonPackage
, pythonOlder
2019-09-16 13:24:14 -07:00
, pytest
, stdenv
2016-12-14 19:10:14 +01:00
}:
2018-06-23 15:27:58 +02:00
buildPythonPackage rec {
2016-12-14 19:10:14 +01:00
pname = "websockets";
2019-11-09 10:53:35 -08:00
version = "8.1";
2016-12-14 19:10:14 +01:00
2019-09-16 13:24:14 -07:00
src = fetchFromGitHub {
owner = "aaugustin";
repo = pname;
rev = version;
2019-11-09 10:53:35 -08:00
sha256 = "05jbqcbjg50ydwl0fijhdlqcq7fl6v99kjva66kmmzzza7vwa872";
2016-12-14 19:10:14 +01:00
};
disabled = pythonOlder "3.3";
# Tests fail on Darwin with `OSError: AF_UNIX path too long`
doCheck = !stdenv.isDarwin;
# Disable all tests that need to terminate within a predetermined amount of
# time. This is nondeterministic.
patchPhase = ''
sed -i 's/with self.assertCompletesWithin.*:/if True:/' \
tests/test_protocol.py
'';
2019-09-16 13:24:14 -07:00
meta = with lib; {
2016-12-14 19:10:14 +01:00
description = "WebSocket implementation in Python 3";
2019-09-16 13:24:14 -07:00
homepage = "https://github.com/aaugustin/websockets";
license = licenses.bsd3;
2016-12-14 19:10:14 +01:00
};
}