diff --git a/pkgs/development/python-modules/python-sn2/default.nix b/pkgs/development/python-modules/python-sn2/default.nix new file mode 100644 index 000000000000..e6c683ee69b7 --- /dev/null +++ b/pkgs/development/python-modules/python-sn2/default.nix @@ -0,0 +1,45 @@ +{ + lib, + aiohttp, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pytest-asyncio, + setuptools, + websockets, +}: + +buildPythonPackage (finalAttrs: { + pname = "python-sn2"; + version = "0.4.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "konsulten"; + repo = "python-sn2"; + tag = "v${finalAttrs.version}"; + hash = "sha256-7IrfTjww2K64qIQ6dGMcTja1/dV5/wt+pcx6ZLW9KEA="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + aiohttp + websockets + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + ]; + + pythonImportsCheck = [ "sn2" ]; + + meta = { + description = "Python library for SystemNexa2 device integration"; + homepage = "https://github.com/konsulten/python-sn2"; + changelog = "https://github.com/konsulten/python-sn2/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 27c448e0e2a7..962b88595e34 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15882,6 +15882,8 @@ self: super: with self; { python-smarttub = callPackage ../development/python-modules/python-smarttub { }; + python-sn2 = callPackage ../development/python-modules/python-sn2 { }; + python-snap7 = callPackage ../development/python-modules/python-snap7 { inherit (pkgs) snap7; }; python-snappy = callPackage ../development/python-modules/python-snappy {