summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2018-09-19 01:34:33 +0900
committerMatthieu Coudron <mattator@gmail.com>2018-11-02 01:22:12 +0900
commitefbf9afb17cc2032f599ccb36479ed158a62f60a (patch)
tree49419b58398b71b9260ee10ba7da82ae6fee5f40 /pkgs
parent38db6fdfb9672a0206a2042447132094bc05a5ea (diff)
downloadnixpkgs-efbf9afb17cc2032f599ccb36479ed158a62f60a.tar
nixpkgs-efbf9afb17cc2032f599ccb36479ed158a62f60a.tar.gz
nixpkgs-efbf9afb17cc2032f599ccb36479ed158a62f60a.tar.bz2
nixpkgs-efbf9afb17cc2032f599ccb36479ed158a62f60a.tar.lz
nixpkgs-efbf9afb17cc2032f599ccb36479ed158a62f60a.tar.xz
nixpkgs-efbf9afb17cc2032f599ccb36479ed158a62f60a.tar.zst
nixpkgs-efbf9afb17cc2032f599ccb36479ed158a62f60a.zip
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.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/misc/gImageReader/default.nix71
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/applications/misc/gImageReader/default.nix b/pkgs/applications/misc/gImageReader/default.nix
new file mode 100644
index 00000000000..16693cfbf09
--- /dev/null
+++ b/pkgs/applications/misc/gImageReader/default.nix
@@ -0,0 +1,71 @@
+{ 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;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 89b32ec3bfa..246f40efdac 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7984,6 +7984,8 @@ with pkgs;
 
   jython = callPackage ../development/interpreters/jython {};
 
+  gImageReader = callPackage ../applications/misc/gImageReader { };
+
   guile-cairo = callPackage ../development/guile-modules/guile-cairo { };
 
   guile-fibers = callPackage ../development/guile-modules/guile-fibers { };