diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-04-27 21:04:56 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-04-27 21:04:56 +0000 |
commit | a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e (patch) | |
tree | 47950e79183035018882419c4eff5047d1537b99 /nixpkgs/pkgs/development/libraries/qgnomeplatform | |
parent | 5b00523fb58512232b819a301c4309f579c7f09c (diff) | |
parent | 22a3bf9fb9edad917fb6cd1066d58b5e426ee975 (diff) | |
download | nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.gz nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.bz2 nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.lz nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.xz nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.zst nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.zip |
Merge commit '22a3bf9fb9edad917fb6cd1066d58b5e426ee975'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qgnomeplatform')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/qgnomeplatform/default.nix | 25 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch | 24 |
2 files changed, 47 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qgnomeplatform/default.nix b/nixpkgs/pkgs/development/libraries/qgnomeplatform/default.nix index 3626e15cfc75..434b3ab84f9c 100644 --- a/nixpkgs/pkgs/development/libraries/qgnomeplatform/default.nix +++ b/nixpkgs/pkgs/development/libraries/qgnomeplatform/default.nix @@ -1,4 +1,16 @@ -{ mkDerivation, lib, fetchFromGitHub, pkgconfig, gtk3, qtbase, qmake, qtx11extras, pantheon }: +{ mkDerivation +, lib +, fetchFromGitHub +, pkgconfig +, gtk3 +, glib +, qtbase +, qmake +, qtx11extras +, pantheon +, substituteAll +, gsettings-desktop-schemas +}: mkDerivation rec { pname = "qgnomeplatform"; @@ -11,12 +23,21 @@ mkDerivation rec { sha256 = "0fb1mzs6sx76bl7f0z2xhc0jq6y1c55jrw1v3na8577is6g5ji0a"; }; + patches = [ + # Hardcode GSettings schema path to avoid crashes from missing schemas + (substituteAll { + src = ./hardcode-gsettings.patch; + gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas; + }) + ]; + nativeBuildInputs = [ pkgconfig qmake ]; buildInputs = [ + glib gtk3 qtbase qtx11extras @@ -38,7 +59,7 @@ mkDerivation rec { meta = with lib; { description = "QPlatformTheme for a better Qt application inclusion in GNOME"; - homepage = https://github.com/FedoraQt/QGnomePlatform; + homepage = "https://github.com/FedoraQt/QGnomePlatform"; license = licenses.lgpl21Plus; maintainers = with maintainers; [ worldofpeace ]; platforms = platforms.linux; diff --git a/nixpkgs/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch b/nixpkgs/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch new file mode 100644 index 000000000000..9b342d7cf832 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch @@ -0,0 +1,24 @@ +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) + , m_usePortal(checkUsePortalSupport()) +- , m_gnomeDesktopSettings(g_settings_new("org.gnome.desktop.wm.preferences")) +- , m_settings(g_settings_new("org.gnome.desktop.interface")) + { ++ g_autoptr(GSettingsSchemaSource) schemaSource = nullptr; ++ g_autoptr(GSettingsSchema) gnomeDesktopSchema = nullptr; ++ g_autoptr(GSettingsSchema) settingsSchema = nullptr; ++ ++ schemaSource = g_settings_schema_source_new_from_directory("@gds_gsettings_path@", g_settings_schema_source_get_default(), true, nullptr); ++ gnomeDesktopSchema = g_settings_schema_source_lookup(schemaSource, "org.gnome.desktop.wm.preferences", false); ++ m_gnomeDesktopSettings = g_settings_new_full(gnomeDesktopSchema, nullptr, nullptr); ++ settingsSchema = g_settings_schema_source_lookup(schemaSource, "org.gnome.desktop.interface", false); ++ m_settings = g_settings_new_full(settingsSchema, nullptr, nullptr); ++ + gtk_init(nullptr, nullptr); + + // Set log handler to suppress false GtkDialog warnings |