mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 12:53:05 +00:00
8ace65ff3d
* mpd-touch-screen-gui: use finalAttrs in mkDerivation; reformat * musescore: use finalAttrs in mkDerivation * syncthingtray: use stdenv.mkDerivation with a function; reformat * ocrfeeder: use finalAttrs in mkDerivation; reformat * castget: use finalAttrs in mkDerivation * gnome-network-displays: use finalAttrs in mkDerivation * mailreaders: use finalAttrs in mkDerivation * mswatch: use finalAttrs in mkDerivation * uhd: use finalAttrs in mkDerivation * maxima: use finalAttrs in mkDerivation * qalculate-gtk: use finalAttrs in mkDerivation * qalculate-qt: use finalAttrs in mkDerivation * wxmaxima: use finalAttrs in mkDerivation * lammps: use finalAttrs in mkDerivation * mlterm: use finalAttrs in mkDerivation * video-trimmer: use finalAttrs in mkDerivation * nerdfonts: use finalAttrs in mkDerivation * gnomeExtensions.easyScreenCast: use finalAttrs in mkDerivation * octave: use finalAttrs in mkDerivation; reformat * comedilib: use finalAttrs in mkDerivation * cpp-utilities: use finalAttrs in mkDerivation * libsForQt5.kpeoplevcard: use finalAttrs in mkDerivation; reformat * liberio: use finalAttrs in mkDerivation * libqalculate: use finalAttrs in mkDerivation; reformat * libwtk-sdl2: use finalAttrs in mkDerivation * libsForQt5.pulseaudio-qt: use finalAttrs in mkDerivation; reformat * qrupdate: use finalAttrs in mkDerivation; reformat * libsForQt5.qtforkawesome: use finalAttrs in mkDerivation; reformat * libsForQt5.qtutilities: use finalAttrs in mkDerivation; reformat * sqlitecpp: use finalAttrs in mkDerivation; reformat * tweeny: use finalAttrs in mkDerivation * volk: use finalAttrs in mkDerivation * wiringpi: use finalAttrs in mkDerivation * snzip: use finalAttrs in mkDerivation; reformat * bpm-tools: use finalAttrs in mkDerivation; reformat * sacd: use finalAttrs in mkDerivation * gtk-gnutella: use finalAttrs in mkDerivation; reformat * sile: use finalAttrs in mkDerivation * pplatex: use finalAttrs in mkDerivation; reformat
74 lines
1.6 KiB
Nix
74 lines
1.6 KiB
Nix
{ lib, stdenv
|
|
, fetchurl
|
|
, pkg-config
|
|
, wrapGAppsHook
|
|
, intltool
|
|
, itstool
|
|
, libxml2
|
|
, gobject-introspection
|
|
, gtk3
|
|
, goocanvas2
|
|
, gtkspell3
|
|
, isocodes
|
|
, gnome
|
|
, python3
|
|
, tesseract4
|
|
, extraOcrEngines ? [] # other supported engines are: ocrad gocr cuneiform
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "ocrfeeder";
|
|
version = "0.8.5";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/${finalAttrs.pname}/${lib.versions.majorMinor finalAttrs.version}/${finalAttrs.pname}-${finalAttrs.version}.tar.xz";
|
|
sha256 = "sha256-sD0qWUndguJzTw0uy0FIqupFf4OX6dTFvcd+Mz+8Su0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
wrapGAppsHook
|
|
intltool
|
|
itstool
|
|
libxml2
|
|
gobject-introspection
|
|
];
|
|
|
|
buildInputs = [
|
|
gtk3
|
|
goocanvas2
|
|
gtkspell3
|
|
isocodes
|
|
(python3.withPackages(ps: with ps; [
|
|
pyenchant
|
|
sane
|
|
pillow
|
|
reportlab
|
|
odfpy
|
|
pygobject3
|
|
]))
|
|
];
|
|
patches = [
|
|
# Compiles, but doesn't launch without this, see:
|
|
# https://gitlab.gnome.org/GNOME/ocrfeeder/-/issues/83
|
|
./fix-launch.diff
|
|
];
|
|
|
|
enginesPath = lib.makeBinPath ([
|
|
tesseract4
|
|
] ++ extraOcrEngines);
|
|
|
|
preFixup = ''
|
|
gappsWrapperArgs+=(--prefix PATH : "${finalAttrs.enginesPath}")
|
|
gappsWrapperArgs+=(--set ISO_CODES_DIR "${isocodes}/share/xml/iso-codes")
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://wiki.gnome.org/Apps/OCRFeeder";
|
|
description = "Complete Optical Character Recognition and Document Analysis and Recognition program";
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.linux;
|
|
};
|
|
})
|