depot/third_party/nixpkgs/pkgs/development/python-modules/oralb-ble/default.nix
Default email 686ce24904 Project import generated by Copybara.
GitOrigin-RevId: ac1f5b72a9e95873d1de0233fddcb56f99884b37
2023-02-16 18:41:37 +01:00

58 lines
1.2 KiB
Nix

{ lib
, bleak-retry-connector
, bluetooth-data-tools
, bluetooth-sensor-state-data
, buildPythonPackage
, fetchFromGitHub
, home-assistant-bluetooth
, poetry-core
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "oralb-ble";
version = "0.17.5";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Lwrr5XzU2pbx3cYkvYtHgXFhGnz3cMBnNFWCpuY3ltg=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
bleak-retry-connector
bluetooth-data-tools
bluetooth-sensor-state-data
home-assistant-bluetooth
];
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=oralb_ble --cov-report=term-missing:skip-covered" ""
'';
pythonImportsCheck = [
"oralb_ble"
];
meta = with lib; {
description = "Library for Oral B BLE devices";
homepage = "https://github.com/Bluetooth-Devices/oralb-ble";
changelog = "https://github.com/Bluetooth-Devices/oralb-ble/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}