Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 40 lines 941 B view raw
1{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder 2, pytest, mock, pytestcov, coverage 3, future, futures, isPy38 4}: 5 6buildPythonPackage rec { 7 pname = "python-jsonrpc-server"; 8 version = "0.2.0"; 9 10 src = fetchFromGitHub { 11 owner = "palantir"; 12 repo = "python-jsonrpc-server"; 13 rev = version; 14 sha256 = "054b0xm5z3f82jwp7zj21pkh7gwj9jd933jhymdx49n1n1iynfn0"; 15 }; 16 17 postPatch = '' 18 sed -i 's/version=versioneer.get_version(),/version="${version}",/g' setup.py 19 ''; 20 21 checkInputs = [ 22 pytest mock pytestcov coverage 23 ]; 24 25 checkPhase = '' 26 pytest 27 ''; 28 29 disabled = isPy38; 30 31 propagatedBuildInputs = [ future ] 32 ++ stdenv.lib.optional (pythonOlder "3.2") futures; 33 34 meta = with stdenv.lib; { 35 homepage = https://github.com/palantir/python-jsonrpc-server; 36 description = "A Python 2 and 3 asynchronous JSON RPC server"; 37 license = licenses.mit; 38 maintainers = [ maintainers.mic92 ]; 39 }; 40}