65 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			65 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   lib,
 | |
|   bleak-retry-connector,
 | |
|   bleak,
 | |
|   bluetooth-data-tools,
 | |
|   bluetooth-sensor-state-data,
 | |
|   buildPythonPackage,
 | |
|   cryptography,
 | |
|   fetchFromGitHub,
 | |
|   home-assistant-bluetooth,
 | |
|   orjson,
 | |
|   poetry-core,
 | |
|   pycryptodomex,
 | |
|   pytest-cov-stub,
 | |
|   pytestCheckHook,
 | |
|   pythonOlder,
 | |
|   sensor-state-data,
 | |
| }:
 | |
| 
 | |
| buildPythonPackage rec {
 | |
|   pname = "xiaomi-ble";
 | |
|   version = "1.1.0";
 | |
|   pyproject = true;
 | |
| 
 | |
|   disabled = pythonOlder "3.9";
 | |
| 
 | |
|   src = fetchFromGitHub {
 | |
|     owner = "Bluetooth-Devices";
 | |
|     repo = "xiaomi-ble";
 | |
|     tag = "v${version}";
 | |
|     hash = "sha256-a1KHP3tkryKO3hlaHjLWZ8Foh1PCPa9aEPK4UHGNPeE=";
 | |
|   };
 | |
| 
 | |
|   build-system = [ poetry-core ];
 | |
| 
 | |
|   pythonRelaxDeps = [ "pycryptodomex" ];
 | |
| 
 | |
|   dependencies = [
 | |
|     bleak
 | |
|     bleak-retry-connector
 | |
|     bluetooth-data-tools
 | |
|     bluetooth-sensor-state-data
 | |
|     cryptography
 | |
|     home-assistant-bluetooth
 | |
|     orjson
 | |
|     pycryptodomex
 | |
|     sensor-state-data
 | |
|   ];
 | |
| 
 | |
|   nativeCheckInputs = [
 | |
|     pytest-cov-stub
 | |
|     pytestCheckHook
 | |
|   ];
 | |
| 
 | |
|   pythonImportsCheck = [ "xiaomi_ble" ];
 | |
| 
 | |
|   meta = with lib; {
 | |
|     description = "Library for Xiaomi BLE devices";
 | |
|     homepage = "https://github.com/Bluetooth-Devices/xiaomi-ble";
 | |
|     changelog = "https://github.com/Bluetooth-Devices/xiaomi-ble/releases/tag/${src.tag}";
 | |
|     license = licenses.mit;
 | |
|     maintainers = with maintainers; [ fab ];
 | |
|   };
 | |
| }
 | 
