unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#40683] [PATCH] gnu: Add wireguard-module.
@ 2020-04-17 15:58 Brice Waegeneire
  2020-04-17 16:47 ` Tobias Geerinckx-Rice via Guix-patches via
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Brice Waegeneire @ 2020-04-17 15:58 UTC (permalink / raw)
  To: 40683

* gnu/packages/vpn.scm (wireguard-module): New variable.
---

This patch add wireguard as a loadable Linux kernel module which allow using
it Linux version < 5.6 without having to rebuild the entire kernel.

Following is a usage example:
--8<---------------cut here---------------start------------->8---
(use-modules (gnu) (gnu services))
(use-package-modules vpn)
(use-service-modules linux)

(operating-system
  ...
  (services (cons* (service kernel-module-loader-service-type
                            '("wireguard"))
                   %base-services))
  (kernel-loadable-modules (list wireguard-module)))
--8<---------------cut here---------------end--------------->8---

 gnu/packages/vpn.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 739522959c..654c9d8db1 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2019, 2020 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -34,6 +35,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system linux-module)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
@@ -496,6 +498,26 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers
 kernel versions 3.10 through 5.5.  WireGuard was added to Linux 5.6.")
     (license license:gpl2)))
 
+(define-public wireguard-module
+  (package
+    (inherit wireguard-linux-compat)
+    (name "wireguard-module")
+    (build-system linux-module-build-system)
+    (arguments
+     `(#:tests? #f                      ; No test suite
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'change-directory
+           (lambda _
+             (chdir "./src")
+             #t)))))
+    (synopsis "WireGuard loadable kernel module for Linux 3.10 through 5.5")
+    (description "This is a loadable Linux kernel module for WireGuard
+supporting kernel versions 3.10 through 5.5.  WireGuard was added to Linux
+5.6.  It ought to be used by adding it to the @code{kernel-loadable-modules}
+field and loaded in memeory by @command{modprobe} or
+@code{kernel-module-loader-service-type}.")))
+
 (define-public wireguard-tools
   (package
     (name "wireguard-tools")
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-26 22:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-17 15:58 [bug#40683] [PATCH] gnu: Add wireguard-module Brice Waegeneire
2020-04-17 16:47 ` Tobias Geerinckx-Rice via Guix-patches via
2020-04-23 12:34 ` [bug#40683] [PATCH v2] gnu: Add wireguard-linux-module Brice Waegeneire
2020-04-23 17:03   ` Leo Famulari
2020-04-23 12:44 ` [bug#40683] Re: [bug#40683] [PATCH] gnu: Add wireguard-module Brice Waegeneire
2020-04-24 19:51 ` [bug#40683] [PATCH v3] gnu: Add loadable module to wireguard-linux-compat Brice Waegeneire
2020-04-26 20:51 ` [bug#40683] [PATCH v4] " Brice Waegeneire
2020-04-26 21:16   ` Leo Famulari
2020-04-26 22:25     ` bug#40683: " Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).