1{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
2, pytestCheckHook, mock, pytest-cov, coverage
3, future, futures ? null, ujson}:
4
5buildPythonPackage rec {
6 pname = "python-jsonrpc-server";
7 version = "0.4.0";
8
9 src = fetchFromGitHub {
10 owner = "palantir";
11 repo = "python-jsonrpc-server";
12 rev = version;
13 sha256 = "0pcf50qvcxqnz3db58whqd8z89cdph19pfs1whgfm0zmwbwk0lw6";
14 };
15
16 postPatch = ''
17 sed -i "s/version=versioneer.get_version(),/version=\"$version\",/g" setup.py
18 '';
19
20 checkInputs = [
21 pytestCheckHook mock pytest-cov coverage
22 ];
23
24 propagatedBuildInputs = [ future ujson ]
25 ++ lib.optional (pythonOlder "3.2") futures;
26
27 meta = with lib; {
28 homepage = "https://github.com/palantir/python-jsonrpc-server";
29 description = "A Python 2 and 3 asynchronous JSON RPC server";
30 license = licenses.mit;
31 maintainers = [ maintainers.mic92 ];
32 };
33}