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