1{
2 stdenv,
3 lib,
4 fetchurl,
5 cmake,
6 pkg-config,
7 ninja,
8 python3,
9 qtbase,
10 qt5compat,
11 qtdeclarative,
12 qtdoc,
13 qtquick3d,
14 qtquicktimeline,
15 qtserialport,
16 qtsvg,
17 qttools,
18 qtwebengine,
19 qtwayland,
20 qtshadertools,
21 wrapQtAppsHook,
22 yaml-cpp,
23 litehtml,
24 libsecret,
25 gumbo,
26 llvmPackages,
27 rustc-demangle,
28 elfutils,
29 perf,
30 gtk3,
31}:
32
33stdenv.mkDerivation rec {
34 pname = "qtcreator";
35 version = "16.0.2";
36
37 src = fetchurl {
38 url = "mirror://qt/official_releases/${pname}/${lib.versions.majorMinor version}/${version}/qt-creator-opensource-src-${version}.tar.xz";
39 hash = "sha256-UWyxZK4XzL8SqUkfqNU+cb22P9jExjn6RkLV1Es32YI=";
40 };
41
42 nativeBuildInputs = [
43 cmake
44 pkg-config
45 (qttools.override { withClang = true; })
46 wrapQtAppsHook
47 python3
48 ninja
49 ];
50
51 buildInputs = [
52 qtbase
53 qtdoc
54 qtsvg
55 qtquick3d
56 qtwebengine
57 qtwayland
58 qtserialport
59 qtshadertools
60 qt5compat
61 qtdeclarative
62 qtquicktimeline
63 yaml-cpp
64 litehtml
65 libsecret
66 gumbo
67 llvmPackages.libclang
68 llvmPackages.llvm
69 rustc-demangle
70 elfutils
71 ];
72
73 cmakeFlags = [
74 # workaround for missing CMAKE_INSTALL_DATAROOTDIR
75 # in pkgs/development/tools/build-managers/cmake/setup-hook.sh
76 "-DCMAKE_INSTALL_DATAROOTDIR=${placeholder "out"}/share"
77 # qtdeclarative in nixpkgs does not provide qmlsc
78 # fix can't find Qt6QmlCompilerPlusPrivate
79 "-DQT_NO_FIND_QMLSC=TRUE"
80 "-DWITH_DOCS=ON"
81 "-DBUILD_DEVELOPER_DOCS=ON"
82 "-DBUILD_QBS=OFF"
83 "-DQTC_CLANG_BUILDMODE_MATCH=ON"
84 "-DCLANGTOOLING_LINK_CLANG_DYLIB=ON"
85 ];
86
87 qtWrapperArgs = [
88 "--set-default PERFPROFILER_PARSER_FILEPATH ${lib.getBin perf}/bin"
89 "--suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}"
90 ];
91
92 meta = with lib; {
93 description = "Cross-platform IDE tailored to the needs of Qt developers";
94 longDescription = ''
95 Qt Creator is a cross-platform IDE (integrated development environment)
96 tailored to the needs of Qt developers. It includes features such as an
97 advanced code editor, a visual debugger and a GUI designer.
98 '';
99 homepage = "https://wiki.qt.io/Qt_Creator";
100 license = licenses.gpl3Only; # annotated with The Qt Company GPL Exception 1.0
101 maintainers = [ maintainers.rewine ];
102 platforms = platforms.linux;
103 };
104}