2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
poetry-core,
|
|
|
|
aiohttp,
|
|
|
|
sensor-state-data,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-asyncio,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "anova-wifi";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.12.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Lash-L";
|
|
|
|
repo = "anova_wifi";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-0RRnQBLglPnPin9/gqWDKIsfi5V7ydrdDKwm93WEnvk=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-05-15 15:35:15 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "--cov=anova_wifi --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ poetry-core ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2024-01-02 11:29:13 +00:00
|
|
|
aiohttp
|
|
|
|
sensor-state-data
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-asyncio
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Makes network calls
|
|
|
|
"test_async_data_1"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "anova_wifi" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Python package for reading anova sous vide api data";
|
|
|
|
homepage = "https://github.com/Lash-L/anova_wifi";
|
|
|
|
changelog = "https://github.com/Lash-L/anova_wifi/releases/tag/v${version}";
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|