From 5822a52f8720e8599ae5a78b97c36e40e4a68d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 11 Aug 2024 10:39:57 -0700 Subject: [PATCH 1/3] python312Packages.prayer-times-calculator-offline: init at 1.0.3 --- .../default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/python-modules/prayer-times-calculator-offline/default.nix diff --git a/pkgs/development/python-modules/prayer-times-calculator-offline/default.nix b/pkgs/development/python-modules/prayer-times-calculator-offline/default.nix new file mode 100644 index 000000000000..976620c5dc5d --- /dev/null +++ b/pkgs/development/python-modules/prayer-times-calculator-offline/default.nix @@ -0,0 +1,32 @@ +{ + buildPythonPackage, + fetchPypi, + lib, + setuptools, +}: + +buildPythonPackage rec { + pname = "prayer-times-calculator-offline"; + version = "1.0.3"; + pyproject = true; + + src = fetchPypi { + pname = "prayer_times_calculator_offline"; + inherit version; + hash = "sha256-vmy1hYZXuDvdjjBN5YivzP+lcwfE86Z9toBzj+kyj14="; + }; + + build-system = [ setuptools ]; + + pythonImportsCheck = [ "prayer_times_calculator_offline" ]; + + # upstream has no tests + doCheck = false; + + meta = { + description = "Prayer Times Calculator - Offline"; + homepage = "https://github.com/cpfair/prayer-times-calculator-offline"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cf49725db571..e6f6c1413e27 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10720,6 +10720,8 @@ self: super: with self; { prayer-times-calculator = callPackage ../development/python-modules/prayer-times-calculator { }; + prayer-times-calculator-offline = callPackage ../development/python-modules/prayer-times-calculator-offline { }; + precis-i18n = callPackage ../development/python-modules/precis-i18n { }; prefixed = callPackage ../development/python-modules/prefixed { }; From eb55c762c1f4c37ef14becde49e3e312e099fd88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 11 Aug 2024 10:41:53 -0700 Subject: [PATCH 2/3] home-assistant: support islamic_prayer_times component --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 67cca39575c5..2d543219a367 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -1993,7 +1993,8 @@ isal ]; "islamic_prayer_times" = ps: with ps; [ - ]; # missing inputs: prayer-times-calculator-offline + prayer-times-calculator-offline + ]; "ismartwindow" = ps: with ps; [ ]; "israel_rail" = ps: with ps; [ @@ -5185,6 +5186,7 @@ "iqvia" "iron_os" "isal" + "islamic_prayer_times" "israel_rail" "ista_ecotrend" "isy994" From 535fa63f85ea84a2a4e2e3d63f32b515f1b289bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 11 Aug 2024 10:45:21 -0700 Subject: [PATCH 3/3] python312Packages.prayer-times-calculator: drop Home Assistant switched to prayer-times-calculator-offline. --- .../prayer-times-calculator/default.nix | 40 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 3 files changed, 1 insertion(+), 42 deletions(-) delete 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 deleted file mode 100644 index d4a72de66f5f..000000000000 --- a/pkgs/development/python-modules/prayer-times-calculator/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - pythonOlder, - requests, - setuptools, -}: - -buildPythonPackage rec { - pname = "prayer-times-calculator"; - version = "0.0.12"; - pyproject = true; - - disabled = pythonOlder "3.6"; - - src = fetchFromGitHub { - owner = "uchagani"; - repo = "prayer-times-calculator"; - rev = "refs/tags/${version}"; - hash = "sha256-HeGUnApQZ12aieaV/UBbJqqpEn4i/ZZKw41H/Yx3+cY="; - }; - - nativeBuildInputs = [ setuptools ]; - - 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"; - changelog = "https://github.com/uchagani/prayer-times-calculator/releases/tag/${version}"; - license = licenses.mit; - maintainers = with maintainers; [ fab ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index b6ad1e3e8f43..e4aca8bf1720 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -371,6 +371,7 @@ mapAliases ({ poster3 = throw "poster3 is unmaintained and source is no longer available"; # added 2023-05-29 postorius = throw "Please use pkgs.mailmanPackages.postorius"; # added 2022-04-29 powerlineMemSegment = powerline-mem-segment; # added 2021-10-08 + prayer-times-calculator = prayer-times-calculator-offline; # added 2024-08-11 privacyidea-ldap-proxy = throw "privacyidea-ldap-proxy has been removed from nixpkgs"; # added 2023-10-31 proboscis = throw "proboscis has been removed since it has not been maintained for 11 years"; # added 2024-05-20 prometheus_client = prometheus-client; # added 2021-06-10 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e6f6c1413e27..b0c7af14e8f5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10718,8 +10718,6 @@ self: super: with self; { praw = callPackage ../development/python-modules/praw { }; - prayer-times-calculator = callPackage ../development/python-modules/prayer-times-calculator { }; - prayer-times-calculator-offline = callPackage ../development/python-modules/prayer-times-calculator-offline { }; precis-i18n = callPackage ../development/python-modules/precis-i18n { };