diff --git a/pkgs/development/python-modules/qingping-ble/default.nix b/pkgs/development/python-modules/qingping-ble/default.nix new file mode 100644 index 000000000000..8cbc94a87cfc --- /dev/null +++ b/pkgs/development/python-modules/qingping-ble/default.nix @@ -0,0 +1,53 @@ +{ lib +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "qingping-ble"; + version = "0.2.3"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "bluetooth-devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-+iUZIsaSYgptHXtNSc9sJiBU8CUEFPDsLVGuFR5WvDw="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bluetooth-sensor-state-data + sensor-state-data + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=qingping_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "qingping_ble" + ]; + + meta = with lib; { + description = "Library for Qingping BLE devices"; + homepage = "https://github.com/bluetooth-devices/qingping-ble"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 11da0814ccc5..f098f1bd0e0e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9125,6 +9125,8 @@ in { qimage2ndarray = callPackage ../development/python-modules/qimage2ndarray { }; + qingping-ble = callPackage ../development/python-modules/qingping-ble { }; + qiskit = callPackage ../development/python-modules/qiskit { }; qiskit-aer = callPackage ../development/python-modules/qiskit-aer { };