depot/third_party/nixpkgs/pkgs/development/python-modules/oralb-ble/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

56 lines
1.2 KiB
Nix

{ lib
, bluetooth-data-tools
, bluetooth-sensor-state-data
, buildPythonPackage
, fetchFromGitHub
, home-assistant-bluetooth
, poetry-core
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "oralb-ble";
version = "0.14.3";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-L6i/XnsPsxO1qltfWOoGV/NpPpZj73w95ScdcBTkdlo=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
bluetooth-data-tools
bluetooth-sensor-state-data
home-assistant-bluetooth
];
checkInputs = [
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 ];
};
}