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