gnu: igt-gpu-tools: Don't use NAME in source URI.
[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, 2018 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.36")
48 (source
49 (origin
50 (method url-fetch)
51 (uri (string-append "mirror://kernel.org/linux/network/connman/"
52 name "-" version ".tar.xz"))
53 (sha256
54 (base32
55 "0x00dq5c2frz06md3g5y0jh5kbcj2hrfl5qjcqga8gs4ri0xp2f7"))))
56 (build-system gnu-build-system)
57 (arguments
58 `(#:configure-flags
59 (list "--enable-nmcompat"
60 "--enable-polkit"
61 "--enable-openconnect"
62 "--enable-openvpn"
63 "--enable-vpnc"
64 "--enable-pptp"
65 "--enable-l2tp"
66 ;; location for daemon state files and internal configuration
67 ;; needs to be writeable
68 "--localstatedir=/var"
69 (string-append
70 "--with-dbusconfdir=" (assoc-ref %outputs "out") "/etc")
71 (string-append
72 "--with-dbusdatadir=" (assoc-ref %outputs "out") "/share"))))
73 (native-inputs
74 `(("pkg-config" ,pkg-config)
75 ("python" ,python-2)))
76 (inputs
77 `(("dbus" ,dbus)
78 ("glib" ,glib)
79 ("gnutls" ,gnutls)
80 ("iptables" ,iptables)
81 ("polkit" ,polkit) ;so connman can be used by unprivileged users
82 ("readline" ,readline)
83 ;; These inputs are needed for connman to include the interface to
84 ;; these technologies so IF they are installed they can be used.
85 ;; TODO: add neard, ofono
86 ("openconnect" ,openconnect)
87 ("openvpn" ,openvpn)
88 ("ppp" ,ppp)
89 ("vpnc" ,vpnc)
90 ("wpa-supplicant" ,wpa-supplicant)))
91 (home-page "https://01.org/connman")
92 (synopsis "Connection management daemon")
93 (description "Connman provides a daemon for managing Internet connections.
94 The Connection Manager is designed to be slim and to use as few resources as
95 possible. It is fully modular system that can be extended through plug-ins.
96 The plug-in approach allows for easy adaption and modification for various use
97 cases. Connman implements DNS resolving and caching, DHCP clients for both
98 IPv4 and IPv6, link-local IPv4 address handling and tethering (IP connection
99 sharing) to clients via USB, ethernet, WiFi, cellular and Bluetooth.")
100 (license gpl2)))
101
102 (define-public econnman
103 (package
104 (name "econnman")
105 (version "1.1")
106 (source
107 (origin
108 (method url-fetch)
109 (uri (string-append "https://download.enlightenment.org/rel/apps/"
110 "econnman/econnman-" version ".tar.gz"))
111 (sha256
112 (base32
113 "057pwwavlvrrq26bncqnfrf449zzaim0zq717xv86av4n940gwv0"))))
114 (build-system gnu-build-system)
115 (arguments
116 `(#:configure-flags '("--localstatedir=/var")
117 #:phases
118 (modify-phases %standard-phases
119 (add-after 'unpack 'set-home-directory
120 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
121 (lambda _ (setenv "HOME" "/tmp") #t))
122 (add-after 'install 'wrap-binary
123 (lambda* (#:key outputs #:allow-other-keys)
124 (let* ((out (assoc-ref outputs "out"))
125 (bin (string-append out "/bin/econnman-bin")))
126 (wrap-program bin
127 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
128 #t))))))
129 (native-inputs `(("pkg-config" ,pkg-config)))
130 (inputs
131 `(("efl" ,efl)
132 ("python-2" ,python-2)
133 ("python2-dbus" ,python2-dbus)
134 ("python2-efl" ,python2-efl)))
135 (home-page "https://www.enlightenment.org")
136 (synopsis "Connman User Interface written using the EFL")
137 (description
138 "An EFL user interface for the @code{connman} connection manager.")
139 (license lgpl3)))
140
141 (define-public cmst
142 (package
143 (name "cmst")
144 (version "2017.09.19")
145 (source
146 (origin
147 (method url-fetch)
148 (uri (string-append
149 "https://github.com/andrew-bibb/cmst/releases/download/cmst-"
150 version "/cmst-" version ".tar.xz"))
151 (sha256
152 (base32 "0dh4639n3l8a19svaagib41hdq5q7x70bnc28dmnwy4jflf38yrm"))))
153 (inputs
154 `(("qtbase" ,qtbase)))
155 (native-inputs
156 `(("qttools" ,qttools)))
157 (build-system gnu-build-system)
158 (arguments
159 '(#:phases
160 (modify-phases %standard-phases
161 (replace 'configure
162 (lambda* (#:key outputs #:allow-other-keys)
163 (invoke "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)))