Unverified Commit f0721f37 authored by e1mo's avatar e1mo
Browse files

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
```
parent 66adc1e4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;
        };
      };