git.iko.soy/typeable/nixpkgs
on master help sign in
qtcreator 4.9.1 -> 4.10.0 (#70573)

Added optional withClangPlugins to disable clang plugins compilation and, therefore, vendor clang dependency.

commit1eafac2ac66ce63ffc8e29a6b1e846c168ceb39f authorAndrew Newman <deadloko@gmail.com> dateTue 5 Nov 2019, 20:00 (7 years ago) parenta692029
3 files changed+31−26
pkgs/development/tools/qtcreator/0001-Fix-clang-libcpp-regexp.patch+2−2 pkgs/development/tools/qtcreator/0002-Dont-remove-clang-header-paths.patch+13 pkgs/development/tools/qtcreator/default.nix+16−24
pkgs/development/tools/qtcreator/0001-Fix-clang-libcpp-regexp.patch+2−2
@@ -1,8 +1,8 @@
11diff --git a/src/plugins/cpptools/headerpathfilter.cpp b/src/plugins/cpptools/headerpathfilter.cpp
2−index b514c46..5f96358 100644
2+index e2d1e6a..1a1d839 100644
33--- a/src/plugins/cpptools/headerpathfilter.cpp
44+++ b/src/plugins/cpptools/headerpathfilter.cpp
5−@@ -92,8 +92,8 @@ HeaderPaths::iterator resourceIterator(HeaderPaths &headerPaths, bool isMacOs)
5+@@ -96,8 +96,8 @@ HeaderPaths::iterator resourceIterator(HeaderPaths &headerPaths, bool isMacOs)
66 {
77 // include/c++, include/g++, libc++\include and libc++abi\include
88 static const QString cppIncludes = R"((.*\/include\/.*(g\+\+|c\+\+).*))"
pkgs/development/tools/qtcreator/0002-Dont-remove-clang-header-paths.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/src/plugins/cpptools/headerpathfilter.cpp b/src/plugins/cpptools/headerpathfilter.cpp
2+index e2d1e6a..1a1d839 100644
3+--- a/src/plugins/cpptools/headerpathfilter.cpp
4++++ b/src/plugins/cpptools/headerpathfilter.cpp
5+@@ -134,8 +134,6 @@ void removeClangSystemHeaderPaths(HeaderPaths &headerPaths)
6+
7+ void HeaderPathFilter::tweakHeaderPaths()
8+ {
9+- removeClangSystemHeaderPaths(builtInHeaderPaths);
10+-
11+ auto split = resourceIterator(builtInHeaderPaths,
12+ projectPart.toolChainTargetTriple.contains("darwin"));
13+
pkgs/development/tools/qtcreator/default.nix+16−24
@@ -1,14 +1,11 @@
11{ mkDerivation, lib, fetchurl, fetchgit, fetchpatch
22, qtbase, qtquickcontrols, qtscript, qtdeclarative, qmake, llvmPackages_8
3−, withDocumentation ? false
3+, withDocumentation ? false, withClangPlugins ? true
44}:
55
66with lib;
77
88let
9− baseVersion = "4.9";
10− revision = "1";
11−
129 # Fetch clang from qt vendor, this contains submodules like this:
1310 # clang<-clang-tools-extra<-clazy.
1411 clang_qt_vendor = llvmPackages_8.clang-unwrapped.overrideAttrs (oldAttrs: {
@@ -23,35 +20,28 @@ in
2320
2421mkDerivation rec {
2522 pname = "qtcreator";
26− version = "${baseVersion}.${revision}";
23+ version = "4.10.0";
24+ baseVersion = builtins.concatStringsSep "." (lib.take 2 (builtins.splitVersion version));
2725
2826 src = fetchurl {
2927 url = "http://download.qt-project.org/official_releases/${pname}/${baseVersion}/${version}/qt-creator-opensource-src-${version}.tar.xz";
30− sha256 = "10ddp1365rf0z4bs7yzc9hajisp3j6mzjshyd0vpi4ki126j5f3r";
28+ sha256 = "12hgxdghz05ms4zl8prz2w8l66vmgw1qw2gsmmwqi2rdaay3lpcg";
3129 };
3230
33− buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative llvmPackages_8.libclang clang_qt_vendor llvmPackages_8.llvm ];
31+ buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative ] ++
32+ optionals withClangPlugins [ llvmPackages_8.libclang
33+ clang_qt_vendor
34+ llvmPackages_8.llvm ];
3435
3536 nativeBuildInputs = [ qmake ];
3637
3738 # 0001-Fix-clang-libcpp-regexp.patch is for fixing regexp that is used to
3839 # find clang libc++ library include paths. By default it's not covering paths
3940 # like libc++-version, which is default name for libc++ folder in nixos.
41+ # ./0002-Dont-remove-clang-header-paths.patch is for forcing qtcreator to not
42+ # remove system clang include paths.
4043 patches = [ ./0001-Fix-clang-libcpp-regexp.patch
41−
42− # Fix clazy plugin name. This plugin was renamed with clang8
43− # release, and patch didn't make it into 4.9.1 release. Should be removed
44− # on qtcreator update, if this problem is fixed.
45− (fetchpatch {
46− url = "https://code.qt.io/cgit/qt-creator/qt-creator.git/patch/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp?id=53c407bc0c87e0b65b537bf26836ddd8e00ead82";
47− sha256 = "1lanp7jg0x8jffajb852q8p4r34facg41l410xsz6s1k91jskbi9";
48− })
49−
50− (fetchpatch {
51− url = "https://code.qt.io/cgit/qt-creator/qt-creator.git/patch/src/plugins/clangtools/clangtidyclazyrunner.cpp?id=53c407bc0c87e0b65b537bf26836ddd8e00ead82";
52− sha256 = "1rl0rc2l297lpfhhawvkkmj77zb081hhp0bbi7nnykf3q9ch0clh";
53− })
54− ];
44+ ./0002-Dont-remove-clang-header-paths.patch ];
5545
5646 doCheck = true;
5747
@@ -63,8 +53,8 @@ mkDerivation rec {
6353
6454 preConfigure = ''
6555 substituteInPlace src/plugins/plugins.pro \
66− --replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls'
67−
56+ --replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls'
57+ '' + optionalString withClangPlugins ''
6858 # Fix paths for llvm/clang includes directories.
6959 substituteInPlace src/shared/clang/clang_defines.pri \
7060 --replace '$$clean_path($${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include)' '${clang_qt_vendor}/lib/clang/8.0.0/include' \
@@ -77,7 +67,9 @@ mkDerivation rec {
7767 # Fix paths to libclang library.
7868 substituteInPlace src/shared/clang/clang_installation.pri \
7969 --replace 'LIBCLANG_LIBS = -L$${LLVM_LIBDIR}' 'LIBCLANG_LIBS = -L${llvmPackages_8.libclang}/lib' \
80− --replace 'LIBCLANG_LIBS += $${CLANG_LIB}' 'LIBCLANG_LIBS += -lclang'
70+ --replace 'LIBCLANG_LIBS += $${CLANG_LIB}' 'LIBCLANG_LIBS += -lclang' \
71+ --replace 'LIBTOOLING_LIBS = -L$${LLVM_LIBDIR}' 'LIBTOOLING_LIBS = -L${clang_qt_vendor}/lib' \
72+ --replace 'LLVM_CXXFLAGS ~= s,-gsplit-dwarf,' '${lib.concatStringsSep "\n" ["LLVM_CXXFLAGS ~= s,-gsplit-dwarf," " LLVM_CXXFLAGS += -fno-rtti"]}'
8173 '';
8274
8375 preBuild = optional withDocumentation ''