gnu: shflags: Update to 1.2.3.
[jackhill/guix/guix.git] / gnu / packages / connman.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
4 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
5 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages connman)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix licenses)
28 #:use-module (guix utils)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages admin)
31 #:use-module (gnu packages enlightenment)
32 #:use-module (gnu packages glib)
33 #:use-module (gnu packages linux)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages polkit)
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages qt)
38 #:use-module (gnu packages readline)
39 #:use-module (gnu packages samba)
40 #:use-module (gnu packages tls)
41 #:use-module (gnu packages vpn))
42
43 (define-public connman
44 (package
45 (name "connman")
46 (version "1.35")
47 (source
48 (origin
49 (method url-fetch)
50 (uri (string-append "mirror://kernel.org/linux/network/connman/"
51 name "-" version ".tar.xz"))
52 (sha256
53 (base32
54 "1apj5j25kj7v1bsfv3nh54aiq873nfrsjfbj85p5qm3ihfwxxmv6"))))
55 (build-system gnu-build-system)
56 (arguments
57 `(#:configure-flags
58 (list "--enable-nmcompat"
59 "--enable-polkit"
60 "--enable-openconnect"
61 "--enable-openvpn"
62 "--enable-vpnc"
63 "--enable-pptp"
64 "--enable-l2tp"
65 ;; location for daemon state files and internal configuration
66 ;; needs to be writeable
67 "--localstatedir=/var"
68 (string-append
69 "--with-dbusconfdir=" (assoc-ref %outputs "out") "/etc")
70 (string-append
71 "--with-dbusdatadir=" (assoc-ref %outputs "out") "/share"))))
72 (native-inputs
73 `(("pkg-config", pkg-config)
74 ("python" ,python-2)))
75 (inputs
76 `(("dbus" ,dbus)
77 ("glib" ,glib)
78 ("gnutls" ,gnutls)
79 ("iptables" ,iptables)
80 ("polkit" ,polkit) ;so connman can be used by unprivileged users
81 ("readline" ,readline)
82 ;; These inputs are needed for connman to include the interface to
83 ;; these technologies so IF they are installed they can be used.
84 ;; TODO: add neard, ofono
85 ("openconnect" ,openconnect)
86 ("openvpn" ,openvpn)
87 ("ppp", ppp)
88 ("vpnc" ,vpnc)
89 ("wpa-supplicant" ,wpa-supplicant)))
90 (home-page "https://01.org/connman")
91 (synopsis "Connection management daemon")
92 (description "Connman provides a daemon for managing Internet connections.
93 The Connection Manager is designed to be slim and to use as few resources as
94 possible. It is fully modular system that can be extended through plug-ins.
95 The plug-in approach allows for easy adaption and modification for various use
96 cases. Connman implements DNS resolving and caching, DHCP clients for both
97 IPv4 and IPv6, link-local IPv4 address handling and tethering (IP connection
98 sharing) to clients via USB, ethernet, WiFi, cellular and Bluetooth.")
99 (license gpl2)))
100
101 (define-public econnman
102 (package
103 (name "econnman")
104 (version "1.1")
105 (source
106 (origin
107 (method url-fetch)
108 (uri (string-append "https://download.enlightenment.org/rel/apps/"
109 "econnman/econnman-" version ".tar.gz"))
110 (sha256
111 (base32
112 "057pwwavlvrrq26bncqnfrf449zzaim0zq717xv86av4n940gwv0"))))
113 (build-system gnu-build-system)
114 (arguments
115 `(#:configure-flags '("--localstatedir=/var")
116 #:phases
117 (modify-phases %standard-phases
118 (add-after 'unpack 'set-home-directory
119 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
120 (lambda _ (setenv "HOME" "/tmp") #t))
121 (add-after 'install 'wrap-binary
122 (lambda* (#:key outputs #:allow-other-keys)
123 (let* ((out (assoc-ref outputs "out"))
124 (bin (string-append out "/bin/econnman-bin")))
125 (wrap-program bin
126 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
127 #t))))))
128 (native-inputs `(("pkg-config" ,pkg-config)))
129 (inputs
130 `(("efl" ,efl)
131 ("python-2" ,python-2)
132 ("python2-dbus" ,python2-dbus)
133 ("python2-efl" ,python2-efl)))
134 (home-page "https://www.enlightenment.org")
135 (synopsis "Connman User Interface written using the EFL")
136 (description
137 "An EFL user interface for the @code{connman} connection manager.")
138 (license lgpl3)))
139
140 (define-public cmst
141 (package
142 (name "cmst")
143 (version "2017.09.19")
144 (source
145 (origin
146 (method url-fetch)
147 (uri (string-append
148 "https://github.com/andrew-bibb/cmst/releases/download/cmst-"
149 version "/cmst-" version ".tar.xz"))
150 (sha256
151 (base32 "0dh4639n3l8a19svaagib41hdq5q7x70bnc28dmnwy4jflf38yrm"))))
152 (inputs
153 `(("qtbase" ,qtbase)))
154 (native-inputs
155 `(("qttools" ,qttools)))
156 (build-system gnu-build-system)
157 (arguments
158 '(#:phases
159 (modify-phases %standard-phases
160 (replace 'configure
161 (lambda* (#:key outputs #:allow-other-keys)
162 (zero?
163 (system* "qmake"
164 (string-append "PREFIX="
165 (assoc-ref outputs "out"))))))
166 (add-before 'install 'fix-Makefiles
167 (lambda* (#:key inputs outputs #:allow-other-keys)
168 (let ((out (assoc-ref outputs "out")))
169 (substitute* (find-files "." "Makefile")
170 (("INSTALL_ROOT)")
171 (string-append "INSTALL_ROOT)" out))
172 (("/usr/bin") "/bin"))))))))
173 (home-page "https://github.com/andrew-bibb/cmst")
174 (synopsis "Qt frontend for Connman")
175 (description
176 "Cmst is a Qt based frontend for the @code{connman} connection manager.
177 This package also provides a systemtray icon.")
178 (license x11)))