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
|
|
|
|
2024-06-27 14:15:56 +00:00
|
|
|
# checks
|
2023-11-29 00:23:29 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2024-06-26 17:31:23 +00:00
|
|
|
build-system = [ setuptools ];
|
2023-11-29 00:23:29 +00:00
|
|
|
|
|
|
|
pythonRelaxDeps = [ "cryptography" ];
|
2023-11-26 10:46:42 +00:00
|
|
|
|
2024-06-26 17:31:23 +00:00
|
|
|
dependencies = [
|
2023-11-26 10:46:42 +00:00
|
|
|
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";
|
|
|
|
homepage = "https://github.com/dnandha/miauth";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2024-06-26 17:31:23 +00:00
|
|
|
mainProgram = "miauth";
|
2023-11-26 10:46:42 +00:00
|
|
|
};
|
|
|
|
}
|