16 , mobile-broadband-provider-info
17 , gobject-introspection
25 , _experimental-update-script-combinators
26 , makeHardcodeGsettingsPatch
29 stdenv.mkDerivation rec {
33 outputs = [ "out" "dev" "devdoc" ];
36 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
37 sha256 = "U6b7KxkK03xZhsrtPpi+3nw8YCOZ7k+TyPwFQwPXbas=";
41 # Needed for wingpanel-indicator-network and switchboard-plug-network
42 ./hardcode-gsettings.patch
56 ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
64 mobile-broadband-provider-info
65 ] ++ lib.optionals withGtk4 [
67 ] ++ lib.optionals withGnome [
68 # advanced certificate chooser
73 "-Dgcr=${lib.boolToString withGnome}"
74 "-Dlibnma_gtk4=${lib.boolToString withGtk4}"
78 substituteInPlace src/nma-ws/nma-eap.c --subst-var-by \
79 NM_APPLET_GSETTINGS ${glib.makeSchemaPath "$out" "$name"}
83 glib-compile-schemas $out/share/glib-2.0/schemas
87 hardcodeGsettingsPatch = makeHardcodeGsettingsPatch {
88 schemaIdToVariableMapping = {
89 "org.gnome.nm-applet.eap" = "NM_APPLET_GSETTINGS";
95 updateSource = gnome.updateScript {
96 packageName = "libnma";
97 versionPolicy = "odd-unstable";
99 updateGsettingsPatch = _experimental-update-script-combinators.copyAttrOutputToFile "libnma.hardcodeGsettingsPatch" ./hardcode-gsettings.patch;
101 _experimental-update-script-combinators.sequence [
108 homepage = "https://gitlab.gnome.org/GNOME/libnma";
109 description = "NetworkManager UI utilities (libnm version)";
110 license = licenses.gpl2Plus; # Mix of GPL and LPGL 2+
111 maintainers = teams.gnome.members;
112 platforms = platforms.linux;