diff --git a/pkgs/development/python-modules/go2rtc-client/default.nix b/pkgs/development/python-modules/go2rtc-client/default.nix new file mode 100644 index 000000000000..e370d262b090 --- /dev/null +++ b/pkgs/development/python-modules/go2rtc-client/default.nix @@ -0,0 +1,67 @@ +{ + lib, + aiohttp, + aioresponses, + awesomeversion, + buildPythonPackage, + fetchFromGitHub, + hatchling, + mashumaro, + orjson, + pytest-asyncio, + pytest-cov-stub, + pytestCheckHook, + pythonOlder, + syrupy, + webrtc-models, +}: + +buildPythonPackage rec { + pname = "go2rtc-client"; + version = "0.0.1b2"; + pyproject = true; + + disabled = pythonOlder "3.12"; + + src = fetchFromGitHub { + owner = "home-assistant-libs"; + repo = "python-go2rtc-client"; + rev = "refs/tags/${version}"; + hash = "sha256-q1NDHauYy8C3tlIpt6J0iMj0TNtBv2j9aU/IE5CgBjg="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'version = "0.0.0"' 'version = "${version}"' + ''; + + pythonRelaxDeps = [ "orjson" ]; + + build-system = [ hatchling ]; + + dependencies = [ + aiohttp + awesomeversion + mashumaro + orjson + webrtc-models + ]; + + nativeCheckInputs = [ + aioresponses + pytest-asyncio + pytest-cov-stub + pytestCheckHook + syrupy + ]; + + pythonImportsCheck = [ "go2rtc_client" ]; + + meta = { + description = "Module for interacting with go2rtc"; + homepage = "https://github.com/home-assistant-libs/python-go2rtc-client"; + changelog = "https://github.com/home-assistant-libs/python-go2rtc-client/releases/tag/${version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/python-modules/webrtc-models/default.nix b/pkgs/development/python-modules/webrtc-models/default.nix new file mode 100644 index 000000000000..d03d77ca4924 --- /dev/null +++ b/pkgs/development/python-modules/webrtc-models/default.nix @@ -0,0 +1,59 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + mashumaro, + orjson, + pytest-asyncio, + pytest-cov-stub, + pytestCheckHook, + pythonOlder, + syrupy, +}: + +buildPythonPackage rec { + pname = "webrtc-models"; + version = "0.1.0"; + pyproject = true; + + disabled = pythonOlder "3.12"; + + src = fetchFromGitHub { + owner = "home-assistant-libs"; + repo = "python-webrtc-models"; + rev = "refs/tags/${version}"; + hash = "sha256-Wmz+P4FFJJZujWF0SR6HVERNNO7xSM1iCayg6tmVyso="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'version = "0.0.0"' 'version = "${version}"' + ''; + + pythonRelaxDeps = [ "orjson" ]; + + build-system = [ hatchling ]; + + dependencies = [ + mashumaro + orjson + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-cov-stub + pytestCheckHook + syrupy + ]; + + pythonImportsCheck = [ "webrtc_models" ]; + + meta = { + description = "WebRTC models as Python dataclasses with mashumaro"; + homepage = "https://github.com/home-assistant-libs/python-webrtc-models"; + changelog = "https://github.com/home-assistant-libs/python-webrtc-models/releases/tag/${version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4a2f7733f84b..989447c253ff 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5164,6 +5164,8 @@ self: super: with self; { gnureadline = callPackage ../development/python-modules/gnureadline { }; + go2rtc-client = callPackage ../development/python-modules/go2rtc-client { }; + goalzero = callPackage ../development/python-modules/goalzero { }; gocardless-pro = callPackage ../development/python-modules/gocardless-pro { }; @@ -17532,6 +17534,8 @@ self: super: with self; { webob = callPackage ../development/python-modules/webob { }; + webrtc-models = callPackage ../development/python-modules/webrtc-models { }; + webrtc-noise-gain = callPackage ../development/python-modules/webrtc-noise-gain { }; webrtcvad = callPackage ../development/python-modules/webrtcvad { };