From 5941d98418056ee01ca1f3bbaedcf12f366d8aec Mon Sep 17 00:00:00 2001 From: Ilya Elenskiy Date: Sat, 13 May 2023 00:39:32 +0200 Subject: [PATCH] python3Packages.qcodes-contrib-drivers: init at 0.18.0 --- .../qcodes-contrib-drivers/default.nix | 58 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/development/python-modules/qcodes-contrib-drivers/default.nix diff --git a/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix b/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix new file mode 100644 index 000000000000..e26745e77566 --- /dev/null +++ b/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix @@ -0,0 +1,58 @@ +{ lib +, fetchFromGitHub +, pythonOlder +, buildPythonPackage +, setuptools +, versioningit +, qcodes +, packaging +, pytestCheckHook +, pytest-mock +, pyvisa-sim +}: + +buildPythonPackage rec { + pname = "qcodes-contrib-drivers"; + version = "0.18.0"; + + disabled = pythonOlder "3.8"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "QCoDeS"; + repo = "Qcodes_contrib_drivers"; + rev = "v${version}"; + sha256 = "sha256-hg3jSiuOkiuOInnUzzlKtBeoP5zkCDBQ3xP6KCwq+lU="; + }; + + nativeBuildInputs = [ setuptools versioningit ]; + + propagatedBuildInputs = [ + qcodes + packaging + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-mock + pyvisa-sim + ]; + + pythonImportsCheck = [ "qcodes_contrib_drivers" ]; + + # should be fixed starting with 0.19.0, remove at next release + disabledTestPaths = [ + "qcodes_contrib_drivers/tests/test_Keysight_M3201A.py" + ]; + + postInstall = '' + export HOME="$TMPDIR" + ''; + + meta = with lib; { + description = "User contributed drivers for QCoDeS"; + homepage = "https://github.com/QCoDeS/Qcodes_contrib_drivers"; + license = licenses.mit; + maintainers = with maintainers; [ evilmav ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b2d64320c4ac..4d4159ebaa10 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10206,6 +10206,8 @@ self: super: with self; { qcodes = callPackage ../development/python-modules/qcodes { }; + qcodes-contrib-drivers = callPackage ../development/python-modules/qcodes-contrib-drivers { }; + qcodes-loop = callPackage ../development/python-modules/qcodes-loop { }; qcs-api-client = callPackage ../development/python-modules/qcs-api-client { };