diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml index d5689a338e10..f1a46ddd2ce3 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml @@ -1120,6 +1120,15 @@ Superuser created successfully. release notes. + + + GNOME desktop environment now enables + QGnomePlatform as the Qt platform theme, + which should avoid crashes when opening file chooser dialogs + in Qt apps by using XDG desktop portal. Additionally, it will + make the apps fit better visually. + + diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md index 07f7fdad4e4d..f9ee2a3e7d12 100644 --- a/nixos/doc/manual/release-notes/rl-2111.section.md +++ b/nixos/doc/manual/release-notes/rl-2111.section.md @@ -319,3 +319,5 @@ To be able to access the web UI this port needs to be opened in the firewall. - MariaDB was upgraded from 10.5.x to 10.6.x. Please read the [upstream release notes](https://mariadb.com/kb/en/changes-improvements-in-mariadb-106/) for changes and upgrade instructions. - The MariaDB C client library, also known as libmysqlclient or mariadb-connector-c, was upgraded from 3.1.x to 3.2.x. While this should hopefully not have any impact, this upgrade comes with some changes to default behavior, so you might want to review the [upstream release notes](https://mariadb.com/kb/en/changes-and-improvements-in-mariadb-connector-c-32/). + +- GNOME desktop environment now enables `QGnomePlatform` as the Qt platform theme, which should avoid crashes when opening file chooser dialogs in Qt apps by using XDG desktop portal. Additionally, it will make the apps fit better visually. diff --git a/nixos/modules/services/x11/desktop-managers/gnome.nix b/nixos/modules/services/x11/desktop-managers/gnome.nix index b0859321a525..4bc42525906c 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome.nix @@ -372,6 +372,13 @@ in xdg.portal.enable = true; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + # Harmonize Qt5 application style and also make them use the portal for file chooser dialog. + qt5 = { + enable = mkDefault true; + platformTheme = mkDefault "gnome"; + style = mkDefault "adwaita"; + }; + networking.networkmanager.enable = mkDefault true; services.xserver.updateDbusEnvironment = true; diff --git a/pkgs/development/libraries/qgnomeplatform/default.nix b/pkgs/development/libraries/qgnomeplatform/default.nix index e3bb938f5f8f..bfb1859ba655 100644 --- a/pkgs/development/libraries/qgnomeplatform/default.nix +++ b/pkgs/development/libraries/qgnomeplatform/default.nix @@ -2,12 +2,12 @@ , lib , fetchFromGitHub , nix-update-script +, cmake , pkg-config -, gtk3 +, adwaita-qt , glib +, gtk3 , qtbase -, qmake -, qtx11extras , pantheon , substituteAll , gsettings-desktop-schemas @@ -15,13 +15,13 @@ mkDerivation rec { pname = "qgnomeplatform"; - version = "0.6.1"; + version = "0.8.0"; src = fetchFromGitHub { owner = "FedoraQt"; repo = "QGnomePlatform"; rev = version; - sha256 = "1mwqg2zk0sfjq54vz2jjahbgi5sxw8rb71h6mgg459wp99mhlqi0"; + sha256 = "C/n8i5j0UWfxhP10c4j89U+LrpPozXnam4fIPYMXZAA="; }; patches = [ @@ -33,24 +33,21 @@ mkDerivation rec { ]; nativeBuildInputs = [ + cmake pkg-config - qmake ]; buildInputs = [ + adwaita-qt glib gtk3 qtbase - qtx11extras ]; - postPatch = '' - # Fix plugin dir - substituteInPlace decoration/decoration.pro \ - --replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix" - substituteInPlace theme/theme.pro \ - --replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix" - ''; + cmakeFlags = [ + "-DGLIB_SCHEMAS_DIR=${glib.getSchemaPath gsettings-desktop-schemas}" + "-DQT_PLUGINS_DIR=${placeholder "out"}/${qtbase.qtPluginPrefix}" + ]; passthru = { updateScript = nix-update-script { diff --git a/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch b/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch index 9b342d7cf832..40f7f98f25c7 100644 --- a/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch +++ b/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch @@ -1,13 +1,14 @@ -diff --git a/common/gnomehintssettings.cpp b/common/gnomehintssettings.cpp -index 9860e57..40fa6ec 100644 ---- a/common/gnomehintssettings.cpp -+++ b/common/gnomehintssettings.cpp -@@ -80,9 +80,17 @@ void gtkMessageHandler(const gchar *log_domain, - GnomeHintsSettings::GnomeHintsSettings() - : QObject(0) +diff --git a/src/common/gnomesettings.cpp b/src/common/gnomesettings.cpp +index 717cc9b..ee255ea 100644 +--- a/src/common/gnomesettings.cpp ++++ b/src/common/gnomesettings.cpp +@@ -150,10 +150,18 @@ GnomeSettingsPrivate::GnomeSettingsPrivate(QObject *parent) + : GnomeSettings(parent) , m_usePortal(checkUsePortalSupport()) + , m_canUseFileChooserPortal(!m_usePortal) - , m_gnomeDesktopSettings(g_settings_new("org.gnome.desktop.wm.preferences")) - , m_settings(g_settings_new("org.gnome.desktop.interface")) + , m_fallbackFont(new QFont(QLatin1String("Sans"), 10)) { + g_autoptr(GSettingsSchemaSource) schemaSource = nullptr; + g_autoptr(GSettingsSchema) gnomeDesktopSchema = nullptr; diff --git a/pkgs/development/web/nodejs/v12.nix b/pkgs/development/web/nodejs/v12.nix index e59b79594203..7717dfa6c9cf 100644 --- a/pkgs/development/web/nodejs/v12.nix +++ b/pkgs/development/web/nodejs/v12.nix @@ -8,7 +8,7 @@ let in buildNodejs { inherit enableNpm; - version = "12.22.5"; - sha256 = "057xhxk440pxlgqpblsh4vfwmfzy0fx1h6q3jr2j79y559ngy9zr"; + version = "12.22.6"; + sha256 = "0yhgkcp7lx5nglxsrybbjymx1fys3wkbbhkj6h6652gnp0b2y0n2"; patches = lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff; } diff --git a/pkgs/development/web/nodejs/v14.nix b/pkgs/development/web/nodejs/v14.nix index bad8ebfa5aed..1ec04407f899 100644 --- a/pkgs/development/web/nodejs/v14.nix +++ b/pkgs/development/web/nodejs/v14.nix @@ -7,7 +7,7 @@ let in buildNodejs { inherit enableNpm; - version = "14.17.5"; - sha256 = "1a0zj505nhpfcj19qvjy2hvc5a7gadykv51y0rc6032qhzzsgca2"; + version = "14.17.6"; + sha256 = "0pmd0haav2ychhcsw44klx6wfn8c7j1rsw08rc8hcm5i3h5wsn7l"; patches = lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff; } diff --git a/pkgs/tools/system/monit/default.nix b/pkgs/tools/system/monit/default.nix index 9e176677c761..93cdbe6d546e 100644 --- a/pkgs/tools/system/monit/default.nix +++ b/pkgs/tools/system/monit/default.nix @@ -1,17 +1,22 @@ -{ lib, stdenv -, fetchurl, bison, flex +{ lib +, stdenv +, fetchurl +, bison +, flex , zlib -, usePAM ? stdenv.hostPlatform.isLinux, pam -, useSSL ? true, openssl +, usePAM ? stdenv.hostPlatform.isLinux +, pam +, useSSL ? true +, openssl }: stdenv.mkDerivation rec { pname = "monit"; - version = "5.27.2"; + version = "5.29.0"; src = fetchurl { url = "${meta.homepage}dist/monit-${version}.tar.gz"; - sha256 = "sha256-2ICceNXcHtenujKlpVxRFIVRMsxNpIBfjTqvjPRuqkw="; + sha256 = "sha256-9mXm3R8mp0tWgomah3k0Fn3islguBIZS7PA2MYR3iF8="; }; nativeBuildInputs = [ bison flex ]; @@ -22,10 +27,10 @@ stdenv.mkDerivation rec { configureFlags = [ (lib.withFeature usePAM "pam") ] ++ (if useSSL then [ - "--with-ssl-incl-dir=${openssl.dev}/include" - "--with-ssl-lib-dir=${openssl.out}/lib" - ] else [ - "--without-ssl" + "--with-ssl-incl-dir=${openssl.dev}/include" + "--with-ssl-lib-dir=${openssl.out}/lib" + ] else [ + "--without-ssl" ]) ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ # will need to check both these are true for musl "libmonit_cv_setjmp_available=yes" @@ -33,7 +38,7 @@ stdenv.mkDerivation rec { ]; meta = { - homepage = "http://mmonit.com/monit/"; + homepage = "https://mmonit.com/monit/"; description = "Monitoring system"; license = lib.licenses.agpl3; maintainers = with lib.maintainers; [ raskin wmertens ryantm ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e28ffda411f7..eb9a7b07e07e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18520,7 +18520,7 @@ with pkgs; qrupdate = callPackage ../development/libraries/qrupdate { }; - qgnomeplatform = libsForQt514.callPackage ../development/libraries/qgnomeplatform { }; + qgnomeplatform = libsForQt5.callPackage ../development/libraries/qgnomeplatform { }; randomx = callPackage ../development/libraries/randomx { };