connman.scm 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2016, 2017, 2019, 2021 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. (define-module (gnu packages connman)
  23. #:use-module (guix packages)
  24. #:use-module (guix download)
  25. #:use-module (guix build-system gnu)
  26. #:use-module (guix licenses)
  27. #:use-module (guix utils)
  28. #:use-module (gnu packages)
  29. #:use-module (gnu packages admin)
  30. #:use-module (gnu packages compression)
  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. (define-public connman
  44. (package
  45. (name "connman")
  46. (version "1.40")
  47. (source
  48. (origin
  49. (method url-fetch)
  50. (uri (string-append "mirror://kernel.org/linux/network/connman/"
  51. "connman-" version ".tar.xz"))
  52. (sha256
  53. (base32 "04nbxpaxykncp65fyh4lk778vn9145fbxhxa8hbkmailw9yawmqs"))))
  54. (build-system gnu-build-system)
  55. (arguments
  56. `(#:configure-flags
  57. (list "--enable-nmcompat"
  58. "--enable-polkit" ; Polkit doesn't need to be present at build time.
  59. "--enable-openconnect"
  60. "--enable-openvpn"
  61. "--enable-vpnc"
  62. "--enable-l2tp"
  63. "--localstatedir=/var"
  64. (string-append
  65. "--with-dbusconfdir=" (assoc-ref %outputs "out") "/etc")
  66. (string-append
  67. "--with-dbusdatadir=" (assoc-ref %outputs "out") "/share"))))
  68. (native-inputs
  69. `(("pkg-config" ,pkg-config)
  70. ("python" ,python-wrapper)))
  71. (inputs
  72. `(("dbus" ,dbus)
  73. ("glib" ,glib)
  74. ("gnutls" ,gnutls)
  75. ("iptables" ,iptables)
  76. ("libmnl" ,libmnl)
  77. ("lz4" ,lz4) ; required by openconnect.pc
  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. (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. `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_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. (define-public cmst
  137. (package
  138. (name "cmst")
  139. (version "2020.11.01")
  140. (source
  141. (origin
  142. (method url-fetch)
  143. (uri (string-append
  144. "https://github.com/andrew-bibb/cmst/releases/download/"
  145. version "/cmst-" version ".tar.xz"))
  146. (sha256
  147. (base32 "0jn12wxwjznady6aniwmvahg1dj25p902sdwj0070biv6vx5c7dq"))))
  148. (inputs
  149. `(("qtbase" ,qtbase-5)))
  150. (native-inputs
  151. `(("qttools" ,qttools)))
  152. (build-system gnu-build-system)
  153. (arguments
  154. '(#:phases
  155. (modify-phases %standard-phases
  156. (replace 'configure
  157. (lambda* (#:key outputs #:allow-other-keys)
  158. (invoke "qmake"
  159. (string-append "PREFIX="
  160. (assoc-ref outputs "out")))))
  161. (add-before 'build 'fix-Makefiles
  162. (lambda* (#:key inputs outputs #:allow-other-keys)
  163. (let ((out (assoc-ref outputs "out")))
  164. (substitute* (find-files "." "Makefile")
  165. (("INSTALL_ROOT)")
  166. (string-append "INSTALL_ROOT)" out))
  167. (("/usr") ""))
  168. (substitute* '("apps/cmstapp/cmstapp.pro"
  169. "apps/cmstapp/code/control_box/controlbox.cpp"
  170. "apps/rootapp/rootapp.pro"
  171. "apps/rootapp/system/org.cmst.roothelper.service"
  172. "cmst.pri"
  173. "cmst.pro")
  174. (("/usr") out)
  175. (("/etc") (string-append out "/etc")))
  176. #t))))))
  177. (home-page "https://github.com/andrew-bibb/cmst")
  178. (synopsis "Qt frontend for Connman")
  179. (description
  180. "Cmst is a Qt based frontend for the @code{connman} connection manager.
  181. This package also provides a systemtray icon.")
  182. (license x11)))