diff options
author | Brice Waegeneire <brice@waegenei.re> | 2020-05-08 11:36:12 +0200 |
---|---|---|
committer | Brice Waegeneire <brice@waegenei.re> | 2020-05-13 11:25:40 +0200 |
commit | d084e71c0d0f97dccf6a792e6975435de5c0bc38 (patch) | |
tree | aca480bc87850c921afe9aff8f0be5d370c4bbb2 /gnu/packages | |
parent | 6b6647f815457e93b55ee4a243345c1a1005ddc1 (diff) | |
download | guix-d084e71c0d0f97dccf6a792e6975435de5c0bc38.tar.gz |
gnu: wireguard-tools: Fix wg-quick.
* gnu/packages/vpn.scm (wireguard-tools)[arguments]: Add phase 'wrap-wg-quick'. [inputs]: Add 'openresolv', 'iproute' and 'iptables'.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/vpn.scm | 30 |
1 files changed, 29 insertions, 1 deletions
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 |