1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pythonOlder, 6 pythonRelaxDepsHook, 7 8 # build-system 9 setuptools, 10 11 # dependencies 12 bluepy, 13 cryptography, 14 15 # tests 16 pytestCheckHook, 17}: 18 19buildPythonPackage rec { 20 pname = "miauth"; 21 version = "0.9.7"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.10"; 25 26 src = fetchPypi { 27 inherit pname version; 28 hash = "sha256-2/4nFInpdY8fb/b+sXhgT6ZPtEgBV+KHMyLnxIp6y/U="; 29 }; 30 31 nativeBuildInputs = [ 32 setuptools 33 pythonRelaxDepsHook 34 ]; 35 36 pythonRelaxDeps = [ "cryptography" ]; 37 38 propagatedBuildInputs = [ 39 bluepy 40 cryptography 41 ]; 42 43 nativeCheckInputs = [ pytestCheckHook ]; 44 45 pythonImportsCheck = [ "miauth" ]; 46 47 meta = with lib; { 48 description = "Authenticate and interact with Xiaomi devices over BLE"; 49 mainProgram = "miauth"; 50 homepage = "https://github.com/dnandha/miauth"; 51 license = licenses.agpl3Only; 52 maintainers = with maintainers; [ fab ]; 53 }; 54}