diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2022-08-11 02:54:25 +0200 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2022-08-11 02:54:25 +0200 |
commit | 29585a363835b26b5437076a466d5e5cbbeeec74 (patch) | |
tree | c4256296fc005893a22a09b3b69d41cca7cb54f9 /pkgs/development/python-modules/aiomysensors/default.nix | |
parent | d6417bd3069397ee3a7bf20a7704c0d7325b39f7 (diff) |
python310Packages.aiomysensors: init at 0.3.0
Diffstat (limited to 'pkgs/development/python-modules/aiomysensors/default.nix')
-rw-r--r-- | pkgs/development/python-modules/aiomysensors/default.nix | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/aiomysensors/default.nix b/pkgs/development/python-modules/aiomysensors/default.nix new file mode 100644 index 0000000000000..dfa02c9794333 --- /dev/null +++ b/pkgs/development/python-modules/aiomysensors/default.nix @@ -0,0 +1,64 @@ +{ lib +, aiofiles +, asyncio-mqtt +, awesomeversion +, buildPythonPackage +, click +, fetchFromGitHub +, marshmallow +, poetry-core +, pyserial-asyncio +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aiomysensors"; + version = "0.3.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "MartinHjelmare"; + repo = pname; + rev = "v${version}"; + hash = "sha256-EGVoHEJrpGtp8OrhQhRZVaN1GhL4QCo/azp6pzgYYcs="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiofiles + asyncio-mqtt + awesomeversion + click + marshmallow + pyserial-asyncio + ]; + + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=src --cov-report=term-missing:skip-covered" "" \ + --replace 'marshmallow = "^3.17"' 'marshmallow = "*"' + ''; + + pythonImportsCheck = [ + "aiomysensors" + ]; + + meta = with lib; { + description = "Library to connect to MySensors gateways"; + homepage = "https://github.com/MartinHjelmare/aiomysensors"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} |