1840314347
If anyone wants to package the new modules, be my guest.
54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
{
|
|
pkgsBuildBuild,
|
|
qtModule,
|
|
stdenv,
|
|
lib,
|
|
qtbase,
|
|
qtdeclarative,
|
|
cups,
|
|
llvmPackages,
|
|
# clang-based c++ parser for qdoc and lupdate
|
|
withClang ? false,
|
|
}:
|
|
|
|
qtModule {
|
|
pname = "qttools";
|
|
|
|
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"
|
|
'';
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
"-DNIX_OUTPUT_OUT=\"${placeholder "out"}\""
|
|
];
|
|
|
|
buildInputs = lib.optionals withClang [
|
|
llvmPackages.libclang
|
|
llvmPackages.llvm
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
qtbase
|
|
qtdeclarative
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ cups ];
|
|
|
|
cmakeFlags =
|
|
lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
"-DQt6LinguistTools_DIR=${pkgsBuildBuild.qt6.qttools}/lib/cmake/Qt6LinguistTools"
|
|
"-DQt6ToolsTools_DIR=${pkgsBuildBuild.qt6.qttools}/lib/cmake/Qt6ToolsTools"
|
|
]
|
|
++ lib.optionals withClang [
|
|
"-DFEATURE_clang=ON"
|
|
];
|
|
|
|
postInstall = ''
|
|
mkdir -p "$dev"
|
|
ln -s "$out/bin" "$dev/bin"
|
|
'';
|
|
}
|