1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6
7 # build-system
8 setuptools,
9 versioningit,
10
11 # dependencies
12 autobahn,
13 cffi,
14 packaging,
15 pandas,
16 qcodes,
17 python-dotenv,
18
19 # tests
20 pytest-mock,
21 pytestCheckHook,
22 pyvisa-sim,
23 writableTmpDirAsHomeHook,
24}:
25
26buildPythonPackage rec {
27 pname = "qcodes-contrib-drivers";
28 version = "0.23.0";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "QCoDeS";
33 repo = "Qcodes_contrib_drivers";
34 tag = "v${version}";
35 hash = "sha256-m2idBaQl2OVhrY5hcLTeXY6BycGf0ufa/ySgxaU2L/4=";
36 };
37
38 build-system = [
39 setuptools
40 versioningit
41 ];
42
43 dependencies = [
44 autobahn
45 cffi
46 packaging
47 pandas
48 qcodes
49 python-dotenv
50 ];
51
52 nativeCheckInputs = [
53 pytest-mock
54 pytestCheckHook
55 pyvisa-sim
56 writableTmpDirAsHomeHook
57 ];
58
59 pythonImportsCheck = [ "qcodes_contrib_drivers" ];
60
61 disabledTests =
62 lib.optionals stdenv.hostPlatform.isDarwin [
63 # At index 13 diff: 'sour6:volt 0.29000000000000004' != 'sour6:volt 0.29'
64 "test_stability_diagram_external"
65 ]
66 ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
67 # AssertionError: assert ['outp:trig4:...9999996', ...] == ['outp:trig4:...t 0.266', ...]
68 "test_stability_diagram_external"
69 ];
70
71 meta = {
72 description = "User contributed drivers for QCoDeS";
73 homepage = "https://github.com/QCoDeS/Qcodes_contrib_drivers";
74 changelog = "https://github.com/QCoDeS/Qcodes_contrib_drivers/releases/tag/v${version}";
75 license = lib.licenses.mit;
76 maintainers = with lib.maintainers; [ evilmav ];
77 };
78}