1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 versioningit,
8 cffi,
9 qcodes,
10 packaging,
11 pandas,
12 pytestCheckHook,
13 pytest-mock,
14 pyvisa-sim,
15 stdenv,
16}:
17
18buildPythonPackage rec {
19 pname = "qcodes-contrib-drivers";
20 version = "0.22.0";
21 pyproject = true;
22
23 disabled = pythonOlder "3.9";
24
25 src = fetchFromGitHub {
26 owner = "QCoDeS";
27 repo = "Qcodes_contrib_drivers";
28 rev = "refs/tags/v${version}";
29 sha256 = "sha256-/W5oC5iqYifMR3/s7aSQ2yTJNmkemkc0KVxIU0Es3zY=";
30 };
31
32 build-system = [
33 setuptools
34 versioningit
35 ];
36
37 dependencies = [
38 cffi
39 qcodes
40 packaging
41 pandas
42 ];
43
44 nativeCheckInputs = [
45 pytestCheckHook
46 pytest-mock
47 pyvisa-sim
48 ];
49
50 pythonImportsCheck = [ "qcodes_contrib_drivers" ];
51
52 disabledTests = lib.optionals (stdenv.hostPlatform.system == "x86_64-darwin") [
53 # At index 13 diff: 'sour6:volt 0.29000000000000004' != 'sour6:volt 0.29'
54 "test_stability_diagram_external"
55 ];
56
57 postInstall = ''
58 export HOME="$TMPDIR"
59 '';
60
61 meta = {
62 description = "User contributed drivers for QCoDeS";
63 homepage = "https://github.com/QCoDeS/Qcodes_contrib_drivers";
64 changelog = "https://github.com/QCoDeS/Qcodes_contrib_drivers/releases/tag/v${version}";
65 license = lib.licenses.mit;
66 maintainers = with lib.maintainers; [ evilmav ];
67 };
68}