Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

networkmanagerapplet: hardcode for eap gschema

This is needed for the networking plug in pantheon.switchboard
and the related indicator in pantheon.wingpanel

(cherry picked from commit cb3579d8c41383d77e5d4b19604edcd383d43dcf)

+37
+5
pkgs/tools/networking/network-manager/applet.nix
··· 33 33 34 34 nativeBuildInputs = [ meson ninja intltool pkgconfig wrapGAppsHook gobject-introspection python3 gtk-doc docbook_xsl docbook_xml_dtd_43 libxml2 ]; 35 35 36 + # Needed for wingpanel-indicator-network and switchboard-plug-network 37 + patches = [ ./hardcode-gsettings.patch ]; 38 + 36 39 postPatch = '' 37 40 chmod +x meson_post_install.py # patchShebangs requires executable file 38 41 patchShebangs meson_post_install.py 42 + 43 + substituteInPlace src/wireless-security/eap-method.c --subst-var-by NM_APPLET_GSETTINGS $lib/share/gsettings-schemas/${name}/glib-2.0/schemas 39 44 ''; 40 45 41 46 passthru = {
+32
pkgs/tools/networking/network-manager/hardcode-gsettings.patch
··· 1 + diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c 2 + index 2e9daa23..6663b3ce 100644 3 + --- a/src/wireless-security/eap-method.c 4 + +++ b/src/wireless-security/eap-method.c 5 + @@ -265,8 +265,11 @@ eap_method_ca_cert_ignore_get (EAPMethod *method, NMConnection *connection) 6 + static GSettings * 7 + _get_ca_ignore_settings (NMConnection *connection) 8 + { 9 + + GSettingsSchemaSource *schema_source; 10 + + g_autoptr (GSettingsSchema) *schema; 11 + GSettings *settings; 12 + - char *path = NULL; 13 + + 14 + + g_autofree char *path = NULL; 15 + const char *uuid; 16 + 17 + g_return_val_if_fail (connection, NULL); 18 + @@ -274,9 +277,12 @@ _get_ca_ignore_settings (NMConnection *connection) 19 + uuid = nm_connection_get_uuid (connection); 20 + g_return_val_if_fail (uuid && *uuid, NULL); 21 + 22 + + schema_source = g_settings_schema_source_new_from_directory ("@NM_APPLET_GSETTINGS@", g_settings_schema_source_get_default (), TRUE, NULL); 23 + + schema = g_settings_schema_source_lookup (schema_source, "org.gnome.nm-applet.eap", FALSE); 24 + + g_settings_schema_source_unref (schema_source); 25 + + 26 + path = g_strdup_printf ("/org/gnome/nm-applet/eap/%s/", uuid); 27 + - settings = g_settings_new_with_path ("org.gnome.nm-applet.eap", path); 28 + - g_free (path); 29 + + settings = g_settings_new_full (schema, NULL, path); 30 + 31 + return settings; 32 + }