gnu: Add cl-ana.statistical-learning.
[jackhill/guix/guix.git] / gnu / packages / connman.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016, 2017, 2019 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, 2018, 2019 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 python-xyz)
38 #:use-module (gnu packages qt)
39 #:use-module (gnu packages readline)
40 #:use-module (gnu packages samba)
41 #:use-module (gnu packages tls)
42 #:use-module (gnu packages vpn))
43
44 (define-public connman
45 (package
46 (name "connman")
47 (version "1.37")
48 (source
49 (origin
50 (method url-fetch)
51 (uri (string-append "mirror://kernel.org/linux/network/connman/"
52 "connman-" version ".tar.xz"))
53 (sha256
54 (base32 "05kfjiqhqfmbbwc4snnyvi5hc4zxanac62f6gcwaf5mvn0z9pqkc"))))
55 (build-system gnu-build-system)
56 (arguments
57 `(#:configure-flags
58 (list "--enable-nmcompat"
59 "--enable-polkit" ; Polkit doesn't need to be present at build time.
60 "--enable-openconnect"
61 "--enable-openvpn"
62 "--enable-vpnc"
63 "--enable-l2tp"
64 "--localstatedir=/var"
65 (string-append
66 "--with-dbusconfdir=" (assoc-ref %outputs "out") "/etc")
67 (string-append
68 "--with-dbusdatadir=" (assoc-ref %outputs "out") "/share"))))
69 (native-inputs
70 `(("pkg-config" ,pkg-config)
71 ("python" ,python-wrapper)))
72 (inputs
73 `(("dbus" ,dbus)
74 ("glib" ,glib)
75 ("gnutls" ,gnutls)
76 ("iptables" ,iptables)
77 ("readline" ,readline)
78 ;; These inputs are needed for connman to include the interface to
79 ;; these technologies so IF they are installed they can be used.
80 ;; TODO: add neard, ofono
81 ("openconnect" ,openconnect)
82 ("openvpn" ,openvpn)
83 ("ppp" ,ppp)
84 ("vpnc" ,vpnc)
85 ("wpa-supplicant" ,wpa-supplicant)
86 ("xl2tpd" ,xl2tpd)))
87 (home-page "https://01.org/connman")
88 (synopsis "Connection management daemon")
89 (description "Connman provides a daemon for managing Internet connections.
90 The Connection Manager is designed to be slim and to use as few resources as
91 possible. It is fully modular system that can be extended through plug-ins.
92 The plug-in approach allows for easy adaption and modification for various use
93 cases. Connman implements DNS resolving and caching, DHCP clients for both
94 IPv4 and IPv6, link-local IPv4 address handling and tethering (IP connection
95 sharing) to clients via USB, ethernet, WiFi, cellular and Bluetooth.")
96 (license gpl2)))
97
98 (define-public econnman
99 (package
100 (name "econnman")
101 (version "1.1")
102 (source
103 (origin
104 (method url-fetch)
105 (uri (string-append "https://download.enlightenment.org/rel/apps/"
106 "econnman/econnman-" version ".tar.gz"))
107 (sha256
108 (base32
109 "057pwwavlvrrq26bncqnfrf449zzaim0zq717xv86av4n940gwv0"))))
110 (build-system gnu-build-system)
111 (arguments
112 `(#:configure-flags '("--localstatedir=/var")
113 #:phases
114 (modify-phases %standard-phases
115 (add-after 'unpack 'set-home-directory
116 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
117 (lambda _ (setenv "HOME" "/tmp") #t))
118 (add-after 'install 'wrap-binary
119 (lambda* (#:key outputs #:allow-other-keys)
120 (let* ((out (assoc-ref outputs "out"))
121 (bin (string-append out "/bin/econnman-bin")))
122 (wrap-program bin
123 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
124 #t))))))
125 (native-inputs `(("pkg-config" ,pkg-config)))
126 (inputs
127 `(("efl" ,efl)
128 ("python" ,python-wrapper)
129 ("python-dbus" ,python-dbus)
130 ("python-efl" ,python-efl)))
131 (home-page "https://www.enlightenment.org")
132 (synopsis "Connman User Interface written using the EFL")
133 (description
134 "An EFL user interface for the @code{connman} connection manager.")
135 (license lgpl3)))
136
137 (define-public cmst
138 (package
139 (name "cmst")
140 (version "2019.01.13")
141 (source
142 (origin
143 (method url-fetch)
144 (uri (string-append
145 "https://github.com/andrew-bibb/cmst/releases/download/cmst-"
146 version "/cmst-" version ".tar.xz"))
147 (sha256
148 (base32 "1cn6xz2rpkf5kx5d6p2x2lh85zppjacp59l6gj3n6x12p90al1vl"))))
149 (inputs
150 `(("qtbase" ,qtbase)))
151 (native-inputs
152 `(("qttools" ,qttools)))
153 (build-system gnu-build-system)
154 (arguments
155 '(#:phases
156 (modify-phases %standard-phases
157 (replace 'configure
158 (lambda* (#:key outputs #:allow-other-keys)
159 (invoke "qmake"
160 (string-append "PREFIX="
161 (assoc-ref outputs "out")))))
162 (add-before 'build 'fix-Makefiles
163 (lambda* (#:key inputs outputs #:allow-other-keys)
164 (let ((out (assoc-ref outputs "out")))
165 (substitute* (find-files "." "Makefile")
166 (("INSTALL_ROOT)")
167 (string-append "INSTALL_ROOT)" out))
168 (("/usr") ""))
169 (substitute* '("apps/cmstapp/cmstapp.pro"
170 "apps/cmstapp/code/control_box/controlbox.cpp"
171 "apps/rootapp/rootapp.pro"
172 "apps/rootapp/system/org.cmst.roothelper.service"
173 "cmst.pri"
174 "cmst.pro")
175 (("/usr") out)
176 (("/etc") (string-append out "/etc")))
177 #t))))))
178 (home-page "https://github.com/andrew-bibb/cmst")
179 (synopsis "Qt frontend for Connman")
180 (description
181 "Cmst is a Qt based frontend for the @code{connman} connection manager.
182 This package also provides a systemtray icon.")
183 (license x11)))