74 # optional dependencies
82 , libGLSupported ? true
85 , developerBuild ? false
89 debugSymbols = debug || developerBuild;
91 stdenv.mkDerivation rec {
98 propagatedBuildInputs = [
155 ] ++ (with unixODBCDrivers; [
159 ]) ++ lib.optional libGLSupported libGL;
166 ++ lib.optional withGtk3 gtk3
167 ++ lib.optional developerBuild gdb
168 ++ lib.optional (cups != null) cups
169 ++ lib.optional (libmysqlclient != null) libmysqlclient
170 ++ lib.optional (postgresql != null) postgresql;
172 nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ];
174 propagatedNativeBuildInputs = [ lndir ];
176 enableParallelBuilding = true;
180 # https://bugreports.qt.io/browse/QTBUG-97568
182 substituteInPlace src/corelib/CMakeLists.txt --replace /bin/ls ${coreutils}/bin/ls
185 fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
186 fix_qt_module_paths = ../hooks/fix-qt-module-paths.sh;
188 . "$fix_qt_builtin_paths"
189 . "$fix_qt_module_paths"
190 . ${../hooks/move-qt-dev-tools.sh}
191 . ${../hooks/fix-qmake-libtool.sh}
194 qtPluginPrefix = "lib/qt-6/plugins";
195 qtQmlPrefix = "lib/qt-6/qml";
198 "-DINSTALL_PLUGINSDIR=${qtPluginPrefix}"
199 "-DINSTALL_QMLDIR=${qtQmlPrefix}"
200 "-DQT_FEATURE_journald=ON"
201 "-DQT_FEATURE_sctp=ON"
202 "-DQT_FEATURE_libproxy=ON"
203 "-DQT_FEATURE_system_sqlite=ON"
204 "-DQT_FEATURE_vulkan=ON"
205 "-DQT_FEATURE_openssl_linked=ON"
208 outputs = [ "out" "dev" ];
211 moveToOutput "mkspecs" "$dev"
219 "libexec/ensure_pro_file.cmake"
220 "libexec/cmake_automoc_parser"
224 "bin/fixqt4headers.pl"
236 # Don't retain build-time dependencies like gdb.
237 sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri
238 fixQtModulePaths "''${!outputDev}/mkspecs/modules"
239 fixQtBuiltinPaths "''${!outputDev}" '*.pr?'
241 # Move development tools to $dev
243 moveToOutput bin "$dev"
244 moveToOutput libexec "$dev"
246 # fixup .pc file (where to find 'moc' etc.)
247 sed -i "$dev/lib/pkgconfig/Qt6Core.pc" \
248 -e "/^bindir=/ c bindir=$dev/bin"
250 patchShebangs $out $dev
253 dontStrip = debugSymbols;
255 setupHook = ../hooks/qtbase-setup-hook.sh;
258 homepage = "https://www.qt.io/";
259 description = "A cross-platform application framework for C++";
260 license = with licenses; [ fdl13Plus gpl2Plus lgpl21Plus lgpl3Plus ];
261 maintainers = with maintainers; [ milahu nickcao LunNova ];
262 platforms = platforms.linux;