2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
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-13 08:15:51 +00:00
|
|
|
buildPythonPackage {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "miauth";
|
|
|
|
version = "0.9.1";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dnandha";
|
|
|
|
repo = "miauth";
|
|
|
|
# Release is not tagged properly, https://github.com/dnandha/miauth/issues/15
|
|
|
|
# rev = "refs/tags/${version}";
|
|
|
|
rev = "refs/tags/release";
|
|
|
|
hash = "sha256-+aoY0Eyd9y7xQTA3uSC6YIZisViilsHlFaOXmhPMcBY=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2024-01-13 08:15:51 +00:00
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"cryptography"
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bluepy
|
|
|
|
cryptography
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"miauth"
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
doCheck = false; # no tests
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|