From d76d0112bdb9eef6431cbb8b50b0dd672caa477d Mon Sep 17 00:00:00 2001 From: Adam Washington Date: Mon, 3 Aug 2026 10:47:31 +0100 Subject: [PATCH 1/2] Temporarily disable Windows and Mac builds until aqt is available again --- .github/workflows/_build_and_package.yml | 42 ++++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/_build_and_package.yml b/.github/workflows/_build_and_package.yml index 7647b94920..38020f99c2 100644 --- a/.github/workflows/_build_and_package.yml +++ b/.github/workflows/_build_and_package.yml @@ -34,29 +34,29 @@ on: jobs: - Build: - strategy: - fail-fast: false - matrix: - os: [ "${{ inputs.osxRunner }}", windows-2022 ] - runs-on: ${{ matrix.os }} - steps: - - name: 'Download Source Tarfiles' - uses: actions/download-artifact@v4 - with: - name: source + # Build: + # strategy: + # fail-fast: false + # matrix: + # os: [ "${{ inputs.osxRunner }}", windows-2022 ] + # runs-on: ${{ matrix.os }} + # steps: + # - name: 'Download Source Tarfiles' + # uses: actions/download-artifact@v4 + # with: + # name: source - - name: 'Unpack Source' - shell: bash - run: tar -xvf dissolve-versioned-source.tar + # - name: 'Unpack Source' + # shell: bash + # run: tar -xvf dissolve-versioned-source.tar - - name: "Build (${{ matrix.os }})" - uses: "./.github/workflows/build" - with: - qtVersion: ${{ inputs.qtVersion }} - antlrVersion: ${{ inputs.antlrVersion }} - conanHash: ${{ inputs.conanHash }} - osxTargetDeploymentVersion: ${{ inputs.osxTargetDeploymentVersion }} + # - name: "Build (${{ matrix.os }})" + # uses: "./.github/workflows/build" + # with: + # qtVersion: ${{ inputs.qtVersion }} + # antlrVersion: ${{ inputs.antlrVersion }} + # conanHash: ${{ inputs.conanHash }} + # osxTargetDeploymentVersion: ${{ inputs.osxTargetDeploymentVersion }} BuildLinux: strategy: From e8550a6365222e4327fc5210507f760e46f36215 Mon Sep 17 00:00:00 2001 From: Adam Washington Date: Mon, 3 Aug 2026 11:32:29 +0100 Subject: [PATCH 2/2] Remove old nix modules that we no longer need --- nix/qt/default.nix | 93 ----- nix/qt/fetch.sh | 1 - nix/qt/hooks/fix-qmake-libtool.sh | 25 -- nix/qt/hooks/fix-qt-builtin-paths.sh | 66 ---- nix/qt/hooks/fix-qt-module-paths.sh | 36 -- nix/qt/hooks/move-qt-dev-tools.sh | 34 -- nix/qt/hooks/qmake-hook.sh | 48 --- nix/qt/hooks/qtbase-setup-hook.sh | 93 ----- nix/qt/hooks/wrap-qt-apps-hook.sh | 99 ------ nix/qt/modules/qt3d.nix | 12 - nix/qt/modules/qt5compat.nix | 13 - nix/qt/modules/qtbase.nix | 290 ---------------- nix/qt/modules/qtdeclarative.nix | 43 --- nix/qt/modules/qtquick3d.nix | 11 - nix/qt/modules/qtshadertools.nix | 8 - nix/qt/modules/qtsvg.nix | 15 - nix/qt/modules/qttools.nix | 44 --- nix/qt/modules/qtwayland.nix | 15 - nix/qt/patches/cmake.patch | 123 ------- nix/qt/patches/qtbase-qmake-pkg-config.patch | 14 - nix/qt/patches/qtbase-tzdir.patch | 49 --- ...declarative-default-disable-qmlcache.patch | 13 - nix/qt/patches/qttools-paths.patch | 27 -- nix/qt/qt-env.nix | 20 -- nix/qt/qtModule.nix | 88 ----- nix/qt/srcs.nix | 323 ------------------ nix/weggli.nix | 19 -- 27 files changed, 1622 deletions(-) delete mode 100644 nix/qt/default.nix delete mode 100644 nix/qt/fetch.sh delete mode 100644 nix/qt/hooks/fix-qmake-libtool.sh delete mode 100644 nix/qt/hooks/fix-qt-builtin-paths.sh delete mode 100644 nix/qt/hooks/fix-qt-module-paths.sh delete mode 100644 nix/qt/hooks/move-qt-dev-tools.sh delete mode 100644 nix/qt/hooks/qmake-hook.sh delete mode 100644 nix/qt/hooks/qtbase-setup-hook.sh delete mode 100644 nix/qt/hooks/wrap-qt-apps-hook.sh delete mode 100644 nix/qt/modules/qt3d.nix delete mode 100644 nix/qt/modules/qt5compat.nix delete mode 100644 nix/qt/modules/qtbase.nix delete mode 100644 nix/qt/modules/qtdeclarative.nix delete mode 100644 nix/qt/modules/qtquick3d.nix delete mode 100644 nix/qt/modules/qtshadertools.nix delete mode 100644 nix/qt/modules/qtsvg.nix delete mode 100644 nix/qt/modules/qttools.nix delete mode 100644 nix/qt/modules/qtwayland.nix delete mode 100644 nix/qt/patches/cmake.patch delete mode 100644 nix/qt/patches/qtbase-qmake-pkg-config.patch delete mode 100644 nix/qt/patches/qtbase-tzdir.patch delete mode 100644 nix/qt/patches/qtdeclarative-default-disable-qmlcache.patch delete mode 100644 nix/qt/patches/qttools-paths.patch delete mode 100644 nix/qt/qt-env.nix delete mode 100644 nix/qt/qtModule.nix delete mode 100644 nix/qt/srcs.nix delete mode 100644 nix/weggli.nix diff --git a/nix/qt/default.nix b/nix/qt/default.nix deleted file mode 100644 index 838bad9278..0000000000 --- a/nix/qt/default.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ newScope -, lib -, stdenv -, fetchurl -, fetchgit -, fetchpatch -, fetchFromGitHub -, makeSetupHook -, makeWrapper -, bison -, cups -, harfbuzz -, libGL -, perl -, cmake -, ninja -, writeText -, gtk3 -, dconf -, libglvnd -, darwin -, buildPackages - - # options -, developerBuild ? false -, debug ? false -}: - -let - srcs = import ./srcs.nix { - inherit fetchurl; - mirror = "mirror://qt"; - }; - - qtModule = - import ./qtModule.nix - { inherit stdenv lib perl cmake ninja writeText; } - { inherit self srcs; }; - - addPackages = self: with self; - let - callPackage = self.newScope ({ inherit qtModule stdenv srcs; }); - in - { - - inherit callPackage qtModule srcs; - - qtbase = callPackage ./modules/qtbase.nix { - withGtk3 = true; - inherit (srcs.qtbase) src version; - inherit bison cups harfbuzz libGL dconf gtk3 developerBuild cmake; - inherit (darwin.apple_sdk_11_0.frameworks) AGL AVFoundation AppKit GSS MetalKit; - patches = [ - ./patches/qtbase-qmake-pkg-config.patch - ./patches/qtbase-tzdir.patch - # Remove symlink check causing build to bail out and fail. - # https://gitlab.kitware.com/cmake/cmake/-/issues/23251 - (fetchpatch { - url = "https://github.com/Homebrew/formula-patches/raw/c363f0edf9e90598d54bc3f4f1bacf95abbda282/qt/qt_internal_check_if_path_has_symlinks.patch"; - sha256 = "sha256-Gv2L8ymZSbJxcmUijKlT2NnkIB3bVH9D7YSsDX2noTU="; - }) - ]; - }; - env = callPackage ./qt-env.nix {}; - - qt3d = callPackage ./modules/qt3d.nix { }; - qt5compat = callPackage ./modules/qt5compat.nix { }; - qtdatavis3d = callPackage ./modules/qtdatavis3d.nix { }; - qtdeclarative = callPackage ./modules/qtdeclarative.nix { }; - qtshadertools = callPackage ./modules/qtshadertools.nix { }; - qtquick3d = callPackage ./modules/qtquick3d.nix { }; - qtsvg = callPackage ./modules/qtsvg.nix { }; - qttools = callPackage ./modules/qttools.nix { }; - qtwayland = callPackage ./modules/qtwayland.nix { }; - - wrapQtAppsHook = makeSetupHook { - deps = [ buildPackages.makeWrapper ]; - } ./hooks/wrap-qt-apps-hook.sh; - - qmake = makeSetupHook { - deps = [ 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/nix/qt/fetch.sh b/nix/qt/fetch.sh deleted file mode 100644 index 139eeeb5aa..0000000000 --- a/nix/qt/fetch.sh +++ /dev/null @@ -1 +0,0 @@ -WGET_ARGS=( https://download.qt.io/official_releases/qt/6.4/6.4.1/submodules/ -A '*.tar.xz' ) diff --git a/nix/qt/hooks/fix-qmake-libtool.sh b/nix/qt/hooks/fix-qmake-libtool.sh deleted file mode 100644 index 44bf10a0db..0000000000 --- a/nix/qt/hooks/fix-qmake-libtool.sh +++ /dev/null @@ -1,25 +0,0 @@ -# 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/nix/qt/hooks/fix-qt-builtin-paths.sh b/nix/qt/hooks/fix-qt-builtin-paths.sh deleted file mode 100644 index 0fd0aee7db..0000000000 --- a/nix/qt/hooks/fix-qt-builtin-paths.sh +++ /dev/null @@ -1,66 +0,0 @@ -# fixQtBuiltinPaths -# -# Usage: fixQtBuiltinPaths _dir_ _pattern_ -# -# Fix Qt builtin paths in files matching _pattern_ under _dir_. -# -fixQtBuiltinPaths() { - local dir="$1" - local pattern="$2" - local bin="${!outputBin}" - local dev="${!outputDev}" - local doc="${!outputDoc}" - 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[^]]*\\]|$dev/bin|g" \ - -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$dev/libexec|g" \ - -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \ - -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$dev|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$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[^]]*\\]|$dev/bin|g" \ - -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$dev/libexec|g" \ - -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \ - -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$dev|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g" - fi - else - echo "fixQtBuiltinPaths: Warning: \`$dir' does not exist" - fi -} diff --git a/nix/qt/hooks/fix-qt-module-paths.sh b/nix/qt/hooks/fix-qt-module-paths.sh deleted file mode 100644 index 0a0e0d51e2..0000000000 --- a/nix/qt/hooks/fix-qt-module-paths.sh +++ /dev/null @@ -1,36 +0,0 @@ -# fixQtModulePaths -# -# Usage: fixQtModulePaths _dir_ -# -# Find Qt module definitions in directory _dir_ and patch the module paths. -# -fixQtModulePaths() { - local dir="$1" - local bin="${!outputBin}" - local dev="${!outputDev}" - 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|$dev/include|g" \ - -e "s|\\\$\\\$QT_MODULE_BIN_BASE|$dev/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 - - if [ "z$bin" != "z$dev" ]; then - if [ -d "$bin/bin" ]; then - mkdir -p "$dev/bin" - lndir -silent "$bin/bin" "$dev/bin" - fi - fi -} diff --git a/nix/qt/hooks/move-qt-dev-tools.sh b/nix/qt/hooks/move-qt-dev-tools.sh deleted file mode 100644 index 85489c8510..0000000000 --- a/nix/qt/hooks/move-qt-dev-tools.sh +++ /dev/null @@ -1,34 +0,0 @@ -updateToolPath() { - local tool="$1" - local target="$2" - local original="${!outputBin}/$tool" - local actual="${!outputDev}/$tool" - if grep -q "$original" "$target"; then - echo "updateToolPath: Updating \`$original' in \`$target\'..." - sed -i "$target" -e "s|$original|$actual|" - fi -} - -moveQtDevTools() { - if [ -n "$devTools" ]; then - for tool in $devTools; do - moveToOutput "$tool" "${!outputDev}" - done - - if [ -d "${!outputDev}/mkspecs" ]; then - find "${!outputDev}/mkspecs" -name '*.pr?' | while read pr_; do - for tool in $devTools; do - updateToolPath "$tool" "$pr_" - done - done - fi - - if [ -d "${!outputDev}/lib/cmake" ]; then - find "${!outputDev}/lib/cmake" -name '*.cmake' | while read cmake; do - for tool in $devTools; do - updateToolPath "$tool" "$cmake" - done - done - fi - fi -} diff --git a/nix/qt/hooks/qmake-hook.sh b/nix/qt/hooks/qmake-hook.sh deleted file mode 100644 index ec1d2ea612..0000000000 --- a/nix/qt/hooks/qmake-hook.sh +++ /dev/null @@ -1,48 +0,0 @@ -. @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 - - runHook postConfigure -} - -if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then - configurePhase=qmakeConfigurePhase -fi diff --git a/nix/qt/hooks/qtbase-setup-hook.sh b/nix/qt/hooks/qtbase-setup-hook.sh deleted file mode 100644 index 613b42fc97..0000000000 --- a/nix/qt/hooks/qtbase-setup-hook.sh +++ /dev/null @@ -1,93 +0,0 @@ -if [[ -n "${__nix_qtbase-}" ]]; then - # Throw an error if a different version of Qt was already set up. - if [[ "$__nix_qtbase" != "@dev@" ]]; then - echo >&2 "Error: detected mismatched Qt dependencies:" - echo >&2 " @dev@" - echo >&2 " $__nix_qtbase" - exit 1 - fi -else # Only set up Qt once. - __nix_qtbase="@dev@" - - 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=@dev@/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) - - postPatchMkspecs() { - # Prevent this hook from running multiple times - dontPatchMkspecs=1 - - local bin="${!outputBin}" - local dev="${!outputDev}" - local doc="${!outputDoc}" - local lib="${!outputLib}" - - moveToOutput "mkspecs" "$dev" - - if [ -d "$dev/mkspecs/modules" ]; then - fixQtModulePaths "$dev/mkspecs/modules" - fi - - if [ -d "$dev/mkspecs" ]; then - fixQtBuiltinPaths "$dev/mkspecs" '*.pr?' - fi - - if [ -d "$lib" ]; then - fixQtBuiltinPaths "$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/nix/qt/hooks/wrap-qt-apps-hook.sh b/nix/qt/hooks/wrap-qt-apps-hook.sh deleted file mode 100644 index 8b135a7d74..0000000000 --- a/nix/qt/hooks/wrap-qt-apps-hook.sh +++ /dev/null @@ -1,99 +0,0 @@ -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/nix/qt/modules/qt3d.nix b/nix/qt/modules/qt3d.nix deleted file mode 100644 index 2f3a45f67d..0000000000 --- a/nix/qt/modules/qt3d.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ qtModule -, qtbase -, qtdeclarative -, qtmultimedia -, assimp -}: - -qtModule { - pname = "qt3d"; - qtInputs = [ qtbase qtdeclarative qtmultimedia ]; - propagatedBuildInputs = [ assimp ]; -} diff --git a/nix/qt/modules/qt5compat.nix b/nix/qt/modules/qt5compat.nix deleted file mode 100644 index cba0651a2c..0000000000 --- a/nix/qt/modules/qt5compat.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ qtModule -, qtbase -, qtdeclarative -, libiconv -, icu -, openssl -}: - -qtModule { - pname = "qt5compat"; - qtInputs = [ qtbase qtdeclarative ]; - buildInputs = [ libiconv icu openssl openssl ]; -} diff --git a/nix/qt/modules/qtbase.nix b/nix/qt/modules/qtbase.nix deleted file mode 100644 index 7df777c8b7..0000000000 --- a/nix/qt/modules/qtbase.nix +++ /dev/null @@ -1,290 +0,0 @@ -{ 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 -, libb2 -, md4c -, mtdev -, lksctp-tools -, libselinux -, libsepol -, vulkan-headers -, vulkan-loader -, valgrind -, 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 -, xcbuild -, AGL -, AVFoundation -, AppKit -, 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 stdenv.isLinux [ - util-linux - systemd - mtdev - lksctp-tools - libselinux - libsepol - lttng-ust - vulkan-headers - vulkan-loader - libthai - libdrm - libdatrie - valgrind - 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 - GSS - MetalKit - ] ++ lib.optional libGLSupported libGL; - - buildInputs = [ - python3 - at-spi2-core - ] ++ lib.optionals (!stdenv.isDarwin) [ - libinput - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ - AppKit - ] - ++ 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 ]; - - propagatedNativeBuildInputs = [ lndir ]; - - 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" - . ${../hooks/move-qt-dev-tools.sh} - . ${../hooks/fix-qmake-libtool.sh} - ''; - - qtPluginPrefix = "lib/qt-6/plugins"; - qtQmlPrefix = "lib/qt-6/qml"; - - cmakeFlags = [ - "-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=ON" - "-DQT_FEATURE_vulkan=ON" - ] ++ lib.optionals stdenv.isDarwin [ - # build as a set of dynamic libraries - "-DFEATURE_framework=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" ]; - - postInstall = '' - moveToOutput "mkspecs" "$dev" - ''; - - devTools = [ - "libexec/moc" - "libexec/rcc" - "libexec/syncqt.pl" - "libexec/qlalr" - "libexec/ensure_pro_file.cmake" - "libexec/cmake_automoc_parser" - "libexec/qvkgen" - "libexec/tracegen" - "libexec/uic" - "bin/fixqt4headers.pl" - "bin/moc" - "bin/qdbuscpp2xml" - "bin/qdbusxml2cpp" - "bin/qlalr" - "bin/qmake" - "bin/rcc" - "bin/syncqt.pl" - "bin/uic" - ]; - - postFixup = '' - # Don't retain build-time dependencies like gdb. - sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri - fixQtModulePaths "''${!outputDev}/mkspecs/modules" - fixQtBuiltinPaths "''${!outputDev}" '*.pr?' - - # Move development tools to $dev - moveQtDevTools - moveToOutput libexec "$dev" - - # fixup .pc file (where to find 'moc' etc.) - # sed -i "$dev/lib/pkgconfig/Qt6Core.pc" \ - # -e "/^bindir=/ c bindir=$dev/bin" - - patchShebangs $out $dev - strip --remove-section=.note.ABI-tag $out/lib/libQt6Core.so - ''; - - 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/nix/qt/modules/qtdeclarative.nix b/nix/qt/modules/qtdeclarative.nix deleted file mode 100644 index 76231f866e..0000000000 --- a/nix/qt/modules/qtdeclarative.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ qtModule -, qtbase -, qtshadertools -, openssl -, python3 -}: - -qtModule { - pname = "qtdeclarative"; - qtInputs = [ qtbase qtshadertools ]; - propagatedBuildInputs = [ openssl python3 ]; - preConfigure = '' - export LD_LIBRARY_PATH="$PWD/build/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" - ''; - cmakeFlags = [ - "-DQT6_INSTALL_PREFIX=${placeholder "out"}" - "-DQT_INSTALL_PREFIX=${placeholder "out"}" - ]; - patches = [ - # prevent headaches from stale qmlcache data - ../patches/qtdeclarative-default-disable-qmlcache.patch - ]; - postInstall = '' - substituteInPlace "$out/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake" \ - --replace ''\'''${QT6_INSTALL_PREFIX}' "$dev" - ''; - devTools = [ - "bin/qml" - "bin/qmlcachegen" - "bin/qmleasing" - "bin/qmlimportscanner" - "bin/qmllint" - "bin/qmlmin" - "bin/qmlplugindump" - "bin/qmlprofiler" - "bin/qmlscene" - "bin/qmltestrunner" - ]; - - NIX_CFLAGS_COMPILE = [ - "-fmacro-prefix-map=${qtbase.dev}=qtbase.dev" - ]; -} diff --git a/nix/qt/modules/qtquick3d.nix b/nix/qt/modules/qtquick3d.nix deleted file mode 100644 index d19a8e725a..0000000000 --- a/nix/qt/modules/qtquick3d.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ qtModule -, qtbase -, qtdeclarative -, openssl -}: - -qtModule { - pname = "qtquick3d"; - qtInputs = [ qtbase qtdeclarative ]; - buildInputs = [ openssl ]; -} diff --git a/nix/qt/modules/qtshadertools.nix b/nix/qt/modules/qtshadertools.nix deleted file mode 100644 index 47102896f7..0000000000 --- a/nix/qt/modules/qtshadertools.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ qtModule -, qtbase -}: - -qtModule { - pname = "qtshadertools"; - qtInputs = [ qtbase ]; -} diff --git a/nix/qt/modules/qtsvg.nix b/nix/qt/modules/qtsvg.nix deleted file mode 100644 index 9031f8805a..0000000000 --- a/nix/qt/modules/qtsvg.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ qtModule -, qtbase -, libwebp -, jasper -, libmng -, zlib -, pkg-config -}: - -qtModule { - pname = "qtsvg"; - qtInputs = [ qtbase ]; - buildInputs = [ libwebp jasper libmng zlib ]; - nativeBuildInputs = [ pkg-config ]; -} diff --git a/nix/qt/modules/qttools.nix b/nix/qt/modules/qttools.nix deleted file mode 100644 index 16a7fc0c89..0000000000 --- a/nix/qt/modules/qttools.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ qtModule -, stdenv -, lib -, qtbase -, qtdeclarative -, cups -, substituteAll -}: - -qtModule { - pname = "qttools"; - qtInputs = [ qtbase qtdeclarative ]; - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ cups ]; - patches = [ - ../patches/qttools-paths.patch - ]; - NIX_CFLAGS_COMPILE = [ - "-DNIX_OUTPUT_DEV=\"${placeholder "dev"}\"" - ]; - - devTools = [ - "bin/qcollectiongenerator" - "bin/linguist" - "bin/assistant" - "bin/qdoc" - "bin/lconvert" - "bin/designer" - "bin/qtattributionsscanner" - "bin/lrelease" - "bin/lrelease-pro" - "bin/pixeltool" - "bin/lupdate" - "bin/lupdate-pro" - "bin/qtdiag" - "bin/qhelpgenerator" - "bin/qtplugininfo" - "bin/qthelpconverter" - "bin/lprodump" - "bin/qdistancefieldgenerator" - ] ++ lib.optionals stdenv.isDarwin [ - "bin/macdeployqt" - ]; - -} diff --git a/nix/qt/modules/qtwayland.nix b/nix/qt/modules/qtwayland.nix deleted file mode 100644 index e28cdb438e..0000000000 --- a/nix/qt/modules/qtwayland.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ qtModule -, qtbase -, qtquick3d -, qtdeclarative -, wayland -, pkg-config -, libdrm -}: - -qtModule { - pname = "qtwayland"; - qtInputs = [ qtbase qtdeclarative ]; - buildInputs = [ wayland libdrm ]; - nativeBuildInputs = [ pkg-config ]; -} diff --git a/nix/qt/patches/cmake.patch b/nix/qt/patches/cmake.patch deleted file mode 100644 index 84192f6696..0000000000 --- a/nix/qt/patches/cmake.patch +++ /dev/null @@ -1,123 +0,0 @@ -commit bd8f6ecea0663bdd150aa48941cbd47d25874396 -Author: Nick Cao -Date: Tue Apr 19 13:49:59 2022 +0800 - - patch cmake file generation for nixpkgs packaging - - As of qt 6.3.0, installing components into different prefixes is not - supported. To workaround that, we move files to their designated in the - postInstall hook. However the generated cmake files still have - references to the original prefix, and would cause issues when using - said components as the dependency of other packages. The purpose of this - patch is to closely match the output layout of qt, and rewrite the - generated cmake files to point to the corrected pathes. - -diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx -index 5a33349b19..677a6084d6 100644 ---- a/Source/cmExportFileGenerator.cxx -+++ b/Source/cmExportFileGenerator.cxx -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - #include - -@@ -330,9 +331,21 @@ static void prefixItems(std::string& exportDirs) - for (std::string const& e : entries) { - exportDirs += sep; - sep = ";"; -- if (!cmSystemTools::FileIsFullPath(e) && -- e.find("${_IMPORT_PREFIX}") == std::string::npos) { -- exportDirs += "${_IMPORT_PREFIX}/"; -+ if (!cmSystemTools::FileIsFullPath(e)) { -+ if (std::getenv("dev")) { -+ if (cmHasLiteralPrefix(e, "include") || cmHasLiteralPrefix(e, "./include")) { -+ exportDirs += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "mkspecs") || cmHasLiteralPrefix(e, "./mkspecs")) { -+ exportDirs += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "libexec") || cmHasLiteralPrefix(e, "./libexec")) { -+ exportDirs += std::getenv("dev"); -+ } else { -+ exportDirs += std::getenv("out"); -+ } -+ } else { -+ exportDirs += std::getenv("out"); -+ } -+ exportDirs += "/"; - } - exportDirs += e; - } -diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx -index adccdfeece..ba248305bd 100644 ---- a/Source/cmExportInstallFileGenerator.cxx -+++ b/Source/cmExportInstallFileGenerator.cxx -@@ -6,6 +6,7 @@ - #include - #include - #include -+#include - - #include "cmExportSet.h" - #include "cmFileSet.h" -@@ -266,7 +267,7 @@ void cmExportInstallFileGenerator::LoadConfigFiles(std::ostream& os) - - void cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string& input) - { -- cmGeneratorExpression::ReplaceInstallPrefix(input, "${_IMPORT_PREFIX}"); -+ cmGeneratorExpression::ReplaceInstallPrefix(input, std::getenv("out")); - } - - bool cmExportInstallFileGenerator::GenerateImportFileConfig( -@@ -382,9 +383,22 @@ void cmExportInstallFileGenerator::SetImportLocationProperty( - // Construct the installed location of the target. - std::string dest = itgen->GetDestination(config); - std::string value; -+ - if (!cmSystemTools::FileIsFullPath(dest)) { -- // The target is installed relative to the installation prefix. -- value = "${_IMPORT_PREFIX}/"; -+ if (std::getenv("dev")) { -+ if (cmHasLiteralPrefix(dest, "include") || cmHasLiteralPrefix(dest, "./include")) { -+ value = std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(dest, "mkspecs") || cmHasLiteralPrefix(dest, "./mkspecs")) { -+ value = std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(dest, "libexec") || cmHasLiteralPrefix(dest, "./libexec")) { -+ value = std::getenv("dev"); -+ } else { -+ value = std::getenv("out"); -+ } -+ } else { -+ value = std::getenv("out"); -+ } -+ value += "/"; - } - value += dest; - value += "/"; -diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx -index f988e54a19..cc5c7ac9fd 100644 ---- a/Source/cmGeneratorExpression.cxx -+++ b/Source/cmGeneratorExpression.cxx -@@ -192,7 +192,20 @@ static void prefixItems(const std::string& content, std::string& result, - sep = ";"; - if (!cmSystemTools::FileIsFullPath(e) && - cmGeneratorExpression::Find(e) != 0) { -- result += prefix; -+ if (std::getenv("dev")) { -+ if (cmHasLiteralPrefix(e, "include") || cmHasLiteralPrefix(e, "./include")) { -+ result += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "mkspecs") || cmHasLiteralPrefix(e, "./mkspecs")) { -+ result += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "libexec") || cmHasLiteralPrefix(e, "./libexec")) { -+ result += std::getenv("dev"); -+ } else { -+ result += std::getenv("out"); -+ } -+ } else { -+ result += std::getenv("out"); -+ } -+ result += "/"; - } - result += e; - } diff --git a/nix/qt/patches/qtbase-qmake-pkg-config.patch b/nix/qt/patches/qtbase-qmake-pkg-config.patch deleted file mode 100644 index 90caaea1cf..0000000000 --- a/nix/qt/patches/qtbase-qmake-pkg-config.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp ---- a/qmake/generators/makefile.cpp -+++ b/qmake/generators/makefile.cpp -@@ -3390,8 +3390,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}"; - diff --git a/nix/qt/patches/qtbase-tzdir.patch b/nix/qt/patches/qtbase-tzdir.patch deleted file mode 100644 index aa85bcca55..0000000000 --- a/nix/qt/patches/qtbase-tzdir.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp -index 627a4a81..a5f50acc 100644 ---- a/src/corelib/time/qtimezoneprivate_tz.cpp -+++ b/src/corelib/time/qtimezoneprivate_tz.cpp -@@ -56,9 +56,11 @@ - // 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/lib/zoneinfo/zone.tab"); -+ path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); - - QFile tzif(path); - if (!tzif.open(QIODevice::ReadOnly)) -@@ -729,18 +729,22 @@ - 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("/usr/share/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; -+ 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; -+ } - } - } - } diff --git a/nix/qt/patches/qtdeclarative-default-disable-qmlcache.patch b/nix/qt/patches/qtdeclarative-default-disable-qmlcache.patch deleted file mode 100644 index 02e578f2d5..0000000000 --- a/nix/qt/patches/qtdeclarative-default-disable-qmlcache.patch +++ /dev/null @@ -1,13 +0,0 @@ -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/nix/qt/patches/qttools-paths.patch b/nix/qt/patches/qttools-paths.patch deleted file mode 100644 index 9a0acb70b0..0000000000 --- a/nix/qt/patches/qttools-paths.patch +++ /dev/null @@ -1,27 +0,0 @@ -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_DEV) + QLatin1String("/bin"); -+ case QLibraryInfo::LibraryExecutablesPath: -+ return QLatin1String(NIX_OUTPUT_DEV) + 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/nix/qt/qt-env.nix b/nix/qt/qt-env.nix deleted file mode 100644 index 0b41f0c073..0000000000 --- a/nix/qt/qt-env.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ buildEnv, qtbase }: name: paths: - -buildEnv { - inherit name; - paths = [ qtbase ] ++ paths; - - pathsToLink = [ "/bin" "/mkspecs" "/include" "/lib" "/share" "/libexec" ]; - extraOutputsToInstall = [ "out" "dev" ]; - - postBuild = '' - rm "$out/bin/qmake" - cp "${qtbase.dev}/bin/qmake" "$out/bin" - cat >"$out/bin/qt.conf" </dev/null \ - && ! grep -q -F "''${version%%-*}" .qmake.conf 2>/dev/null - then - echo >&2 "error: could not find version ''${version%%-*} in .qmake.conf" - echo >&2 "hint: check .qmake.conf and update the package version in Nixpkgs" - exit 1 - fi - - if [[ -z "$dontSyncQt" && -f sync.profile ]]; then - # FIXME: this probably breaks crosscompiling as it's not from nativeBuildInputs - # I don't know how to get /libexec from nativeBuildInputs to work, it's not under /bin - ${lib.getDev self.qtbase}/libexec/syncqt.pl -version "''${version%%-*}" - fi - ''; - - postFixup = '' - if [ -d "''${!outputDev}/lib/pkgconfig" ]; then - find "''${!outputDev}/lib/pkgconfig" -name '*.pc' | while read pc; do - sed -i "$pc" \ - -e "/^prefix=/ c prefix=''${!outputLib}" \ - -e "/^exec_prefix=/ c exec_prefix=''${!outputBin}" \ - -e "/^includedir=/ c includedir=''${!outputDev}/include" - done - fi - - moveQtDevTools - '' + args.postFixup or ""; - - 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/nix/qt/srcs.nix b/nix/qt/srcs.nix deleted file mode 100644 index 91b01d084b..0000000000 --- a/nix/qt/srcs.nix +++ /dev/null @@ -1,323 +0,0 @@ -{ fetchurl, mirror, }: - -let - minor = "6.4"; - patch = "${minor}.2"; - -in { - qt3d = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qt3d-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qt3d-everywhere-src-${patch}.tar.xz"; - }; - }; - qt5compat = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qt5compat-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qt5compat-everywhere-src-${patch}.tar.xz"; - }; - }; - qtactiveqt = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtactiveqt-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtactiveqt-everywhere-src-${patch}.tar.xz"; - }; - }; - qtbase = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtbase-everywhere-src-${patch}.tar.xz"; - sha256 = "qIvGztuzSHikmmIrqnnKznjPutT5X9vTZW3bIccFUl0="; - name = "qtbase-everywhere-src-${patch}.tar.xz"; - }; - }; - qtcharts = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtcharts-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtcharts-everywhere-src-${patch}.tar.xz"; - }; - }; - qtconnectivity = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtconnectivity-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtconnectivity-everywhere-src-${patch}.tar.xz"; - }; - }; - qtdatavis3d = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtdatavis3d-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtdatavis3d-everywhere-src-${patch}.tar.xz"; - }; - }; - qtdeclarative = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtdeclarative-everywhere-src-${patch}.tar.xz"; - sha256 = "0pSwKdwrLU9l2lFv3DuAiNMmQ+t/932xNai5zpBMqjc="; - name = "qtdeclarative-everywhere-src-${patch}.tar.xz"; - }; - }; - qtdoc = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtdoc-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtdoc-everywhere-src-${patch}.tar.xz"; - }; - }; - qthttpserver = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qthttpserver-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qthttpserver-everywhere-src-${patch}.tar.xz"; - }; - }; - qtimageformats = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtimageformats-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtimageformats-everywhere-src-${patch}.tar.xz"; - }; - }; - qtlanguageserver = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtlanguageserver-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtlanguageserver-everywhere-src-${patch}.tar.xz"; - }; - }; - qtlottie = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtlottie-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtlottie-everywhere-src-${patch}.tar.xz"; - }; - }; - qtmultimedia = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtmultimedia-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtmultimedia-everywhere-src-${patch}.tar.xz"; - }; - }; - qtnetworkauth = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtnetworkauth-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtnetworkauth-everywhere-src-${patch}.tar.xz"; - }; - }; - qtpositioning = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtpositioning-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtpositioning-everywhere-src-${patch}.tar.xz"; - }; - }; - qtquick3d = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtquick3d-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtquick3d-everywhere-src-${patch}.tar.xz"; - }; - }; - qtquick3dphysics = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtquick3dphysics-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtquick3dphysics-everywhere-src-${patch}.tar.xz"; - }; - }; - qtquicktimeline = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtquicktimeline-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtquicktimeline-everywhere-src-${patch}.tar.xz"; - }; - }; - qtremoteobjects = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtremoteobjects-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtremoteobjects-everywhere-src-${patch}.tar.xz"; - }; - }; - qtscxml = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtscxml-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtscxml-everywhere-src-${patch}.tar.xz"; - }; - }; - qtsensors = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtsensors-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtsensors-everywhere-src-${patch}.tar.xz"; - }; - }; - qtserialbus = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtserialbus-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtserialbus-everywhere-src-${patch}.tar.xz"; - }; - }; - qtserialport = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtserialport-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtserialport-everywhere-src-${patch}.tar.xz"; - }; - }; - qtshadertools = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtshadertools-everywhere-src-${patch}.tar.xz"; - sha256 = "VJiVm503wlS9EmqxMgz4auuKMbPqflHbZmqPlpivvWw="; - name = "qtshadertools-everywhere-src-${patch}.tar.xz"; - }; - }; - qtspeech = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtspeech-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtspeech-everywhere-src-${patch}.tar.xz"; - }; - }; - qtsvg = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtsvg-everywhere-src-${patch}.tar.xz"; - sha256 = "t0avPLF5NiHY7X6uONmtWhVUHcJ0IDEGnyrj/odZAxQ="; - name = "qtsvg-everywhere-src-${patch}.tar.xz"; - }; - }; - qttools = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qttools-everywhere-src-${patch}.tar.xz"; - sha256 = "/OlGiOqSV4Kih5NHWEmR+FRjDarbpsUq7W2T4zzQsZw="; - name = "qttools-everywhere-src-${patch}.tar.xz"; - }; - }; - qttranslations = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qttranslations-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qttranslations-everywhere-src-${patch}.tar.xz"; - }; - }; - qtvirtualkeyboard = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtvirtualkeyboard-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtvirtualkeyboard-everywhere-src-${patch}.tar.xz"; - }; - }; - qtwayland = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtwayland-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtwayland-everywhere-src-${patch}.tar.xz"; - }; - }; - qtwebchannel = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtwebchannel-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtwebchannel-everywhere-src-${patch}.tar.xz"; - }; - }; - qtwebengine = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtwebengine-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtwebengine-everywhere-src-${patch}.tar.xz"; - }; - }; - qtwebsockets = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtwebsockets-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtwebsockets-everywhere-src-${patch}.tar.xz"; - }; - }; - qtwebview = { - version = "${patch}"; - src = fetchurl { - url = - "${mirror}/official_releases/qt/${minor}/${patch}/submodules/qtwebview-everywhere-src-${patch}.tar.xz"; - sha256 = ""; - name = "qtwebview-everywhere-src-${patch}.tar.xz"; - }; - }; -} diff --git a/nix/weggli.nix b/nix/weggli.nix deleted file mode 100644 index bfebbf8df5..0000000000 --- a/nix/weggli.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ pkgs, src }: - -pkgs.rustPlatform.buildRustPackage rec { - pname = "weggli"; - version = "0.2.2"; - - inherit src; - - cargoSha256 = "9vQ58kw64ok714qtj0xkcaMUQlGwUHwxg6ycSE/gtOQ="; - default = false; - wayland = true; - - meta = with pkgs.lib; { - description = - " fast and robust semantic search tool for C and C++ codebases"; - homepage = "https://github.com/googleprojectzero/weggli"; - maintainers = [ maintainers.rprospero ]; - }; -}