| 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, 2020 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.38") |
| 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 "0awkqigvhwwxiapw0x6yd4whl465ka8a4al0v2pcqy9ggjlsqc6b")))) |
| 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 | ("libmnl" ,libmnl) |
| 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) |
| 84 | ("ppp" ,ppp) |
| 85 | ("vpnc" ,vpnc) |
| 86 | ("wpa-supplicant" ,wpa-supplicant) |
| 87 | ("xl2tpd" ,xl2tpd))) |
| 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))) |
| 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 |
| 116 | (add-after 'unpack 'set-home-directory |
| 117 | ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2 |
| 118 | (lambda _ (setenv "HOME" "/tmp") #t)) |
| 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) |
| 129 | ("python" ,python-wrapper) |
| 130 | ("python-dbus" ,python-dbus) |
| 131 | ("python-efl" ,python-efl))) |
| 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))) |
| 137 | |
| 138 | (define-public cmst |
| 139 | (package |
| 140 | (name "cmst") |
| 141 | (version "2019.01.13") |
| 142 | (source |
| 143 | (origin |
| 144 | (method url-fetch) |
| 145 | (uri (string-append |
| 146 | "https://github.com/andrew-bibb/cmst/releases/download/cmst-" |
| 147 | version "/cmst-" version ".tar.xz")) |
| 148 | (sha256 |
| 149 | (base32 "1cn6xz2rpkf5kx5d6p2x2lh85zppjacp59l6gj3n6x12p90al1vl")))) |
| 150 | (inputs |
| 151 | `(("qtbase" ,qtbase))) |
| 152 | (native-inputs |
| 153 | `(("qttools" ,qttools))) |
| 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) |
| 160 | (invoke "qmake" |
| 161 | (string-append "PREFIX=" |
| 162 | (assoc-ref outputs "out"))))) |
| 163 | (add-before 'build 'fix-Makefiles |
| 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)) |
| 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)))))) |
| 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))) |