qtcreator: added dev output to be able to build 3rd-party plug-ins for QtCreator

Also bump LLVM version for package.
This commit is contained in:
mourogurt
2025-08-29 13:40:33 +03:00
parent 121ce01700
commit b9ae98f878
2 changed files with 37 additions and 16 deletions
+35 -14
View File
@@ -29,12 +29,12 @@
perf,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "qtcreator";
version = "17.0.1";
src = fetchurl {
url = "mirror://qt/official_releases/${pname}/${lib.versions.majorMinor version}/${version}/qt-creator-opensource-src-${version}.tar.xz";
url = "mirror://qt/official_releases/${finalAttrs.pname}/${lib.versions.majorMinor finalAttrs.version}/${finalAttrs.version}/qt-creator-opensource-src-${finalAttrs.version}.tar.xz";
hash = "sha256-9WcYCEdnBzkami7bmWPqSmtrkMeMvnTs4aygxrQuUYQ=";
};
@@ -69,25 +69,42 @@ stdenv.mkDerivation rec {
elfutils
];
outputs = [
"out"
"dev"
];
cmakeFlags = [
# workaround for missing CMAKE_INSTALL_DATAROOTDIR
# in pkgs/development/tools/build-managers/cmake/setup-hook.sh
"-DCMAKE_INSTALL_DATAROOTDIR=${placeholder "out"}/share"
(lib.cmakeFeature "CMAKE_INSTALL_DATAROOTDIR" "${placeholder "out"}/share")
# qtdeclarative in nixpkgs does not provide qmlsc
# fix can't find Qt6QmlCompilerPlusPrivate
"-DQT_NO_FIND_QMLSC=TRUE"
"-DWITH_DOCS=ON"
"-DBUILD_DEVELOPER_DOCS=ON"
"-DBUILD_QBS=OFF"
"-DQTC_CLANG_BUILDMODE_MATCH=ON"
"-DCLANGTOOLING_LINK_CLANG_DYLIB=ON"
(lib.cmakeBool "QT_NO_FIND_QMLSC" true)
(lib.cmakeBool "WITH_DOCS" true)
(lib.cmakeBool "BUILD_DEVELOPER_DOCS" true)
(lib.cmakeBool "BUILD_QBS" false)
(lib.cmakeBool "QTC_CLANG_BUILDMODE_MATCH" true)
(lib.cmakeBool "CLANGTOOLING_LINK_CLANG_DYLIB" true)
];
qtWrapperArgs = [
"--set-default PERFPROFILER_PARSER_FILEPATH ${lib.getBin perf}/bin"
];
meta = with lib; {
postInstall = ''
# Small hack to set-up right prefix in cmake modules for header files
cmake . $cmakeFlags -DCMAKE_INSTALL_PREFIX="''${!outputDev}"
cmake --install . --prefix "''${!outputDev}" --component Devel
'';
# Remove prefix from the QtC config to make sane output path for 3rd-party plug-ins.
postFixup = ''
substituteInPlace ''${!outputDev}/lib/cmake/QtCreator/QtCreatorConfig.cmake --replace "$out/" ""
'';
meta = {
description = "Cross-platform IDE tailored to the needs of Qt developers";
longDescription = ''
Qt Creator is a cross-platform IDE (integrated development environment)
@@ -95,8 +112,12 @@ stdenv.mkDerivation rec {
advanced code editor, a visual debugger and a GUI designer.
'';
homepage = "https://wiki.qt.io/Qt_Creator";
license = licenses.gpl3Only; # annotated with The Qt Company GPL Exception 1.0
maintainers = [ maintainers.rewine ];
platforms = platforms.linux;
license = lib.licenses.gpl3Only; # annotated with The Qt Company GPL Exception 1.0
maintainers = with lib.maintainers; [
rewine
zatm8
];
platforms = lib.platforms.linux;
mainProgram = "qtcreator";
};
}
})
+2 -2
View File
@@ -7123,8 +7123,8 @@ with pkgs;
qtcreator = qt6Packages.callPackage ../development/tools/qtcreator {
inherit (linuxPackages) perf;
llvmPackages = llvmPackages_18;
stdenv = llvmPackages_18.stdenv;
llvmPackages = llvmPackages_21;
stdenv = llvmPackages_21.stdenv;
};
qxmledit = libsForQt5.callPackage ../applications/editors/qxmledit { };