nixpkgs-suyu/pkgs/development/libraries/qt-5/modules/qttools.nix
Matthew Bauer 79c0e740a7 qttools: patch qmlimportscanner for darwin builds
This needs to be the full path for qtmacdeploy to work. We add
${qt5.qttools.dev}/bin/qmlimportscanner as the default.

Fixes #63093
2019-06-22 22:21:38 -04:00

39 lines
942 B
Nix

{ 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;
}