2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
astral,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hdate";
|
2021-09-22 15:38:15 +00:00
|
|
|
version = "0.10.4";
|
2021-05-20 23:08:51 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "py-libhdate";
|
|
|
|
repo = "py-libhdate";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-NF2ZA9ruW7sL2tLY11VAtyPRxGg2o5/mpv3ZsH/Zxb8=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'pytz = ">= 2020.0"' 'pytz = "*"' \
|
|
|
|
--replace 'astral = {version = "^2.2", python = "^3.6"}' 'astral = "*"'
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
astral
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "tests" ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "hdate" ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for Jewish/Hebrew date and Zmanim";
|
|
|
|
homepage = "https://github.com/py-libhdate/py-libhdate";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/py-libhdate/py-libhdate/releases/tag/v${version}";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = with licenses; [ gpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|