From 1729fe4d81c104dda74adcc622425e42885d4bf5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 15 May 2021 20:42:37 +0200 Subject: [PATCH 1/3] python3Packages.prayer-times-calculator: init at 0.0.4 --- .../prayer-times-calculator/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/prayer-times-calculator/default.nix diff --git a/pkgs/development/python-modules/prayer-times-calculator/default.nix b/pkgs/development/python-modules/prayer-times-calculator/default.nix new file mode 100644 index 00000000000..758c52f1d4b --- /dev/null +++ b/pkgs/development/python-modules/prayer-times-calculator/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "prayer-times-calculator"; + version = "0.0.4"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "uchagani"; + repo = pname; + rev = version; + sha256 = "053wa0zzfflaxlllh6sxgnrqqx8qyv4jcj85fsiv6n608kw202d5"; + }; + + propagatedBuildInputs = [ + requests + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "prayer_times_calculator" ]; + + meta = with lib; { + description = "Python client for the Prayer Times API"; + homepage = "https://github.com/uchagani/prayer-times-calculator"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 21eacfb16c2..75741ec01b7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5189,6 +5189,8 @@ in { praw = callPackage ../development/python-modules/praw { }; + prayer-times-calculator = callPackage ../development/python-modules/prayer-times-calculator { }; + precis-i18n = callPackage ../development/python-modules/precis-i18n { }; pre-commit = callPackage ../development/python-modules/pre-commit { }; From c96787585e29f79ca730a1dbd2d040c4998b409f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 15 May 2021 20:44:00 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index e97bbae7f74..f60317fe048 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -407,7 +407,7 @@ "ipp" = ps: with ps; [ pyipp ]; "iqvia" = ps: with ps; [ numpy pyiqvia ]; "irish_rail_transport" = ps: with ps; [ ]; # missing inputs: pyirishrail - "islamic_prayer_times" = ps: with ps; [ ]; # missing inputs: prayer_times_calculator + "islamic_prayer_times" = ps: with ps; [ prayer-times-calculator ]; "iss" = ps: with ps; [ ]; # missing inputs: pyiss "isy994" = ps: with ps; [ ]; # missing inputs: pyisy "itach" = ps: with ps; [ ]; # missing inputs: pyitachip2ir From 468fda7daafe9b4395e13d08e738c8da07710497 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 15 May 2021 20:47:36 +0200 Subject: [PATCH 3/3] home-assistant: enable islamic_prayer_times tests --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 3a8948f8982..021e723d9e8 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -286,6 +286,7 @@ in with py.pkgs; buildPythonApplication rec { "intent" "intent_script" "ipp" + "islamic_prayer_times" "jewish_calendar" "kmtronic" "knx"