1{
2 qtModule,
3 stdenv,
4 lib,
5 qtbase,
6 qtdeclarative,
7 replaceVars,
8 llvmPackages,
9}:
10
11qtModule {
12 pname = "qttools";
13
14 outputs = [
15 "out"
16 "dev"
17 "bin"
18 ];
19
20 buildInputs = with llvmPackages; [
21 libclang
22 libllvm
23 ];
24
25 propagatedBuildInputs = [
26 qtbase
27 qtdeclarative
28 ];
29
30 patches = [
31 # fixQtBuiltinPaths overwrites builtin paths we should keep
32 (replaceVars ./qttools-QT_HOST_DATA-refs.patch {
33 qtbaseDev = lib.getDev qtbase;
34 })
35
36 (replaceVars ./qttools-libclang-main-header.patch {
37 libclangDev = lib.getDev llvmPackages.libclang;
38 })
39 ];
40
41 devTools = [
42 "bin/qcollectiongenerator"
43 "bin/linguist"
44 "bin/assistant"
45 "bin/qdoc"
46 "bin/lconvert"
47 "bin/designer"
48 "bin/qtattributionsscanner"
49 "bin/lrelease"
50 "bin/lrelease-pro"
51 "bin/pixeltool"
52 "bin/lupdate"
53 "bin/lupdate-pro"
54 "bin/qtdiag"
55 "bin/qhelpgenerator"
56 "bin/qtplugininfo"
57 "bin/qthelpconverter"
58 "bin/lprodump"
59 "bin/qdistancefieldgenerator"
60 ]
61 ++ lib.optionals stdenv.hostPlatform.isDarwin [ "bin/macdeployqt" ];
62
63 env.NIX_CFLAGS_COMPILE = lib.optionalString (
64 stdenv.hostPlatform.isDarwin && qtdeclarative != null
65 ) ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"'';
66
67 setupHook = ../hooks/qttools-setup-hook.sh;
68}