gnu: tzdata: Update to 2020a.
[jackhill/guix/guix.git] / gnu / packages / vpn.scm
index 1c2228c..becc505 100644 (file)
@@ -8,7 +8,7 @@
 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2018 Meiyo Peng <meiyo.peng@gmail.com>
-;;; Copyright © 2019 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2019, 2020 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;;
@@ -118,7 +118,7 @@ shared-secret IPSec authentication with Xauth, AES (256, 192, 128), 3DES,
 1DES, MD5, SHA1, DH1/2/5 and IP tunneling.  It runs entirely in userspace.
 Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
    (license license:gpl2+) ; some file are bsd-2, see COPYING
-   (home-page "http://www.unix-ag.uni-kl.de/~massar/vpnc/")))
+   (home-page "https://www.unix-ag.uni-kl.de/~massar/vpnc/")))
 
 (define-public vpnc-scripts
   (let ((commit "1000e0f6dd7d6bff163169a46359211c1fc3a6d2"))
@@ -456,14 +456,14 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers
 (define-public wireguard
   (package
     (name "wireguard")
-    (version "0.0.20191127")
+    (version "0.0.20191219")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://git.zx2c4.com/WireGuard/snapshot/"
                                   "WireGuard-" version ".tar.xz"))
               (sha256
                (base32
-                "01ixdhbvx5yiq07msd60f98685wdksss4pfhdn1d8r25z2k80kkx"))))
+                "1rxhhf18vnlbxpaxib6y55gbvr5h9dcvl8sn2l5slzz97066zfjs"))))
     (build-system gnu-build-system)
     (outputs '("out" ; The WireGuard userspace tools
                "kernel-patch")) ; A patch to build Linux with WireGuard support
@@ -471,6 +471,7 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers
      `(#:tests? #f ; No tests available.
        #:make-flags
        (list "CC=gcc"
+             "--directory=src/tools"
              "WITH_BASHCOMPLETION=yes"
              ;; Build and install the helper script wg-quick(8).
              "WITH_WGQUICK=yes"
@@ -498,17 +499,7 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers
                (call-with-output-file output
                  (lambda (port)
                    (format port "~a" str))))
-               #t))
-         (add-after 'make-patch 'chdir
-           (lambda _
-             (chdir "src/tools")
-             #t))
-         ;; Otherwise the 'install-license-file' phase installs nothing.
-         ;; <https://bugs.gnu.org/34703>
-         (add-after 'install 'reset-cwd
-           (lambda _
-             (chdir "../..")
-             #t)))))
+               #t)))))
     (inputs
      `(("libmnl" ,libmnl)))
     (home-page "https://www.wireguard.com/")
@@ -519,6 +510,52 @@ that can be applied to a Linux kernel source tree in order to build it with
 WireGuard support.")
     (license license:gpl2)))
 
+(define-public wireguard-tools
+  (package
+    (name "wireguard-tools")
+    (version "1.0.20200206")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.zx2c4.com/wireguard-tools.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0ivc08lds5w39a6f2xdfih9wlk5g724hl3kpdvxvh5yff4l84qb7"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (list "CC=gcc"
+             "--directory=src"
+             "WITH_BASHCOMPLETION=yes"
+             ;; Install the ‘simple and dirty’ helper script wg-quick(8).
+             "WITH_WGQUICK=yes"
+             (string-append "PREFIX=" (assoc-ref %outputs "out"))
+             ;; Currently used only to create an empty /etc/wireguard directory.
+             (string-append "SYSCONFDIR=no-thanks"))
+       ;; The test suite is meant to be run interactively.  It runs Clang's
+       ;; scan-build static analyzer and then starts a web server to display the
+       ;; results.
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         ;; No configure script
+         (delete 'configure))))
+    (home-page "https://www.wireguard.com/")
+    (synopsis "Tools for configuring WireGuard tunnels")
+    (description
+     "This package provides the user-space command-line tools for using and
+configuring WireGuard tunnels.
+
+WireGuard is a simple and fast general-purpose @acronym{VPN, Virtual Private
+Network} that securely encapsulates IP packets over UDP.  It aims to be as easy
+to configure and deploy as SSH.  VPN connections are made simply by exchanging
+public keys and can roam across IP addresses.")
+    (license
+     (list license:lgpl2.1+    ; src/netlink.h & contrib/embeddable-wg-library
+           license:gpl2))))    ; everything else
+
 (define-public xl2tpd
   (package
     (name "xl2tpd")