summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorFlorian Pelz <pelzflorian@pelzflorian.de>2019-05-15 23:41:44 +0200
committerLudovic Courtès <ludo@gnu.org>2019-05-16 13:30:32 +0200
commit3e9c80b27ae04e07e8a8cf2f2b1118b6dba926d4 (patch)
tree075bc2cfe2753ee293c087555c1a371c80c2cc52 /gnu
parentce10e6053bb02e936b3a0862f3a3f86010b948d0 (diff)
downloadguix-3e9c80b27ae04e07e8a8cf2f2b1118b6dba926d4.tar.gz
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.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/gnome.scm23
1 files changed, 21 insertions, 2 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 09984717cc..9070673cf6 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -35,6 +35,7 @@
 ;;; Copyright © 2018, 2019 Timothy Sample <samplet@ngyro.com>
 ;;; Copyright © 2019 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5502,7 +5503,24 @@ to virtual private networks (VPNs) via OpenVPN.")
                (base32
                 "1js0i2kwfklahsn77qgxzdscy33drrlym3mrj1qhlw0zf8ri56ya"))))
     (build-system glib-or-gtk-build-system)
-    (arguments '(#:configure-flags '("--disable-migration")))
+    (arguments '(#:configure-flags '("--disable-migration")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (add-after 'unpack 'patch-source
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (let ((mbpi (assoc-ref inputs
+                                              "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)
+                            (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)
+                            (string-append start "\"" iso-codes
+                                           "/share\", " end)))
+                         #t))))))
     (native-inputs
      `(("intltool" ,intltool)
        ("gobject-introspection" ,gobject-introspection)
@@ -5519,7 +5537,8 @@ to virtual private networks (VPNs) via OpenVPN.")
        ("libsecret" ,libsecret)
        ("libselinux" ,libselinux)
        ("jansson" ,jansson) ; for team support
-       ("modem-manager" ,modem-manager)))
+       ("modem-manager" ,modem-manager)
+       ("mobile-broadband-provider-info" ,mobile-broadband-provider-info)))
     (synopsis "Applet for managing network connections")
     (home-page "https://www.gnome.org/projects/NetworkManager/")
     (description