Since WireGuard was added to Linux 5.6, the WireGuard upstream split
their old 'wireguard' codebase into 'wireguard-tools' (the userspace
tools) and 'wireguard-linux-compat' (the kernel patch for older
This commit adds the new upstream for the kernel patch and deprecates
the obselete 'wireguard' package.
* gnu/packages/vpn.scm (wireguard-linux-compat): New variable.
(wireguard): Deprecate in favor of wireguard-tools.
gnu/packages/vpn.scm | 61 ++++++++++++++++++--------------------------
1 file changed, 25 insertions(+), 36 deletions(-)
Toggle diff (100 lines)
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index becc505b34..e9d9ab8be4 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -453,61 +453,47 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers
(license license:bsd-3)))
-(define-public wireguard
+(define-public wireguard-linux-compat
- (version "0.0.20191219")
+ (name "wireguard-linux-compat")
+ (version "1.0.20200401")
- (uri (string-append "https://git.zx2c4.com/WireGuard/snapshot/"
- "WireGuard-" version ".tar.xz"))
+ (uri (string-append "https://git.zx2c4.com/wireguard-linux-compat/"
+ "snapshot/wireguard-linux-compat-" version
- "1rxhhf18vnlbxpaxib6y55gbvr5h9dcvl8sn2l5slzz97066zfjs"))))
+ "0ymprz3h4b92wlcqm5k5vmcgap8pjv202bgkdx0axmp12n1lmyvx"))))
(build-system gnu-build-system)
- (outputs '("out" ; The WireGuard userspace tools
- "kernel-patch")) ; A patch to build Linux with WireGuard support
- `(#:tests? #f ; No tests available.
- "--directory=src/tools"
- "WITH_BASHCOMPLETION=yes"
- ;; Build and install the helper script wg-quick(8).
- (string-append "PREFIX=" (assoc-ref %outputs "out"))
- (string-append "SYSCONFDIR=" (assoc-ref %outputs "out") "/etc"))
+ `(#:tests? #f ; No test suite
#:modules ((guix build gnu-build-system)
(modify-phases %standard-phases
- ;; There is no ./configure script.
- ;; Until WireGuard is added to the upstream Linux kernel, it is
- ;; distributed as a kernel patch generated by this script.
- (add-after 'patch-source-shebangs 'make-patch
+ (delete 'configure) ; No ./configure script
(lambda* (#:key outputs #:allow-other-keys)
- (let* ((output (string-append (assoc-ref outputs "kernel-patch")
- (patch-builder "./contrib/kernel-tree/create-patch.sh")
+ (let* ((patch-builder "./kernel-tree-scripts/create-patch.sh")
(port (open-input-pipe patch-builder))
(str (get-string-all port)))
- (mkdir-p (dirname output))
- (call-with-output-file output
+ (call-with-output-file "wireguard.patch"
(format port "~a" str))))
- (home-page "https://www.wireguard.com/")
- (synopsis "Tools for configuring WireGuard")
- (description "This package provides the userspace tools for setting and
-retrieving configuration of WireGuard network tunnel interfaces, and a patch
-that can be applied to a Linux kernel source tree in order to build it with
+ (lambda* (#:key outputs #:allow-other-keys)
+ (install-file "wireguard.patch"
+ (assoc-ref %outputs "out"))
+ (home-page "https://git.zx2c4.com/wireguard-linux-compat/")
+ (synopsis "WireGuard kernel module for Linux 3.10 through 5.5")
+ (description "This is an out-of-tree Linux kernel patch for kernel versions
+3.10 through 5.5. WireGuard was added to Linux 5.6.")
(define-public wireguard-tools
@@ -556,6 +542,9 @@ public keys and can roam across IP addresses.")
(list license:lgpl2.1+ ; src/netlink.h & contrib/embeddable-wg-library
license:gpl2)))) ; everything else
+(define-public wireguard
+ (deprecated-package "wireguard" wireguard-tools))