diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qt-6')
61 files changed, 2838 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/default.nix b/nixpkgs/pkgs/development/libraries/qt-6/default.nix new file mode 100644 index 000000000000..d9bc6ae15e1f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/default.nix @@ -0,0 +1,173 @@ +{ newScope +, lib +, stdenv +, fetchurl +, fetchpatch +, makeSetupHook +, makeWrapper +, gst_all_1 +, libglvnd +, darwin +, buildPackages + + # options +, developerBuild ? false +, debug ? false +}: + +let + srcs = import ./srcs.nix { + inherit fetchurl; + mirror = "mirror://qt"; + }; + + addPackages = self: with self; + let + callPackage = self.newScope ({ + inherit qtModule srcs; + stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + }); + in + { + + inherit callPackage srcs; + + qtModule = callPackage ./qtModule.nix { }; + + qtbase = callPackage ./modules/qtbase.nix { + withGtk3 = true; + inherit (srcs.qtbase) src version; + inherit developerBuild; + inherit (darwin.apple_sdk_11_0.frameworks) + AGL AVFoundation AppKit Contacts CoreBluetooth EventKit GSS MetalKit; + patches = [ + ./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch + ./patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch + ./patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch + ./patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch + ./patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch + ./patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch + ./patches/0007-qtbase-find-qt-tools-in-QTTOOLSPATH.patch + ]; + }; + env = callPackage ./qt-env.nix { }; + full = env "qt-full-${qtbase.version}" ([ + qt3d + qt5compat + qtcharts + qtconnectivity + qtdatavis3d + qtdeclarative + qtdoc + qtgrpc + qthttpserver + qtimageformats + qtlanguageserver + qtlocation + qtlottie + qtmultimedia + qtmqtt + qtnetworkauth + qtpositioning + qtsensors + qtserialbus + qtserialport + qtshadertools + qtspeech + qtquick3d + qtquick3dphysics + qtquickeffectmaker + qtquicktimeline + qtremoteobjects + qtsvg + qtscxml + qttools + qttranslations + qtvirtualkeyboard + qtwebchannel + qtwebengine + qtwebsockets + qtwebview + ] ++ lib.optionals (!stdenv.isDarwin) [ qtwayland libglvnd ]); + + qt3d = callPackage ./modules/qt3d.nix { }; + qt5compat = callPackage ./modules/qt5compat.nix { }; + qtcharts = callPackage ./modules/qtcharts.nix { }; + qtconnectivity = callPackage ./modules/qtconnectivity.nix { + inherit (darwin.apple_sdk_11_0.frameworks) IOBluetooth PCSC; + }; + qtdatavis3d = callPackage ./modules/qtdatavis3d.nix { }; + qtdeclarative = callPackage ./modules/qtdeclarative.nix { }; + qtdoc = callPackage ./modules/qtdoc.nix { }; + qtgrpc = callPackage ./modules/qtgrpc.nix { }; + qthttpserver = callPackage ./modules/qthttpserver.nix { }; + qtimageformats = callPackage ./modules/qtimageformats.nix { }; + qtlanguageserver = callPackage ./modules/qtlanguageserver.nix { }; + qtlocation = callPackage ./modules/qtlocation.nix { }; + qtlottie = callPackage ./modules/qtlottie.nix { }; + qtmultimedia = callPackage ./modules/qtmultimedia.nix { + inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi; + inherit (darwin.apple_sdk_11_0.frameworks) VideoToolbox; + }; + qtmqtt = callPackage ./modules/qtmqtt.nix { }; + qtnetworkauth = callPackage ./modules/qtnetworkauth.nix { }; + qtpositioning = callPackage ./modules/qtpositioning.nix { }; + qtsensors = callPackage ./modules/qtsensors.nix { }; + qtserialbus = callPackage ./modules/qtserialbus.nix { }; + qtserialport = callPackage ./modules/qtserialport.nix { }; + qtshadertools = callPackage ./modules/qtshadertools.nix { }; + qtspeech = callPackage ./modules/qtspeech.nix { + inherit (darwin.apple_sdk_11_0.frameworks) Cocoa; + }; + qtquick3d = callPackage ./modules/qtquick3d.nix { }; + qtquick3dphysics = callPackage ./modules/qtquick3dphysics.nix { }; + qtquickeffectmaker = callPackage ./modules/qtquickeffectmaker.nix { }; + qtquicktimeline = callPackage ./modules/qtquicktimeline.nix { }; + qtremoteobjects = callPackage ./modules/qtremoteobjects.nix { }; + qtsvg = callPackage ./modules/qtsvg.nix { }; + qtscxml = callPackage ./modules/qtscxml.nix { }; + qttools = callPackage ./modules/qttools.nix { }; + qttranslations = callPackage ./modules/qttranslations.nix { }; + qtvirtualkeyboard = callPackage ./modules/qtvirtualkeyboard.nix { }; + qtwayland = callPackage ./modules/qtwayland.nix { }; + qtwebchannel = callPackage ./modules/qtwebchannel.nix { }; + qtwebengine = callPackage ./modules/qtwebengine.nix { + inherit (darwin) bootstrap_cmds cctools xnu; + inherit (darwin.apple_sdk_11_0) libpm libunwind llvmPackages_14; + inherit (darwin.apple_sdk_11_0.libs) sandbox; + inherit (darwin.apple_sdk_11_0.frameworks) + AGL AVFoundation Accelerate Cocoa CoreLocation CoreML ForceFeedback + GameController ImageCaptureCore LocalAuthentication + MediaAccessibility MediaPlayer MetalKit Network OpenDirectory Quartz + ReplayKit SecurityInterface Vision; + xcbuild = buildPackages.xcbuild.override { + productBuildVer = "20A2408"; + }; + }; + qtwebsockets = callPackage ./modules/qtwebsockets.nix { }; + qtwebview = callPackage ./modules/qtwebview.nix { + inherit (darwin.apple_sdk_11_0.frameworks) WebKit; + }; + + wrapQtAppsHook = makeSetupHook + { + name = "wrap-qt6-apps-hook"; + propagatedBuildInputs = [ buildPackages.makeBinaryWrapper ]; + } ./hooks/wrap-qt-apps-hook.sh; + + qmake = makeSetupHook + { + name = "qmake6-hook"; + propagatedBuildInputs = [ self.qtbase.dev ]; + substitutions = { + inherit debug; + fix_qmake_libtool = ./hooks/fix-qmake-libtool.sh; + }; + } ./hooks/qmake-hook.sh; + }; + + # TODO(@Artturin): convert to makeScopeWithSplicing + # simple example of how to do that in 5568a4d25ca406809530420996d57e0876ca1a01 + self = lib.makeScope newScope addPackages; +in +self diff --git a/nixpkgs/pkgs/development/libraries/qt-6/fetch.sh b/nixpkgs/pkgs/development/libraries/qt-6/fetch.sh new file mode 100644 index 000000000000..519f2f887d1f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/fetch.sh @@ -0,0 +1 @@ +WGET_ARGS=( https://download.qt.io/official_releases/qt/6.5/6.5.2/submodules/ -A '*.tar.xz' ) diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qmake-libtool.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qmake-libtool.sh new file mode 100644 index 000000000000..44bf10a0db06 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qmake-libtool.sh @@ -0,0 +1,25 @@ +# Fix libtool libraries generated by qmake. +# qmake started inserting filenames of shared objects instead of the appropriate +# linker flags. fixQmakeLibtool searches for broken libtool libraries and +# replaces the filenames with the linker flags that should have been there. +fixQmakeLibtool() { + if [ -d "$1" ]; then + find "$1" -name '*.la' | while read la; do + set +e + framework_libs=$(grep '^dependency_libs' "$la" | grep -Eo -- '-framework +\w+' | tr '\n' ' ') + set -e + sed -i "$la" \ + -e '/^dependency_libs/ s,\(/[^ ]\+\)/lib\([^/ ]\+\)\.so,-L\1 -l\2,g' \ + -e '/^dependency_libs/ s,-framework \+\w\+,,g' + if [ ! -z "$framework_libs" ]; then + if grep '^inherited_linker_flags=' $la >/dev/null; then + sed -i "$la" -e "s/^\(inherited_linker_flags='[^']*\)/\1 $framework_libs/" + else + echo "inherited_linker_flags='$framework_libs'" >>"$la" + fi + fi + done + fi +} + +fixupOutputHooks+=('fixQmakeLibtool $prefix') diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh new file mode 100644 index 000000000000..d6f8ab32f799 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh @@ -0,0 +1,63 @@ +# fixQtBuiltinPaths +# +# Usage: fixQtBuiltinPaths _dir_ _pattern_ +# +# Fix Qt builtin paths in files matching _pattern_ under _dir_. +# +fixQtBuiltinPaths() { + local dir="$1" + local pattern="$2" + local lib="${!outputLib}" + + if [ -d "$dir" ]; then + find "$dir" -name "$pattern" | while read pr_; do + if grep -q '\$\$\[QT_' "${pr_:?}"; then + echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${pr_:?}'..." + sed -i "${pr_:?}" \ + -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$lib/libexec|g" \ + -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$lib/mkspecs|g" \ + -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$lib/share/doc|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$lib/examples|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$lib/include|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$lib/$qtPluginPrefix|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$lib/tests|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$lib/$qtQmlPrefix|g" + fi + done + elif [ -e "$dir" ]; then + if grep -q '\$\$\[QT_' "${dir:?}"; then + echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${dir:?}'..." + sed -i "${dir:?}" \ + -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$lib/libexec|g" \ + -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$lib/mkspecs|g" \ + -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$lib/share/doc|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$lib/examples|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$lib/include|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$lib/$qtPluginPrefix|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$lib/tests|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$lib/$qtQmlPrefix|g" + fi + else + echo "fixQtBuiltinPaths: Warning: \`$dir' does not exist" + fi +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh new file mode 100644 index 000000000000..4884f45b9930 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh @@ -0,0 +1,27 @@ +# fixQtModulePaths +# +# Usage: fixQtModulePaths _dir_ +# +# Find Qt module definitions in directory _dir_ and patch the module paths. +# +fixQtModulePaths() { + local dir="$1" + local lib="${!outputLib}" + + if [ -d "$dir" ]; then + find "$dir" -name 'qt_*.pri' | while read pr; do + if grep -q '\$\$QT_MODULE_' "${pr:?}"; then + echo "fixQtModulePaths: Fixing module paths in \`${pr:?}'..." + sed -i "${pr:?}" \ + -e "s|\\\$\\\$QT_MODULE_LIB_BASE|$lib/lib|g" \ + -e "s|\\\$\\\$QT_MODULE_HOST_LIB_BASE|$lib/lib|g" \ + -e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$lib/include|g" \ + -e "s|\\\$\\\$QT_MODULE_BIN_BASE|$lib/bin|g" + fi + done + elif [ -e "$dir" ]; then + echo "fixQtModulePaths: Warning: \`$dir' is not a directory" + else + echo "fixQtModulePaths: Warning: \`$dir' does not exist" + fi +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh new file mode 100644 index 000000000000..8c4ce096443f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh @@ -0,0 +1,53 @@ +. @fix_qmake_libtool@ + +qmakeFlags=(${qmakeFlags-}) + +qmakePrePhase() { + qmakeFlags_orig=("${qmakeFlags[@]}") + + # These flags must be added _before_ the flags specified in the derivation. + # TODO: these flags also need a patch which isn't applied + # can we either remove these flags or update the qt5 patch? + # "NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \ + qmakeFlags=( + "PREFIX=$out" + "NIX_OUTPUT_OUT=$out" + "NIX_OUTPUT_DEV=${!outputDev}" + "NIX_OUTPUT_BIN=${!outputBin}" + "NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" + "NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" + ) + + if [ -n "@debug@" ]; then + qmakeFlags+=("CONFIG+=debug") + else + qmakeFlags+=("CONFIG+=release") + fi + + qmakeFlags+=("${qmakeFlags_orig[@]}") +} +prePhases+=" qmakePrePhase" + +qmakeConfigurePhase() { + runHook preConfigure + + echo "QMAKEPATH=$QMAKEPATH" + echo qmake "${qmakeFlags[@]}" + qmake "${qmakeFlags[@]}" + + if ! [[ -v enableParallelBuilding ]]; then + enableParallelBuilding=1 + echo "qmake: enabled parallel building" + fi + + if ! [[ -v enableParallelInstalling ]]; then + enableParallelInstalling=1 + echo "qmake: enabled parallel installing" + fi + + runHook postConfigure +} + +if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then + configurePhase=qmakeConfigurePhase +fi diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh new file mode 100644 index 000000000000..9bc68e6cd3d6 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh @@ -0,0 +1,105 @@ +if [[ -n "${__nix_qtbase-}" ]]; then + # Throw an error if a different version of Qt was already set up. + if [[ "$__nix_qtbase" != "@out@" ]]; then + echo >&2 "Error: detected mismatched Qt dependencies:" + echo >&2 " @out@" + echo >&2 " $__nix_qtbase" + exit 1 + fi +else # Only set up Qt once. + __nix_qtbase="@out@" + + qtPluginPrefix=@qtPluginPrefix@ + qtQmlPrefix=@qtQmlPrefix@ + + . @fix_qt_builtin_paths@ + . @fix_qt_module_paths@ + + # Disable debug symbols if qtbase was built without debugging. + # This stops -dev paths from leaking into other outputs. + if [ -z "@debug@" ]; then + NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-DQT_NO_DEBUG" + fi + + # Integration with CMake: + # Set the CMake build type corresponding to how qtbase was built. + if [ -n "@debug@" ]; then + cmakeBuildType="Debug" + else + cmakeBuildType="Release" + fi + + # Build tools are often confused if QMAKE is unset. + export QMAKE=@out@/bin/qmake + + export QMAKEPATH= + + export QMAKEMODULES= + + declare -Ag qmakePathSeen=() + qmakePathHook() { + # Skip this path if we have seen it before. + # MUST use 'if' because 'qmakePathSeen[$]' may be unset. + if [ -n "${qmakePathSeen[$1]-}" ]; then return; fi + qmakePathSeen[$1]=1 + if [ -d "$1/mkspecs" ]; then + QMAKEMODULES="${QMAKEMODULES}${QMAKEMODULES:+:}/mkspecs" + QMAKEPATH="${QMAKEPATH}${QMAKEPATH:+:}$1" + fi + } + envBuildHostHooks+=(qmakePathHook) + + export QTTOOLSPATH= + + declare -Ag qttoolsPathSeen=() + qtToolsHook() { + # Skip this path if we have seen it before. + # MUST use 'if' because 'qttoolsPathSeen[$]' may be unset. + if [ -n "${qttoolsPathSeen[$1]-}" ]; then return; fi + qttoolsPathSeen[$1]=1 + if [ -d "$1/libexec" ]; then + QTTOOLSPATH="${QTTOOLSPATH}${QTTOOLSPATH:+:}$1/libexec" + fi + } + addEnvHooks "$hostOffset" qtToolsHook + + postPatchMkspecs() { + # Prevent this hook from running multiple times + dontPatchMkspecs=1 + + local lib="${!outputLib}" + local dev="${!outputDev}" + + moveToOutput "mkspecs/modules" "$dev" + + if [ -d "$dev/mkspecs/modules" ]; then + fixQtModulePaths "$dev/mkspecs/modules" + fi + + if [ -d "$lib/mkspecs" ]; then + fixQtBuiltinPaths "$lib/mkspecs" '*.pr?' + fi + + if [ -d "$lib/lib" ]; then + fixQtBuiltinPaths "$lib/lib" '*.pr?' + fi + } + if [ -z "${dontPatchMkspecs-}" ]; then + postPhases="${postPhases-}${postPhases:+ }postPatchMkspecs" + fi + + qtPreHook() { + # Check that wrapQtAppsHook is used, or it is explicitly disabled. + if [[ -z "$__nix_wrapQtAppsHook" && -z "$dontWrapQtApps" ]]; then + echo >&2 "Error: wrapQtAppsHook is not used, and dontWrapQtApps is not set." + exit 1 + fi + } + prePhases+=" qtPreHook" + + addQtModulePrefix() { + addToSearchPath QT_ADDITIONAL_PACKAGES_PREFIX_PATH $1 + } + addEnvHooks "$hostOffset" addQtModulePrefix + +fi diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh new file mode 100644 index 000000000000..8b135a7d7492 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh @@ -0,0 +1,99 @@ +if [[ -z "${__nix_wrapQtAppsHook-}" ]]; then + __nix_wrapQtAppsHook=1 # Don't run this hook more than once. + + # Inherit arguments given in mkDerivation + qtWrapperArgs=(${qtWrapperArgs-}) + + qtHostPathSeen=() + + qtUnseenHostPath() { + for pkg in "${qtHostPathSeen[@]}"; do + if [ "${pkg:?}" == "$1" ]; then + return 1 + fi + done + + qtHostPathSeen+=("$1") + return 0 + } + + qtHostPathHook() { + qtUnseenHostPath "$1" || return 0 + + if ! [ -v qtPluginPrefix ]; then + echo "wrapQtAppsHook qtHostPathHook: qtPluginPrefix is unset. hint: add qt6.qtbase to buildInputs" + fi + + local pluginDir="$1/${qtPluginPrefix:?}" + if [ -d "$pluginDir" ]; then + qtWrapperArgs+=(--prefix QT_PLUGIN_PATH : "$pluginDir") + fi + + local qmlDir="$1/${qtQmlPrefix:?}" + if [ -d "$qmlDir" ]; then + qtWrapperArgs+=(--prefix QML2_IMPORT_PATH : "$qmlDir") + fi + } + addEnvHooks "$targetOffset" qtHostPathHook + + makeQtWrapper() { + local original="$1" + local wrapper="$2" + shift 2 + makeWrapper "$original" "$wrapper" "${qtWrapperArgs[@]}" "$@" + } + + wrapQtApp() { + local program="$1" + shift 1 + wrapProgram "$program" "${qtWrapperArgs[@]}" "$@" + } + + qtOwnPathsHook() { + local xdgDataDir="${!outputBin}/share" + if [ -d "$xdgDataDir" ]; then + qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "$xdgDataDir") + fi + + local xdgConfigDir="${!outputBin}/etc/xdg" + if [ -d "$xdgConfigDir" ]; then + qtWrapperArgs+=(--prefix XDG_CONFIG_DIRS : "$xdgConfigDir") + fi + + qtHostPathHook "${!outputBin}" + } + + preFixupPhases+=" qtOwnPathsHook" + + # Note: $qtWrapperArgs still gets defined even if ${dontWrapQtApps-} is set. + wrapQtAppsHook() { + # skip this hook when requested + [ -z "${dontWrapQtApps-}" ] || return 0 + + # guard against running multiple times (e.g. due to propagation) + [ -z "$wrapQtAppsHookHasRun" ] || return 0 + wrapQtAppsHookHasRun=1 + + local targetDirs=("$prefix/bin" "$prefix/sbin" "$prefix/libexec" "$prefix/Applications" "$prefix/"*.app) + echo "wrapping Qt applications in ${targetDirs[@]}" + + for targetDir in "${targetDirs[@]}"; do + [ -d "$targetDir" ] || continue + + find "$targetDir" ! -type d -executable -print0 | while IFS= read -r -d '' file; do + if [ -f "$file" ]; then + echo "wrapping $file" + wrapQtApp "$file" + elif [ -h "$file" ]; then + target="$(readlink -e "$file")" + echo "wrapping $file -> $target" + rm "$file" + makeQtWrapper "$target" "$file" + fi + done + done + } + + fixupOutputHooks+=(wrapQtAppsHook) + +fi diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qt3d.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qt3d.nix new file mode 100644 index 000000000000..2f3a45f67d85 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qt3d.nix @@ -0,0 +1,12 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtmultimedia +, assimp +}: + +qtModule { + pname = "qt3d"; + qtInputs = [ qtbase qtdeclarative qtmultimedia ]; + propagatedBuildInputs = [ assimp ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qt5compat.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qt5compat.nix new file mode 100644 index 000000000000..f3a62b7b5ec9 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qt5compat.nix @@ -0,0 +1,13 @@ +{ qtModule +, qtbase +, qtdeclarative +, libiconv +, icu +, openssl +}: + +qtModule { + pname = "qt5compat"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ libiconv icu openssl ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtbase.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtbase.nix new file mode 100644 index 000000000000..4a4ebb320757 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -0,0 +1,264 @@ +{ stdenv +, lib +, src +, patches ? [ ] +, version +, coreutils +, bison +, flex +, gdb +, gperf +, lndir +, perl +, pkg-config +, python3 +, which +, cmake +, ninja +, ccache +, xmlstarlet +, libproxy +, xorg +, zstd +, double-conversion +, util-linux +, systemd +, systemdSupport ? stdenv.isLinux +, libb2 +, md4c +, mtdev +, lksctp-tools +, libselinux +, libsepol +, vulkan-headers +, vulkan-loader +, libthai +, libdrm +, libdatrie +, lttng-ust +, libepoxy +, libiconv +, dbus +, fontconfig +, freetype +, glib +, harfbuzz +, icu +, libX11 +, libXcomposite +, libXext +, libXi +, libXrender +, libinput +, libjpeg +, libpng +, libxcb +, libxkbcommon +, libxml2 +, libxslt +, openssl +, pcre +, pcre2 +, sqlite +, udev +, xcbutil +, xcbutilimage +, xcbutilkeysyms +, xcbutilrenderutil +, xcbutilwm +, zlib +, at-spi2-core +, unixODBC +, unixODBCDrivers + # darwin +, moveBuildTree +, xcbuild +, AGL +, AVFoundation +, AppKit +, Contacts +, CoreBluetooth +, EventKit +, GSS +, MetalKit + # optional dependencies +, cups +, libmysqlclient +, postgresql +, withGtk3 ? false +, dconf +, gtk3 + # options +, libGLSupported ? stdenv.isLinux +, libGL +, debug ? false +, developerBuild ? false +}: + +let + debugSymbols = debug || developerBuild; +in +stdenv.mkDerivation rec { + pname = "qtbase"; + + inherit src version; + + debug = debugSymbols; + + propagatedBuildInputs = [ + libxml2 + libxslt + openssl + sqlite + zlib + unixODBC + # Text rendering + harfbuzz + icu + # Image formats + libjpeg + libpng + pcre2 + pcre + libproxy + zstd + double-conversion + libb2 + md4c + dbus + glib + # unixODBC drivers + unixODBCDrivers.psql + unixODBCDrivers.sqlite + unixODBCDrivers.mariadb + ] ++ lib.optionals systemdSupport [ + systemd + ] ++ lib.optionals stdenv.isLinux [ + util-linux + mtdev + lksctp-tools + libselinux + libsepol + lttng-ust + vulkan-headers + vulkan-loader + libthai + libdrm + libdatrie + udev + # Text rendering + fontconfig + freetype + # X11 libs + libX11 + libXcomposite + libXext + libXi + libXrender + libxcb + libxkbcommon + xcbutil + xcbutilimage + xcbutilkeysyms + xcbutilrenderutil + xcbutilwm + xorg.libXdmcp + xorg.libXtst + xorg.xcbutilcursor + libepoxy + ] ++ lib.optionals stdenv.isDarwin [ + AGL + AVFoundation + AppKit + Contacts + CoreBluetooth + EventKit + GSS + MetalKit + ] ++ lib.optional libGLSupported libGL; + + buildInputs = [ + at-spi2-core + ] ++ lib.optionals (!stdenv.isDarwin) [ + libinput + ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + AppKit + CoreBluetooth + ] + ++ lib.optional withGtk3 gtk3 + ++ lib.optional developerBuild gdb + ++ lib.optional (cups != null) cups + ++ lib.optional (libmysqlclient != null) libmysqlclient + ++ lib.optional (postgresql != null) postgresql; + + nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ] + ++ lib.optionals stdenv.isDarwin [ moveBuildTree ]; + + propagatedNativeBuildInputs = [ lndir ]; + + strictDeps = true; + + enableParallelBuilding = true; + + inherit patches; + + # https://bugreports.qt.io/browse/QTBUG-97568 + postPatch = '' + substituteInPlace src/corelib/CMakeLists.txt --replace /bin/ls ${coreutils}/bin/ls + '' + lib.optionalString stdenv.isDarwin '' + substituteInPlace cmake/QtAutoDetect.cmake --replace "/usr/bin/xcrun" "${xcbuild}/bin/xcrun" + ''; + + fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh; + fix_qt_module_paths = ../hooks/fix-qt-module-paths.sh; + preHook = '' + . "$fix_qt_builtin_paths" + . "$fix_qt_module_paths" + ''; + + qtPluginPrefix = "lib/qt-6/plugins"; + qtQmlPrefix = "lib/qt-6/qml"; + + cmakeFlags = [ + "-DQT_EMBED_TOOLCHAIN_COMPILER=OFF" + "-DINSTALL_PLUGINSDIR=${qtPluginPrefix}" + "-DINSTALL_QMLDIR=${qtQmlPrefix}" + "-DQT_FEATURE_libproxy=ON" + "-DQT_FEATURE_system_sqlite=ON" + "-DQT_FEATURE_openssl_linked=ON" + ] ++ lib.optionals (!stdenv.isDarwin) [ + "-DQT_FEATURE_sctp=ON" + "-DQT_FEATURE_journald=${if systemdSupport then "ON" else "OFF"}" + "-DQT_FEATURE_vulkan=ON" + ] ++ lib.optionals stdenv.isDarwin [ + # error: 'path' is unavailable: introduced in macOS 10.15 + "-DQT_FEATURE_cxx17_filesystem=OFF" + ]; + + NIX_LDFLAGS = toString (lib.optionals stdenv.isDarwin [ + # Undefined symbols for architecture arm64: "___gss_c_nt_hostbased_service_oid_desc" + "-framework GSS" + ]); + + outputs = [ "out" "dev" ]; + + moveToDev = false; + + postFixup = '' + moveToOutput "mkspecs/modules" "$dev" + fixQtModulePaths "$dev/mkspecs/modules" + fixQtBuiltinPaths "$out" '*.pr?' + ''; + + dontStrip = debugSymbols; + + setupHook = ../hooks/qtbase-setup-hook.sh; + + meta = with lib; { + homepage = "https://www.qt.io/"; + description = "A cross-platform application framework for C++"; + license = with licenses; [ fdl13Plus gpl2Plus lgpl21Plus lgpl3Plus ]; + maintainers = with maintainers; [ milahu nickcao LunNova ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtcharts.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtcharts.nix new file mode 100644 index 000000000000..917697c38623 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtcharts.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtcharts"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix new file mode 100644 index 000000000000..976fd626f5d1 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix @@ -0,0 +1,18 @@ +{ qtModule +, lib +, stdenv +, qtbase +, qtdeclarative +, bluez +, pkg-config +, IOBluetooth +, PCSC +}: + +qtModule { + pname = "qtconnectivity"; + qtInputs = [ qtbase qtdeclarative ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = lib.optionals stdenv.isLinux [ bluez ]; + propagatedBuildInputs = lib.optionals stdenv.isDarwin [ IOBluetooth PCSC ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix new file mode 100644 index 000000000000..1d0f9711e588 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtdatavis3d"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix new file mode 100644 index 000000000000..d78a886109af --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix @@ -0,0 +1,17 @@ +{ qtModule +, qtbase +, qtlanguageserver +, qtshadertools +, openssl +, python3 +}: + +qtModule { + pname = "qtdeclarative"; + qtInputs = [ qtbase qtlanguageserver qtshadertools ]; + propagatedBuildInputs = [ openssl python3 ]; + patches = [ + # prevent headaches from stale qmlcache data + ../patches/qtdeclarative-default-disable-qmlcache.patch + ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdoc.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdoc.nix new file mode 100644 index 000000000000..3bbe39e5ee20 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdoc.nix @@ -0,0 +1,26 @@ +{ qtModule +, qtdeclarative +, qtbase +, qttools +}: + +qtModule { + pname = "qtdoc"; + # avoid fix-qt-builtin-paths hook substitute QT_INSTALL_DOCS to qtdoc's path + postPatch = '' + for file in $(grep -rl '$QT_INSTALL_DOCS'); do + substituteInPlace $file \ + --replace '$QT_INSTALL_DOCS' "${qtbase}/share/doc" + done + ''; + nativeBuildInputs = [ (qttools.override { withClang = true; }) ]; + qtInputs = [ qtdeclarative ]; + cmakeFlags = [ + "-DCMAKE_MESSAGE_LOG_LEVEL=STATUS" + ]; + dontUseNinjaBuild = true; + buildFlags = [ "docs" ]; + dontUseNinjaInstall = true; + installFlags = [ "install_docs" ]; + outputs = [ "out" ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgrpc.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgrpc.nix new file mode 100644 index 000000000000..f2623dd3d566 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgrpc.nix @@ -0,0 +1,12 @@ +{ qtModule +, qtbase +, qtdeclarative +, protobuf +, grpc +}: + +qtModule { + pname = "qtgrpc"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ protobuf grpc ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qthttpserver.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qthttpserver.nix new file mode 100644 index 000000000000..cd2c9d2a803c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qthttpserver.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtwebsockets +}: + +qtModule { + pname = "qthttpserver"; + qtInputs = [ qtbase qtwebsockets ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtimageformats.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtimageformats.nix new file mode 100644 index 000000000000..b28adbc7295b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtimageformats.nix @@ -0,0 +1,13 @@ +{ qtModule +, qtbase +, libwebp +, jasper +, libmng +, libtiff +}: + +qtModule { + pname = "qtimageformats"; + qtInputs = [ qtbase ]; + buildInputs = [ libwebp jasper libmng libtiff ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix new file mode 100644 index 000000000000..07115d6755a5 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix @@ -0,0 +1,11 @@ +{ qtModule +, qtbase +}: + +qtModule { + pname = "qtlanguageserver"; + qtInputs = [ qtbase ]; + + # Doesn't have version set + dontCheckQtModuleVersion = true; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlocation.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlocation.nix new file mode 100644 index 000000000000..751a2e0915a3 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlocation.nix @@ -0,0 +1,10 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtpositioning +}: + +qtModule { + pname = "qtlocation"; + qtInputs = [ qtbase qtdeclarative qtpositioning ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlottie.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlottie.nix new file mode 100644 index 000000000000..d94c289953d0 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlottie.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtlottie"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmqtt.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmqtt.nix new file mode 100644 index 000000000000..43c6dade7de3 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmqtt.nix @@ -0,0 +1,16 @@ +{ qtModule +, fetchFromGitHub +, qtbase +}: + +qtModule rec { + pname = "qtmqtt"; + version = "6.5.2"; + src = fetchFromGitHub { + owner = "qt"; + repo = "qtmqtt"; + rev = "v${version}"; + hash = "sha256-yyerVzz+nGT5kjNo24zYqZcJmrE50KCp38s3+samjd0="; + }; + qtInputs = [ qtbase ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix new file mode 100644 index 000000000000..cb012ee8bef7 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix @@ -0,0 +1,37 @@ +{ qtModule +, lib +, stdenv +, qtbase +, qtdeclarative +, qtshadertools +, qtsvg +, pkg-config +, alsa-lib +, gstreamer +, gst-plugins-base +, gst-plugins-good +, gst-libav +, gst-vaapi +, libpulseaudio +, wayland +, elfutils +, libunwind +, orc +, VideoToolbox +}: + +qtModule { + pname = "qtmultimedia"; + qtInputs = [ qtbase qtdeclarative qtsvg qtshadertools ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ libunwind orc ] + ++ lib.optionals stdenv.isLinux [ libpulseaudio elfutils alsa-lib wayland ]; + propagatedBuildInputs = + lib.optionals stdenv.isLinux [ gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi ] + ++ lib.optionals stdenv.isDarwin [ VideoToolbox ]; + + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin + "-include AudioToolbox/AudioToolbox.h"; + NIX_LDFLAGS = lib.optionalString stdenv.isDarwin + "-framework AudioToolbox"; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix new file mode 100644 index 000000000000..148ed890fc9e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase }: + +qtModule { + pname = "qtnetworkauth"; + qtInputs = [ qtbase ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtpositioning.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtpositioning.nix new file mode 100644 index 000000000000..99b06bbf2536 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtpositioning.nix @@ -0,0 +1,14 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtserialport +, pkg-config +, openssl +}: + +qtModule { + pname = "qtpositioning"; + qtInputs = [ qtbase qtdeclarative qtserialport ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ openssl ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3d.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3d.nix new file mode 100644 index 000000000000..d19a8e725a16 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3d.nix @@ -0,0 +1,11 @@ +{ qtModule +, qtbase +, qtdeclarative +, openssl +}: + +qtModule { + pname = "qtquick3d"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ openssl ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix new file mode 100644 index 000000000000..34c17fc03453 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix @@ -0,0 +1,13 @@ +{ qtModule +, lib +, stdenv +, qtbase +, qtquick3d +}: + +qtModule { + pname = "qtquick3dphysics"; + qtInputs = [ qtbase qtquick3d ]; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) + "-faligned-allocation"; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix new file mode 100644 index 000000000000..c86fc92218f3 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtquick3d +}: + +qtModule { + pname = "qtquickeffectmaker"; + qtInputs = [ qtbase qtquick3d ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix new file mode 100644 index 000000000000..7458515dba26 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtquicktimeline"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix new file mode 100644 index 000000000000..888ec33b461a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtremoteobjects"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtscxml.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtscxml.nix new file mode 100644 index 000000000000..c49064c5e579 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtscxml.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase, qtdeclarative }: + +qtModule { + pname = "qtscxml"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsensors.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsensors.nix new file mode 100644 index 000000000000..73ddc394cc46 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsensors.nix @@ -0,0 +1,10 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtsvg +}: + +qtModule { + pname = "qtsensors"; + qtInputs = [ qtbase qtdeclarative qtsvg ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialbus.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialbus.nix new file mode 100644 index 000000000000..4fd6d7cb83c3 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialbus.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase, qtserialport }: + +qtModule { + pname = "qtserialbus"; + qtInputs = [ qtbase qtserialport ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialport.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialport.nix new file mode 100644 index 000000000000..2d23ae17cc5f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialport.nix @@ -0,0 +1,14 @@ +{ qtModule +, stdenv +, lib +, qtbase +, udev +, pkg-config +}: + +qtModule { + pname = "qtserialport"; + qtInputs = [ qtbase ]; + nativeBuildInputs = [ pkg-config ]; + propagatedBuildInputs = lib.optionals stdenv.isLinux [ udev ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtshadertools.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtshadertools.nix new file mode 100644 index 000000000000..47102896f7e6 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtshadertools.nix @@ -0,0 +1,8 @@ +{ qtModule +, qtbase +}: + +qtModule { + pname = "qtshadertools"; + qtInputs = [ qtbase ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtspeech.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtspeech.nix new file mode 100644 index 000000000000..ec713bc98c68 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtspeech.nix @@ -0,0 +1,19 @@ +{ qtModule +, lib +, stdenv +, qtbase +, qtmultimedia +, pkg-config +, flite +, alsa-lib +, speechd +, Cocoa +}: + +qtModule { + pname = "qtspeech"; + qtInputs = [ qtbase qtmultimedia ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = lib.optionals stdenv.isLinux [ flite alsa-lib speechd ]; + propagatedBuildInputs = lib.optionals stdenv.isDarwin [ Cocoa ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsvg.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsvg.nix new file mode 100644 index 000000000000..9031f8805ac9 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsvg.nix @@ -0,0 +1,15 @@ +{ qtModule +, qtbase +, libwebp +, jasper +, libmng +, zlib +, pkg-config +}: + +qtModule { + pname = "qtsvg"; + qtInputs = [ qtbase ]; + buildInputs = [ libwebp jasper libmng zlib ]; + nativeBuildInputs = [ pkg-config ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qttools.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qttools.nix new file mode 100644 index 000000000000..adca87550cca --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qttools.nix @@ -0,0 +1,30 @@ +{ qtModule +, stdenv +, lib +, qtbase +, qtdeclarative +, cups +, llvmPackages +# clang-based c++ parser for qdoc and lupdate +, withClang ? false +}: + +qtModule { + pname = "qttools"; + buildInputs = lib.optionals withClang [ + llvmPackages.libclang + llvmPackages.llvm + ]; + qtInputs = [ qtbase qtdeclarative ]; + propagatedBuildInputs = lib.optionals stdenv.isDarwin [ cups ]; + patches = [ + ../patches/qttools-paths.patch + ]; + env.NIX_CFLAGS_COMPILE = toString [ + "-DNIX_OUTPUT_OUT=\"${placeholder "out"}\"" + ]; + postInstall = '' + mkdir -p "$dev" + ln -s "$out/bin" "$dev/bin" + ''; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qttranslations.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qttranslations.nix new file mode 100644 index 000000000000..4795cd9e1bfe --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qttranslations.nix @@ -0,0 +1,8 @@ +{ qtModule +, qttools +}: + +qtModule { + pname = "qttranslations"; + qtInputs = [ qttools ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix new file mode 100644 index 000000000000..9c53f11e1a3c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix @@ -0,0 +1,14 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtsvg +, hunspell +, pkg-config +}: + +qtModule { + pname = "qtvirtualkeyboard"; + qtInputs = [ qtbase qtdeclarative qtsvg ]; + propagatedBuildInputs = [ hunspell ]; + nativeBuildInputs = [ pkg-config ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwayland.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwayland.nix new file mode 100644 index 000000000000..e28cdb438e5e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwayland.nix @@ -0,0 +1,15 @@ +{ qtModule +, qtbase +, qtquick3d +, qtdeclarative +, wayland +, pkg-config +, libdrm +}: + +qtModule { + pname = "qtwayland"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ wayland libdrm ]; + nativeBuildInputs = [ pkg-config ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix new file mode 100644 index 000000000000..49b959c5dea7 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix @@ -0,0 +1,12 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtwebsockets +, openssl +}: + +qtModule { + pname = "qtwebchannel"; + qtInputs = [ qtbase qtdeclarative qtwebsockets ]; + buildInputs = [ openssl ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebengine.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebengine.nix new file mode 100644 index 000000000000..909616d953de --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebengine.nix @@ -0,0 +1,316 @@ +{ qtModule +, qtdeclarative +, qtwebchannel +, qtpositioning +, qtwebsockets +, buildPackages +, bison +, coreutils +, flex +, git +, gperf +, ninja +, pkg-config +, python3 +, which +, nodejs +, qtbase +, perl +, xorg +, libXcursor +, libXScrnSaver +, libXrandr +, libXtst +, libxshmfence +, libXi +, fontconfig +, freetype +, harfbuzz +, icu +, dbus +, libdrm +, zlib +, minizip +, libjpeg +, libpng +, libtiff +, libwebp +, libopus +, jsoncpp +, protobuf +, libvpx +, srtp +, snappy +, nss +, libevent +, openssl +, alsa-lib +, pulseaudio +, libcap +, pciutils +, systemd +, pipewire +, gn +, runCommand +, writeScriptBin +, ffmpeg_4 +, lib +, stdenv +, glib +, libxml2 +, libxslt +, lcms2 +, re2 +, libkrb5 +, mesa +, xkeyboard_config +, enableProprietaryCodecs ? true + # darwin +, llvmPackages_14 +, bootstrap_cmds +, cctools +, xcbuild +, AGL +, AVFoundation +, Accelerate +, Cocoa +, CoreLocation +, CoreML +, ForceFeedback +, GameController +, ImageCaptureCore +, LocalAuthentication +, MediaAccessibility +, MediaPlayer +, MetalKit +, Network +, OpenDirectory +, Quartz +, ReplayKit +, SecurityInterface +, Vision +, openbsm +, libunwind +, cups +, libpm +, sandbox +, xnu +}: + +qtModule { + pname = "qtwebengine"; + qtInputs = [ qtdeclarative qtwebchannel qtwebsockets qtpositioning ]; + nativeBuildInputs = [ + bison + coreutils + flex + git + gperf + ninja + pkg-config + (python3.withPackages (ps: with ps; [ html5lib ])) + which + gn + nodejs + ] ++ lib.optionals stdenv.isDarwin [ + llvmPackages_14.clang + bootstrap_cmds + cctools + xcbuild + ]; + doCheck = true; + outputs = [ "out" "dev" ]; + + dontUseGnConfigure = true; + + # ninja builds some components with -Wno-format, + # which cannot be set at the same time as -Wformat-security + hardeningDisable = [ "format" ]; + + patches = [ + # removes macOS 12+ dependencies + ../patches/qtwebengine-darwin-no-low-latency-flag.patch + ../patches/qtwebengine-darwin-no-copy-certificate-chain.patch + # Don't assume /usr/share/X11, and also respect the XKB_CONFIG_ROOT + # environment variable, since NixOS relies on it working. + # See https://github.com/NixOS/nixpkgs/issues/226484 for more context. + ../patches/qtwebengine-xkb-includes.patch + ]; + + postPatch = '' + # Patch Chromium build tools + ( + cd src/3rdparty/chromium; + + # Manually fix unsupported shebangs + substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \ + --replace "/usr/bin/env -S make -f" "/usr/bin/make -f" || true + substituteInPlace third_party/webgpu-cts/src/tools/run_deno \ + --replace "/usr/bin/env -S deno" "/usr/bin/deno" || true + patchShebangs . + ) + + substituteInPlace cmake/Functions.cmake \ + --replace "/bin/bash" "${buildPackages.bash}/bin/bash" + + # Patch library paths in sources + substituteInPlace src/core/web_engine_library_info.cpp \ + --replace "QLibraryInfo::path(QLibraryInfo::DataPath)" "\"$out\"" \ + --replace "QLibraryInfo::path(QLibraryInfo::TranslationsPath)" "\"$out/translations\"" \ + --replace "QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)" "\"$out/libexec\"" + '' + + lib.optionalString stdenv.isLinux '' + sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \ + src/3rdparty/chromium/device/udev_linux/udev?_loader.cc + + sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ + src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc + '' + + lib.optionalString stdenv.isDarwin '' + substituteInPlace configure.cmake \ + --replace "AppleClang" "Clang" + substituteInPlace cmake/Functions.cmake \ + --replace "/usr/bin/xcrun" "${xcbuild}/bin/xcrun" + substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn \ + --replace "\$sysroot/usr" "${xnu}" + ''; + + cmakeFlags = [ + "-DQT_FEATURE_qtpdf_build=ON" + "-DQT_FEATURE_qtpdf_widgets_build=ON" + "-DQT_FEATURE_qtpdf_quick_build=ON" + "-DQT_FEATURE_pdf_v8=ON" + "-DQT_FEATURE_pdf_xfa=ON" + "-DQT_FEATURE_pdf_xfa_bmp=ON" + "-DQT_FEATURE_pdf_xfa_gif=ON" + "-DQT_FEATURE_pdf_xfa_png=ON" + "-DQT_FEATURE_pdf_xfa_tiff=ON" + "-DQT_FEATURE_webengine_system_icu=ON" + "-DQT_FEATURE_webengine_system_libevent=ON" + "-DQT_FEATURE_webengine_system_libxml=ON" + "-DQT_FEATURE_webengine_system_ffmpeg=ON" + # android only. https://bugreports.qt.io/browse/QTBUG-100293 + # "-DQT_FEATURE_webengine_native_spellchecker=ON" + "-DQT_FEATURE_webengine_sanitizer=ON" + "-DQT_FEATURE_webengine_kerberos=ON" + ] ++ lib.optionals stdenv.isLinux [ + "-DQT_FEATURE_webengine_webrtc_pipewire=ON" + ] ++ lib.optionals enableProprietaryCodecs [ + "-DQT_FEATURE_webengine_proprietary_codecs=ON" + ] ++ lib.optionals stdenv.isDarwin [ + "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.targetPlatform.darwinSdkVersion}" + ]; + + propagatedBuildInputs = [ + # Image formats + libjpeg + libpng + libtiff + libwebp + + # Video formats + srtp + libvpx + + # Audio formats + libopus + + # Text rendering + harfbuzz + icu + + openssl + glib + libxml2 + libxslt + lcms2 + re2 + + libevent + ffmpeg_4 + ] ++ lib.optionals stdenv.isLinux [ + dbus + zlib + minizip + snappy + nss + protobuf + jsoncpp + + # Audio formats + alsa-lib + pulseaudio + + # Text rendering + fontconfig + freetype + + libcap + pciutils + + # X11 libs + xorg.xrandr + libXScrnSaver + libXcursor + libXrandr + xorg.libpciaccess + libXtst + xorg.libXcomposite + xorg.libXdamage + libdrm + xorg.libxkbfile + libxshmfence + libXi + xorg.libXext + + # Pipewire + pipewire + + libkrb5 + mesa + ] ++ lib.optionals stdenv.isDarwin [ + AGL + AVFoundation + Accelerate + Cocoa + CoreLocation + CoreML + ForceFeedback + GameController + ImageCaptureCore + LocalAuthentication + MediaAccessibility + MediaPlayer + MetalKit + Network + OpenDirectory + Quartz + ReplayKit + SecurityInterface + Vision + + openbsm + libunwind + ]; + + buildInputs = [ + cups + ] ++ lib.optionals stdenv.isDarwin [ + libpm + sandbox + ]; + + requiredSystemFeatures = [ "big-parallel" ]; + + preConfigure = '' + export NINJAFLAGS="-j$NIX_BUILD_CORES" + ''; + + meta = with lib; { + description = "A web engine based on the Chromium web browser"; + platforms = platforms.unix; + # This build takes a long time; particularly on slow architectures + # 1 hour on 32x3.6GHz -> maybe 12 hours on 4x2.4GHz + timeout = 24 * 3600; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix new file mode 100644 index 000000000000..f81cd64596eb --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix @@ -0,0 +1,11 @@ +{ qtModule +, qtbase +, qtdeclarative +, openssl +}: + +qtModule { + pname = "qtwebsockets"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ openssl ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebview.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebview.nix new file mode 100644 index 000000000000..1e7c42397792 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebview.nix @@ -0,0 +1,14 @@ +{ lib +, stdenv +, qtModule +, qtdeclarative +, qtwebengine +, WebKit +}: + +qtModule { + pname = "qtwebview"; + qtInputs = [ qtdeclarative ] + ++ lib.optionals (!stdenv.isDarwin) [ qtwebengine ]; + propagatedBuildInputs = lib.optionals stdenv.isDarwin [ WebKit ]; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch new file mode 100644 index 000000000000..6724e0d28adb --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch @@ -0,0 +1,50 @@ +From 69d9faa9e4420d3cb0d1466c1b95ceadb2cd75f3 Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Thu, 13 Apr 2023 23:42:29 +0800 +Subject: [PATCH 1/6] qtbase: qmake: always use libname instead of absolute + path in qmake files + +In generated qmake files, absolute paths to qt libraries are embedded +and then used in linker flags. However as the libraries can be provided +by qt modules other than the one currently being built, the ebedded +paths can be incorrect. +--- + cmake/QtFinishPrlFile.cmake | 7 ++++--- + cmake/QtGenerateLibHelpers.cmake | 3 --- + 2 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/cmake/QtFinishPrlFile.cmake b/cmake/QtFinishPrlFile.cmake +index 1cf9377e6ce..ac4428bd7a1 100644 +--- a/cmake/QtFinishPrlFile.cmake ++++ b/cmake/QtFinishPrlFile.cmake +@@ -64,9 +64,10 @@ foreach(line ${lines}) + endif() + list(APPEND adjusted_libs "-framework" "${CMAKE_MATCH_1}") + else() +- # Not a framework, transform the Qt module into relocatable relative path. +- qt_strip_library_version_suffix(relative_lib "${relative_lib}") +- list(APPEND adjusted_libs "$$[QT_INSTALL_LIBS]/${relative_lib}") ++ # Not a framework, extract the library name and prepend an -l to make ++ # it relocatable. ++ qt_transform_absolute_library_paths_to_link_flags(lib_with_link_flag "${lib}") ++ list(APPEND adjusted_libs "${lib_with_link_flag}") + endif() + endif() + else() +diff --git a/cmake/QtGenerateLibHelpers.cmake b/cmake/QtGenerateLibHelpers.cmake +index 3ffe354fd8d..441332d4582 100644 +--- a/cmake/QtGenerateLibHelpers.cmake ++++ b/cmake/QtGenerateLibHelpers.cmake +@@ -73,9 +73,6 @@ function(qt_transform_absolute_library_paths_to_link_flags out_var library_path_ + string(TOLOWER "${dir}" dir_lower) + # If library_path isn't in default link directories, we should add it to link flags. + list(FIND IMPLICIT_LINK_DIRECTORIES_LOWER "${dir_lower}" index) +- if(${index} EQUAL -1) +- list(APPEND out_list "-L\"${dir}\"") +- endif() + list(APPEND out_list "${lib_name_with_link_flag}") + else() + list(APPEND out_list "${library_path}") +-- +2.39.2 + diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch new file mode 100644 index 000000000000..ee4af1730eb8 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch @@ -0,0 +1,490 @@ +From 41e32c41f781261726722628122c924abb532575 Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Fri, 14 Apr 2023 21:43:04 +0800 +Subject: [PATCH 2/6] qtbase: qmake: fix mkspecs for darwin + +--- + mkspecs/common/mac.conf | 2 +- + mkspecs/features/mac/default_post.prf | 263 -------------------------- + mkspecs/features/mac/default_pre.prf | 58 ------ + mkspecs/features/mac/sdk.mk | 27 --- + mkspecs/features/mac/sdk.prf | 61 ------ + mkspecs/features/mac/toolchain.prf | 5 - + 6 files changed, 1 insertion(+), 415 deletions(-) + +diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf +index 61bea952b22..9909dae7260 100644 +--- a/mkspecs/common/mac.conf ++++ b/mkspecs/common/mac.conf +@@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL = \ + + QMAKE_FIX_RPATH = install_name_tool -id + +-QMAKE_LFLAGS_RPATH = -Wl,-rpath, ++QMAKE_LFLAGS_RPATH = + QMAKE_LFLAGS_GCSECTIONS = -Wl,-dead_strip + + QMAKE_LFLAGS_REL_RPATH = +diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf +index 4acf3b19d5c..aadfce875e2 100644 +--- a/mkspecs/features/mac/default_post.prf ++++ b/mkspecs/features/mac/default_post.prf +@@ -1,9 +1,5 @@ + load(default_post) + +-# Recompute SDK version in case the user set it explicitly +-sdk_version = $$QMAKE_MAC_SDK_VERSION +-QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) +- + contains(TEMPLATE, .*app) { + !macx-xcode:if(isEmpty(BUILDS)|build_pass) { + # Detect changes to the platform SDK +@@ -15,37 +11,6 @@ contains(TEMPLATE, .*app) { + + QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk) + } +- +- # Detect incompatible SDK versions +- +- isEmpty(QT_MAC_SDK_VERSION_MIN): \ +- QT_MAC_SDK_VERSION_MIN = $$QT_MAC_SDK_VERSION +- +- !versionAtLeast(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION_MIN): \ +- warning("Qt requires at least version $$QT_MAC_SDK_VERSION_MIN of the platform SDK," \ +- "you're building against version $${QMAKE_MAC_SDK_VERSION}. Please upgrade.") +- +- !isEmpty(QT_MAC_SDK_VERSION_MAX) { +- # For Qt developers only +- !isEmpty($$list($$(QT_MAC_SDK_NO_VERSION_CHECK))): \ +- CONFIG += sdk_no_version_check +- +- QMAKE_MAC_SDK_MAJOR_VERSION = $$replace(QMAKE_MAC_SDK_VERSION, "(\\d+)(\\.\\d+)(\\.\\d+)?", \\1) +- +- !sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_VERSION, $$QT_MAC_SDK_VERSION_MAX) { +- warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_MAX"\ +- "of the platform SDK, you're using $${QMAKE_MAC_SDK_MAJOR_VERSION}.") +- warning("This is an unsupported configuration. You may experience build issues," \ +- "and by using") +- warning("the $$QMAKE_MAC_SDK_VERSION SDK you are opting in to new features" \ +- "that Qt has not been prepared for.") +- +- warning("Please downgrade the SDK you use to build your app to version" \ +- "$$QT_MAC_SDK_VERSION_MAX, or configure") +- warning("with CONFIG+=sdk_no_version_check when running qmake" \ +- "to silence this warning.") +- } +- } + } + + !no_objective_c:CONFIG += objective_c +@@ -73,234 +38,6 @@ qt { + } + } + +-# Add the same default rpaths as Xcode does for new projects. +-# This is especially important for iOS/tvOS/watchOS where no other option is possible. +-!no_default_rpath { +- uikit: QMAKE_RPATHDIR += @executable_path/Frameworks +- else: QMAKE_RPATHDIR += @executable_path/../Frameworks +- equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks +-} +- +-# Don't pass -headerpad_max_install_names when using Bitcode. +-# In that case the linker emits a warning stating that the flag is ignored when +-# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962). +-# Using this flag is also unnecessary in practice on UIKit platforms since they +-# are sandboxed, and only UIKit platforms support bitcode to begin with. +-!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD +- +-app_extension_api_only { +- QMAKE_CFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +- QMAKE_CXXFLAGS_PRECOMPILE += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +- QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +-} +- +-macos { +- !isEmpty(QMAKE_APPLE_DEVICE_ARCHS) { +- # If the user has requested a specific set of architectures, +- # build all of those by default, but limited to only those. +- CONFIG -= only_active_arch +- } else { +- # Otherwise allow building all of the architectures available +- # in Qt, but only build the active arch (unless the user has +- # manually overridden this via CONFIG -= only_active_arch). +- QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCHS +- } +-} +- +-macx-xcode { +- qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO +- !isEmpty(QMAKE_PKGINFO_TYPEINFO): \ +- qmake_pkginfo_typeinfo.value = $$QMAKE_PKGINFO_TYPEINFO +- else: \ +- qmake_pkginfo_typeinfo.value = "????" +- QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo +- +- bundle_version = $$VERSION +- isEmpty(bundle_version): bundle_version = 1.0.0 +- +- l = $$split(bundle_version, '.') 0 0 # make sure there are at least three +- VER_MAJ = $$member(l, 0, 0) +- VER_MIN = $$member(l, 1, 1) +- VER_PAT = $$member(l, 2, 2) +- unset(l) +- +- qmake_full_version.name = QMAKE_FULL_VERSION +- qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +- QMAKE_MAC_XCODE_SETTINGS += qmake_full_version +- +- qmake_short_version.name = QMAKE_SHORT_VERSION +- qmake_short_version.value = $${VER_MAJ}.$${VER_MIN} +- QMAKE_MAC_XCODE_SETTINGS += qmake_short_version +- +- !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { +- debug_information_format.name = DEBUG_INFORMATION_FORMAT +- debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT +- debug_information_format.build = debug +- QMAKE_MAC_XCODE_SETTINGS += debug_information_format +- } +- +- QMAKE_XCODE_ARCHS = +- +- arch_device.name = "ARCHS[sdk=$${device.sdk}*]" +- arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS +- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS +- QMAKE_MAC_XCODE_SETTINGS += arch_device +- +- ios:simulator { +- arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" +- arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS +- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS +- QMAKE_MAC_XCODE_SETTINGS += arch_simulator +- } +- +- only_active_arch.name = ONLY_ACTIVE_ARCH +- only_active_arch.value = YES +- only_active_arch.build = debug +- QMAKE_MAC_XCODE_SETTINGS += only_active_arch +-} else { +- device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS +- ios:simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS +- VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS +- +- single_arch: VALID_ARCHS = $$first(VALID_ARCHS) +- +- macos { +- only_active_arch: DEFAULT_ARCHS = $$system("uname -m") +- else: DEFAULT_ARCHS = $$VALID_ARCHS +- } +- +- ARCHS = $(filter $(EXPORT_VALID_ARCHS), \ +- $(if $(ARCHS), $(ARCHS), \ +- $(if $(EXPORT_DEFAULT_ARCHS), $(EXPORT_DEFAULT_ARCHS), \ +- $(EXPORT_VALID_ARCHS)))) +- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ARCHS), $(EXPORT_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch)) +- +- QMAKE_EXTRA_VARIABLES += VALID_ARCHS DEFAULT_ARCHS ARCHS ARCH_ARGS +- +- arch_flags = $(EXPORT_ARCH_ARGS) +- +- QMAKE_CFLAGS += $$arch_flags +- QMAKE_CXXFLAGS += $$arch_flags +- QMAKE_LFLAGS += $$arch_flags +- +- QMAKE_PCH_ARCHS = $$VALID_ARCHS +- +- macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET +- ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET +- tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET +- watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET +- +- # If we're doing a simulator and device build, device and simulator +- # architectures use different paths and flags for the sysroot and +- # deployment target switch, so we must multiplex them across multiple +- # architectures using -Xarch. Otherwise we fall back to the simple path. +- # This is not strictly necessary, but results in cleaner command lines +- # and makes it easier for people to override EXPORT_VALID_ARCHS to limit +- # individual rules to a different set of architecture(s) from the overall +- # build (such as machtest in QtCore). +- ios:simulator:device { +- QMAKE_XARCH_CFLAGS = +- QMAKE_XARCH_LFLAGS = +- QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS +- +- for (arch, VALID_ARCHS) { +- contains(VALID_SIMULATOR_ARCHS, $$arch) { +- sdk = $$simulator.sdk +- version_identifier = $$simulator.deployment_identifier +- platform_identifier = $$simulator.sdk +- } else { +- sdk = $$device.sdk +- version_identifier = $$device.deployment_identifier +- platform_identifier = $$device.sdk +- } +- +- version_min_flags = \ +- -Xarch_$${arch} \ +- -m$${version_identifier}-version-min=$$deployment_target +- QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \ +- -Xarch_$${arch} \ +- -isysroot$$xcodeSDKInfo(Path, $$sdk) +- QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \ +- -Xarch_$${arch} \ +- -isysroot$$xcodeSDKInfo(Path, $$sdk) +- +- QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) +- QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch}) +- +- QMAKE_EXTRA_VARIABLES += \ +- QMAKE_XARCH_CFLAGS_$${arch} \ +- QMAKE_XARCH_LFLAGS_$${arch} +- } +- +- QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) +- QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) +- QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) +- } else { +- ios:simulator { +- version_identifier = $$simulator.deployment_identifier +- platform_identifier = $$simulator.sdk +- sysroot_path = $$xcodeSDKInfo(Path, $$simulator.sdk) +- } else { +- version_identifier = $$device.deployment_identifier +- platform_identifier = $$device.sdk +- sysroot_path = $$xcodeSDKInfo(Path, $$device.sdk) +- } +- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target +- QMAKE_CFLAGS += -isysroot $$sysroot_path $$version_min_flag +- QMAKE_CXXFLAGS += -isysroot $$sysroot_path $$version_min_flag +- QMAKE_LFLAGS += -isysroot $$sysroot_path $$version_min_flag +- } +- +- # Enable precompiled headers for multiple architectures +- QMAKE_CFLAGS_USE_PRECOMPILE = +- for (arch, VALID_ARCHS) { +- icc_pch_style: \ +- use_flag = "-pch-use " +- else: \ +- use_flag = -include +- +- # Only use Xarch with multi-arch, as the option confuses ccache +- count(VALID_ARCHS, 1, greaterThan): \ +- QMAKE_CFLAGS_USE_PRECOMPILE += \ +- -Xarch_$${arch} +- +- QMAKE_CFLAGS_USE_PRECOMPILE += \ +- $${use_flag}${QMAKE_PCH_OUTPUT_$${arch}} +- } +- icc_pch_style { +- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -include ${QMAKE_PCH_INPUT} +- QMAKE_CFLAGS_USE_PRECOMPILE = +- } else { +- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +- QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +- QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +- } +- +- QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} +-} +- +-!equals(sdk_version, $$QMAKE_MAC_SDK_VERSION) { +- # Explicit SDK version has been set, respect that +- QMAKE_LFLAGS += -Wl,-sdk_version -Wl,$$sdk_version +-} +- +-cache(QMAKE_XCODE_DEVELOPER_PATH, stash) +-!isEmpty(QMAKE_XCODE_VERSION): \ +- cache(QMAKE_XCODE_VERSION, stash) +- +-QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix() +- +-xcode_product_bundle_identifier_setting.name = PRODUCT_BUNDLE_IDENTIFIER +-xcode_product_bundle_identifier_setting.value = $$QMAKE_TARGET_BUNDLE_PREFIX +-isEmpty(xcode_product_bundle_identifier_setting.value): \ +- xcode_product_bundle_identifier_setting.value = "com.yourcompany" +-xcode_product_bundle_target = $$QMAKE_BUNDLE +-isEmpty(xcode_product_bundle_target): \ +- xcode_product_bundle_target = ${PRODUCT_NAME:rfc1034identifier} +-xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identifier_setting.value}.$${xcode_product_bundle_target}" +-QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting +- + !macx-xcode { + generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS + generate_xcode_project.target = xcodeproj +diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf +index e3534561a56..3b01424e67b 100644 +--- a/mkspecs/features/mac/default_pre.prf ++++ b/mkspecs/features/mac/default_pre.prf +@@ -1,60 +1,2 @@ + CONFIG = asset_catalogs rez $$CONFIG + load(default_pre) +- +-isEmpty(QMAKE_XCODE_DEVELOPER_PATH) { +- # Get path of Xcode's Developer directory +- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null") +- isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \ +- error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.") +- +- # Make sure Xcode path is valid +- !exists($$QMAKE_XCODE_DEVELOPER_PATH): \ +- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.") +-} +- +-isEmpty(QMAKE_XCODEBUILD_PATH): \ +- QMAKE_XCODEBUILD_PATH = $$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null") +- +-!isEmpty(QMAKE_XCODEBUILD_PATH) { +- # Make sure Xcode is set up properly +- !system("/usr/bin/xcrun xcodebuild -license check 2>/dev/null"): \ +- error("Xcode not set up properly. You need to confirm the license agreement by running 'sudo xcrun xcodebuild -license accept'.") +- +- isEmpty(QMAKE_XCODE_VERSION) { +- # Extract Xcode version using xcodebuild +- xcode_version = $$system("/usr/bin/xcrun xcodebuild -version") +- QMAKE_XCODE_VERSION = $$member(xcode_version, 1) +- isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.") +- unset(xcode_version) +- } +-} +- +-isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) { +- QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist +- exists($$QMAKE_XCODE_PREFERENCES_FILE): \ +- QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null") +- +- !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \ +- cache(QMAKE_TARGET_BUNDLE_PREFIX) +-} +- +-QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon +- +-# Make the default debug info format for static debug builds +-# DWARF instead of DWARF with dSYM. This cuts down build times +-# for application debug builds significantly, as Xcode doesn't +-# have to pull out all the DWARF info from the Qt static libs +-# and put it into a dSYM file. We don't need that dSYM file in +-# the first place, since the information is available in the +-# object files inside the archives (static libraries). +-macx-xcode:qtConfig(static): \ +- QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf +- +-# This variable is used by the xcode_dynamic_library_suffix +-# feature, which allows Xcode to choose the Qt libraries to link to +-# at build time, depending on the current Xcode SDK and configuration. +-QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX +- +-xcode_copy_phase_strip_setting.name = COPY_PHASE_STRIP +-xcode_copy_phase_strip_setting.value = NO +-QMAKE_MAC_XCODE_SETTINGS += xcode_copy_phase_strip_setting +diff --git a/mkspecs/features/mac/sdk.mk b/mkspecs/features/mac/sdk.mk +index a32ceacb6ce..e69de29bb2d 100644 +--- a/mkspecs/features/mac/sdk.mk ++++ b/mkspecs/features/mac/sdk.mk +@@ -1,27 +0,0 @@ +- +-ifeq ($(QT_MAC_SDK_NO_VERSION_CHECK),) +- CHECK_SDK_COMMAND = /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version 2>/dev/null +- CURRENT_MAC_SDK_VERSION := $(shell DEVELOPER_DIR=$(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) $(CHECK_SDK_COMMAND)) +- ifneq ($(CURRENT_MAC_SDK_VERSION),$(EXPORT_QMAKE_MAC_SDK_VERSION)) +- # We don't want to complain about out of date SDK unless the target needs to be remade. +- # This covers use-cases such as running 'make check' after moving the build to a +- # computer without Xcode or with a different Xcode version. +- TARGET_UP_TO_DATE := $(shell QT_MAC_SDK_NO_VERSION_CHECK=1 $(MAKE) --question $(QMAKE_TARGET) && echo 1 || echo 0) +- ifeq ($(TARGET_UP_TO_DATE),0) +- ifneq ($(findstring missing DEVELOPER_DIR path,$(CURRENT_MAC_SDK_VERSION)),) +- $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) is no longer valid.) +- else ifneq ($(findstring SDK "$(EXPORT_QMAKE_MAC_SDK)" cannot be located,$(CURRENT_MAC_SDK_VERSION)),) +- $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) no longer contains the $(EXPORT_QMAKE_MAC_SDK_VERSION) platform SDK.) +- else ifneq ($(CURRENT_MAC_SDK_VERSION),) +- $(info The $(EXPORT_QMAKE_MAC_SDK) platform SDK has been changed from version $(EXPORT_QMAKE_MAC_SDK_VERSION) to version $(CURRENT_MAC_SDK_VERSION).) +- else +- $(info Unknown error resolving current platform SDK version.) +- endif +- $(info This requires a fresh build of your project. Please wipe the build directory) +- ifneq ($(EXPORT__QMAKE_STASH_),) +- $(info including the qmake cache in $(EXPORT__QMAKE_STASH_)) +- endif +- $(error ^) +- endif +- endif +-endif +diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf +index 3a9c2778bbe..e69de29bb2d 100644 +--- a/mkspecs/features/mac/sdk.prf ++++ b/mkspecs/features/mac/sdk.prf +@@ -1,61 +0,0 @@ +- +-isEmpty(QMAKE_MAC_SDK): \ +- error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.") +- +-contains(QMAKE_MAC_SDK, .*/.*): \ +- error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)") +- +-defineReplace(xcodeSDKInfo) { +- info = $$1 +- equals(info, "Path"): \ +- infoarg = --show-sdk-path +- equals(info, "PlatformPath"): \ +- infoarg = --show-sdk-platform-path +- equals(info, "SDKVersion"): \ +- infoarg = --show-sdk-version +- sdk = $$2 +- isEmpty(sdk): \ +- sdk = $$QMAKE_MAC_SDK +- +- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) { +- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null") +- # --show-sdk-platform-path won't work for Command Line Tools; this is fine +- # only used by the XCTest backend to testlib +- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \ +- error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg") +- cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info}) +- } +- +- return($$eval(QMAKE_MAC_SDK.$${sdk}.$${info})) +-} +- +-QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path) +-QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath) +-QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) +- +-isEmpty(QMAKE_EXPORT_INCDIR_OPENGL) { +- QMAKE_EXPORT_INCDIR_OPENGL = $$QMAKE_INCDIR_OPENGL +- sysrootified = +- for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val +- QMAKE_INCDIR_OPENGL = $$sysrootified +-} +- +-QMAKESPEC_NAME = $$basename(QMAKESPEC) +- +-# Resolve SDK version of various tools +-for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL QMAKE_LINK_C QMAKE_LINK_C_SHLIB)) { +- tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool} +- !isEmpty($$tool_variable) { +- $$tool = $$eval($$tool_variable) +- next() +- } +- +- value = $$eval($$tool) +- isEmpty(value): next() +- +- sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null") +- isEmpty(sysrooted): next() +- +- $$tool = $$sysrooted $$member(value, 1, -1) +- cache($$tool_variable, set stash, $$tool) +-} +diff --git a/mkspecs/features/mac/toolchain.prf b/mkspecs/features/mac/toolchain.prf +index df191eb13c4..e69de29bb2d 100644 +--- a/mkspecs/features/mac/toolchain.prf ++++ b/mkspecs/features/mac/toolchain.prf +@@ -1,5 +0,0 @@ +-# Ensure that we process sdk.prf first, as it will update QMAKE_CXX, +-# which the default path determination uses. +-sdk: load(sdk) +- +-load(toolchain) +-- +2.39.2 + diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch new file mode 100644 index 000000000000..759c71365d7e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch @@ -0,0 +1,26 @@ +From f52f3c2cb1703592eaeb43e80f585a24ce8402d7 Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Fri, 14 Apr 2023 09:34:46 +0800 +Subject: [PATCH 3/6] qtbase: qmake: fix includedir in generated pkg-config + +--- + qmake/generators/makefile.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp +index cc985a878b4..4e3b383d812 100644 +--- a/qmake/generators/makefile.cpp ++++ b/qmake/generators/makefile.cpp +@@ -3403,8 +3403,7 @@ MakefileGenerator::writePkgConfigFile() + << varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ") + // << varGlue("DEFINES","-D"," -D"," ") + ; +- if (!project->values("QMAKE_DEFAULT_INCDIRS").contains(includeDir)) +- t << "-I${includedir}"; ++ t << "-I${includedir}"; + if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle") + && libDir != QLatin1String("/Library/Frameworks")) { + t << " -F${libdir}"; +-- +2.39.2 + diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch new file mode 100644 index 000000000000..0b4da29afd7c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch @@ -0,0 +1,60 @@ +From dd0dfc9cf87966f5d7493a943ec04c665be83cb6 Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Fri, 14 Apr 2023 09:35:25 +0800 +Subject: [PATCH 4/6] qtbase: fix locating tzdir on NixOS + +--- + src/corelib/time/qtimezoneprivate_tz.cpp | 27 +++++++++++++++--------- + 1 file changed, 17 insertions(+), 10 deletions(-) + +diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp +index 960a0944185..a5186acbd91 100644 +--- a/src/corelib/time/qtimezoneprivate_tz.cpp ++++ b/src/corelib/time/qtimezoneprivate_tz.cpp +@@ -51,7 +51,11 @@ typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash; + // Parse zone.tab table, assume lists all installed zones, if not will need to read directories + static QTzTimeZoneHash loadTzTimeZones() + { +- QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); ++ // Try TZDIR first, in case we're running on NixOS. ++ QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab"); ++ // Fallback to traditional paths in case we are not on NixOS. ++ if (!QFile::exists(path)) ++ path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); + if (!QFile::exists(path)) + path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); + +@@ -730,18 +734,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId) + if (!tzif.open(QIODevice::ReadOnly)) + return ret; + } else { +- // Open named tz, try modern path first, if fails try legacy path +- tzif.setFileName("/usr/share/zoneinfo/"_L1 + QString::fromLocal8Bit(ianaId)); ++ // Try TZDIR first, in case we're running on NixOS ++ tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId)); + if (!tzif.open(QIODevice::ReadOnly)) { +- tzif.setFileName("/usr/lib/zoneinfo/"_L1 + QString::fromLocal8Bit(ianaId)); ++ tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); + if (!tzif.open(QIODevice::ReadOnly)) { +- // ianaId may be a POSIX rule, taken from $TZ or /etc/TZ +- auto check = validatePosixRule(ianaId); +- if (check.isValid) { +- ret.m_hasDst = check.hasDst; +- ret.m_posixRule = ianaId; ++ tzif.setFileName("/usr/lib/zoneinfo/"_L1 + QString::fromLocal8Bit(ianaId)); ++ if (!tzif.open(QIODevice::ReadOnly)) { ++ // ianaId may be a POSIX rule, taken from $TZ or /etc/TZ ++ auto check = validatePosixRule(ianaId); ++ if (check.isValid) { ++ ret.m_hasDst = check.hasDst; ++ ret.m_posixRule = ianaId; ++ } ++ return ret; + } +- return ret; + } + } + } +-- +2.39.2 + diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch new file mode 100644 index 000000000000..606be2d5ac19 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch @@ -0,0 +1,26 @@ +From 4e8c14f1af9c332826e0454f4fd63e541edbaf5c Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Tue, 21 Mar 2023 15:48:49 +0800 +Subject: [PATCH 5/6] qtbase: deal with a font face at index 0 as Regular for + Variable fonts + +Reference: https://bugreports.qt.io/browse/QTBUG-111994 +--- + src/gui/text/unix/qfontconfigdatabase.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/gui/text/unix/qfontconfigdatabase.cpp b/src/gui/text/unix/qfontconfigdatabase.cpp +index 474644b871f..c7a117fd134 100644 +--- a/src/gui/text/unix/qfontconfigdatabase.cpp ++++ b/src/gui/text/unix/qfontconfigdatabase.cpp +@@ -556,6 +556,7 @@ void QFontconfigDatabase::populateFontDatabase() + FcObjectSetAdd(os, *p); + ++p; + } ++ FcPatternAddBool(pattern, FC_VARIABLE, FcFalse); + fonts = FcFontList(nullptr, pattern, os); + FcObjectSetDestroy(os); + FcPatternDestroy(pattern); +-- +2.39.2 + diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch new file mode 100644 index 000000000000..4933534caffb --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch @@ -0,0 +1,32 @@ +From 61ae6e04388dd40e11c214d56f22f8f2007bf35f Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Wed, 12 Apr 2023 10:13:50 +0800 +Subject: [PATCH 6/6] qtbase: qt-cmake: always use cmake from path + +The generated qt-cmake scripts embeds the absolute path of cmake used +during the build of qtbase, bloating the runtime closure of qtbase. +--- + bin/qt-cmake.in | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/bin/qt-cmake.in b/bin/qt-cmake.in +index f719257f602..571ffe788fa 100755 +--- a/bin/qt-cmake.in ++++ b/bin/qt-cmake.in +@@ -4,12 +4,7 @@ + script_dir_path=`dirname $0` + script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` + +-# Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH. +-original_cmake_path="@CMAKE_COMMAND@" +-cmake_path=$original_cmake_path +-if ! test -f "$cmake_path"; then +- cmake_path="cmake" +-fi ++cmake_path="cmake" + + toolchain_path="$script_dir_path/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/qt.toolchain.cmake" + +-- +2.39.2 + diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-find-qt-tools-in-QTTOOLSPATH.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-find-qt-tools-in-QTTOOLSPATH.patch new file mode 100644 index 000000000000..146cba58b8e7 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-find-qt-tools-in-QTTOOLSPATH.patch @@ -0,0 +1,46 @@ +From 31d808a7b0d52a01c3f2875202cd29410a94b39a Mon Sep 17 00:00:00 2001 +From: rewine <luhongxu@deepin.org> +Date: Wed, 29 Mar 2023 11:51:33 +0800 +Subject: [PATCH] qtbase-find-tools-in-PATH + +1. find qt's tools in `QTTOOLSPATH` env + qt assumes that all components use the same install prefix + we can't get the real prefix for qttools when build qtbase + we will add /libexec to `QTTOOLSPATH` in qtToolsHook + find_path will also search in 'PATH' by default + see `CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH` + +2. disable tool_dependencies_enabled + We can guarantee the build order of qt components in nixpkgs + tools in qttools always build before qtdoc + qdoc_bin is not a build target now, since we find it in `QTTOOLSPATH` + +--- + cmake/QtDocsHelpers.cmake | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake +index 48ed5a32..9409d22d 100644 +--- a/cmake/QtDocsHelpers.cmake ++++ b/cmake/QtDocsHelpers.cmake +@@ -47,9 +47,14 @@ function(qt_internal_add_docs) + set(doc_tools_libexec "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_LIBEXECDIR}") + endif() + +- set(qdoc_bin "${doc_tools_bin}/qdoc${CMAKE_EXECUTABLE_SUFFIX}") +- set(qtattributionsscanner_bin "${doc_tools_libexec}/qtattributionsscanner${CMAKE_EXECUTABLE_SUFFIX}") +- set(qhelpgenerator_bin "${doc_tools_libexec}/qhelpgenerator${CMAKE_EXECUTABLE_SUFFIX}") ++ set(tool_dependencies_enabled FALSE) ++ ++ find_path(qdoc_path name qdoc PATHS ENV QTTOOLSPATH) ++ find_path(qtattributionsscanner_path name qtattributionsscanner PATHS ENV QTTOOLSPATH) ++ find_path(qhelpgenerator_path name qhelpgenerator PATHS ENV QTTOOLSPATH) ++ set(qdoc_bin "${qdoc_path}/qdoc${CMAKE_EXECUTABLE_SUFFIX}") ++ set(qtattributionsscanner_bin "${qtattributionsscanner_path}/qtattributionsscanner${CMAKE_EXECUTABLE_SUFFIX}") ++ set(qhelpgenerator_bin "${qhelpgenerator_path}/qhelpgenerator${CMAKE_EXECUTABLE_SUFFIX}") + + get_target_property(target_type ${target} TYPE) + if (NOT target_type STREQUAL "INTERFACE_LIBRARY") +-- +2.38.1 + diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch new file mode 100644 index 000000000000..02e578f2d523 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch @@ -0,0 +1,13 @@ +diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp +index 852cde9e..165f1b57 100644 +--- a/src/qml/jsruntime/qv4engine.cpp ++++ b/src/qml/jsruntime/qv4engine.cpp +@@ -2093,7 +2093,7 @@ void ExecutionEngine::registerModule(const QString &_name, const QJSValue &modul + + bool ExecutionEngine::diskCacheEnabled() const + { +- return (!disableDiskCache() && !debugger()) || forceDiskCache(); ++ return forceDiskCache(); + } + + void ExecutionEngine::callInContext(QV4::Function *function, QObject *self, diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qttools-paths.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qttools-paths.patch new file mode 100644 index 000000000000..6e7b8488fa54 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qttools-paths.patch @@ -0,0 +1,27 @@ +diff --git a/src/linguist/shared/runqttool.cpp b/src/linguist/shared/runqttool.cpp +index d355b9dc..94fef33f 100644 +--- a/src/linguist/shared/runqttool.cpp ++++ b/src/linguist/shared/runqttool.cpp +@@ -20,9 +20,21 @@ class FMT { + Q_DECLARE_TR_FUNCTIONS(Linguist) + }; + ++static QString qtBasePath(QLibraryInfo::LibraryPath location) ++{ ++ switch (location) { ++ case QLibraryInfo::BinariesPath: ++ return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/bin"); ++ case QLibraryInfo::LibraryExecutablesPath: ++ return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/libexec"); ++ default: ++ return QLibraryInfo::path(location); ++ } ++} ++ + static QString qtToolFilePath(const QString &toolName, QLibraryInfo::LibraryPath location) + { +- QString filePath = QLibraryInfo::path(location) + QLatin1Char('/') + toolName; ++ QString filePath = qtBasePath(location) + QLatin1Char('/') + toolName; + #ifdef Q_OS_WIN + filePath.append(QLatin1String(".exe")); + #endif diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch new file mode 100644 index 000000000000..c7e461945c04 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch @@ -0,0 +1,16 @@ +diff --git a/src/3rdparty/chromium/net/cert/x509_util_apple.cc b/src/3rdparty/chromium/net/cert/x509_util_apple.cc +index ae69948dfca..7062a9a9b97 100644 +--- a/src/3rdparty/chromium/net/cert/x509_util_apple.cc ++++ b/src/3rdparty/chromium/net/cert/x509_util_apple.cc +@@ -139,11 +139,6 @@ SHA256HashValue CalculateFingerprint256(SecCertificateRef cert) { + + base::ScopedCFTypeRef<CFArrayRef> CertificateChainFromSecTrust( + SecTrustRef trust) { +- if (__builtin_available(macOS 12.0, iOS 15.0, *)) { +- return base::ScopedCFTypeRef<CFArrayRef>( +- SecTrustCopyCertificateChain(trust)); +- } +- + base::ScopedCFTypeRef<CFMutableArrayRef> chain( + CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks)); + const CFIndex chain_length = SecTrustGetCertificateCount(trust); diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch new file mode 100644 index 000000000000..86507165bd9c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch @@ -0,0 +1,60 @@ +diff --git a/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc b/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc +index 6a3a777..249d4cc 100644 +--- a/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc ++++ b/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc +@@ -20,12 +20,6 @@ + #include "media/base/media_log.h" + #include "media/base/video_frame.h" + +-// This is a min version of macOS where we want to support SVC encoding via +-// EnableLowLatencyRateControl flag. The flag is actually supported since 11.3, +-// but there we see frame drops even with ample bitrate budget. Excessive frame +-// drops were fixed in 12.0.1. +-#define LOW_LATENCY_FLAG_AVAILABLE_VER 12.0.1 +- + namespace media { + + namespace { +@@ -150,8 +144,6 @@ VTVideoEncodeAccelerator::GetSupportedProfiles() { + profile.max_framerate_numerator = kMaxFrameRateNumerator; + profile.max_framerate_denominator = kMaxFrameRateDenominator; + profile.max_resolution = gfx::Size(kMaxResolutionWidth, kMaxResolutionHeight); +- if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) +- profile.scalability_modes.push_back(SVCScalabilityMode::kL1T2); + for (const auto& supported_profile : kSupportedProfiles) { + profile.profile = supported_profile; + profiles.push_back(profile); +@@ -595,13 +587,6 @@ bool VTVideoEncodeAccelerator::CreateCompressionSession( + kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder}; + std::vector<CFTypeRef> encoder_values{kCFBooleanTrue}; + +- if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) { +- if (require_low_delay_) { +- encoder_keys.push_back( +- kVTVideoEncoderSpecification_EnableLowLatencyRateControl); +- encoder_values.push_back(kCFBooleanTrue); +- } +- } + base::ScopedCFTypeRef<CFDictionaryRef> encoder_spec = + video_toolbox::DictionaryWithKeysAndValues( + encoder_keys.data(), encoder_values.data(), encoder_keys.size()); +@@ -669,19 +654,8 @@ bool VTVideoEncodeAccelerator::ConfigureCompressionSession() { + } + + if (num_temporal_layers_ == 2) { +- if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) { +- if (!session_property_setter.IsSupported( +- kVTCompressionPropertyKey_BaseLayerFrameRateFraction)) { +- DLOG(ERROR) << "BaseLayerFrameRateFraction is not supported"; +- return false; +- } +- rv &= session_property_setter.Set( +- kVTCompressionPropertyKey_BaseLayerFrameRateFraction, 0.5); +- DLOG_IF(ERROR, !rv) << " Setting BaseLayerFrameRate property failed."; +- } else { + DLOG(ERROR) << "SVC encoding is not supported on this OS version."; + rv = false; +- } + } + + return rv; diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-xkb-includes.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-xkb-includes.patch new file mode 100644 index 000000000000..5056550ccecd --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-xkb-includes.patch @@ -0,0 +1,12 @@ +--- a/src/3rdparty/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc 2023-04-19 21:58:29.127258300 +0900 ++++ b/src/3rdparty/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc 2023-04-19 22:01:35.860196284 +0900 +@@ -637,8 +637,7 @@ + .variant = layout_variant.c_str(), + .options = ""}; + std::unique_ptr<xkb_context, XkbContextDeleter> context; +- context.reset(xkb_context_new(XKB_CONTEXT_NO_DEFAULT_INCLUDES)); +- xkb_context_include_path_append(context.get(), "/usr/share/X11/xkb"); ++ context.reset(xkb_context_new(XKB_CONTEXT_NO_FLAGS)); + std::unique_ptr<xkb_keymap, XkbKeymapDeleter> keymap; + keymap.reset(xkb_keymap_new_from_names(context.get(), &names, + XKB_KEYMAP_COMPILE_NO_FLAGS)); diff --git a/nixpkgs/pkgs/development/libraries/qt-6/qt-env.nix b/nixpkgs/pkgs/development/libraries/qt-6/qt-env.nix new file mode 100644 index 000000000000..f0bf8721074f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/qt-env.nix @@ -0,0 +1,22 @@ +{ buildEnv, qtbase }: name: paths: + +buildEnv { + inherit name; + paths = [ qtbase ] ++ paths; + + pathsToLink = [ "/bin" "/mkspecs" "/include" "/lib" "/share" "/libexec" ]; + extraOutputsToInstall = [ "out" "dev" ]; + + postBuild = '' + for f in qmake qmake6; do + rm "$out/bin/$f" + cp "${qtbase}/bin/$f" "$out/bin" + done + cat >"$out/bin/qt.conf" <<EOF + [Paths] + Prefix = $out + Plugins = ${qtbase.qtPluginPrefix} + Qml2Imports = ${qtbase.qtQmlPrefix} + EOF + ''; +} diff --git a/nixpkgs/pkgs/development/libraries/qt-6/qtModule.nix b/nixpkgs/pkgs/development/libraries/qt-6/qtModule.nix new file mode 100644 index 000000000000..98606d24a968 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/qtModule.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, cmake +, ninja +, perl +, moveBuildTree +, srcs +, patches ? [ ] +}: + +args: + +let + inherit (args) pname; + version = args.version or srcs.${pname}.version; + src = args.src or srcs.${pname}.src; +in +stdenv.mkDerivation (args // { + inherit pname version src; + patches = args.patches or patches.${pname} or [ ]; + + buildInputs = args.buildInputs or [ ]; + nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ] + ++ lib.optionals stdenv.isDarwin [ moveBuildTree ]; + propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]); + + moveToDev = false; + + outputs = args.outputs or [ "out" "dev" ]; + + dontWrapQtApps = args.dontWrapQtApps or true; + + meta = with lib; { + homepage = "https://www.qt.io/"; + description = "A cross-platform application framework for C++"; + license = with licenses; [ fdl13Plus gpl2Plus lgpl21Plus lgpl3Plus ]; + maintainers = with maintainers; [ milahu nickcao ]; + platforms = platforms.unix; + } // (args.meta or { }); +}) diff --git a/nixpkgs/pkgs/development/libraries/qt-6/srcs.nix b/nixpkgs/pkgs/development/libraries/qt-6/srcs.nix new file mode 100644 index 000000000000..a0ac367f162c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/srcs.nix @@ -0,0 +1,318 @@ +# DO NOT EDIT! This file is generated automatically. +# Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-6 +{ fetchurl, mirror }: + +{ + qt3d = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qt3d-everywhere-src-6.5.2.tar.xz"; + sha256 = "047rwawrlm7n0vifxmsqvs3w3j5c16x8qkpx8xazq6xd47dn9w11"; + name = "qt3d-everywhere-src-6.5.2.tar.xz"; + }; + }; + qt5 = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qt5-everywhere-src-6.5.2.tar.xz"; + sha256 = "15da8xd213fg2yfna3zvvr5mnhdfdai0i4m1paqfxr10sl81p515"; + name = "qt5-everywhere-src-6.5.2.tar.xz"; + }; + }; + qt5compat = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qt5compat-everywhere-src-6.5.2.tar.xz"; + sha256 = "1i4izabbmf1dayzlj1miz7hsm4cy0qb7i72pwyl2fp05w8pf9axr"; + name = "qt5compat-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtactiveqt = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtactiveqt-everywhere-src-6.5.2.tar.xz"; + sha256 = "04zhbwhnjlc561bs2f4y82mzlf18byy6g5gh37yq9r3gfz54002x"; + name = "qtactiveqt-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtbase = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtbase-everywhere-src-6.5.2.tar.xz"; + sha256 = "0s8jwzdcv97dfy8n3jjm8zzvllv380l73mwdva7rs2nqnhlwgd1x"; + name = "qtbase-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtcharts = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtcharts-everywhere-src-6.5.2.tar.xz"; + sha256 = "0bddlrwda5bh5bdwdx86ixdpm3zg5nygzb754y5nkjlw06zgfnkp"; + name = "qtcharts-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtconnectivity = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtconnectivity-everywhere-src-6.5.2.tar.xz"; + sha256 = "16fwbz9pr6pi19119mp6w0crq9nsb35fw8cgpfpkq99d6li4jbnv"; + name = "qtconnectivity-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtdatavis3d = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtdatavis3d-everywhere-src-6.5.2.tar.xz"; + sha256 = "1s8wlpc4nibnxaghkxmaxda5dkkn64jw6qgmzw39vi5vvhc3khb8"; + name = "qtdatavis3d-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtdeclarative = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtdeclarative-everywhere-src-6.5.2.tar.xz"; + sha256 = "06c7xfqn2a5s2m8j1bcvx3pyjqg1rgqkjvp49737gb4z9vjiz8gk"; + name = "qtdeclarative-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtdoc = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtdoc-everywhere-src-6.5.2.tar.xz"; + sha256 = "0cydg39f4cpv965pr97qn3spm5fzlxvhamifjfdsrzgskc5nm0v3"; + name = "qtdoc-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtgrpc = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtgrpc-everywhere-src-6.5.2.tar.xz"; + sha256 = "016jw2ny7paky54pk4pa499273919s8ag2ksx361ir6d0ydrdcks"; + name = "qtgrpc-everywhere-src-6.5.2.tar.xz"; + }; + }; + qthttpserver = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qthttpserver-everywhere-src-6.5.2.tar.xz"; + sha256 = "1b6w0999n5vw5xb93m0rc896l6ci3jld657y8645rl3q29fjpypq"; + name = "qthttpserver-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtimageformats = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtimageformats-everywhere-src-6.5.2.tar.xz"; + sha256 = "0hv7mkn72126rkhy5gmjmbvzy7v17mkk3q2pkmzy99f64j4w1q5a"; + name = "qtimageformats-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtlanguageserver = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtlanguageserver-everywhere-src-6.5.2.tar.xz"; + sha256 = "196iicwpqca2ydpca41qs6aqxxq8ycknw6lm2v00h1w3m86frdbk"; + name = "qtlanguageserver-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtlocation = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtlocation-everywhere-src-6.5.2.tar.xz"; + sha256 = "1yvdv1gqj7dij7v4cq9rlnqfb77c0v9b7n56jccvy5v6q9j7s7c9"; + name = "qtlocation-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtlottie = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtlottie-everywhere-src-6.5.2.tar.xz"; + sha256 = "16z8fhaa40ig0cggb689zf8j3cid6fk6pmh91b8342ymy1fdqfh0"; + name = "qtlottie-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtmultimedia = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtmultimedia-everywhere-src-6.5.2.tar.xz"; + sha256 = "0xc9k4mlncscxqbp8q46yjd89k4jb8j0ggbi5ad874lycym013wl"; + name = "qtmultimedia-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtnetworkauth = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtnetworkauth-everywhere-src-6.5.2.tar.xz"; + sha256 = "0g18kh3zhcfi9ni8cqbbjdc1l6jf99ijv5shcl42jk6219b4pk2f"; + name = "qtnetworkauth-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtpositioning = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtpositioning-everywhere-src-6.5.2.tar.xz"; + sha256 = "1yhlfs8izc054qv1krf5qv6zzjlvmz013h74fwamn74dfh1kyjbh"; + name = "qtpositioning-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtquick3d = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtquick3d-everywhere-src-6.5.2.tar.xz"; + sha256 = "1nh0vg2m1lf8m40bxbwsam5pwdzjammhal69k2pb5s0rjifs7q3m"; + name = "qtquick3d-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtquick3dphysics = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtquick3dphysics-everywhere-src-6.5.2.tar.xz"; + sha256 = "0dri8v0pmvc1h1cdhdchvd4xi5f62c1wrk0jd01lh95i6sc1403m"; + name = "qtquick3dphysics-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtquickeffectmaker = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtquickeffectmaker-everywhere-src-6.5.2.tar.xz"; + sha256 = "1gvcszqj6khqisxkpwi67xad0247hpq5zcz4v2vhbgkxq8kwfiym"; + name = "qtquickeffectmaker-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtquicktimeline = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtquicktimeline-everywhere-src-6.5.2.tar.xz"; + sha256 = "1fhmy01nqcr9q1193m9fkhbvqd9208kaigprqxkjjm61bn8awif9"; + name = "qtquicktimeline-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtremoteobjects = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtremoteobjects-everywhere-src-6.5.2.tar.xz"; + sha256 = "0k29sk02n54vj1w6vh6xycsjpyfqlijc13fnxh1q7wpgg4gizx60"; + name = "qtremoteobjects-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtscxml = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtscxml-everywhere-src-6.5.2.tar.xz"; + sha256 = "1jxx9p7zi40r990ky991xd43mv6i8hdpnj2fhl7sf4q9fpng4c58"; + name = "qtscxml-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtsensors = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtsensors-everywhere-src-6.5.2.tar.xz"; + sha256 = "19iamfl4znqbfflnnpis6qk3cqri7kzbg0nsgf42lc5lzdybs1j0"; + name = "qtsensors-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtserialbus = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtserialbus-everywhere-src-6.5.2.tar.xz"; + sha256 = "1zndnw1zx5x9daidcm0jq7jcr06ihw0nf6iksrx591f1rl3n6hph"; + name = "qtserialbus-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtserialport = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtserialport-everywhere-src-6.5.2.tar.xz"; + sha256 = "17nc5kmha6fy3vzkxfr2gxyzdsahs1x66d5lhcqk0szak8b58g06"; + name = "qtserialport-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtshadertools = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtshadertools-everywhere-src-6.5.2.tar.xz"; + sha256 = "0g8aziqhds2fkx11y4p2akmyn2p1qqf2fjxv72f9pibnhpdv0gya"; + name = "qtshadertools-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtspeech = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtspeech-everywhere-src-6.5.2.tar.xz"; + sha256 = "1cnlc9x0wswzl7j2imi4kvs9zavs4z1mhzzfpwr6d9zlfql9rzw8"; + name = "qtspeech-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtsvg = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtsvg-everywhere-src-6.5.2.tar.xz"; + sha256 = "18v337lfk8krg0hff5jx6fi7gn6x3djn03x3psrhlbmgjc8crd28"; + name = "qtsvg-everywhere-src-6.5.2.tar.xz"; + }; + }; + qttools = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qttools-everywhere-src-6.5.2.tar.xz"; + sha256 = "0ha3v488vnm4pgdpyjgf859sak0z2fwmbgcyivcd93qxflign7sm"; + name = "qttools-everywhere-src-6.5.2.tar.xz"; + }; + }; + qttranslations = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qttranslations-everywhere-src-6.5.2.tar.xz"; + sha256 = "1sxy2ljn5ajvn4yjb8fx86l56viyvqh5r9hf5x67azkmgrilaz1k"; + name = "qttranslations-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtvirtualkeyboard = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtvirtualkeyboard-everywhere-src-6.5.2.tar.xz"; + sha256 = "0sb2c901ma30dcbf4yhznw0pad09iz55alvkzyw2d992gqwf0w05"; + name = "qtvirtualkeyboard-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtwayland = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtwayland-everywhere-src-6.5.2.tar.xz"; + sha256 = "16iwar19sgjvxgmbr6hmd3hsxp6ahdjwl1lra2wapl3zzf3bw81h"; + name = "qtwayland-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtwebchannel = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtwebchannel-everywhere-src-6.5.2.tar.xz"; + sha256 = "0qwfnwva7v5f2g5is17yy66mnmc9c1yf9aagaw5qanskdvxdk261"; + name = "qtwebchannel-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtwebengine = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtwebengine-everywhere-src-6.5.2.tar.xz"; + sha256 = "17qxf3asyxq6kcqqvml170n7rnzih3nr4srp9r5v80pmas5l7jg7"; + name = "qtwebengine-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtwebsockets = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtwebsockets-everywhere-src-6.5.2.tar.xz"; + sha256 = "0xjwifxj2ssshys6f6kjr6ri2vq1wfshxky6mcscjm7vvyqdfjr0"; + name = "qtwebsockets-everywhere-src-6.5.2.tar.xz"; + }; + }; + qtwebview = { + version = "6.5.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.5/6.5.2/submodules/qtwebview-everywhere-src-6.5.2.tar.xz"; + sha256 = "0cgn1px8zk2khmswi9zawi9cnx9p26y4lb3a0kr4kfklm1rf00jr"; + name = "qtwebview-everywhere-src-6.5.2.tar.xz"; + }; + }; +} |