networkmanagerapplet: 1.8.24 -> 1.16.0

No longer carries libnma, so we can drop a bunch of dependencies and
simplify a bit.
This commit is contained in:
Tor Hedin Brønner 2020-03-15 16:49:22 +01:00 committed by Jan Tojnar
parent f07bad3201
commit 50438bd5b1
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
2 changed files with 11 additions and 63 deletions

View File

@ -2,19 +2,15 @@
, fetchurl
, meson
, ninja
, intltool
, gtk-doc
, gettext
, pkg-config
, networkmanager
, gnome3
, libnotify
, libsecret
, polkit
, isocodes
, modemmanager
, libxml2
, docbook_xsl
, docbook_xml_dtd_43
, libnma
, mobile-broadband-provider-info
, glib-networking
, gsettings-desktop-schemas
@ -25,70 +21,54 @@
, python3
, gtk3
, libappindicator-gtk3
, withGnome ? true
, gcr
, glib
}:
let
stdenv.mkDerivation rec {
pname = "network-manager-applet";
version = "1.8.24";
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
version = "1.16.0";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "1gzvz4wfqfsfclqg56y954al8x6fmz71cnxlx1i4nqr7a25bp2qi";
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1rf3nm0hjcy9f8ajb4vmvwy503w8yj8d4daxkcb7w7i7b92qmyfn";
};
mesonFlags = [
"-Dlibnm_gtk=false" # It is deprecated
"-Dselinux=false"
"-Dappindicator=yes"
"-Dgcr=${if withGnome then "true" else "false"}"
];
outputs = [ "out" "lib" "dev" "devdoc" "man" ];
outputs = [ "out" "man" ];
buildInputs = [
libnma
gtk3
networkmanager
libnotify
libsecret
gsettings-desktop-schemas
polkit
isocodes
mobile-broadband-provider-info
libgudev
modemmanager
jansson
glib-networking
libappindicator-gtk3
gnome3.adwaita-icon-theme
] ++ stdenv.lib.optionals withGnome [ gcr ]; # advanced certificate chooser
];
nativeBuildInputs = [
meson
ninja
intltool
gettext
pkg-config
wrapGAppsHook
gobject-introspection
python3
gtk-doc
docbook_xsl
docbook_xml_dtd_43
libxml2
];
# Needed for wingpanel-indicator-network and switchboard-plug-network
patches = [ ./hardcode-gsettings.patch ];
postPatch = ''
chmod +x meson_post_install.py # patchShebangs requires executable file
patchShebangs meson_post_install.py
substituteInPlace src/wireless-security/eap-method.c --subst-var-by NM_APPLET_GSETTINGS ${glib.makeSchemaPath "$lib" "${pname}-${version}"}
'';
passthru = {
@ -99,7 +79,7 @@ in stdenv.mkDerivation rec {
};
meta = with stdenv.lib; {
homepage = https://wiki.gnome.org/Projects/NetworkManager;
homepage = "https://gitlab.gnome.org/GNOME/network-manager-applet/";
description = "NetworkManager control applet for GNOME";
license = licenses.gpl2;
maintainers = with maintainers; [ phreedom ];

View File

@ -1,32 +0,0 @@
diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c
index 2e9daa23..6663b3ce 100644
--- a/src/wireless-security/eap-method.c
+++ b/src/wireless-security/eap-method.c
@@ -265,8 +265,11 @@ eap_method_ca_cert_ignore_get (EAPMethod *method, NMConnection *connection)
static GSettings *
_get_ca_ignore_settings (NMConnection *connection)
{
+ GSettingsSchemaSource *schema_source;
+ g_autoptr (GSettingsSchema) *schema;
GSettings *settings;
- char *path = NULL;
+
+ g_autofree char *path = NULL;
const char *uuid;
g_return_val_if_fail (connection, NULL);
@@ -274,9 +277,12 @@ _get_ca_ignore_settings (NMConnection *connection)
uuid = nm_connection_get_uuid (connection);
g_return_val_if_fail (uuid && *uuid, NULL);
+ schema_source = g_settings_schema_source_new_from_directory ("@NM_APPLET_GSETTINGS@", g_settings_schema_source_get_default (), TRUE, NULL);
+ schema = g_settings_schema_source_lookup (schema_source, "org.gnome.nm-applet.eap", FALSE);
+ g_settings_schema_source_unref (schema_source);
+
path = g_strdup_printf ("/org/gnome/nm-applet/eap/%s/", uuid);
- settings = g_settings_new_with_path ("org.gnome.nm-applet.eap", path);
- g_free (path);
+ settings = g_settings_new_full (schema, NULL, path);
return settings;
}