diff --git a/pkgs/development/python-modules/pydrawise/default.nix b/pkgs/development/python-modules/pydrawise/default.nix new file mode 100644 index 000000000000..4adda6c53ccc --- /dev/null +++ b/pkgs/development/python-modules/pydrawise/default.nix @@ -0,0 +1,65 @@ +{ lib +, aiohttp +, aioresponses +, apischema +, buildPythonPackage +, fetchFromGitHub +, freezegun +, gql +, graphql-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, requests +, setuptools +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "pydrawise"; + version = "2023.8.0"; + format = "pyproject"; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "dknowles2"; + repo = "pydrawise"; + rev = "refs/tags/${version}"; + hash = "sha256-cnQJ0enDgOB66rEZePmfTImFrPNMiXfggATM6hsL+ag="; + }; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + + propagatedBuildInputs = [ + aiohttp + apischema + gql + graphql-core + requests + ]; + + nativeCheckInputs = [ + aioresponses + freezegun + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pydrawise" + ]; + + meta = with lib; { + description = "Library for interacting with Hydrawise sprinkler controllers through the GraphQL API"; + homepage = "https://github.com/dknowles2/pydrawise"; + changelog = "https://github.com/dknowles2/pydrawise/releases/tag/${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index aed36f89b540..73bc5f5b4744 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8972,6 +8972,8 @@ self: super: with self; { inherit (pkgs) graphviz; }; + pydrawise = callPackage ../development/python-modules/pydrawise { }; + pydrive2 = callPackage ../development/python-modules/pydrive2 { }; pydroid-ipcam = callPackage ../development/python-modules/pydroid-ipcam { };