Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.growattserver: init at 1.0.1 #123179

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 42 additions & 0 deletions pkgs/development/python-modules/growattserver/default.nix
@@ -0,0 +1,42 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, requests
}:

buildPythonPackage rec {
pname = "growattserver";
version = "1.0.1";
disabled = pythonOlder "3.6";

src = fetchFromGitHub {
owner = "indykoning";
repo = "PyPi_GrowattServer";
rev = version;
sha256 = "1vgb92axlz1kkszmamjbsqgi74afnbr2mc1np3pmbn3bx5rmk1d9";
};

propagatedBuildInputs = [
requests
];

postPatch = ''
# https://github.com/indykoning/PyPi_GrowattServer/issues/2
substituteInPlace setup.py \
--replace "tag = os.environ['LATEST_TAG']" "" \
--replace "version=tag," 'version="${version}",'
'';

# Project has no tests
doCheck = false;

pythonImportsCheck = [ "growattServer" ];

meta = with lib; {
description = "Python package to retrieve information from Growatt units";
homepage = "https://github.com/indykoning/PyPi_GrowattServer";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}
2 changes: 1 addition & 1 deletion pkgs/servers/home-assistant/component-packages.nix
Expand Up @@ -329,7 +329,7 @@
"greeneye_monitor" = ps: with ps; [ ]; # missing inputs: greeneye_monitor
"greenwave" = ps: with ps; [ ]; # missing inputs: greenwavereality
"group" = ps: with ps; [ ];
"growatt_server" = ps: with ps; [ ]; # missing inputs: growattServer
"growatt_server" = ps: with ps; [ growattserver ];
"gstreamer" = ps: with ps; [ ]; # missing inputs: gstreamer-player
"gtfs" = ps: with ps; [ ]; # missing inputs: pygtfs
"guardian" = ps: with ps; [ aioguardian ];
Expand Down
1 change: 1 addition & 0 deletions pkgs/servers/home-assistant/default.nix
Expand Up @@ -259,6 +259,7 @@ in with py.pkgs; buildPythonApplication rec {
"geo_json_events"
"geo_location"
"group"
"growatt_server"
"hddtemp"
"history"
"history_stats"
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -2934,6 +2934,8 @@ in {

gremlinpython = callPackage ../development/python-modules/gremlinpython { };

growattserver = callPackage ../development/python-modules/growattserver { };

grip = callPackage ../development/python-modules/grip { };

grpc_google_iam_v1 = callPackage ../development/python-modules/grpc_google_iam_v1 { };
Expand Down