summaryrefslogtreecommitdiff
path: root/gnu/packages/gnome.scm
diff options
context:
space:
mode:
authorJelle Licht <jlicht@fsfe.org>2019-07-07 21:01:05 +0200
committerJelle Licht <jlicht@fsfe.org>2019-07-17 11:08:43 +0200
commit633422b0e656d1bb2f94f1fcc3e045bc0bd97dc4 (patch)
tree2f2ff039c07f52a3c6e2a95488a264781e87313a /gnu/packages/gnome.scm
parentd9af93c4ea4e0798e36d2db5a849aa44273371f7 (diff)
gnu: network-manager-openvpn: Patch hardcoded paths.
* gnu/packages/gnome.scm (network-manager-openvpn)[arguments]: Add custom 'patch-path' phase to replace references to openvpn and modprobe. [inputs]: Add kmod.
Diffstat (limited to 'gnu/packages/gnome.scm')
-rw-r--r--gnu/packages/gnome.scm22
1 files changed, 21 insertions, 1 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 600b73f7e9..c06e074782 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -37,6 +37,7 @@
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2019 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2019 Jelle Licht <jlicht@fsfe.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -5447,12 +5448,31 @@ services.")
"0gyrv46h9k17qym48qacq4zpxbap6hi17shn921824zm98m2bdvr"))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--enable-absolute-paths" "--localstatedir=/var")))
+ `(#:configure-flags '("--enable-absolute-paths" "--localstatedir=/var")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'patch-path
+ (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
+ (let* ((ovpn (string-append (assoc-ref inputs "openvpn")
+ "/sbin/openvpn"))
+ (modprobe (string-append (assoc-ref inputs "kmod")
+ "/bin/modprobe"))
+ (pretty-ovpn (string-append "\"" ovpn "\"")))
+ (for-each
+ (lambda (file)
+ (substitute* file
+ (("\"/usr/local/sbin/openvpn\"") pretty-ovpn)
+ (("\"/usr/sbin/openvpn\"") pretty-ovpn)
+ (("\"/sbin/openvpn\"") pretty-ovpn)
+ (("/sbin/modprobe") modprobe)))
+ '("src/nm-openvpn-service.c" "properties/nm-openvpn-editor.c")))
+ #t)))))
(native-inputs
`(("pkg-config" ,pkg-config)
("intltool" ,intltool)))
(inputs
`(("gtk+" ,gtk+)
+ ("kmod" ,kmod)
("openvpn" ,openvpn)
("network-manager" ,network-manager)
("network-manager-applet" ,network-manager-applet) ;for libnma