Open devurandom opened 5 months ago
I don’t believe this is an error in tesseract
packaging, but probably an oversight in skanpage
or KDE packaging.
Yeah it's a clunky design. You'll have to do something like
pkgs.kdePackages.skanpage.override { tesseractLanguages = [ "eng" ]; }
I guess the languages are listed at https://github.com/NixOS/nixpkgs/blob/20d5e902db240050f9fe1ee627f4a0168193c52a/pkgs/applications/graphics/tesseract/languages.nix#L158-L286
Installing tesseract
separately will do nothing here.
Yeah it's a clunky design. You'll have to do something like
pkgs.kdePackages.skanpage.override { tesseractLanguages = [ "eng" ]; }
This will rebuild skanpage, right? Is there an option to change this in nixpkgs, to save me (and probably others who want to use skanpage with OCR) the rebuilds?
I tried the following (and several variations with =
and without, with different names instead of pkgs.tesseract.languages
that I saw in the tesseract module, ...) in my configuration, but could not get Nix to accept it:
pkgs.kdePackages.skanpage.override = {
tesseractLanguages = pkgs.tesseract.languages;
};
I guess it is not supposed to be done this way. Could you please help and tell me how to set this correctly in my NixOS configuration?
This will rebuild skanpage, right?
Yeah, that's why I find it clunky... it would be nice to have a wrapper package instead to prevent such rebuilds.
I tried the following (and several variations
tesseractLanguages
accepts a list of strings, while pkgs.tesseract.languages
is an attrset.
Normally you would select the individual languages you want.
If you really want to have all languages available, you could do something like tesseractLanguages = builtins.attrNames pkgs.tesseract.languages
, though I don't know the disk requirements of such a setup offhand.
Describe the bug
I have
kdePackages.skanpage
andtesseract
installed.Tesseract sees the language files:
Skanpage cannot OCR my document for the reason of missing language files:
Steps To Reproduce
Steps to reproduce the behavior:
kdePackages.skanpage
andtesseract
Expected behavior
Skanpage should be able to OCR my document.
Notify maintainers
@schuelermine, @ilya-fedin, @LunNova, @mjm, @NickCao, @ttuegel
Metadata
Add a :+1: reaction to issues you find important.