Subject: bug#35640: Make USB modems just work on Guix

From: Ludovic Courtès <[email-masked]>
Date: Thu, 16 May 2019 13:30:17 +0200

"pelzflorian (Florian Pelz)" <[email-masked]> skribis:

> From 627e41c4741acd5b91771131a1646bb89b8c270b Mon Sep 17 00:00:00 2001
> From: Florian Pelz <[email-masked]>
> Date: Wed, 15 May 2019 23:41:44 +0200
> Subject: [PATCH] gnu: network-manager-applet: Patch libnma for modem support.
>
> * gnu/packages/gnome.scm (network-manager-applet): Patch libnma to load
> iso-codes and mobile-broadband-provider-info from the store and not require
> them in the profile.

Great.  Applied with the changes below; the spacing change is to please
Emacs (C-M-a & co. get confused by opening parentheses at the beginning
of a line.)

Thanks,
Ludo’.

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index fc024ebf72..9070673cf6 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5512,14 +5512,15 @@ to virtual private networks (VPNs) via OpenVPN.")
                                               "mobile-broadband-provider-info"))
                              (iso-codes (assoc-ref inputs "iso-codes")))
                          (substitute* "src/libnma/nma-mobile-providers.c"
-                           (("(g_build_filename \\()dirs\\[i\\].*, \
-(MOBILE_BROADBAND_PROVIDER_INFO.*)" all start end)
+                           (("(g_build_filename \\()dirs\\[i\\].*,\
+ (MOBILE_BROADBAND_PROVIDER_INFO.*)" all start end)
                             (string-append start "\"" mbpi "/share\", " end)))
                          (substitute* "src/libnma/nma-mobile-providers.c"
-                           (("(g_build_filename \\()dirs\\[i\\].*, \
-(ISO_3166_COUNTRY_CODES.*)" all start end)
+                           (("(g_build_filename \\()dirs\\[i\\].*,\
+ (ISO_3166_COUNTRY_CODES.*)" all start end)
                             (string-append start "\"" iso-codes
-                                           "/share\", " end)))))))))
+                                           "/share\", " end)))
+                         #t))))))
     (native-inputs
      `(("intltool" ,intltool)
        ("gobject-introspection" ,gobject-introspection)