Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / qt-5 / modules / qttools.nix
blob37e4348ed2c23018431e99f7a1c64953cc38b4fb
1 { qtModule, stdenv, lib, qtbase, qtdeclarative }:
3 qtModule {
4   pname = "qttools";
5   propagatedBuildInputs = [ qtbase qtdeclarative ];
6   outputs = [ "out" "dev" "bin" ];
8   # fixQtBuiltinPaths overwrites a builtin path we should keep
9   postPatch = ''
10     sed -i "src/linguist/linguist.pro" \
11         -e '/^cmake_linguist_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${lib.getDev qtbase}|'
12     sed -i "src/qtattributionsscanner/qtattributionsscanner.pro" \
13         -e '/^cmake_qattributionsscanner_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${lib.getDev qtbase}|'
14   '';
16   devTools = [
17     "bin/qcollectiongenerator"
18     "bin/linguist"
19     "bin/assistant"
20     "bin/qdoc"
21     "bin/lconvert"
22     "bin/designer"
23     "bin/qtattributionsscanner"
24     "bin/lrelease"
25     "bin/lrelease-pro"
26     "bin/pixeltool"
27     "bin/lupdate"
28     "bin/lupdate-pro"
29     "bin/qtdiag"
30     "bin/qhelpgenerator"
31     "bin/qtplugininfo"
32     "bin/qthelpconverter"
33     "bin/lprodump"
34     "bin/qdistancefieldgenerator"
35   ] ++ lib.optionals stdenv.isDarwin [
36     "bin/macdeployqt"
37   ];
39   env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && qtdeclarative != null) ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"'';
41   setupHook = ../hooks/qttools-setup-hook.sh;