about summary refs log tree commit diff
path: root/pkgs/applications/graphics/tesseract
diff options
context:
space:
mode:
authorStanisław Pitucha <git@viraptor.info>2022-08-14 20:03:31 +1000
committerStanisław Pitucha <stan.pitucha@envato.com>2022-08-25 21:33:28 +1000
commit195833f20c850013446ada0cec4413f0c38d71f0 (patch)
tree2a520e99f77f937b3cbb98e963fac156ca751b5e /pkgs/applications/graphics/tesseract
parente98d5da182d3edaf180ad1ec03495e6d43b8c2ed (diff)
tesseract5: fix darwin compilation
Diffstat (limited to 'pkgs/applications/graphics/tesseract')
-rw-r--r--pkgs/applications/graphics/tesseract/default.nix6
-rw-r--r--pkgs/applications/graphics/tesseract/tesseract5.nix10
2 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/applications/graphics/tesseract/default.nix b/pkgs/applications/graphics/tesseract/default.nix
index dc5f97318708d..70649d633b852 100644
--- a/pkgs/applications/graphics/tesseract/default.nix
+++ b/pkgs/applications/graphics/tesseract/default.nix
@@ -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
 {
diff --git a/pkgs/applications/graphics/tesseract/tesseract5.nix b/pkgs/applications/graphics/tesseract/tesseract5.nix
index dd4d6cb2791df..244eb1e53e40c 100644
--- a/pkgs/applications/graphics/tesseract/tesseract5.nix
+++ b/pkgs/applications/graphics/tesseract/tesseract5.nix
@@ -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;
   };
 }