From d6bb50060509045bc9953ec3b1984836eec1de68 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 6 May 2021 00:22:15 +0200 Subject: [PATCH] python3Packages.motioneye-client: init at 0.3.6 --- .../motioneye-client/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/motioneye-client/default.nix diff --git a/pkgs/development/python-modules/motioneye-client/default.nix b/pkgs/development/python-modules/motioneye-client/default.nix new file mode 100644 index 000000000000..19bb9a39c29c --- /dev/null +++ b/pkgs/development/python-modules/motioneye-client/default.nix @@ -0,0 +1,52 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-aiohttp +, pytest-timeout +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "motioneye-client"; + version = "0.3.6"; + format = "pyproject"; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "dermotduffy"; + repo = pname; + rev = "v${version}"; + sha256 = "0j28rn7059km7q6z1kalp0pjcrd42wcm5mnbi94j93bvfld97w70"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + pytest-aiohttp + pytest-timeout + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov-report=term-missing --cov=motioneye_client --cov-fail-under=100" "" + ''; + + pythonImportsCheck = [ "motioneye_client" ]; + + meta = with lib; { + description = "Python library for motionEye"; + homepage = "https://github.com/dermotduffy/motioneye-client"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 33559777930e..07f12451ccc9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4241,6 +4241,8 @@ in { mortgage = callPackage ../development/python-modules/mortgage { }; + motioneye-client = callPackage ../development/python-modules/motioneye-client { }; + moto = callPackage ../development/python-modules/moto { }; moviepy = callPackage ../development/python-modules/moviepy { };