2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2024-01-25 14:12:00 +00:00
|
|
|
, fetchPypi
|
2024-01-13 08:15:51 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pythonRelaxDepsHook
|
|
|
|
|
|
|
|
# build-system
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# dependencies
|
2024-01-02 11:29:13 +00:00
|
|
|
, bluepy
|
|
|
|
, cryptography
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytestCheckHook
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
buildPythonPackage rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "miauth";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.9.7";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
hash = "sha256-2/4nFInpdY8fb/b+sXhgT6ZPtEgBV+KHMyLnxIp6y/U=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2024-01-13 08:15:51 +00:00
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"cryptography"
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bluepy
|
|
|
|
cryptography
|
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +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 ];
|
|
|
|
};
|
|
|
|
}
|