From 4537204529edf803bc136ae5b3bceaaa90506013 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 24 Nov 2021 09:24:48 +0100 Subject: [PATCH] python3Packages.pyhaversion: 21.10.0 -> 21.11.1 --- .../python-modules/pyhaversion/default.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pyhaversion/default.nix b/pkgs/development/python-modules/pyhaversion/default.nix index 36f4f434469e..6fe9df519652 100644 --- a/pkgs/development/python-modules/pyhaversion/default.nix +++ b/pkgs/development/python-modules/pyhaversion/default.nix @@ -1,7 +1,6 @@ { lib , aiohttp , aresponses -, async-timeout , awesomeversion , buildPythonPackage , fetchFromGitHub @@ -12,21 +11,20 @@ buildPythonPackage rec { pname = "pyhaversion"; - version = "21.10.0"; + version = "21.11.1"; + format = "setuptools"; - # Only 3.8.0 and beyond are supported disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "ludeeus"; repo = pname; rev = version; - sha256 = "sha256-EvVkewFgkfYL6BjmJ/IWeuCyR+0R0ZxI35i9sxKcqxo="; + sha256 = "sha256-wh6NJRDgOrEHYEN3QlC4lOZHPnPeiPCJFF1xLoixQ14="; }; propagatedBuildInputs = [ aiohttp - async-timeout awesomeversion ]; @@ -36,7 +34,16 @@ buildPythonPackage rec { pytestCheckHook ]; - pythonImportsCheck = [ "pyhaversion" ]; + postPatch = '' + # Upstream doesn't set a version for the tagged releases + substituteInPlace setup.py \ + --replace "main" ${version} + ''; + + + pythonImportsCheck = [ + "pyhaversion" + ]; meta = with lib; { description = "Python module to the newest version number of Home Assistant";