2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
chameleon,
|
|
|
|
fetchFromGitHub,
|
|
|
|
importlib-metadata,
|
|
|
|
lingva,
|
|
|
|
polib,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "holidays";
|
2024-10-23 06:41:50 +00:00
|
|
|
version = "0.59";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
src = fetchFromGitHub {
|
2024-02-29 20:09:43 +00:00
|
|
|
owner = "vacanza";
|
2023-03-04 12:14:45 +00:00
|
|
|
repo = "python-holidays";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-23 06:41:50 +00:00
|
|
|
hash = "sha256-g7ldsWqVWM1FtOB2gFrCuATD5PthZhbelKT4NV6Rovg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2023-11-16 04:20:00 +00:00
|
|
|
setuptools
|
|
|
|
|
|
|
|
# l10n
|
2024-04-21 15:54:59 +00:00
|
|
|
lingva
|
2023-11-16 04:20:00 +00:00
|
|
|
chameleon
|
|
|
|
polib
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts/l10n/*.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
# make l10n
|
|
|
|
./scripts/l10n/generate_po_files.py
|
|
|
|
./scripts/l10n/generate_mo_files.py
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [ python-dateutil ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
importlib-metadata
|
|
|
|
polib
|
2021-04-08 16:26:57 +00:00
|
|
|
pytestCheckHook
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "holidays" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Generate and work with holidays in Python";
|
2024-02-29 20:09:43 +00:00
|
|
|
homepage = "https://github.com/vacanza/python-holidays";
|
|
|
|
changelog = "https://github.com/vacanza/python-holidays/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
fab
|
|
|
|
jluttine
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|