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/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 2d17a0305ce..aaa7da47335 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 diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 7024f09717a..226f838a8b9 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" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2542a1e07d5..377eecbb339 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5191,6 +5191,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 { };