1{ stdenv, buildPythonPackage, fetchPypi, six }:
2buildPythonPackage rec {
3 pname = "websocket_client";
4 version = "0.47.0";
5
6 src = fetchPypi {
7 inherit version pname;
8 sha256 = "0jb1446053ryp5p25wsr1hjfdzwfm04a6f3pzpcb63bfz96xqlx4";
9 };
10
11 prePatch = ''
12 # ssl.match_hostname exists in python2.7 version maintained in nixpkgs,
13 # the dependency is not necessary.
14 sed -e "s/\['backports.ssl_match_hostname'\]/\[\]/" -i setup.py
15 '';
16
17 propagatedBuildInputs = [ six ];
18
19 meta = with stdenv.lib; {
20 homepage = https://github.com/liris/websocket-client;
21 description = "Websocket client for python";
22 license = licenses.lgpl2;
23 };
24}