guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#34643] [PATCH 2/2] gnu: Add linux-libre with WireGuard.


From: Leo Famulari
Subject: [bug#34643] [PATCH 2/2] gnu: Add linux-libre with WireGuard.
Date: Sun, 24 Feb 2019 20:15:03 -0500

This is a demonstration patch. We don't need to actually include it in Guix.

* gnu/packages/linux.scm (linux-libre-with-wireguard): New variable.
---
 gnu/packages/linux.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 983e335e30..816c920e48 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5180,3 +5180,20 @@ 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
 WireGuard support.")
     (license license:gpl2)))
+
+(define-public linux-libre-with-wireguard
+  (package
+    (inherit linux-libre)
+    (name "linux-libre-with-wireguard")
+    (native-inputs
+     `(("wireguard-patch" ,wireguard "kernel-patch")
+       ,@(package-native-inputs linux-libre)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments linux-libre)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-before 'patch-source-shebangs 'add-wireguard
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((wireguard-patch (string-append (assoc-ref inputs 
"wireguard-patch")
+                                                      "/wireguard.patch")))
+                 (invoke "patch" "-p1" "-i" wireguard-patch))))))))))
-- 
2.20.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]