diff options
author | Anselm Schüler <mail@anselmschueler.com> | 2022-05-02 12:38:53 +0200 |
---|---|---|
committer | Erik Arvstedt <erik.arvstedt@gmail.com> | 2022-05-02 13:44:04 +0200 |
commit | 92a849e613e506252d45b6b5483d87377b09ebd7 (patch) | |
tree | f6857321f8add40941828ac8cb1a007a628f2325 /pkgs/applications/graphics | |
parent | 1b38ecfc74e47d49f207d9092571852de834d3e1 (diff) |
tesseract5: init at 5.1.0
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r-- | pkgs/applications/graphics/tesseract/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/graphics/tesseract/tesseract5.nix | 39 |
2 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/tesseract/default.nix b/pkgs/applications/graphics/tesseract/default.nix index 840c87de216b7..dc5f97318708d 100644 --- a/pkgs/applications/graphics/tesseract/default.nix +++ b/pkgs/applications/graphics/tesseract/default.nix @@ -3,6 +3,7 @@ let base3 = callPackage ./tesseract3.nix {}; base4 = callPackage ./tesseract4.nix {}; + base5 = callPackage ./tesseract5.nix {}; languages = callPackage ./languages.nix {}; in { @@ -15,4 +16,9 @@ in tesseractBase = base4; languages = languages.v4; }); + + tesseract5 = lowPrio (callPackage ./wrapper.nix { + tesseractBase = base5; + languages = languages.v4; + }); } diff --git a/pkgs/applications/graphics/tesseract/tesseract5.nix b/pkgs/applications/graphics/tesseract/tesseract5.nix new file mode 100644 index 0000000000000..dd4d6cb2791df --- /dev/null +++ b/pkgs/applications/graphics/tesseract/tesseract5.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchFromGitHub, autoreconfHook, autoconf-archive, pkg-config +, leptonica, libpng, libtiff, icu, pango, opencl-headers, fetchpatch }: + +stdenv.mkDerivation rec { + pname = "tesseract"; + version = "5.1.0"; + + src = fetchFromGitHub { + owner = "tesseract-ocr"; + repo = "tesseract"; + rev = version; + sha256 = "sha256-B1x3wxr9Sn2rsG8AHncPTEErhDo7YtpDRxfW9ZOPWoU="; + }; + + enableParallelBuilding = true; + + nativeBuildInputs = [ + pkg-config + autoreconfHook + autoconf-archive + ]; + + buildInputs = [ + leptonica + libpng + libtiff + icu + pango + opencl-headers + ]; + + meta = { + description = "OCR engine"; + homepage = "https://github.com/tesseract-ocr/tesseract"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ anselmschueler ]; + platforms = with lib.platforms; linux ++ darwin; + }; +} |