From 8699200898db42053fbf9f8312bccd35bd3ea021 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 27 Jun 2022 09:21:33 +0200 Subject: [PATCH] python310Packages.tesla-powerwall: 0.3.17 -> 0.3.18 - use GitHub as source (on PyPI is now only wheel available) --- .../tesla-powerwall/default.nix | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/tesla-powerwall/default.nix b/pkgs/development/python-modules/tesla-powerwall/default.nix index a2a7b4893745..d879d9302eb0 100644 --- a/pkgs/development/python-modules/tesla-powerwall/default.nix +++ b/pkgs/development/python-modules/tesla-powerwall/default.nix @@ -1,21 +1,24 @@ { lib , buildPythonPackage -, fetchPypi -, requests +, fetchFromGitHub , pytestCheckHook +, pythonOlder +, requests , responses }: buildPythonPackage rec { pname = "tesla-powerwall"; - version = "0.3.17"; - + version = "0.3.18"; format = "setuptools"; - src = fetchPypi { - pname = "tesla_powerwall"; - inherit version; - sha256 = "09351e408e8e3cc03414944c1a487ef2178300829559e80835026acb84330cfd"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "jrester"; + repo = "tesla_powerwall"; + rev = "v${version}"; + hash = "sha256-Z+axzTiKDgJqGhl2c6g7N1AbmXO46lbaHVOXhMstoCY="; }; propagatedBuildInputs = [ @@ -31,12 +34,14 @@ buildPythonPackage rec { "tests/unit" ]; - pythonImportsCheck = [ "tesla_powerwall" ]; + pythonImportsCheck = [ + "tesla_powerwall" + ]; - meta = { + meta = with lib; { description = "API for Tesla Powerwall"; homepage = "https://github.com/jrester/tesla_powerwall"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ dotlambda ]; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; }; }