connman.scm 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. (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 enlightenment)
  31. #:use-module (gnu packages glib)
  32. #:use-module (gnu packages linux)
  33. #:use-module (gnu packages pkg-config)
  34. #:use-module (gnu packages polkit)
  35. #:use-module (gnu packages python)
  36. #:use-module (gnu packages python-xyz)
  37. #:use-module (gnu packages qt)
  38. #:use-module (gnu packages readline)
  39. #:use-module (gnu packages samba)
  40. #:use-module (gnu packages tls)
  41. #:use-module (gnu packages vpn))
  42. (define-public connman
  43. (package
  44. (name "connman")
  45. (version "1.36")
  46. (source
  47. (origin
  48. (method url-fetch)
  49. (uri (string-append "mirror://kernel.org/linux/network/connman/"
  50. name "-" version ".tar.xz"))
  51. (sha256
  52. (base32
  53. "0x00dq5c2frz06md3g5y0jh5kbcj2hrfl5qjcqga8gs4ri0xp2f7"))))
  54. (build-system gnu-build-system)
  55. (arguments
  56. `(#:configure-flags
  57. (list "--enable-nmcompat"
  58. "--enable-polkit"
  59. "--enable-openconnect"
  60. "--enable-openvpn"
  61. "--enable-vpnc"
  62. "--enable-pptp"
  63. "--enable-l2tp"
  64. ;; location for daemon state files and internal configuration
  65. ;; needs to be writeable
  66. "--localstatedir=/var"
  67. (string-append
  68. "--with-dbusconfdir=" (assoc-ref %outputs "out") "/etc")
  69. (string-append
  70. "--with-dbusdatadir=" (assoc-ref %outputs "out") "/share"))))
  71. (native-inputs
  72. `(("pkg-config" ,pkg-config)
  73. ("python" ,python-2)))
  74. (inputs
  75. `(("dbus" ,dbus)
  76. ("glib" ,glib)
  77. ("gnutls" ,gnutls)
  78. ("iptables" ,iptables)
  79. ("polkit" ,polkit) ;so connman can be used by unprivileged users
  80. ("readline" ,readline)
  81. ;; These inputs are needed for connman to include the interface to
  82. ;; these technologies so IF they are installed they can be used.
  83. ;; TODO: add neard, ofono
  84. ("openconnect" ,openconnect)
  85. ("openvpn" ,openvpn)
  86. ("ppp" ,ppp)
  87. ("vpnc" ,vpnc)
  88. ("wpa-supplicant" ,wpa-supplicant)))
  89. (home-page "https://01.org/connman")
  90. (synopsis "Connection management daemon")
  91. (description "Connman provides a daemon for managing Internet connections.
  92. The Connection Manager is designed to be slim and to use as few resources as
  93. possible. It is fully modular system that can be extended through plug-ins.
  94. The plug-in approach allows for easy adaption and modification for various use
  95. cases. Connman implements DNS resolving and caching, DHCP clients for both
  96. IPv4 and IPv6, link-local IPv4 address handling and tethering (IP connection
  97. sharing) to clients via USB, ethernet, WiFi, cellular and Bluetooth.")
  98. (license gpl2)))
  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-2" ,python-2)
  130. ("python2-dbus" ,python2-dbus)
  131. ("python2-efl" ,python2-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. (define-public cmst
  138. (package
  139. (name "cmst")
  140. (version "2017.09.19")
  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 "0dh4639n3l8a19svaagib41hdq5q7x70bnc28dmnwy4jflf38yrm"))))
  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 'install '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/bin") "/bin"))))))))
  169. (home-page "https://github.com/andrew-bibb/cmst")
  170. (synopsis "Qt frontend for Connman")
  171. (description
  172. "Cmst is a Qt based frontend for the @code{connman} connection manager.
  173. This package also provides a systemtray icon.")
  174. (license x11)))