nixpkgs/pkgs/applications/graphics/tesseract/tesseract5.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1008 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
, curl, leptonica, libarchive, libpng, libtiff, icu, pango, opencl-headers, fetchpatch
2022-08-14 10:03:31 +00:00
, Accelerate, CoreGraphics, CoreVideo
}:
2022-05-02 10:38:53 +00:00
stdenv.mkDerivation rec {
pname = "tesseract";
2024-01-19 09:51:33 +00:00
version = "5.3.4";
2022-05-02 10:38:53 +00:00
src = fetchFromGitHub {
owner = "tesseract-ocr";
repo = "tesseract";
rev = version;
2024-01-19 09:51:33 +00:00
sha256 = "sha256-IKxzDhSM+BPsKyQP3mADAkpRSGHs4OmdFIA+Txt084M=";
2022-05-02 10:38:53 +00:00
};
enableParallelBuilding = true;
nativeBuildInputs = [
pkg-config
autoreconfHook
];
buildInputs = [
curl
2022-05-02 10:38:53 +00:00
leptonica
libarchive
2022-05-02 10:38:53 +00:00
libpng
libtiff
icu
pango
opencl-headers
2022-08-14 10:03:31 +00:00
] ++ lib.optionals stdenv.isDarwin [
Accelerate
CoreGraphics
CoreVideo
2022-05-02 10:38:53 +00:00
];
meta = {
description = "OCR engine";
homepage = "https://github.com/tesseract-ocr/tesseract";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ anselmschueler ];
2022-08-14 10:03:31 +00:00
platforms = lib.platforms.unix;
mainProgram = "tesseract";
2022-05-02 10:38:53 +00:00
};
}