summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5/modules/qttools.nix
blob: 573472a8b5ab030e6366db678ea89dbe4d6fa943 (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
39
{ qtModule, stdenv, lib, qtbase, qtdeclarative }:

with lib;

qtModule {
  name = "qttools";
  qtInputs = [ qtbase ];
  outputs = [ "out" "dev" "bin" ];

  # fixQtBuiltinPaths overwrites a builtin path we should keep
  postPatch = ''
    sed -i "src/linguist/linguist.pro" \
        -e '/^cmake_linguist_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${getDev qtbase}|'
  '';

  devTools = [
    "bin/qcollectiongenerator"
    "bin/linguist"
    "bin/assistant"
    "bin/qdoc"
    "bin/lconvert"
    "bin/designer"
    "bin/qtattributesscanner"
    "bin/lrelease"
    "bin/pixeltool"
    "bin/lupdate"
    "bin/qtdiag"
    "bin/qhelpgenerator"
    "bin/qtplugininfo"
    "bin/qthelpconverter"
  ] ++ optionals stdenv.isDarwin [
    "bin/macdeployqt"
  ];

  NIX_CFLAGS_COMPILE =
    lib.optional stdenv.isDarwin ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"'';

  setupHook = ../hooks/qttools-setup-hook.sh;
}