From 92a849e613e506252d45b6b5483d87377b09ebd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Mon, 2 May 2022 12:38:53 +0200 Subject: [PATCH] tesseract5: init at 5.1.0 --- maintainers/maintainer-list.nix | 7 ++++ .../graphics/tesseract/default.nix | 6 +++ .../graphics/tesseract/tesseract5.nix | 39 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 +- 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/graphics/tesseract/tesseract5.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 36d7ae48119f..7324dcff047f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -829,6 +829,13 @@ githubId = 5327697; name = "Anatolii Prylutskyi"; }; + anselmschueler = { + email = "mail@anselmschueler.com"; + github = "schuelermine"; + githubId = 48802534; + name = "Anselm Schüler"; + matrix = "@schuelermine:matrix.org"; + }; antoinerg = { email = "roygobeil.antoine@gmail.com"; github = "antoinerg"; diff --git a/pkgs/applications/graphics/tesseract/default.nix b/pkgs/applications/graphics/tesseract/default.nix index 840c87de216b..dc5f97318708 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 000000000000..dd4d6cb2791d --- /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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index db85ec622476..390ceac60b9c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29784,7 +29784,8 @@ with pkgs; inherit (callPackage ../applications/graphics/tesseract {}) tesseract3 - tesseract4; + tesseract4 + tesseract5; tesseract = tesseract3; tetraproc = callPackage ../applications/audio/tetraproc { };