all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Brice Waegeneire <brice@waegenei.re>
To: 41192@debbugs.gnu.org
Cc: leo@famulari.name
Subject: [bug#41192] [PATCH v2 2/2] gnu: wireguard-tools: Fix wg-quick.
Date: Tue, 12 May 2020 23:01:52 +0200	[thread overview]
Message-ID: <20200512210152.11991-3-brice@waegenei.re> (raw)
In-Reply-To: <20200512210152.11991-1-brice@waegenei.re>

* gnu/packages/vpn.scm (wireguard-tools)[arguments]: Add phase
'wrap-wg-quick'.
[inputs]: Add 'openresolv', 'iproute' and 'iptables'.
---
 gnu/packages/vpn.scm | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index ebae1c43f7..369d3200c1 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -40,7 +40,9 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages dns)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gettext)
@@ -541,7 +543,33 @@ WireGuard was added to Linux 5.6.")
        #:phases
        (modify-phases %standard-phases
          ;; No configure script
-         (delete 'configure))))
+         (delete 'configure)
+         (add-after 'install 'install-contrib-docs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (copy-recursively "contrib/"
+                                 (string-append out "/share/doc/wireguard-tools"))
+               #t)))
+         (add-after 'install 'wrap-wg-quick
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (inputs-sbin (map (lambda (input)
+                                        (string-append (assoc-ref inputs input) "/sbin"))
+                                      (list "resolvconf" "iproute" "procps"
+                                            "iptables")))
+                   (coreutils (string-append (assoc-ref inputs "coreutils")
+                                             "/bin")))
+               (wrap-program (string-append out "/bin/wg-quick")
+                 `("PATH" ":" prefix ,(append inputs-sbin
+                                              (list coreutils))))
+               #t))))))
+    (inputs
+     `(("resolvconf" ,openresolv)
+       ("coreutils" ,coreutils)
+       ("bash" ,bash)                   ; for scripts using /dev/tcp
+       ("procps" ,procps)
+       ("iproute" ,iproute)
+       ("iptables" ,iptables)))
     (home-page "https://www.wireguard.com/")
     (synopsis "Tools for configuring WireGuard tunnels")
     (description
-- 
2.26.2





  parent reply	other threads:[~2020-05-12 21:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 18:43 [bug#41192] [PATCH 0/2] wireguard-tools: Fix wg-quick Brice Waegeneire
2020-05-11 18:53 ` [bug#41192] [PATCH 1/2] gnu: Add openresolv Brice Waegeneire
2020-05-11 19:52   ` Leo Famulari
2020-05-12 20:34     ` Brice Waegeneire
2020-05-11 18:53 ` [bug#41192] [PATCH 2/2] gnu: wireguard-tools: Fix wg-quick Brice Waegeneire
2020-05-11 19:58   ` Leo Famulari
2020-05-12 20:57     ` Brice Waegeneire
2020-05-12 21:01 ` [bug#41192] [PATCH v2 0/2] " Brice Waegeneire
2020-05-12 21:01   ` [bug#41192] [PATCH v2 1/2] gnu: Add openresolv Brice Waegeneire
2020-05-12 21:01   ` Brice Waegeneire [this message]
2020-05-12 21:28   ` [bug#41192] [PATCH v2 0/2] gnu: wireguard-tools: Fix wg-quick Leo Famulari
2020-05-13  9:28     ` bug#41192: " Brice Waegeneire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200512210152.11991-3-brice@waegenei.re \
    --to=brice@waegenei.re \
    --cc=41192@debbugs.gnu.org \
    --cc=leo@famulari.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.