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 ```
This commit is contained in:
parent
66adc1e47f
commit
f0721f3779
@ -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;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user