depot/third_party/nixpkgs/pkgs/development/libraries/qt-6/modules/qttools.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

37 lines
855 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.hostPlatform.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"
'';
}