From 540f69e705aa47178716a1784d38fec196455e11 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Apr 2021 23:49:55 +0200 Subject: [PATCH 1/3] python3Packages.hdate: init 0.10.2 --- .../python-modules/hdate/default.nix | 63 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 65 insertions(+) create mode 100644 pkgs/development/python-modules/hdate/default.nix diff --git a/pkgs/development/python-modules/hdate/default.nix b/pkgs/development/python-modules/hdate/default.nix new file mode 100644 index 000000000000..a034eddd5651 --- /dev/null +++ b/pkgs/development/python-modules/hdate/default.nix @@ -0,0 +1,63 @@ +{ lib +, astral +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, poetry-core +, pytestCheckHook +, pythonOlder +, pytz +}: + +buildPythonPackage rec { + pname = "hdate"; + version = "0.10.2"; + disabled = pythonOlder "3.6"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "py-libhdate"; + repo = "py-libhdate"; + rev = "v${version}"; + sha256 = "07b0c7q8w6flj4q72v58d3wymsxfp5qz8z97qhhc2977mjx5fsxd"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + astral + pytz + ]; + + checkInputs = [ + pytestCheckHook + ]; + + patches = [ + # Version was not updated for the release + (fetchpatch { + name = "update-version.patch"; + url = "https://github.com/py-libhdate/py-libhdate/commit/b8186a891b29fed99def5ce0985ee0ae1e0dd77e.patch"; + sha256 = "1pmhgh57x9390ff5gyisng0l6b79sd6dxmf172hpk1gr03c3hv98"; + }) + ]; + + postPatch = '' + substituteInPlace pyproject.toml --replace "^2020.5" ">=2020.5" + ''; + + pytestFlagsArray = [ + "tests" + ]; + + pythonImportsCheck = [ "hdate" ]; + + meta = with lib; { + description = "Python module for Jewish/Hebrew date and Zmanim"; + homepage = "https://github.com/py-libhdate/py-libhdate"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 37ae756d9da7..8d98631630e8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2985,6 +2985,8 @@ in { hachoir = callPackage ../development/python-modules/hachoir { }; + hdate = callPackage ../development/python-modules/hdate { }; + ha-ffmpeg = callPackage ../development/python-modules/ha-ffmpeg { }; halo = callPackage ../development/python-modules/halo { }; From f3c8245dab2db2ed6a0538ffc6d8f0d265db9b3f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 9 Apr 2021 17:36:49 +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 28b7aed5f397..cdd00d07d868 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -413,7 +413,7 @@ "itach" = ps: with ps; [ ]; # missing inputs: pyitachip2ir "itunes" = ps: with ps; [ ]; "izone" = ps: with ps; [ ]; # missing inputs: python-izone - "jewish_calendar" = ps: with ps; [ ]; # missing inputs: hdate + "jewish_calendar" = ps: with ps; [ hdate ]; "joaoapps_join" = ps: with ps; [ ]; # missing inputs: python-join-api "juicenet" = ps: with ps; [ ]; # missing inputs: python-juicenet "kaiterra" = ps: with ps; [ ]; # missing inputs: kaiterra-async-client From 724c39fdc75d24573963e7c7497dad8f3984344f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 9 Apr 2021 17:37:47 +0200 Subject: [PATCH 3/3] home-assistant: enable jewish_calendar 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 4df380e2b5a0..4ca42120e582 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -272,6 +272,7 @@ in with py.pkgs; buildPythonApplication rec { "intent" "intent_script" "ipp" + "jewish_calendar" "kmtronic" "knx" "kodi"