3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/qt-5/modules/qttools.nix
Tom Hall 704b49db97
qttools: Add qtdeclarative to buildInputs
qtdeclarative is an optional dependency for some parts of qttools:
without it, the lupdate binary is not able to process qml files for
translatable strings.
2020-02-10 15:27:41 -06:00

40 lines
956 B
Nix

{ qtModule, stdenv, lib, qtbase, qtdeclarative }:
with lib;
qtModule {
name = "qttools";
qtInputs = [ qtbase qtdeclarative ];
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;
}