quaternion: add support for qt6

This commit is contained in:
Peter Hoeg 2024-03-05 08:32:00 +01:00
parent 8243a08149
commit d4f34d235d
2 changed files with 17 additions and 7 deletions

View file

@ -4,7 +4,7 @@
, cmake
, wrapQtAppsHook
, qtbase
, qtquickcontrols2
, qtquickcontrols2 ? null # only a separate package on qt5
, qtkeychain
, qtmultimedia
, qttools
@ -13,14 +13,18 @@
, olm
}:
stdenv.mkDerivation rec {
let
inherit (lib) cmakeBool;
in
stdenv.mkDerivation (finalAttrs: {
pname = "quaternion";
version = "0.0.96.1";
src = fetchFromGitHub {
owner = "quotient-im";
repo = "Quaternion";
rev = "refs/tags/${version}";
rev = finalAttrs.version;
hash = "sha256-lRCSEb/ldVnEv6z0moU4P5rf0ssKb9Bw+4QEssLjuwI=";
};
@ -36,8 +40,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake qttools wrapQtAppsHook ];
# qt6 needs UTF
env.LANG = "C.UTF-8";
cmakeFlags = [
"-DBUILD_WITH_QT6=OFF"
# drop this from 0.0.97 onwards as it will be qt6 only
(cmakeBool "BUILD_WITH_QT6" ((lib.versions.major qtbase.version) == "6"))
];
postInstall =
@ -55,6 +63,6 @@ stdenv.mkDerivation rec {
homepage = "https://matrix.org/ecosystem/clients/quaternion/";
license = licenses.gpl3;
maintainers = with maintainers; [ peterhoeg ];
inherit (qtquickcontrols2.meta) platforms;
inherit (qtbase.meta) platforms;
};
}
})

View file

@ -4367,7 +4367,9 @@ with pkgs;
charles4
;
quaternion = libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { };
quaternion-qt5 = libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { };
quaternion-qt6 = qt6Packages.callPackage ../applications/networking/instant-messengers/quaternion { };
quaternion = quaternion-qt6;
tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { };