gnu: Move numerous "inputs" which should be "native-inputs".
[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 Ludovic Courtès <ludo@gnu.org>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages vpn)
21 #:use-module ((guix licenses)
22 #:renamer (symbol-prefix-proc 'license:))
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages compression)
28 #:use-module (gnu packages gettext)
29 #:use-module (gnu packages gnupg)
30 #:use-module (gnu packages openssl)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages xml))
34
35 (define-public gvpe
36 (package
37 (name "gvpe")
38 (version "2.25")
39 (source (origin
40 (method url-fetch)
41 (uri (string-append "mirror://gnu/gvpe/gvpe-"
42 version ".tar.gz"))
43 (sha256
44 (base32
45 "1gsipcysvsk80gvyn9jnk9g0xg4ng9yd5zp066jnmpgs52d2vhvk"))))
46 (build-system gnu-build-system)
47 (home-page "http://software.schmorp.de/pkg/gvpe.html")
48 (inputs `(("openssl" ,openssl)
49 ("zlib" ,zlib)))
50 (synopsis "Secure VPN among multiple nodes over an untrusted network")
51 (description
52 "The GNU Virtual Private Ethernet creates a virtual network
53 with multiple nodes using a variety of transport protocols. It works
54 by creating encrypted host-to-host tunnels between multiple
55 endpoints.")
56 (license license:gpl3+)))
57
58 (define-public vpnc
59 (package
60 (name "vpnc")
61 (version "0.5.3")
62 (source (origin
63 (method url-fetch)
64 (uri (string-append "http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-"
65 version ".tar.gz"))
66 (sha256 (base32
67 "1128860lis89g1s21hqxvap2nq426c9j4bvgghncc1zj0ays7kj6"))
68 (patches (list (search-patch "vpnc-script.patch")))))
69 (build-system gnu-build-system)
70 (inputs `(("libgcrypt" ,libgcrypt)
71 ("perl" ,perl)))
72 (arguments
73 `(#:tests? #f ; there is no check target
74 #:phases
75 (alist-replace
76 'configure
77 (lambda* (#:key outputs #:allow-other-keys)
78 (let ((out (assoc-ref outputs "out")))
79 (substitute* "Makefile"
80 (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
81 (substitute* "Makefile"
82 (("ETCDIR=/etc/vpnc") (string-append "ETCDIR=" out "/etc/vpnc")))))
83 %standard-phases)))
84 (synopsis "Client for Cisco VPN concentrators")
85 (description
86 "vpnc is a VPN client compatible with Cisco's EasyVPN equipment.
87 It supports IPSec (ESP) with Mode Configuration and Xauth. It supports only
88 shared-secret IPSec authentication with Xauth, AES (256, 192, 128), 3DES,
89 1DES, MD5, SHA1, DH1/2/5 and IP tunneling. It runs entirely in userspace.
90 Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
91 (license license:gpl2+) ; some file are bsd-2, see COPYING
92 (home-page "http://www.unix-ag.uni-kl.de/~massar/vpnc/")))
93
94
95 (define-public openconnect
96 (package
97 (name "openconnect")
98 (version "4.99")
99 (source (origin
100 (method url-fetch)
101 (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/openconnect-"
102 version ".tar.gz"))
103 (sha256 (base32
104 "1rd8pap455wzkx19i0sy3cqap524b6fwcjvqynxp6lhm01di4bd6"))))
105 (build-system gnu-build-system)
106 (inputs
107 `(("libxml2" ,libxml2)
108 ("openssl" ,openssl)
109 ("vpnc" ,vpnc)
110 ("zlib" ,zlib)))
111 (native-inputs
112 `(("gettext" ,gnu-gettext)
113 ("pkg-config" ,pkg-config)))
114 (arguments
115 `(#:phases
116 (alist-replace
117 'configure
118 (lambda* (#:key inputs #:allow-other-keys #:rest args)
119 (let ((vpnc (assoc-ref inputs "vpnc"))
120 (configure (assoc-ref %standard-phases 'configure)))
121 (apply configure
122 (append args
123 (list '#:configure-flags
124 (list (string-append "--with-vpnc-script="
125 vpnc
126 "/etc/vpnc/vpnc-script")))))))
127 %standard-phases)))
128 (synopsis "Client for Cisco VPN")
129 (description
130 "OpenConnect is a client for Cisco's AnyConnect SSL VPN, which is
131 supported by the ASA5500 Series, by IOS 12.4(9)T or later on Cisco SR500,
132 870, 880, 1800, 2800, 3800, 7200 Series and Cisco 7301 Routers,
133 and probably others.")
134 (license license:lgpl2.1)
135 (home-page "http://www.infradead.org/openconnect/")))