blob: c4c5417ae47bca62aa118f62369e4220914fc8e7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
{
lib,
aiohttp,
aresponses,
awesomeversion,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pyhaversion";
version = "24.6.1";
pyproject = true;
disabled = pythonOlder "3.12";
src = fetchFromGitHub {
owner = "ludeeus";
repo = "pyhaversion";
rev = "refs/tags/${version}";
hash = "sha256-UZ9236mERoz3WG9MfeN1ALKc8OjqpcbbIhiEsRYzn4I=";
};
postPatch = ''
# Upstream doesn't set a version for the tagged releases
substituteInPlace pyproject.toml \
--replace-fail 'version = "0"' 'version = "${version}"'
'';
build-system = [ poetry-core ];
dependencies = [
aiohttp
awesomeversion
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "pyhaversion" ];
disabledTests = [
# Error fetching version information from HaVersionSource.SUPERVISOR Server disconnected
"test_stable_version"
"test_etag"
];
meta = with lib; {
description = "Python module to the newest version number of Home Assistant";
homepage = "https://github.com/ludeeus/pyhaversion";
changelog = "https://github.com/ludeeus/pyhaversion/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ makefu ];
};
}
|