diff --git a/pkgs/development/python-modules/starlink-grpc-core/default.nix b/pkgs/development/python-modules/starlink-grpc-core/default.nix new file mode 100644 index 000000000000..f84b01013280 --- /dev/null +++ b/pkgs/development/python-modules/starlink-grpc-core/default.nix @@ -0,0 +1,52 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + setuptools, + setuptools-scm, + grpcio, + protobuf, + yagrc, +}: + +buildPythonPackage rec { + pname = "starlink-grpc-core"; + version = "1.2.3"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "sparky8512"; + repo = "starlink-grpc-tools"; + tag = "v${version}"; + hash = "sha256-TXj8cU5abVIA81vEylYgZCIAUk31BppwRdHMl9kOEPQ="; + }; + + pypaBuildFlags = [ "packaging" ]; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + grpcio + protobuf + yagrc + ]; + + # no tests + doCheck = false; + + pythonImportsCheck = [ "starlink_grpc" ]; + + meta = { + description = "Core functions for Starlink gRPC communication"; + homepage = "https://github.com/sparky8512/starlink-grpc-tools"; + changelog = "https://github.com/sparky8512/starlink-grpc-tools/releases/tag/v${version}"; + license = lib.licenses.unlicense; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +} diff --git a/pkgs/development/python-modules/yagrc/default.nix b/pkgs/development/python-modules/yagrc/default.nix new file mode 100644 index 000000000000..885973956df7 --- /dev/null +++ b/pkgs/development/python-modules/yagrc/default.nix @@ -0,0 +1,57 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + setuptools, + setuptools-scm, + grpcio, + grpcio-reflection, + protobuf, + pytestCheckHook, + pytest-grpc, +}: + +buildPythonPackage rec { + pname = "yagrc"; + version = "1.1.2"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "sparky8512"; + repo = "yagrc"; + tag = "v${version}"; + hash = "sha256-nqUzDJfLsI8n8UjfCuOXRG6T8ibdN6fSGPPxm5RJhQk="; + }; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + grpcio + grpcio-reflection + protobuf + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-grpc + ]; + + # tests fail due to pytest-grpc compatibility issues with newer grpcio versions + doCheck = false; + + pythonImportsCheck = [ "yagrc" ]; + + meta = { + description = "Yet another gRPC reflection client"; + homepage = "https://github.com/sparky8512/yagrc"; + changelog = "https://github.com/sparky8512/yagrc/releases"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 8a0da8e0ed59..eda661c25a86 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -5579,7 +5579,8 @@ ]; # missing inputs: starlingbank "starlink" = ps: with ps; [ - ]; # missing inputs: starlink-grpc-core + starlink-grpc-core + ]; "startca" = ps: with ps; [ xmltodict @@ -7565,6 +7566,7 @@ "srp_energy" "ssdp" "starline" + "starlink" "startca" "statistics" "statsd" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 16275f74768b..4c954353961a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17118,6 +17118,8 @@ self: super: with self; { starline = callPackage ../development/python-modules/starline { }; + starlink-grpc-core = callPackage ../development/python-modules/starlink-grpc-core { }; + stashy = callPackage ../development/python-modules/stashy { }; static3 = callPackage ../development/python-modules/static3 { }; @@ -19739,6 +19741,8 @@ self: super: with self; { yacs = callPackage ../development/python-modules/yacs { }; + yagrc = callPackage ../development/python-modules/yagrc { }; + yalesmartalarmclient = callPackage ../development/python-modules/yalesmartalarmclient { }; yalexs = callPackage ../development/python-modules/yalexs { };