From b1dbcccb23f36e1ded1d64c9afc1679fa89112a6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 26 Aug 2022 09:17:19 +0200 Subject: [PATCH 1/2] python310Packages.thermopro-ble: init at 0.4.0 --- .../python-modules/thermopro-ble/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/thermopro-ble/default.nix diff --git a/pkgs/development/python-modules/thermopro-ble/default.nix b/pkgs/development/python-modules/thermopro-ble/default.nix new file mode 100644 index 000000000000..a82430a8105c --- /dev/null +++ b/pkgs/development/python-modules/thermopro-ble/default.nix @@ -0,0 +1,53 @@ +{ lib +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "thermopro-ble"; + version = "0.4.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "bluetooth-devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-YVSJG+H4kUMrsVUBNjW67V2s/ziYH6RzQIk6CvMfRfg="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bluetooth-sensor-state-data + sensor-state-data + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=thermopro_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "thermopro_ble" + ]; + + meta = with lib; { + description = "Library for Thermopro BLE devices"; + homepage = "https://github.com/bluetooth-devices/thermopro-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 a1045e102845..77438d1d63a5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10807,6 +10807,8 @@ in { thermobeacon-ble = callPackage ../development/python-modules/thermobeacon-ble { }; + thermopro-ble = callPackage ../development/python-modules/thermopro-ble { }; + thespian = callPackage ../development/python-modules/thespian { }; thinc = callPackage ../development/python-modules/thinc { From e70d35945aedfe2e5f8d0e283206044a7a07d896 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 26 Aug 2022 09:20:32 +0200 Subject: [PATCH 2/2] python310Packages.thermopro-ble: 0.4.0 -> 0.4.1 --- pkgs/development/python-modules/thermopro-ble/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/thermopro-ble/default.nix b/pkgs/development/python-modules/thermopro-ble/default.nix index a82430a8105c..a09234c11409 100644 --- a/pkgs/development/python-modules/thermopro-ble/default.nix +++ b/pkgs/development/python-modules/thermopro-ble/default.nix @@ -1,4 +1,5 @@ { lib +, bluetooth-data-tools , bluetooth-sensor-state-data , buildPythonPackage , fetchFromGitHub @@ -10,7 +11,7 @@ buildPythonPackage rec { pname = "thermopro-ble"; - version = "0.4.0"; + version = "0.4.1"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -19,7 +20,7 @@ buildPythonPackage rec { owner = "bluetooth-devices"; repo = pname; rev = "v${version}"; - hash = "sha256-YVSJG+H4kUMrsVUBNjW67V2s/ziYH6RzQIk6CvMfRfg="; + hash = "sha256-5KfR01qsSGF2ZNklhm7he9Hskk8pqC2GEmIcsB4HpRY="; }; nativeBuildInputs = [ @@ -27,6 +28,7 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ + bluetooth-data-tools bluetooth-sensor-state-data sensor-state-data ];