2023-11-26 10:46:42 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-01-16 23:12:20 +00:00
|
|
|
fetchPypi,
|
2023-11-29 00:23:29 +00:00
|
|
|
pythonOlder,
|
2024-05-22 14:01:06 +00:00
|
|
|
|
2023-11-29 00:23:29 +00:00
|
|
|
# build-system
|
2023-11-26 10:46:42 +00:00
|
|
|
setuptools,
|
2024-05-22 14:01:06 +00:00
|
|
|
|
2023-11-29 00:23:29 +00:00
|
|
|
# dependencies
|
2023-11-26 10:46:42 +00:00
|
|
|
bluepy,
|
|
|
|
cryptography,
|
2024-05-22 14:01:06 +00:00
|
|
|
|
2023-11-29 00:23:29 +00:00
|
|
|
# tests
|
|
|
|
pytestCheckHook,
|
2023-11-26 10:46:42 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-16 23:12:20 +00:00
|
|
|
buildPythonPackage rec {
|
2023-11-26 10:46:42 +00:00
|
|
|
pname = "miauth";
|
2024-01-16 23:12:20 +00:00
|
|
|
version = "0.9.7";
|
2023-11-26 10:46:42 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
2024-01-16 23:12:20 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
hash = "sha256-2/4nFInpdY8fb/b+sXhgT6ZPtEgBV+KHMyLnxIp6y/U=";
|
2023-11-26 10:46:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2023-11-29 00:23:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [ "cryptography" ];
|
2023-11-26 10:46:42 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bluepy
|
|
|
|
cryptography
|
|
|
|
];
|
|
|
|
|
2024-01-16 23:12:20 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
|
2023-11-26 10:46:42 +00:00
|
|
|
pythonImportsCheck = [ "miauth" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Authenticate and interact with Xiaomi devices over BLE";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "miauth";
|
2023-11-26 10:46:42 +00:00
|
|
|
homepage = "https://github.com/dnandha/miauth";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|