nixpkgs/pkgs/applications/misc/qt-box-editor/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
949 B
Nix
Raw Normal View History

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