tesseract5: fix darwin compilation

This commit is contained in:
Stanisław Pitucha 2022-08-14 20:03:31 +10:00 committed by Stanisław Pitucha
parent e98d5da182
commit 195833f20c
3 changed files with 15 additions and 5 deletions

View file

@ -1,9 +1,11 @@
{ callPackage, lowPrio }:
{ callPackage, lowPrio, Accelerate, CoreGraphics, CoreVideo}:
let
base3 = callPackage ./tesseract3.nix {};
base4 = callPackage ./tesseract4.nix {};
base5 = callPackage ./tesseract5.nix {};
base5 = callPackage ./tesseract5.nix {
inherit Accelerate CoreGraphics CoreVideo;
};
languages = callPackage ./languages.nix {};
in
{

View file

@ -1,5 +1,7 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, autoconf-archive, pkg-config
, leptonica, libpng, libtiff, icu, pango, opencl-headers, fetchpatch }:
, leptonica, libpng, libtiff, icu, pango, opencl-headers, fetchpatch
, Accelerate, CoreGraphics, CoreVideo
}:
stdenv.mkDerivation rec {
pname = "tesseract";
@ -27,6 +29,10 @@ stdenv.mkDerivation rec {
icu
pango
opencl-headers
] ++ lib.optionals stdenv.isDarwin [
Accelerate
CoreGraphics
CoreVideo
];
meta = {
@ -34,6 +40,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/tesseract-ocr/tesseract";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ anselmschueler ];
platforms = with lib.platforms; linux ++ darwin;
platforms = lib.platforms.unix;
};
}

View file

@ -30829,7 +30829,9 @@ with pkgs;
termtosvg = callPackage ../tools/misc/termtosvg { };
inherit (callPackage ../applications/graphics/tesseract {})
inherit (callPackage ../applications/graphics/tesseract {
inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo;
})
tesseract3
tesseract4
tesseract5;