Commit | Line | Data |
---|---|---|
9478c9d8 | 1 | ;;; GNU Guix --- Functional package management for GNU |
55350f83 | 2 | ;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il> |
b5f57f60 | 3 | ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> |
261f5691 | 4 | ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> |
5c7d6224 | 5 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
1943a258 | 6 | ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
9478c9d8 EF |
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) | |
8c158517 | 31 | #:use-module (gnu packages enlightenment) |
9478c9d8 EF |
32 | #:use-module (gnu packages glib) |
33 | #:use-module (gnu packages linux) | |
34 | #:use-module (gnu packages pkg-config) | |
125e3cde | 35 | #:use-module (gnu packages polkit) |
9478c9d8 | 36 | #:use-module (gnu packages python) |
44d10b1f | 37 | #:use-module (gnu packages python-xyz) |
5819431c | 38 | #:use-module (gnu packages qt) |
9478c9d8 EF |
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") | |
1943a258 | 47 | (version "1.38") |
9478c9d8 EF |
48 | (source |
49 | (origin | |
50 | (method url-fetch) | |
f2bca8db | 51 | (uri (string-append "mirror://kernel.org/linux/network/connman/" |
dd93e8a2 | 52 | "connman-" version ".tar.xz")) |
9478c9d8 | 53 | (sha256 |
1943a258 | 54 | (base32 "0awkqigvhwwxiapw0x6yd4whl465ka8a4al0v2pcqy9ggjlsqc6b")))) |
9478c9d8 EF |
55 | (build-system gnu-build-system) |
56 | (arguments | |
57 | `(#:configure-flags | |
58 | (list "--enable-nmcompat" | |
4eb639cc | 59 | "--enable-polkit" ; Polkit doesn't need to be present at build time. |
9478c9d8 EF |
60 | "--enable-openconnect" |
61 | "--enable-openvpn" | |
62 | "--enable-vpnc" | |
9478c9d8 | 63 | "--enable-l2tp" |
028bf3c0 | 64 | "--localstatedir=/var" |
9478c9d8 EF |
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 | |
c695fb76 | 70 | `(("pkg-config" ,pkg-config) |
4eb639cc | 71 | ("python" ,python-wrapper))) |
9478c9d8 EF |
72 | (inputs |
73 | `(("dbus" ,dbus) | |
74 | ("glib" ,glib) | |
75 | ("gnutls" ,gnutls) | |
76 | ("iptables" ,iptables) | |
1943a258 | 77 | ("libmnl" ,libmnl) |
9478c9d8 EF |
78 | ("readline" ,readline) |
79 | ;; These inputs are needed for connman to include the interface to | |
80 | ;; these technologies so IF they are installed they can be used. | |
81 | ;; TODO: add neard, ofono | |
82 | ("openconnect" ,openconnect) | |
83 | ("openvpn" ,openvpn) | |
c695fb76 | 84 | ("ppp" ,ppp) |
9478c9d8 | 85 | ("vpnc" ,vpnc) |
4eb639cc EF |
86 | ("wpa-supplicant" ,wpa-supplicant) |
87 | ("xl2tpd" ,xl2tpd))) | |
9478c9d8 EF |
88 | (home-page "https://01.org/connman") |
89 | (synopsis "Connection management daemon") | |
90 | (description "Connman provides a daemon for managing Internet connections. | |
91 | The Connection Manager is designed to be slim and to use as few resources as | |
92 | possible. It is fully modular system that can be extended through plug-ins. | |
93 | The plug-in approach allows for easy adaption and modification for various use | |
94 | cases. Connman implements DNS resolving and caching, DHCP clients for both | |
95 | IPv4 and IPv6, link-local IPv4 address handling and tethering (IP connection | |
96 | sharing) to clients via USB, ethernet, WiFi, cellular and Bluetooth.") | |
97 | (license gpl2))) | |
8c158517 EF |
98 | |
99 | (define-public econnman | |
100 | (package | |
101 | (name "econnman") | |
102 | (version "1.1") | |
103 | (source | |
104 | (origin | |
105 | (method url-fetch) | |
106 | (uri (string-append "https://download.enlightenment.org/rel/apps/" | |
107 | "econnman/econnman-" version ".tar.gz")) | |
108 | (sha256 | |
109 | (base32 | |
110 | "057pwwavlvrrq26bncqnfrf449zzaim0zq717xv86av4n940gwv0")))) | |
111 | (build-system gnu-build-system) | |
112 | (arguments | |
113 | `(#:configure-flags '("--localstatedir=/var") | |
114 | #:phases | |
115 | (modify-phases %standard-phases | |
8f1f2784 EF |
116 | (add-after 'unpack 'set-home-directory |
117 | ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2 | |
118 | (lambda _ (setenv "HOME" "/tmp") #t)) | |
8c158517 EF |
119 | (add-after 'install 'wrap-binary |
120 | (lambda* (#:key outputs #:allow-other-keys) | |
121 | (let* ((out (assoc-ref outputs "out")) | |
122 | (bin (string-append out "/bin/econnman-bin"))) | |
123 | (wrap-program bin | |
124 | `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))) | |
125 | #t)))))) | |
126 | (native-inputs `(("pkg-config" ,pkg-config))) | |
127 | (inputs | |
128 | `(("efl" ,efl) | |
11af5446 EF |
129 | ("python" ,python-wrapper) |
130 | ("python-dbus" ,python-dbus) | |
131 | ("python-efl" ,python-efl))) | |
8c158517 EF |
132 | (home-page "https://www.enlightenment.org") |
133 | (synopsis "Connman User Interface written using the EFL") | |
134 | (description | |
135 | "An EFL user interface for the @code{connman} connection manager.") | |
136 | (license lgpl3))) | |
5819431c MO |
137 | |
138 | (define-public cmst | |
139 | (package | |
140 | (name "cmst") | |
8fd60494 | 141 | (version "2019.01.13") |
5819431c MO |
142 | (source |
143 | (origin | |
144 | (method url-fetch) | |
145 | (uri (string-append | |
146 | "https://github.com/andrew-bibb/cmst/releases/download/cmst-" | |
b6b5a3db | 147 | version "/cmst-" version ".tar.xz")) |
5819431c | 148 | (sha256 |
8fd60494 | 149 | (base32 "1cn6xz2rpkf5kx5d6p2x2lh85zppjacp59l6gj3n6x12p90al1vl")))) |
5819431c | 150 | (inputs |
5c7d6224 | 151 | `(("qtbase" ,qtbase))) |
5819431c | 152 | (native-inputs |
5c7d6224 | 153 | `(("qttools" ,qttools))) |
5819431c MO |
154 | (build-system gnu-build-system) |
155 | (arguments | |
156 | '(#:phases | |
157 | (modify-phases %standard-phases | |
158 | (replace 'configure | |
159 | (lambda* (#:key outputs #:allow-other-keys) | |
5c1c1716 RW |
160 | (invoke "qmake" |
161 | (string-append "PREFIX=" | |
162 | (assoc-ref outputs "out"))))) | |
55350f83 | 163 | (add-before 'build 'fix-Makefiles |
5819431c MO |
164 | (lambda* (#:key inputs outputs #:allow-other-keys) |
165 | (let ((out (assoc-ref outputs "out"))) | |
166 | (substitute* (find-files "." "Makefile") | |
167 | (("INSTALL_ROOT)") | |
168 | (string-append "INSTALL_ROOT)" out)) | |
55350f83 EF |
169 | (("/usr") "")) |
170 | (substitute* '("apps/cmstapp/cmstapp.pro" | |
171 | "apps/cmstapp/code/control_box/controlbox.cpp" | |
172 | "apps/rootapp/rootapp.pro" | |
173 | "apps/rootapp/system/org.cmst.roothelper.service" | |
174 | "cmst.pri" | |
175 | "cmst.pro") | |
176 | (("/usr") out) | |
177 | (("/etc") (string-append out "/etc"))) | |
178 | #t)))))) | |
5819431c MO |
179 | (home-page "https://github.com/andrew-bibb/cmst") |
180 | (synopsis "Qt frontend for Connman") | |
181 | (description | |
182 | "Cmst is a Qt based frontend for the @code{connman} connection manager. | |
183 | This package also provides a systemtray icon.") | |
184 | (license x11))) |