diff --git a/pkgs/development/python-modules/pysuez/default.nix b/pkgs/development/python-modules/pysuez/default.nix new file mode 100644 index 000000000000..34f6de519266 --- /dev/null +++ b/pkgs/development/python-modules/pysuez/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, requests +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pysuez"; + version = "0.2.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "ooii"; + repo = "pySuez"; + rev = "refs/tags/v${version}"; + hash = "sha256-Xgd0E/oFO2yyytBjuwr1vDJfKWC0Iw8P6GStCuCni/g="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + requests + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ + "pysuez" + ]; + + meta = with lib; { + description = "Module to get water consumption data from Suez"; + homepage = "https://github.com/ooii/pySuez"; + changelog = "https://github.com/ooii/pySuez/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 7b856c0b2535..5c2a067b3f28 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -4145,7 +4145,8 @@ subarulink ]; "suez_water" = ps: with ps; [ - ]; # missing inputs: pysuez + pysuez + ]; "sun" = ps: with ps; [ ]; "supervisord" = ps: with ps; [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0a195b38ec9b..313c9687e354 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9264,6 +9264,8 @@ self: super: with self; { pysubs2 = callPackage ../development/python-modules/pysubs2 { }; + pysuez = callPackage ../development/python-modules/pysuez { }; + pysqlitecipher = callPackage ../development/python-modules/pysqlitecipher { }; pysyncthru = callPackage ../development/python-modules/pysyncthru { };