17 mobile-broadband-provider-info,
18 gobject-introspection,
26 _experimental-update-script-combinators,
27 makeHardcodeGsettingsPatch,
30 stdenv.mkDerivation rec {
41 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
42 sha256 = "U6b7KxkK03xZhsrtPpi+3nw8YCOZ7k+TyPwFQwPXbas=";
46 # Needed for wingpanel-indicator-network and switchboard-plug-network
47 ./hardcode-gsettings.patch
63 ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
72 mobile-broadband-provider-info
74 ++ lib.optionals withGtk4 [
77 ++ lib.optionals withGnome [
78 # advanced certificate chooser
83 "-Dgcr=${lib.boolToString withGnome}"
84 "-Dlibnma_gtk4=${lib.boolToString withGtk4}"
88 substituteInPlace src/nma-ws/nma-eap.c --subst-var-by \
89 NM_APPLET_GSETTINGS ${glib.makeSchemaPath "$out" "$name"}
93 glib-compile-schemas $out/share/glib-2.0/schemas
97 hardcodeGsettingsPatch = makeHardcodeGsettingsPatch {
98 schemaIdToVariableMapping = {
99 "org.gnome.nm-applet.eap" = "NM_APPLET_GSETTINGS";
105 updateSource = gnome.updateScript {
106 packageName = "libnma";
107 versionPolicy = "odd-unstable";
109 updateGsettingsPatch = _experimental-update-script-combinators.copyAttrOutputToFile "libnma.hardcodeGsettingsPatch" ./hardcode-gsettings.patch;
111 _experimental-update-script-combinators.sequence [
118 homepage = "https://gitlab.gnome.org/GNOME/libnma";
119 description = "NetworkManager UI utilities (libnm version)";
120 license = licenses.gpl2Plus; # Mix of GPL and LPGL 2+
121 maintainers = teams.gnome.members;
122 platforms = platforms.linux;