1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, msgpack
5, numpy
6, pytest-asyncio
7, pytestCheckHook
8, python-rapidjson
9, pythonOlder
10, pyzmq
11, ruamel-yaml
12}:
13
14buildPythonPackage rec {
15 pname = "rpcq";
16 version = "3.9.2";
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchFromGitHub {
21 owner = "rigetti";
22 repo = pname;
23 rev = "v${version}";
24 sha256 = "1vvf6y7459f8aamhkcxx36ajiai143s2vwg751x0dl0lx7hp3yn5";
25 };
26
27 propagatedBuildInputs = [
28 msgpack
29 python-rapidjson
30 pyzmq
31 ruamel-yaml
32 ];
33
34 checkInputs = [
35 numpy
36 pytest-asyncio
37 pytestCheckHook
38 ];
39
40 postPatch = ''
41 substituteInPlace setup.py \
42 --replace "msgpack>=0.6,<1.0" "msgpack"
43 '';
44
45 pythonImportsCheck = [ "rpcq" ];
46
47 meta = with lib; {
48 description = "The RPC framework and message specification for rigetti Quantum Cloud services";
49 homepage = "https://github.com/rigetti/rpcq";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ fab ];
52 };
53}