nixpkgs/pkgs/applications/misc/gImageReader/default.nix
Matthieu Coudron efbf9afb17 gImageReader: init at 3.2.99
gImageReader is a GUI for tesseract, an optical character recognition engine.
While the UI supports Qt/Gtk, I have only added the gtk one in the nix derivation.
2018-11-02 01:22:12 +09:00

71 lines
1.5 KiB
Nix

{ stdenv, fetchFromGitHub, cmake, pkgconfig, libuuid
, sane-backends, podofo, libjpeg, djvulibre, libxmlxx3, libzip, tesseract
, enchant, intltool, poppler, json-glib
, ninja
, python3
# Gtk deps
# upstream gImagereader supports Qt too
, gtk3, gobjectIntrospection, wrapGAppsHook
, gnome3, gtkspell3, gtkspellmm, cairomm
}:
let
variant = "gtk";
pythonEnv = python3.withPackages( ps: with ps;[ pygobject3 ] );
in
stdenv.mkDerivation rec {
name = "gImageReader-${version}";
version = "3.2.99";
src = fetchFromGitHub {
owner= "manisandro";
repo = "gImageReader";
rev = "v${version}";
sha256 = "19dbxq83j77lbvi10a8x0xxgw5hbsqyc852c196zzvmwk3km6pnc";
};
nativeBuildInputs = [
cmake ninja
intltool
pkgconfig
pythonEnv
# Gtk specific
wrapGAppsHook
gobjectIntrospection
];
buildInputs = [
enchant
libxmlxx3
libzip
libuuid
sane-backends
podofo
libjpeg
djvulibre
tesseract
poppler
# Gtk specific
gnome3.gtkmm
gtkspell3
gtkspellmm
gnome3.gtksourceview
gnome3.gtksourceviewmm
cairomm
json-glib
];
# interface type can be where <type> is either gtk, qt5, qt4
cmakeFlags = [ "-DINTERFACE_TYPE=${variant}" ];
meta = with stdenv.lib; {
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;
};
}