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