From b3dbc9eb0ff9a3c8264bdfd78172572b8c46bc9f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 30 Oct 2024 10:34:07 +0100 Subject: [PATCH] python312Packages.go2rtc-client: init at 0.0.1b2 Module for interacting with go2rtc https://github.com/home-assistant-libs/python-go2rtc-client --- .../python-modules/go2rtc-client/default.nix | 67 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 69 insertions(+) create mode 100644 pkgs/development/python-modules/go2rtc-client/default.nix 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0a0b98e0f6a1..d51d39017472 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5160,6 +5160,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 { };