Unverified Commit 9cbf22c3 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

Merge pull request #260239 from NickCao/qt6

qt6: 6.5.3 -> 6.6.0
parents 7ba31c7a 2de11a76
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, cmake
, ninja
, extra-cmake-modules
@@ -26,6 +27,15 @@ stdenv.mkDerivation rec {
    hash = "sha256-aAmpFKIIFZLPWUaOcf4V1d/wVQ7xRcnXFsqFjROsabg=";
  };

  patches = [
    # itemfakevim: fix build with qt 6.6.0
    # https://github.com/hluk/CopyQ/pull/2508
    (fetchpatch2 {
      url = "https://github.com/hluk/CopyQ/commit/a20bfff0d78296b334ff8cabb047ab5d842b7311.patch";
      hash = "sha256-F/6cQ8+O1Ttd4EFFxQas5ES6U+qxWdmYqUWRQLsVMa4=";
    })
  ];

  nativeBuildInputs = [
    cmake
    ninja
+7 −0
Original line number Diff line number Diff line
@@ -94,6 +94,13 @@ stdenv.mkDerivation rec {
      url = "https://salsa.debian.org/debian/telegram-desktop/-/raw/09b363ed5a4fcd8ecc3282b9bfede5fbb83f97ef/debian/patches/Disable-register-custom-scheme.patch";
      hash = "sha256-B8X5lnSpwwdp1HlvyXJWQPybEN+plOwimdV5gW6aY2Y=";
    })
    # lib_base: Add missing include for Qt 6.6
    (fetchpatch {
      url = "https://github.com/desktop-app/lib_base/commit/5ca91dbb811c84591780236abc31431e313faf39.patch";
      stripLen = 1;
      extraPrefix = "Telegram/lib_base/";
      hash = "sha256-eZkyMnPaAmUFYXiCmPhLRTw2Xdx0lylY+UVOckCsiaA=";
    })
  ];

  postPatch = ''
+11 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, obs-studio
, cmake
, zlib
@@ -27,6 +28,16 @@ stdenv.mkDerivation (finalAttrs: {
    fetchSubmodules = true;
  };

  patches = [
    # fix build with qt 6.6.0
    # treewide: replace deprecated qAsConst with std::as_const()
    # https://github.com/univrsal/tuna/pull/176
    (fetchpatch2 {
      url = "https://github.com/univrsal/tuna/commit/0d570e771f8d8e6ae7c85bd2b86bbf59c264789e.patch";
      hash = "sha256-A5idhMiM9funqhTm5XMIBqwy+FO1SaNPtgZjo+Vws6k=";
    })
  ];

  postInstall = ''
    mkdir $out/lib $out/share
    mv $out/obs-plugins/64bit $out/lib/obs-plugins
+11 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, cmake
, extra-cmake-modules
, pkg-config
@@ -30,6 +31,16 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-s1FaazHVtWE697BO0hIOgZVowdkq68R9x327ZnJRnlo=";
  };

  patches = [
    # fix build with qt 6.6.0
    # treewide: replace deprecated qAsConst with std::as_const()
    # https://github.com/zealdocs/zeal/pull/1565
    (fetchpatch2 {
      url = "https://github.com/zealdocs/zeal/commit/d50a0115d58df2b222ede4c3a76b9686f4716465.patch";
      hash = "sha256-Ub6RCZGpLSOjvK17Jrm+meZuZGXcC4kI3QYl5HbsLWU=";
    })
  ];

  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace 'ZEAL_VERSION_SUFFIX "-dev"' 'ZEAL_VERSION_SUFFIX ""'
+8 −14
Original line number Diff line number Diff line
@@ -49,11 +49,11 @@ let
          ./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
          ./patches/0008-qtbase-allow-translations-outside-prefix.patch
          ./patches/0008-qtbase-find-qmlimportscanner-in-macdeployqt-via-environment.patch
          ./patches/0009-qtbase-check-in-the-QML-folder-of-this-library-does-actuall.patch
          ./patches/0010-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch
          ./patches/0007-qtbase-find-tools-in-PATH.patch
          ./patches/0008-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch
          ./patches/0009-qtbase-allow-translations-outside-prefix.patch
          ./patches/0010-qtbase-find-qmlimportscanner-in-macdeployqt-via-envi.patch
          ./patches/0011-qtbase-check-in-the-QML-folder-of-this-library-does-.patch
        ];
      };
      env = callPackage ./qt-env.nix { };
@@ -65,6 +65,7 @@ let
        qtdatavis3d
        qtdeclarative
        qtdoc
        qtgraphs
        qtgrpc
        qthttpserver
        qtimageformats
@@ -105,15 +106,8 @@ let
      qtdatavis3d = callPackage ./modules/qtdatavis3d.nix { };
      qtdeclarative = callPackage ./modules/qtdeclarative.nix { };
      qtdoc = callPackage ./modules/qtdoc.nix { };
      qtgrpc = callPackage ./modules/qtgrpc.nix {
        patches = [
          (fetchpatch2 {
            # fix compatibility with protobuf 23
            url = "https://gitlab.archlinux.org/archlinux/packaging/packages/qt6-grpc/-/raw/5cfb8728ca626af41d5dc2b1f642d026c011ec56/protobuf-23.patch";
            hash = "sha256-msVQEAt0DewOnZIgymGijJEpIXbfmMUkdbIyJ0ZNuok=";
          })
        ];
      };
      qtgraphs = callPackage ./modules/qtgraphs.nix { };
      qtgrpc = callPackage ./modules/qtgrpc.nix { };
      qthttpserver = callPackage ./modules/qthttpserver.nix { };
      qtimageformats = callPackage ./modules/qtimageformats.nix { };
      qtlanguageserver = callPackage ./modules/qtlanguageserver.nix { };
Loading