mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 12:42:24 +00:00
ocrfeeder: init at 0.8.3
This commit is contained in:
parent
5d7ef923cb
commit
cc7ce76119
73
pkgs/applications/graphics/ocrfeeder/default.nix
Normal file
73
pkgs/applications/graphics/ocrfeeder/default.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{ stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, gtk3
|
||||
, gtkspell3
|
||||
, isocodes
|
||||
, goocanvas2
|
||||
, intltool
|
||||
, itstool
|
||||
, libxml2
|
||||
, gnome3
|
||||
, python3
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook
|
||||
, tesseract4
|
||||
, extraOcrEngines ? [] # other supported engines are: ocrad gocr cuneiform
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ocrfeeder";
|
||||
version = "0.8.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "12f5gnq92ffnd5zaj04df7jrnsdz1zn4zcgpbf5p9qnd21i2y529";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
intltool
|
||||
itstool
|
||||
libxml2
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
gobject-introspection
|
||||
goocanvas2
|
||||
gtkspell3
|
||||
isocodes
|
||||
(python3.withPackages(ps: with ps; [
|
||||
pyenchant
|
||||
sane
|
||||
pillow
|
||||
reportlab
|
||||
odfpy
|
||||
pygobject3
|
||||
]))
|
||||
];
|
||||
|
||||
# https://gitlab.gnome.org/GNOME/ocrfeeder/-/issues/22
|
||||
postConfigure = ''
|
||||
substituteInPlace src/ocrfeeder/util/constants.py \
|
||||
--replace /usr/share/xml/iso-codes ${isocodes}/share/xml/iso-codes
|
||||
'';
|
||||
|
||||
enginesPath = stdenv.lib.makeBinPath ([
|
||||
tesseract4
|
||||
] ++ extraOcrEngines);
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(--prefix PATH : "${enginesPath}")
|
||||
'';
|
||||
|
||||
meta = with stdenv.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;
|
||||
};
|
||||
}
|
|
@ -2460,6 +2460,8 @@ in
|
|||
|
||||
ocrmypdf = callPackage ../tools/text/ocrmypdf { };
|
||||
|
||||
ocrfeeder = callPackage ../applications/graphics/ocrfeeder { };
|
||||
|
||||
onboard = callPackage ../applications/misc/onboard { };
|
||||
|
||||
oneshot = callPackage ../tools/networking/oneshot { };
|
||||
|
|
Loading…
Reference in a new issue