diff options
author | e1mo <git@e1mo.de> | 2024-04-19 10:45:08 +0200 |
---|---|---|
committer | e1mo <git@e1mo.de> | 2024-04-19 10:47:54 +0200 |
commit | f0721f377955cbd33a3613750b43629580ade724 (patch) | |
tree | e2498d48989e9cab23850d9d445bedc086a5157b /nixos/modules | |
parent | 66adc1e47f8784803f2deb6cacd5e07264ec2d5c (diff) |
nixos/paperless: Always buidl tesseract with english
With the changes introduced in #303388 tesseract would only be compiled with the languages defined in `PAPERLESS_OCR_LANGUAGE`. However, english is always required, making tesseract fail to build when only non-english languages are defined in tesseract: ``` eng.traineddata must be present in tessdata for Tesseract to work ```
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/misc/paperless.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index 3456098073b34..e564fe3b8317b 100644 --- a/nixos/modules/services/misc/paperless.nix +++ b/nixos/modules/services/misc/paperless.nix @@ -203,9 +203,12 @@ in apply = pkg: pkg.override { tesseract5 = pkg.tesseract5.override { # always enable detection modules + # tesseract fails to build when eng is not present enableLanguages = if cfg.settings ? PAPERLESS_OCR_LANGUAGE then - [ "equ" "osd" ] + lists.unique ( + [ "equ" "osd" "eng" ] ++ lib.splitString "+" cfg.settings.PAPERLESS_OCR_LANGUAGE + ) else null; }; }; |