2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitLab
|
|
|
|
, fetchpatch
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, setuptools-scm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tololib";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.1.0";
|
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "MatthiasLohr";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "tololib";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-TxWKV2nrnCxZmj6+wBDMSdJRvKV+MsPFbOyIlUJYJ3Q=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
preCheck = ''
|
|
|
|
export PATH="$PATH:$out/bin";
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Test requires network access
|
|
|
|
"test_discovery"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"tololib"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Library for Controlling TOLO Sauna/Steam Bath Devices";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "tolo-cli";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://gitlab.com/MatthiasLohr/tololib";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://gitlab.com/MatthiasLohr/tololib/-/blob/v${version}/CHANGELOG.md";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|