From dfee629102e0eacce8e8372e8f08b127c0c577f2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 6 Sep 2022 07:05:23 +0200 Subject: [PATCH] python310Packages.tilt-ble: init at 0.2.2 --- .../python-modules/tilt-ble/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/tilt-ble/default.nix diff --git a/pkgs/development/python-modules/tilt-ble/default.nix b/pkgs/development/python-modules/tilt-ble/default.nix new file mode 100644 index 000000000000..e7fd0e0368b9 --- /dev/null +++ b/pkgs/development/python-modules/tilt-ble/default.nix @@ -0,0 +1,55 @@ +{ lib +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, home-assistant-bluetooth +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "tilt-ble"; + version = "0.2.2"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-inr2cPl627w2klSqScMg3dvofIkX3hGb44+Go6ah/6I="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bluetooth-sensor-state-data + home-assistant-bluetooth + sensor-state-data + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=tilt_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "tilt_ble" + ]; + + meta = with lib; { + description = "Library for Tilt BLE devices"; + homepage = "https://github.com/Bluetooth-Devices/tilt-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 0e88b141da54..5fd5faed352f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10869,6 +10869,8 @@ in { tilestache = callPackage ../development/python-modules/tilestache { }; + tilt-ble = callPackage ../development/python-modules/tilt-ble { }; + timeago = callPackage ../development/python-modules/timeago { }; timecop = callPackage ../development/python-modules/timecop { };