summary refs log tree commit diff
path: root/pkgs/applications/misc/qt-box-editor/default.nix
blob: c65e5377eb3b17e95c17833ed4559443aea0e251 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ stdenv
, fetchFromGitHub
, qtbase
, qtsvg
, qmake
, leptonica
, tesseract
}:

stdenv.mkDerivation {
  pname = "qt-box-editor";
  version = "unstable-2019-07-12";

  src = fetchFromGitHub {
    owner = "zdenop";
    repo = "qt-box-editor";
    rev = "75a68b466868ba41ba2886caa796057403fe1901";
    sha256 = "0zwsyy7cnbhy5aazwlkhd9y8bnzlgy1gffqa46abajn4809b95k3";
  };

  buildInputs = [ qtbase qtsvg leptonica tesseract ];

  nativeBuildInputs = [ qmake ];

  # remove with next release
  # https://github.com/zdenop/qt-box-editor/pull/78
  postPatch = ''
    printf "INSTALLS += target\ntarget.path = $out/bin" >>  qt-box-editor.pro
  '';

  meta = with stdenv.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;
  };
}