1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 qmake,
6 qtbase,
7 qtxmlpatterns,
8 qtsvg,
9 qtscxml,
10 libGLU,
11}:
12
13stdenv.mkDerivation rec {
14 pname = "qxmledit";
15 version = "0.9.17";
16
17 outputs = [
18 "out"
19 "doc"
20 ];
21
22 src = fetchFromGitHub {
23 owner = "lbellonda";
24 repo = pname;
25 rev = version;
26 hash = "sha256-UzN5U+aC/uKokSdeUG2zv8+mkaH4ndYZ0sfzkpQ3l1M=";
27 };
28
29 nativeBuildInputs = [ qmake ];
30
31 buildInputs = [
32 qtbase
33 qtxmlpatterns
34 qtsvg
35 qtscxml
36 libGLU
37 ];
38
39 qmakeFlags = [ "CONFIG+=release" ];
40
41 preConfigure = ''
42 export QXMLEDIT_INST_DATA_DIR="$out/share/data"
43 export QXMLEDIT_INST_TRANSLATIONS_DIR="$out/share/i18n"
44 export QXMLEDIT_INST_INCLUDE_DIR="$out/include"
45 export QXMLEDIT_INST_DIR="$out/bin"
46 export QXMLEDIT_INST_LIB_DIR="$out/lib"
47 export QXMLEDIT_INST_DOC_DIR="$doc"
48 '';
49
50 dontWrapQtApps = true;
51
52 meta = {
53 broken = stdenv.hostPlatform.isDarwin;
54 description = "Simple XML editor based on qt libraries";
55 homepage = "https://sourceforge.net/projects/qxmledit";
56 license = lib.licenses.lgpl2;
57 platforms = lib.platforms.unix;
58 changelog = "https://github.com/lbellonda/qxmledit/blob/${version}/NEWS";
59 mainProgram = "qxmledit";
60 };
61}