gnu: packages: Use 'search-patches' everywhere.
[jackhill/guix/guix.git] / gnu / packages / vpn.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages vpn)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages gettext)
30 #:use-module (gnu packages gnupg)
31 #:use-module (gnu packages linux)
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages tls)
35 #:use-module (gnu packages xml))
36
37 (define-public gvpe
38 (package
39 (name "gvpe")
40 (version "2.25")
41 (source (origin
42 (method url-fetch)
43 (uri (string-append "mirror://gnu/gvpe/gvpe-"
44 version ".tar.gz"))
45 (sha256
46 (base32
47 "1gsipcysvsk80gvyn9jnk9g0xg4ng9yd5zp066jnmpgs52d2vhvk"))))
48 (build-system gnu-build-system)
49 (home-page "http://software.schmorp.de/pkg/gvpe.html")
50 (inputs `(("openssl" ,openssl)
51 ("zlib" ,zlib)))
52 (synopsis "Secure VPN among multiple nodes over an untrusted network")
53 (description
54 "The GNU Virtual Private Ethernet creates a virtual network
55 with multiple nodes using a variety of transport protocols. It works
56 by creating encrypted host-to-host tunnels between multiple
57 endpoints.")
58 (license license:gpl3+)))
59
60 (define-public vpnc
61 (package
62 (name "vpnc")
63 (version "0.5.3")
64 (source (origin
65 (method url-fetch)
66 (uri (string-append "https://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-"
67 version ".tar.gz"))
68 (sha256 (base32
69 "1128860lis89g1s21hqxvap2nq426c9j4bvgghncc1zj0ays7kj6"))
70 (patches (search-patches "vpnc-script.patch"))))
71 (build-system gnu-build-system)
72 (inputs `(("libgcrypt" ,libgcrypt)
73 ("perl" ,perl)
74
75 ;; The following packages provide commands that 'vpnc-script'
76 ;; expects.
77 ("net-tools" ,net-tools) ;ifconfig, route
78 ("iproute2" ,iproute))) ;ip
79 (arguments
80 `(#:tests? #f ; there is no check target
81 #:phases
82 (modify-phases %standard-phases
83 (replace 'configure
84 (lambda* (#:key outputs #:allow-other-keys)
85 (let ((out (assoc-ref outputs "out")))
86 (substitute* "Makefile"
87 (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
88 (substitute* "Makefile"
89 (("ETCDIR=/etc/vpnc") (string-append "ETCDIR=" out
90 "/etc/vpnc"))))))
91 (add-after 'install 'wrap-vpnc-script
92 (lambda* (#:key inputs outputs #:allow-other-keys)
93 ;; Wrap 'etc/vpnc/vpnc-script' so that it finds the commands it
94 ;; needs. Assume coreutils/grep/sed are in $PATH.
95 (let ((out (assoc-ref outputs "out")))
96 (wrap-program (string-append out "/etc/vpnc/vpnc-script")
97 `("PATH" ":" prefix
98 (,(string-append (assoc-ref inputs "net-tools")
99 "/sbin")
100 ,(string-append (assoc-ref inputs "net-tools")
101 "/bin")
102 ,(string-append (assoc-ref inputs "iproute2")
103 "/sbin"))))))))))
104 (synopsis "Client for Cisco VPN concentrators")
105 (description
106 "vpnc is a VPN client compatible with Cisco's EasyVPN equipment.
107 It supports IPSec (ESP) with Mode Configuration and Xauth. It supports only
108 shared-secret IPSec authentication with Xauth, AES (256, 192, 128), 3DES,
109 1DES, MD5, SHA1, DH1/2/5 and IP tunneling. It runs entirely in userspace.
110 Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
111 (license license:gpl2+) ; some file are bsd-2, see COPYING
112 (home-page "http://www.unix-ag.uni-kl.de/~massar/vpnc/")))
113
114
115 (define-public openconnect
116 (package
117 (name "openconnect")
118 (version "7.05")
119 (source (origin
120 (method url-fetch)
121 (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/"
122 "openconnect-" version ".tar.gz"))
123 (sha256 (base32
124 "1i102yr8yp2ny587n6pd966443h1pqxyw5q0n5afq575046jj98g"))))
125 (build-system gnu-build-system)
126 (inputs
127 `(("libxml2" ,libxml2)
128 ("gnutls" ,gnutls)
129 ("vpnc" ,vpnc)
130 ("zlib" ,zlib)))
131 (native-inputs
132 `(("gettext" ,gnu-gettext)
133 ("pkg-config" ,pkg-config)))
134 (arguments
135 `(#:configure-flags
136 `(,(string-append "--with-vpnc-script="
137 (assoc-ref %build-inputs "vpnc")
138 "/etc/vpnc/vpnc-script"))))
139 (synopsis "Client for Cisco VPN")
140 (description
141 "OpenConnect is a client for Cisco's AnyConnect SSL VPN, which is
142 supported by the ASA5500 Series, by IOS 12.4(9)T or later on Cisco SR500,
143 870, 880, 1800, 2800, 3800, 7200 Series and Cisco 7301 Routers,
144 and probably others.")
145 (license license:lgpl2.1)
146 (home-page "http://www.infradead.org/openconnect/")))
147
148 (define-public openvpn
149 (package
150 (name "openvpn")
151 (version "2.3.6")
152 (source (origin
153 (method url-fetch)
154 (uri (string-append
155 "https://swupdate.openvpn.org/community/releases/openvpn-"
156 version ".tar.xz"))
157 (sha256
158 (base32
159 "1v8h2nshxnvn2zyr08vzkfby1kc7ma6bi0s6hix389cj9krjxbmd"))))
160 (build-system gnu-build-system)
161 (arguments
162 '(#:configure-flags '("--enable-iproute2=yes")))
163 (native-inputs
164 `(("iproute2" ,iproute)))
165 (inputs
166 `(("lzo" ,lzo)
167 ("openssl" ,openssl)
168 ("linux-pam" ,linux-pam)))
169 (home-page "https://openvpn.net/")
170 (synopsis "Virtual private network daemon")
171 (description "OpenVPN implements virtual private network (VPN) techniques
172 for creating secure point-to-point or site-to-site connections in routed or
173 bridged configurations and remote access facilities. It uses a custom
174 security protocol that utilizes SSL/TLS for key exchange. It is capable of
175 traversing network address translators (NATs) and firewalls.")
176 (license license:gpl2)))
177
178 (define-public tinc
179 (package
180 (name "tinc")
181 (version "1.0.26")
182 (source (origin
183 (method url-fetch)
184 (uri (string-append "http://tinc-vpn.org/packages/"
185 name "-" version ".tar.gz"))
186 (sha256
187 (base32
188 "08ds8s32cjslms1q227ihd6jz35583v378ij4pknfa5xngfijhrb"))))
189 (build-system gnu-build-system)
190 (arguments
191 '(#:configure-flags
192 '("--sysconfdir=/etc"
193 "--localstatedir=/var")))
194 (inputs `(("zlib" ,zlib)
195 ("lzo" ,lzo)
196 ("openssl" ,openssl)))
197 (home-page "http://tinc-vpn.org")
198 (synopsis "Virtual Private Network (VPN) daemon")
199 (description
200 "Tinc is a VPN that uses tunnelling and encryption to create a secure
201 private network between hosts on the internet.")
202 (license license:gpl2+)))