depot/third_party/nixpkgs/pkgs/development/libraries/qt-5/modules/qttools.nix
Default email ae2dc6aea6 Project import generated by Copybara.
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
2024-10-11 07:15:48 +02:00

69 lines
1.3 KiB
Nix

{
qtModule,
stdenv,
lib,
qtbase,
qtdeclarative,
substituteAll,
llvmPackages,
}:
qtModule {
pname = "qttools";
outputs = [
"out"
"dev"
"bin"
];
buildInputs = with llvmPackages; [
libclang
libllvm
];
propagatedBuildInputs = [
qtbase
qtdeclarative
];
patches = [
# fixQtBuiltinPaths overwrites builtin paths we should keep
(substituteAll {
src = ./qttools-QT_HOST_DATA-refs.patch;
qtbaseDev = lib.getDev qtbase;
})
(substituteAll {
src = ./qttools-libclang-main-header.patch;
libclangDev = lib.getDev llvmPackages.libclang;
})
];
devTools = [
"bin/qcollectiongenerator"
"bin/linguist"
"bin/assistant"
"bin/qdoc"
"bin/lconvert"
"bin/designer"
"bin/qtattributionsscanner"
"bin/lrelease"
"bin/lrelease-pro"
"bin/pixeltool"
"bin/lupdate"
"bin/lupdate-pro"
"bin/qtdiag"
"bin/qhelpgenerator"
"bin/qtplugininfo"
"bin/qthelpconverter"
"bin/lprodump"
"bin/qdistancefieldgenerator"
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "bin/macdeployqt" ];
env.NIX_CFLAGS_COMPILE = lib.optionalString (
stdenv.hostPlatform.isDarwin && qtdeclarative != null
) ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"'';
setupHook = ../hooks/qttools-setup-hook.sh;
}