depot/third_party/nixpkgs/pkgs/development/python-modules/oralb-ble/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

55 lines
1.1 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.2";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-LPVNxdmKaOfUcnLVSH1kANW7Zz6bPPEyCemsau5YyHA=";
};
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";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}