at 23.11-beta 70 lines 1.5 kB view raw
1{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libuuid 2, sane-backends, podofo, libjpeg, djvulibre, libxmlxx3, libzip, tesseract 3, intltool, poppler, json-glib 4, ninja 5, python3 6 7# Gtk deps 8# upstream gImagereader supports Qt too 9, gobject-introspection, wrapGAppsHook 10, gtkmm3, gtksourceview3, gtksourceviewmm, gtkspell3, gtkspellmm, cairomm 11}: 12 13let 14 variant = "gtk"; 15 pythonEnv = python3.withPackages( ps: with ps;[ pygobject3 ] ); 16in 17stdenv.mkDerivation rec { 18 pname = "gImageReader"; 19 version = "3.4.1"; 20 21 src = fetchFromGitHub { 22 owner= "manisandro"; 23 repo = "gImageReader"; 24 rev = "v${version}"; 25 sha256 = "sha256-vW4FbviMHBiJ3rwJY/yS7JDOoCT72nGV6jEeo+k6ylU="; 26 }; 27 28 nativeBuildInputs = [ 29 cmake ninja 30 intltool 31 pkg-config 32 pythonEnv 33 34 # Gtk specific 35 wrapGAppsHook 36 gobject-introspection 37 ]; 38 39 buildInputs = [ 40 libxmlxx3 41 libzip 42 libuuid 43 sane-backends 44 podofo 45 libjpeg 46 djvulibre 47 tesseract 48 poppler 49 50 # Gtk specific 51 gtkmm3 52 gtkspell3 53 gtkspellmm 54 gtksourceview3 55 gtksourceviewmm 56 cairomm 57 json-glib 58 ]; 59 60 # interface type can be where <type> is either gtk, qt5, qt4 61 cmakeFlags = [ "-DINTERFACE_TYPE=${variant}" ]; 62 63 meta = with lib; { 64 description = "A simple Gtk/Qt front-end to tesseract-ocr"; 65 homepage = "https://github.com/manisandro/gImageReader"; 66 license = licenses.gpl3Plus; 67 maintainers = with maintainers; [teto]; 68 platforms = platforms.linux; 69 }; 70}