2022-06-16 17:23:12 +00:00
|
|
|
{ qtModule
|
|
|
|
, stdenv
|
|
|
|
, lib
|
|
|
|
, qtbase
|
|
|
|
, qtdeclarative
|
2022-12-17 10:02:37 +00:00
|
|
|
, cups
|
2023-07-15 17:15:38 +00:00
|
|
|
, llvmPackages
|
|
|
|
# clang-based c++ parser for qdoc and lupdate
|
|
|
|
, withClang ? false
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
qtModule {
|
|
|
|
pname = "qttools";
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = lib.optionals withClang [
|
|
|
|
llvmPackages.libclang
|
|
|
|
llvmPackages.llvm
|
|
|
|
];
|
2023-11-16 04:20:00 +00:00
|
|
|
propagatedBuildInputs = [ qtbase qtdeclarative ]
|
2024-02-29 20:09:43 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ cups ];
|
2022-11-27 09:42:12 +00:00
|
|
|
patches = [
|
|
|
|
../patches/qttools-paths.patch
|
|
|
|
];
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
2023-04-29 16:46:19 +00:00
|
|
|
"-DNIX_OUTPUT_OUT=\"${placeholder "out"}\""
|
2022-11-27 09:42:12 +00:00
|
|
|
];
|
2023-10-19 13:55:26 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace \
|
|
|
|
src/qdoc/catch/CMakeLists.txt \
|
|
|
|
src/qdoc/catch_generators/CMakeLists.txt \
|
|
|
|
src/qdoc/catch_conversions/CMakeLists.txt \
|
|
|
|
--replace ''\'''${CMAKE_INSTALL_INCLUDEDIR}' "$out/include"
|
|
|
|
'';
|
2023-04-29 16:46:19 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$dev"
|
|
|
|
ln -s "$out/bin" "$dev/bin"
|
|
|
|
'';
|
2022-06-16 17:23:12 +00:00
|
|
|
}
|