1{ stdenv, buildPythonPackage, fetchPypi, six }:
2buildPythonPackage rec {
3 pname = "websocket_client";
4 version = "0.51.0";
5
6 src = fetchPypi {
7 inherit version pname;
8 sha256 = "030bbfbf29ac9e315ffb207ed5ed42b6981b5038ea00d1e13b02b872cc95e8f6";
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}