From 2c10706569ee2eef1d277ea5d3379db946c7464f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 20 Dec 2021 20:32:22 +0100 Subject: [PATCH] python3Packages.automate-home: init at 0.9.1 --- .../python-modules/automate-home/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/automate-home/default.nix diff --git a/pkgs/development/python-modules/automate-home/default.nix b/pkgs/development/python-modules/automate-home/default.nix new file mode 100644 index 000000000000..bd2816f6d345 --- /dev/null +++ b/pkgs/development/python-modules/automate-home/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, pythonOlder +, APScheduler +, hiredis +, aioredis +, ephem +, pytz +, pyyaml +}: + +buildPythonPackage rec { + pname = "automate-home"; + version = "0.9.1"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-41qd+KPSrOrczkovwXht3irbcYlYehBZ1HZ44yZe4cM="; + }; + + propagatedBuildInputs = [ + APScheduler + hiredis + aioredis + ephem + pytz + pyyaml + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + # Rename pyephem, https://github.com/majamassarini/automate-home/pull/3 + substituteInPlace setup.py \ + --replace "pyephem" "ephem" \ + --replace "aioredis==1.3.1" "aioredis" + ''; + + pythonImportsCheck = [ + "home" + ]; + + meta = with lib; { + description = "Python module to automate (home) devices"; + homepage = "https://github.com/majamassarini/automate-home"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 679625d51a6c..47fb0b1be819 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -751,6 +751,8 @@ in { automat = callPackage ../development/python-modules/automat { }; + automate-home = callPackage ../development/python-modules/automate-home { }; + autopage = callPackage ../development/python-modules/autopage { }; autopep8 = callPackage ../development/python-modules/autopep8 { };