Add gnome theme for qt6

This commit is contained in:
linsui 2022-10-23 21:46:02 +08:00
parent 41bd3b658a
commit 16f0d689de
4 changed files with 47 additions and 8 deletions

View file

@ -12,7 +12,13 @@ let
isLxqt = cfg.platformTheme == "lxqt";
isKde = cfg.platformTheme == "kde";
packages = if isQGnome then [ pkgs.qgnomeplatform pkgs.adwaita-qt ]
packages =
if isQGnome then [
pkgs.qgnomeplatform
pkgs.adwaita-qt
pkgs.qgnomeplatform-qt6
pkgs.adwaita-qt6
]
else if isQtStyle then [ pkgs.libsForQt5.qtstyleplugins ]
else if isQt5ct then [ pkgs.libsForQt5.qt5ct ]
else if isLxqt then [ pkgs.lxqt.lxqt-qtplugin pkgs.lxqt.lxqt-config ]
@ -40,6 +46,7 @@ in
example = "gnome";
relatedPackages = [
"qgnomeplatform"
"qgnomeplatform-qt6"
["libsForQt5" "qtstyleplugins"]
["libsForQt5" "qt5ct"]
["lxqt" "lxqt-qtplugin"]
@ -71,6 +78,7 @@ in
example = "adwaita";
relatedPackages = [
"adwaita-qt"
"adwaita-qt6"
["libsForQt5" "qtstyleplugins"]
];
description = lib.mdDoc ''

View file

@ -1,16 +1,17 @@
{ mkDerivation
, stdenv
{ stdenv
, lib
, fetchFromGitHub
, nix-update-script
, cmake
, ninja
, qtbase
, qtwayland
, qt5
, xorg
, useQt6 ? false
}:
mkDerivation rec {
stdenv.mkDerivation rec {
pname = "adwaita-qt";
version = "1.4.1";
@ -30,9 +31,19 @@ mkDerivation rec {
buildInputs = [
qtbase
qt5.qtx11extras
] ++ lib.optionals stdenv.isLinux [
xorg.libxcb
] ++ lib.optionals (!useQt6) [
qt5.qtx11extras
] ++ lib.optionals useQt6 [
qtwayland
];
# Qt setup hook complains about missing `wrapQtAppsHook` otherwise.
dontWrapQtApps = true;
cmakeFlags = lib.optionals useQt6 [
"-DUSE_QT6=true"
];
postPatch = ''

View file

@ -1,19 +1,22 @@
{ mkDerivation
{ stdenv
, lib
, fetchFromGitHub
, nix-update-script
, cmake
, pkg-config
, adwaita-qt
, adwaita-qt6
, glib
, gtk3
, qtbase
, qtwayland
, pantheon
, substituteAll
, gsettings-desktop-schemas
, useQt6 ? false
}:
mkDerivation rec {
stdenv.mkDerivation rec {
pname = "qgnomeplatform";
version = "0.8.4";
@ -38,15 +41,24 @@ mkDerivation rec {
];
buildInputs = [
adwaita-qt
glib
gtk3
qtbase
] ++ lib.optionals (!useQt6) [
adwaita-qt
] ++ lib.optionals useQt6 [
adwaita-qt6
qtwayland
];
# Qt setup hook complains about missing `wrapQtAppsHook` otherwise.
dontWrapQtApps = true;
cmakeFlags = [
"-DGLIB_SCHEMAS_DIR=${glib.getSchemaPath gsettings-desktop-schemas}"
"-DQT_PLUGINS_DIR=${placeholder "out"}/${qtbase.qtPluginPrefix}"
] ++ lib.optionals useQt6 [
"-DUSE_QT6=true"
];
passthru = {

View file

@ -22554,6 +22554,10 @@ with pkgs;
qgnomeplatform = libsForQt5.callPackage ../development/libraries/qgnomeplatform { };
qgnomeplatform-qt6 = qt6Packages.callPackage ../development/libraries/qgnomeplatform {
useQt6 = true;
};
randomx = darwin.apple_sdk_11_0.callPackage ../development/libraries/randomx { };
remodel = callPackage ../development/tools/remodel {
@ -26425,6 +26429,10 @@ with pkgs;
adwaita-qt = libsForQt5.callPackage ../data/themes/adwaita-qt { };
adwaita-qt6 = qt6Packages.callPackage ../data/themes/adwaita-qt {
useQt6 = true;
};
adw-gtk3 = callPackage ../data/themes/adw-gtk3 { };
agave = callPackage ../data/fonts/agave { };