2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libuuid
|
2020-04-24 23:36:52 +00:00
|
|
|
, sane-backends, podofo, libjpeg, djvulibre, libxmlxx3, libzip, tesseract
|
|
|
|
, intltool, poppler, json-glib
|
|
|
|
, ninja
|
|
|
|
, python3
|
|
|
|
|
|
|
|
# Gtk deps
|
|
|
|
# upstream gImagereader supports Qt too
|
|
|
|
, gobject-introspection, wrapGAppsHook
|
|
|
|
, gtkmm3, gtksourceview3, gtksourceviewmm, gtkspell3, gtkspellmm, cairomm
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
variant = "gtk";
|
|
|
|
pythonEnv = python3.withPackages( ps: with ps;[ pygobject3 ] );
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gImageReader";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "3.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner= "manisandro";
|
|
|
|
repo = "gImageReader";
|
|
|
|
rev = "v${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-lJ4wPLxVN3NERnru8vLreiWMEUip6xeCXAfoT8DcfiQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake ninja
|
|
|
|
intltool
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
pythonEnv
|
|
|
|
|
|
|
|
# Gtk specific
|
|
|
|
wrapGAppsHook
|
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libxmlxx3
|
|
|
|
libzip
|
|
|
|
libuuid
|
|
|
|
sane-backends
|
|
|
|
podofo
|
|
|
|
libjpeg
|
|
|
|
djvulibre
|
|
|
|
tesseract
|
|
|
|
poppler
|
|
|
|
|
|
|
|
# Gtk specific
|
|
|
|
gtkmm3
|
|
|
|
gtkspell3
|
|
|
|
gtkspellmm
|
|
|
|
gtksourceview3
|
|
|
|
gtksourceviewmm
|
|
|
|
cairomm
|
|
|
|
json-glib
|
|
|
|
];
|
|
|
|
|
|
|
|
# interface type can be where <type> is either gtk, qt5, qt4
|
|
|
|
cmakeFlags = [ "-DINTERFACE_TYPE=${variant}" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A simple Gtk/Qt front-end to tesseract-ocr";
|
|
|
|
homepage = "https://github.com/manisandro/gImageReader";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [teto];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|