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:
e1mo 2024-04-19 10:45:08 +02:00
parent 66adc1e47f
commit f0721f3779
No known key found for this signature in database
GPG Key ID: 1D5D79A439E787F1

View File

@ -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;
};
};