diff --git a/pkgs/development/python-modules/pysiaalarm/default.nix b/pkgs/development/python-modules/pysiaalarm/default.nix new file mode 100644 index 000000000000..206d24a40dc5 --- /dev/null +++ b/pkgs/development/python-modules/pysiaalarm/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, dataclasses-json +, pycryptodome +, setuptools +, pytest-asyncio +, pytest-cases +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pysiaalarm"; + version = "3.0.0"; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + inherit pname version; + sha256 = "b1c3a3d48d399bc91014167f59b23af601044d182db9267c23a9cf3559922122"; + }; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "==" ">=" + substituteInPlace pytest.ini \ + --replace "--cov pysiaalarm --cov-report term-missing" "" + ''; + + propagatedBuildInputs = [ + dataclasses-json + pycryptodome + setuptools + ]; + + checkInputs = [ + pytest-asyncio + pytest-cases + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pysiaalarm" + "pysiaalarm.aio" + ]; + + meta = with lib; { + description = "Python package for creating a client that talks with SIA-based alarm systems"; + homepage = "https://github.com/eavanvalkenburg/pysiaalarm"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8a12c1556ab1..0ee4004dee55 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5325,6 +5325,8 @@ in { pyshark = callPackage ../development/python-modules/pyshark { }; + pysiaalarm = callPackage ../development/python-modules/pysiaalarm { }; + pytest-subprocess = callPackage ../development/python-modules/pytest-subprocess { }; python-codon-tables = callPackage ../development/python-modules/python-codon-tables { };