git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #120250 from fabaff/hdate
commit860b457585bfe96b4b037f5c84ee44c816f06574 authorMartin Weinelt <mweinelt@users.noreply.github.com> dateFri 7 May 2021, 13:14 (6 years ago) parenteeece47724c39f
4 files changed+67−1
pkgs/development/python-modules/hdate/default.nix+63 pkgs/servers/home-assistant/component-packages.nix+1−1 pkgs/servers/home-assistant/default.nix+1 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/hdate/default.nixnew file+63
@@ -0,0 +1,63 @@
1+{ lib
2+, astral
3+, buildPythonPackage
4+, fetchFromGitHub
5+, fetchpatch
6+, poetry-core
7+, pytestCheckHook
8+, pythonOlder
9+, pytz
10+}:
11+
12+buildPythonPackage rec {
13+ pname = "hdate";
14+ version = "0.10.2";
15+ disabled = pythonOlder "3.6";
16+ format = "pyproject";
17+
18+ src = fetchFromGitHub {
19+ owner = "py-libhdate";
20+ repo = "py-libhdate";
21+ rev = "v${version}";
22+ sha256 = "07b0c7q8w6flj4q72v58d3wymsxfp5qz8z97qhhc2977mjx5fsxd";
23+ };
24+
25+ nativeBuildInputs = [
26+ poetry-core
27+ ];
28+
29+ propagatedBuildInputs = [
30+ astral
31+ pytz
32+ ];
33+
34+ checkInputs = [
35+ pytestCheckHook
36+ ];
37+
38+ patches = [
39+ # Version was not updated for the release
40+ (fetchpatch {
41+ name = "update-version.patch";
42+ url = "https://github.com/py-libhdate/py-libhdate/commit/b8186a891b29fed99def5ce0985ee0ae1e0dd77e.patch";
43+ sha256 = "1pmhgh57x9390ff5gyisng0l6b79sd6dxmf172hpk1gr03c3hv98";
44+ })
45+ ];
46+
47+ postPatch = ''
48+ substituteInPlace pyproject.toml --replace "^2020.5" ">=2020.5"
49+ '';
50+
51+ pytestFlagsArray = [
52+ "tests"
53+ ];
54+
55+ pythonImportsCheck = [ "hdate" ];
56+
57+ meta = with lib; {
58+ description = "Python module for Jewish/Hebrew date and Zmanim";
59+ homepage = "https://github.com/py-libhdate/py-libhdate";
60+ license = with licenses; [ gpl3Plus ];
61+ maintainers = with maintainers; [ fab ];
62+ };
63+}
pkgs/servers/home-assistant/component-packages.nix+1−1
@@ -413,7 +413,7 @@
413413 "itach" = ps: with ps; [ ]; # missing inputs: pyitachip2ir
414414 "itunes" = ps: with ps; [ ];
415415 "izone" = ps: with ps; [ ]; # missing inputs: python-izone
416− "jewish_calendar" = ps: with ps; [ ]; # missing inputs: hdate
416+ "jewish_calendar" = ps: with ps; [ hdate ];
417417 "joaoapps_join" = ps: with ps; [ ]; # missing inputs: python-join-api
418418 "juicenet" = ps: with ps; [ ]; # missing inputs: python-juicenet
419419 "kaiterra" = ps: with ps; [ ]; # missing inputs: kaiterra-async-client
pkgs/servers/home-assistant/default.nix+1
@@ -272,6 +272,7 @@ in with py.pkgs; buildPythonApplication rec {
272272 "intent"
273273 "intent_script"
274274 "ipp"
275+ "jewish_calendar"
275276 "kmtronic"
276277 "knx"
277278 "kodi"
pkgs/top-level/python-packages.nix+2
@@ -2985,6 +2985,8 @@ in {
29852985
29862986 hachoir = callPackage ../development/python-modules/hachoir { };
29872987
2988+ hdate = callPackage ../development/python-modules/hdate { };
2989+
29882990 ha-ffmpeg = callPackage ../development/python-modules/ha-ffmpeg { };
29892991
29902992 halo = callPackage ../development/python-modules/halo { };