2020-04-07 20:32:47 +00:00
|
|
|
{ mkDerivation
|
2021-01-25 08:26:54 +00:00
|
|
|
, lib
|
2019-07-12 19:02:44 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
, qmake
|
|
|
|
, leptonica
|
2023-03-03 05:02:31 +00:00
|
|
|
, tesseract4
|
2019-07-12 19:02:44 +00:00
|
|
|
}:
|
|
|
|
|
2020-04-07 20:32:47 +00:00
|
|
|
mkDerivation {
|
2019-07-12 19:02:44 +00:00
|
|
|
pname = "qt-box-editor";
|
2023-01-28 21:17:59 +00:00
|
|
|
version = "unstable-2019-07-14";
|
2019-07-12 19:02:44 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zdenop";
|
|
|
|
repo = "qt-box-editor";
|
2023-01-28 21:17:59 +00:00
|
|
|
rev = "cba2929dabc6c715acd1a282ba161fee914c87f6";
|
|
|
|
hash = "sha256-3dWnAu0CLO3atjbC1zJEnL3vzsIEecDDDhW3INMfCv4=";
|
2019-07-12 19:02:44 +00:00
|
|
|
};
|
|
|
|
|
2023-03-03 05:02:31 +00:00
|
|
|
buildInputs = [ qtbase qtsvg leptonica tesseract4 ];
|
2019-07-12 19:02:44 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ qmake ];
|
|
|
|
|
2023-01-28 21:17:59 +00:00
|
|
|
# https://github.com/zdenop/qt-box-editor/issues/87
|
2019-07-12 19:02:44 +00:00
|
|
|
postPatch = ''
|
2023-01-28 21:17:59 +00:00
|
|
|
sed -i '/allheaders.h/a#include <leptonica/pix_internal.h>' src/TessTools.h
|
|
|
|
|
|
|
|
substituteInPlace qt-box-editor.pro \
|
|
|
|
--replace '-llept' '-lleptonica'
|
2019-07-12 19:02:44 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-12 19:02:44 +00:00
|
|
|
description = "Editor of tesseract-ocr box files";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/zdenop/qt-box-editor";
|
2019-07-12 19:02:44 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|