nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 msgpack,
6 numpy,
7 pytest-asyncio,
8 pytestCheckHook,
9 python-rapidjson,
10 pyzmq,
11 ruamel-yaml,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "rpcq";
17 version = "3.10.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "rigetti";
22 repo = "rpcq";
23 tag = "v${version}";
24 hash = "sha256-J7jtGXJIF3jp0a0IQZmSR4TWf9D02Luau+Bupmi/d68=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace "msgpack>=0.6,<1.0" "msgpack"
30 '';
31
32 nativeBuildInputs = [ setuptools ];
33
34 propagatedBuildInputs = [
35 msgpack
36 python-rapidjson
37 pyzmq
38 ruamel-yaml
39 ];
40
41 nativeCheckInputs = [
42 numpy
43 pytest-asyncio
44 pytestCheckHook
45 ];
46
47 enabledTestPaths = [
48 # Don't run tests that spin-up a zmq server
49 "rpcq/test/test_base.py"
50 "rpcq/test/test_spec.py"
51 ];
52
53 pythonImportsCheck = [ "rpcq" ];
54
55 meta = {
56 description = "RPC framework and message specification for rigetti Quantum Cloud services";
57 homepage = "https://github.com/rigetti/rpcq";
58 license = lib.licenses.asl20;
59 maintainers = with lib.maintainers; [ fab ];
60 };
61}