2020-04-24 23:36:52 +00:00
|
|
|
{ mkDerivation
|
2021-02-05 17:12:51 +00:00
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
, qmake
|
|
|
|
, leptonica
|
2023-03-04 12:14:45 +00:00
|
|
|
, tesseract4
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation {
|
|
|
|
pname = "qt-box-editor";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "unstable-2019-07-14";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zdenop";
|
|
|
|
repo = "qt-box-editor";
|
2023-02-16 17:41:37 +00:00
|
|
|
rev = "cba2929dabc6c715acd1a282ba161fee914c87f6";
|
|
|
|
hash = "sha256-3dWnAu0CLO3atjbC1zJEnL3vzsIEecDDDhW3INMfCv4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
buildInputs = [ qtbase qtsvg leptonica tesseract4 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ qmake ];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
# https://github.com/zdenop/qt-box-editor/issues/87
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2023-02-16 17:41:37 +00:00
|
|
|
sed -i '/allheaders.h/a#include <leptonica/pix_internal.h>' src/TessTools.h
|
|
|
|
|
|
|
|
substituteInPlace qt-box-editor.pro \
|
|
|
|
--replace '-llept' '-lleptonica'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Editor of tesseract-ocr box files";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "qt-box-editor-1.12rc1";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/zdenop/qt-box-editor";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|