diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qt-6/modules')
39 files changed, 1111 insertions, 0 deletions
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..f1df7f6fc254 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qt3d.nix @@ -0,0 +1,11 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtmultimedia +, assimp +}: + +qtModule { + pname = "qt3d"; + propagatedBuildInputs = [ qtbase qtdeclarative qtmultimedia 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..d2049d7fc3e5 --- /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"; + propagatedBuildInputs = [ 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..0a16f725c477 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -0,0 +1,281 @@ +{ stdenv +, lib +, src +, patches ? [ ] +, version +, coreutils +, buildPackages +, bison +, flex +, gdb +, gperf +, lndir +, perl +, pkg-config +, which +, cmake +, ninja +, xmlstarlet +, libproxy +, xorg +, zstd +, double-conversion +, util-linux +, systemd +, systemdSupport ? stdenv.hostPlatform.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 + # mingw +, pkgsBuildBuild + # optional dependencies +, cups +, libmysqlclient +, postgresql +, withGtk3 ? false +, dconf +, gtk3 + # options +, libGLSupported ? stdenv.hostPlatform.isLinux +, libGL +, debug ? false +, developerBuild ? false +, qttranslations ? null +}: + +let + debugSymbols = debug || developerBuild; + isCrossBuild = !stdenv.buildPlatform.canExecute stdenv.hostPlatform; +in +stdenv.mkDerivation rec { + pname = "qtbase"; + + inherit src version; + + debug = debugSymbols; + + propagatedBuildInputs = [ + libxml2 + libxslt + openssl + sqlite + zlib + # Text rendering + harfbuzz + icu + # Image formats + libjpeg + libpng + pcre2 + pcre + zstd + libb2 + md4c + double-conversion + ] ++ lib.optionals (!stdenv.hostPlatform.isMinGW) [ + libproxy + dbus + glib + # unixODBC drivers + unixODBC + unixODBCDrivers.psql + unixODBCDrivers.sqlite + unixODBCDrivers.mariadb + ] ++ lib.optionals systemdSupport [ + systemd + ] ++ lib.optionals stdenv.hostPlatform.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.hostPlatform.isDarwin [ + AGL + AVFoundation + AppKit + Contacts + CoreBluetooth + EventKit + GSS + MetalKit + ] ++ lib.optionals libGLSupported [ + libGL + ] ++ lib.optionals stdenv.hostPlatform.isMinGW [ + vulkan-headers + vulkan-loader + ]; + + buildInputs = lib.optionals (lib.meta.availableOn stdenv.hostPlatform at-spi2-core) [ + at-spi2-core + ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform libinput) [ + libinput + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ + AppKit + CoreBluetooth + ] + ++ lib.optional withGtk3 gtk3 + ++ lib.optional developerBuild gdb + ++ lib.optional (cups != null && lib.meta.availableOn stdenv.hostPlatform cups) cups + ++ lib.optional (libmysqlclient != null && !stdenv.hostPlatform.isMinGW) libmysqlclient + ++ lib.optional (postgresql != null && lib.meta.availableOn stdenv.hostPlatform postgresql) postgresql; + + nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ moveBuildTree ]; + + propagatedNativeBuildInputs = [ lndir ]; + + strictDeps = true; + + enableParallelBuilding = true; + + inherit patches; + + # https://bugreports.qt.io/browse/QTBUG-97568 + postPatch = '' + substituteInPlace src/corelib/CMakeLists.txt --replace-fail "/bin/ls" "${buildPackages.coreutils}/bin/ls" + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace cmake/QtPublicAppleHelpers.cmake --replace-fail "/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.hostPlatform.isDarwin) [ + "-DQT_FEATURE_sctp=ON" + "-DQT_FEATURE_journald=${if systemdSupport then "ON" else "OFF"}" + "-DQT_FEATURE_vulkan=ON" + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # error: 'path' is unavailable: introduced in macOS 10.15 + "-DQT_FEATURE_cxx17_filesystem=OFF" + ] ++ lib.optionals isCrossBuild [ + "-DQT_HOST_PATH=${pkgsBuildBuild.qt6.qtbase}" + "-DQt6HostInfo_DIR=${pkgsBuildBuild.qt6.qtbase}/lib/cmake/Qt6HostInfo" + ] + ++ lib.optional (qttranslations != null && !isCrossBuild) "-DINSTALL_TRANSLATIONSDIR=${qttranslations}/translations"; + + env.NIX_LDFLAGS = toString (lib.optionals stdenv.hostPlatform.isDarwin [ + # Undefined symbols for architecture arm64: "___gss_c_nt_hostbased_service_oid_desc" + "-framework GSS" + ]); + + env.NIX_CFLAGS_COMPILE = "-DNIXPKGS_QT_PLUGIN_PREFIX=\"${qtPluginPrefix}\""; + + outputs = [ "out" "dev" ]; + + moveToDev = false; + + postFixup = '' + moveToOutput "mkspecs/modules" "$dev" + fixQtModulePaths "$dev/mkspecs/modules" + fixQtBuiltinPaths "$out" '*.pr?' + ''; + + dontStrip = debugSymbols; + + dontWrapQtApps = true; + + 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 ++ platforms.windows; + }; +} 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..e9b6c8d6b33f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtcharts.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtcharts"; + propagatedBuildInputs = [ 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..126920dd5051 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix @@ -0,0 +1,23 @@ +{ qtModule +, lib +, stdenv +, qtbase +, qtdeclarative +, bluez +, pkg-config +, IOBluetooth +, PCSC +}: + +qtModule { + pname = "qtconnectivity"; + nativeBuildInputs = [ pkg-config ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ bluez ]; + propagatedBuildInputs = [ + qtbase + qtdeclarative + ] ++ lib.optionals stdenv.hostPlatform.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..e6c12508c9d0 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtdatavis3d"; + propagatedBuildInputs = [ 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..697556e30edc --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix @@ -0,0 +1,18 @@ +{ qtModule +, qtbase +, qtlanguageserver +, qtshadertools +, openssl +, python3 +}: + +qtModule { + pname = "qtdeclarative"; + propagatedBuildInputs = [ qtbase qtlanguageserver qtshadertools openssl python3 ]; + patches = [ + # prevent headaches from stale qmlcache data + ../patches/qtdeclarative-default-disable-qmlcache.patch + # add version specific QML import path + ../patches/qtdeclarative-qml-paths.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..555108caa01a --- /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; }) ]; + propagatedBuildInputs = [ 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/qtgraphs.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgraphs.nix new file mode 100644 index 000000000000..5cafb8d8d7fd --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgraphs.nix @@ -0,0 +1,16 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtquick3d +, qtquicktimeline +}: + +qtModule { + pname = "qtgraphs"; + propagatedBuildInputs = [ + qtbase + qtdeclarative + qtquick3d + qtquicktimeline + ]; +} 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..09ff7ee89196 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgrpc.nix @@ -0,0 +1,12 @@ +{ qtModule +, qtbase +, qtdeclarative +, protobuf +, grpc +}: + +qtModule { + pname = "qtgrpc"; + propagatedBuildInputs = [ 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..cf32c8a7ea76 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qthttpserver.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtwebsockets +}: + +qtModule { + pname = "qthttpserver"; + propagatedBuildInputs = [ 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..50420aaa7e45 --- /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"; + propagatedBuildInputs = [ 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..b45ab11fc3ff --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix @@ -0,0 +1,11 @@ +{ qtModule +, qtbase +}: + +qtModule { + pname = "qtlanguageserver"; + propagatedBuildInputs = [ 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..12fa89b9aaea --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlocation.nix @@ -0,0 +1,10 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtpositioning +}: + +qtModule { + pname = "qtlocation"; + propagatedBuildInputs = [ 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..4231fcb26b1c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlottie.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtlottie"; + propagatedBuildInputs = [ 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..a9660b73710b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmqtt.nix @@ -0,0 +1,18 @@ +{ qtModule +, fetchFromGitHub +, qtbase +}: + +qtModule rec { + pname = "qtmqtt"; + version = "6.6.2"; + + src = fetchFromGitHub { + owner = "qt"; + repo = "qtmqtt"; + rev = "v${version}"; + hash = "sha256-R8B7Vt/XzI7+17DDZ+TVbqfGKdEfUMiLa1BqzIbo4OM="; + }; + + propagatedBuildInputs = [ 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..5c9a0e58a82c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix @@ -0,0 +1,42 @@ +{ qtModule +, lib +, stdenv +, qtbase +, qtdeclarative +, qtquick3d +, qtshadertools +, qtsvg +, pkg-config +, alsa-lib +, gstreamer +, gst-plugins-base +, gst-plugins-good +, gst-libav +, gst-vaapi +, ffmpeg_6 +, libva +, libpulseaudio +, wayland +, libXrandr +, elfutils +, libunwind +, orc +, VideoToolbox +}: + +qtModule { + pname = "qtmultimedia"; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ libunwind orc ffmpeg_6 ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio elfutils alsa-lib wayland libXrandr libva ]; + propagatedBuildInputs = [ qtbase qtdeclarative qtsvg qtshadertools qtquick3d ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ VideoToolbox ]; + + cmakeFlags = [ "-DENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS=0" ]; + + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin + "-include AudioToolbox/AudioToolbox.h"; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.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..bec5f354a23a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase }: + +qtModule { + pname = "qtnetworkauth"; + propagatedBuildInputs = [ 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..20f059976323 --- /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"; + propagatedBuildInputs = [ 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..1c84856c0c12 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3d.nix @@ -0,0 +1,11 @@ +{ qtModule +, qtbase +, qtdeclarative +, openssl +}: + +qtModule { + pname = "qtquick3d"; + propagatedBuildInputs = [ 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..92d676f7c8e2 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix @@ -0,0 +1,13 @@ +{ qtModule +, lib +, stdenv +, qtbase +, qtquick3d +}: + +qtModule { + pname = "qtquick3dphysics"; + propagatedBuildInputs = [ qtbase qtquick3d ]; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.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..213814a017e2 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtquick3d +}: + +qtModule { + pname = "qtquickeffectmaker"; + propagatedBuildInputs = [ 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..9ac9c1f09393 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtquicktimeline"; + propagatedBuildInputs = [ 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..1fd3b1b7a253 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtremoteobjects"; + propagatedBuildInputs = [ 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..ece975f59e8d --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtscxml.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase, qtdeclarative }: + +qtModule { + pname = "qtscxml"; + propagatedBuildInputs = [ 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..bc49c7a77f58 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsensors.nix @@ -0,0 +1,10 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtsvg +}: + +qtModule { + pname = "qtsensors"; + propagatedBuildInputs = [ 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..3a7285d0a8b0 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialbus.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase, qtserialport }: + +qtModule { + pname = "qtserialbus"; + propagatedBuildInputs = [ 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..00f668ef5631 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialport.nix @@ -0,0 +1,13 @@ +{ qtModule +, stdenv +, lib +, qtbase +, udev +, pkg-config +}: + +qtModule { + pname = "qtserialport"; + nativeBuildInputs = [ pkg-config ]; + propagatedBuildInputs = [ qtbase ] ++ lib.optionals stdenv.hostPlatform.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..5a4b894b9abd --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtshadertools.nix @@ -0,0 +1,8 @@ +{ qtModule +, qtbase +}: + +qtModule { + pname = "qtshadertools"; + propagatedBuildInputs = [ 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..15672de8b980 --- /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"; + nativeBuildInputs = [ pkg-config ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ flite alsa-lib speechd ]; + propagatedBuildInputs = [ qtbase qtmultimedia ] + ++ lib.optionals stdenv.hostPlatform.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..d81634d9ef1b --- /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"; + propagatedBuildInputs = [ 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..f13500d65464 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qttools.nix @@ -0,0 +1,37 @@ +{ 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 + ]; + propagatedBuildInputs = [ qtbase qtdeclarative ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ cups ]; + patches = [ + ../patches/qttools-paths.patch + ]; + env.NIX_CFLAGS_COMPILE = toString [ + "-DNIX_OUTPUT_OUT=\"${placeholder "out"}\"" + ]; + postPatch = '' + substituteInPlace \ + src/qdoc/catch/CMakeLists.txt \ + src/qdoc/catch_generators/CMakeLists.txt \ + src/qdoc/catch_conversions/CMakeLists.txt \ + --replace ''\'''${CMAKE_INSTALL_INCLUDEDIR}' "$out/include" + ''; + 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..61c642de1085 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qttranslations.nix @@ -0,0 +1,9 @@ +{ qtModule +, qttools +}: + +qtModule { + pname = "qttranslations"; + nativeBuildInputs = [ qttools ]; + outputs = [ "out" ]; +} 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..9f067900dc06 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix @@ -0,0 +1,13 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtsvg +, hunspell +, pkg-config +}: + +qtModule { + pname = "qtvirtualkeyboard"; + propagatedBuildInputs = [ qtbase qtdeclarative qtsvg 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..b5f1c71fdd75 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwayland.nix @@ -0,0 +1,14 @@ +{ qtModule +, qtbase +, qtdeclarative +, wayland +, pkg-config +, libdrm +}: + +qtModule { + pname = "qtwayland"; + propagatedBuildInputs = [ 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..bf0ba0f63385 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix @@ -0,0 +1,12 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtwebsockets +, openssl +}: + +qtModule { + pname = "qtwebchannel"; + propagatedBuildInputs = [ 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..f07aeefa0be0 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebengine.nix @@ -0,0 +1,323 @@ +{ qtModule +, qtdeclarative +, qtwebchannel +, qtpositioning +, qtwebsockets +, buildPackages +, bison +, coreutils +, flex +, git +, gperf +, ninja +, pkg-config +, python3 +, which +, nodejs +, 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 +, ffmpeg_4 +, lib +, stdenv +, glib +, libxml2 +, libxslt +, lcms2 +, libkrb5 +, mesa +, enableProprietaryCodecs ? true + # darwin +, autoSignDarwinBinariesHook +, 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"; + nativeBuildInputs = [ + bison + coreutils + flex + git + gperf + ninja + pkg-config + (python3.withPackages (ps: with ps; [ html5lib ])) + which + gn + nodejs + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ + autoSignDarwinBinariesHook + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + 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 + + ../patches/qtwebengine-link-pulseaudio.patch + + # Override locales install path so they go to QtWebEngine's $out + ../patches/qtwebengine-locales-path.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.hostPlatform.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.hostPlatform.isDarwin '' + substituteInPlace configure.cmake src/gn/CMakeLists.txt \ + --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_libevent=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.hostPlatform.isLinux [ + "-DQT_FEATURE_webengine_system_libxml=ON" + "-DQT_FEATURE_webengine_webrtc_pipewire=ON" + + # Appears not to work on some platforms + # https://github.com/Homebrew/homebrew-core/issues/104008 + "-DQT_FEATURE_webengine_system_icu=ON" + ] ++ lib.optionals enableProprietaryCodecs [ + "-DQT_FEATURE_webengine_proprietary_codecs=ON" + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinSdkVersion}" + ]; + + propagatedBuildInputs = [ + qtdeclarative + qtwebchannel + qtwebsockets + qtpositioning + + # Image formats + libjpeg + libpng + libtiff + libwebp + + # Video formats + srtp + libvpx + + # Audio formats + libopus + + # Text rendering + harfbuzz + + openssl + glib + libxslt + lcms2 + + libevent + ffmpeg_4 + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ + dbus + zlib + minizip + snappy + nss + protobuf + jsoncpp + + icu + libxml2 + + # 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.hostPlatform.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.hostPlatform.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 = [ "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "armv7a-linux" "armv7l-linux" "x86_64-linux" ]; + # 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..c3a346a8d78a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix @@ -0,0 +1,11 @@ +{ qtModule +, qtbase +, qtdeclarative +, openssl +}: + +qtModule { + pname = "qtwebsockets"; + propagatedBuildInputs = [ 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..dfc2da1df555 --- /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"; + propagatedBuildInputs = [ qtdeclarative ] + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ qtwebengine ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ WebKit ]; +} |