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