diff --git a/nixos/modules/config/qt.nix b/nixos/modules/config/qt.nix index cf4e9621d70d..2b09281e467f 100644 --- a/nixos/modules/config/qt.nix +++ b/nixos/modules/config/qt.nix @@ -19,7 +19,7 @@ let pkgs.qgnomeplatform-qt6 pkgs.adwaita-qt6 ] - else if isQtStyle then [ pkgs.libsForQt5.qtstyleplugins ] + else if isQtStyle then [ pkgs.libsForQt5.qtstyleplugins pkgs.qt6Packages.qt6gtk2 ] else if isQt5ct then [ pkgs.libsForQt5.qt5ct pkgs.qt6Packages.qt6ct ] else if isLxqt then [ pkgs.lxqt.lxqt-qtplugin pkgs.lxqt.lxqt-config ] else if isKde then [ pkgs.libsForQt5.plasma-integration pkgs.libsForQt5.systemsettings ] @@ -86,6 +86,7 @@ in "adwaita-qt" "adwaita-qt6" ["libsForQt5" "qtstyleplugins"] + ["qt6Packages" "qt6gtk2"] ]; description = lib.mdDoc '' Selects the style to use for Qt applications. diff --git a/pkgs/tools/misc/qt6gtk2/default.nix b/pkgs/tools/misc/qt6gtk2/default.nix new file mode 100644 index 000000000000..69044a2bb312 --- /dev/null +++ b/pkgs/tools/misc/qt6gtk2/default.nix @@ -0,0 +1,36 @@ +{ fetchFromGitHub, lib, stdenv, gtk2, pkg-config, qmake, qtbase }: + +stdenv.mkDerivation (finalAttrs: { + pname = "qt6gtk2"; + version = "0.2"; + + src = fetchFromGitHub { + owner = "trialuser02"; + repo = finalAttrs.pname; + rev = finalAttrs.version; + hash = "sha256-g5ZCwTnNEJJ57zEwNqMxrl0EWYJMt3PquZ2IsmxQYqk="; + }; + + buildInputs = [ gtk2 qtbase ]; + nativeBuildInputs = [ pkg-config qmake ]; + + dontWrapQtApps = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib/qt-6/plugins/{platformthemes,styles} + cp -pr src/qt6gtk2-qtplugin/libqt6gtk2.so $out/lib/qt-6/plugins/platformthemes + cp -pr src/qt6gtk2-style/libqt6gtk2-style.so $out/lib/qt-6/plugins/styles + + runHook postInstall + ''; + + meta = { + description = "GTK+2.0 integration plugins for Qt6"; + license = lib.licenses.gpl2Plus; + homepage = "https://github.com/trialuser02/qt6gtk2"; + maintainers = [ lib.maintainers.misterio77 ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index b3fd53eae208..4fda684b54d6 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -33,6 +33,8 @@ in qt6ct = callPackage ../tools/misc/qt6ct { }; + qt6gtk2 = callPackage ../tools/misc/qt6gtk2 { }; + qtkeychain = callPackage ../development/libraries/qtkeychain { inherit (pkgs.darwin.apple_sdk.frameworks) CoreFoundation Security; };