From 5bc5fcbf4b2338342aa68c39a7e3588ebb1e7f97 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 4 Nov 2023 21:45:59 +0100 Subject: [PATCH] python311Packages.holidays: generate l10n files The localization files were previously missing, which led to issues in the home-assistant workday component. --- .../python-modules/holidays/default.nix | 41 ++++++++++++++----- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/holidays/default.nix b/pkgs/development/python-modules/holidays/default.nix index 9fd25d7e138c..24224b769d7a 100644 --- a/pkgs/development/python-modules/holidays/default.nix +++ b/pkgs/development/python-modules/holidays/default.nix @@ -1,15 +1,22 @@ { lib , buildPythonPackage -, convertdate , fetchFromGitHub -, hijri-converter -, importlib-metadata -, korean-lunar-calendar -, polib -, pytestCheckHook -, python-dateutil , pythonOlder + +# build-system , setuptools + +# l10n +, polib +, lingua +, chameleon + +# dependencies +, python-dateutil + +# tests +, importlib-metadata +, pytestCheckHook }: buildPythonPackage rec { @@ -28,15 +35,29 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools + + # l10n + lingua + chameleon + polib ]; + postPatch = '' + patchShebangs scripts/l10n/*.py + ''; + + preBuild = '' + # make l10n + ./scripts/l10n/generate_po_files.py + ./scripts/l10n/generate_mo_files.py + ''; + propagatedBuildInputs = [ - convertdate python-dateutil - hijri-converter - korean-lunar-calendar ]; + doCheck = false; + nativeCheckInputs = [ importlib-metadata polib