2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
37 lines
842 B
Nix
37 lines
842 B
Nix
{ qtModule
|
|
, stdenv
|
|
, lib
|
|
, qtbase
|
|
, qtdeclarative
|
|
, cups
|
|
, llvmPackages
|
|
# clang-based c++ parser for qdoc and lupdate
|
|
, withClang ? false
|
|
}:
|
|
|
|
qtModule {
|
|
pname = "qttools";
|
|
buildInputs = lib.optionals withClang [
|
|
llvmPackages.libclang
|
|
llvmPackages.llvm
|
|
];
|
|
propagatedBuildInputs = [ qtbase qtdeclarative ]
|
|
++ lib.optionals stdenv.isDarwin [ cups ];
|
|
patches = [
|
|
../patches/qttools-paths.patch
|
|
];
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
"-DNIX_OUTPUT_OUT=\"${placeholder "out"}\""
|
|
];
|
|
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"
|
|
'';
|
|
postInstall = ''
|
|
mkdir -p "$dev"
|
|
ln -s "$out/bin" "$dev/bin"
|
|
'';
|
|
}
|