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