From 10650b89f174cbb61a693f9b8288f2acfe816890 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 18 Feb 2020 15:05:27 +0100 Subject: gnu: Add wireguard-tools. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ‘wireguard’ repository that included both tools and kernel patch is no longer maintained. I will add this to its description once kernel 5.6 hits Guix. * gnu/packages/linux.scm (wireguard-tools): New public variable. --- gnu/packages/vpn.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'gnu/packages/vpn.scm') diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index e29c1e7d03..78a2c322af 100644 --- a/gnu/packages/vpn.scm +++ b/gnu/packages/vpn.scm @@ -519,6 +519,57 @@ that can be applied to a Linux kernel source tree in order to build it with WireGuard support.") (license license:gpl2))) +(define-public wireguard-tools + (package + (name "wireguard-tools") + (version "1.0.20200206") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.zx2c4.com/wireguard-tools.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ivc08lds5w39a6f2xdfih9wlk5g724hl3kpdvxvh5yff4l84qb7")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no test suite + #:make-flags + (list "CC=gcc" + "WITH_BASHCOMPLETION=yes" + ;; Install the ‘simple and dirty’ helper script wg-quick(8). + "WITH_WGQUICK=yes" + (string-append "PREFIX=" (assoc-ref %outputs "out")) + ;; Currently used only to create an empty /etc/wireguard directory. + (string-append "SYSCONFDIR=no-thanks")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source-directory + (lambda _ + (chdir "src") + #t)) + (delete 'configure) ; no configure script + (add-after 'install 'reset-cwd + ;; Otherwise the 'install-license-file' phase installs nothing. + ;; + (lambda _ + (chdir "..") + #t))))) + (home-page "https://www.wireguard.com/") + (synopsis "Tools for configuring WireGuard tunnels") + (description + "This package provides the user-space command-line tools for using and +configuring WireGuard tunnels. + +WireGuard is a simple and fast general-purpose @acronym{VPN, Virtual Private +Network} that securely encapsulates IP packets over UDP. It aims to be as easy +to configure and deploy as SSH. VPN connections are made simply by exchanging +public keys and can roam across IP addresses.") + (license + (list license:lgpl2.1+ ; src/netlink.h & contrib/embeddable-wg-library + license:gpl2)))) ; everything else + (define-public xl2tpd (package (name "xl2tpd") -- cgit v1.2.3 From c1005113a3e8e2d59f63d9e6a0a6176c7f67421f Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 2 Mar 2020 23:42:56 -0500 Subject: gnu: WireGuard: Simplify package definitions. * gnu/packages/vpn.scm (wireguard-tools, wireguard)[arguments]: Set --directory in #:make-flags and remove the 'chdir', 'enter-source-directory' and 'reset-cwd' phases. --- gnu/packages/vpn.scm | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'gnu/packages/vpn.scm') diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index 78a2c322af..a6bba28db1 100644 --- a/gnu/packages/vpn.scm +++ b/gnu/packages/vpn.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2018 Pierre Langlois ;;; Copyright © 2018 Meiyo Peng -;;; Copyright © 2019 Leo Famulari +;;; Copyright © 2019, 2020 Leo Famulari ;;; Copyright © 2019 Rutger Helling ;;; Copyright © 2019 Ricardo Wurmus ;;; @@ -471,6 +471,7 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers `(#:tests? #f ; No tests available. #:make-flags (list "CC=gcc" + "--directory=src/tools" "WITH_BASHCOMPLETION=yes" ;; Build and install the helper script wg-quick(8). "WITH_WGQUICK=yes" @@ -498,17 +499,7 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers (call-with-output-file output (lambda (port) (format port "~a" str)))) - #t)) - (add-after 'make-patch 'chdir - (lambda _ - (chdir "src/tools") - #t)) - ;; Otherwise the 'install-license-file' phase installs nothing. - ;; - (add-after 'install 'reset-cwd - (lambda _ - (chdir "../..") - #t))))) + #t))))) (inputs `(("libmnl" ,libmnl))) (home-page "https://www.wireguard.com/") @@ -537,6 +528,7 @@ WireGuard support.") `(#:tests? #f ; no test suite #:make-flags (list "CC=gcc" + "--directory=src" "WITH_BASHCOMPLETION=yes" ;; Install the ‘simple and dirty’ helper script wg-quick(8). "WITH_WGQUICK=yes" @@ -545,17 +537,8 @@ WireGuard support.") (string-append "SYSCONFDIR=no-thanks")) #:phases (modify-phases %standard-phases - (add-after 'unpack 'enter-source-directory - (lambda _ - (chdir "src") - #t)) - (delete 'configure) ; no configure script - (add-after 'install 'reset-cwd - ;; Otherwise the 'install-license-file' phase installs nothing. - ;; - (lambda _ - (chdir "..") - #t))))) + ;; No configure script + (delete 'configure)))) (home-page "https://www.wireguard.com/") (synopsis "Tools for configuring WireGuard tunnels") (description -- cgit v1.2.3 From 19781930b781813e61be1b77e8b6cd34c2868d62 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Tue, 3 Mar 2020 00:12:19 -0500 Subject: gnu: wireguard-tools: Explain why we skip the test suite. * gnu/packages/vpn.scm (wireguard-tools): Add comment. --- gnu/packages/vpn.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gnu/packages/vpn.scm') diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index a6bba28db1..becc505b34 100644 --- a/gnu/packages/vpn.scm +++ b/gnu/packages/vpn.scm @@ -525,8 +525,7 @@ WireGuard support.") (base32 "0ivc08lds5w39a6f2xdfih9wlk5g724hl3kpdvxvh5yff4l84qb7")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; no test suite - #:make-flags + `(#:make-flags (list "CC=gcc" "--directory=src" "WITH_BASHCOMPLETION=yes" @@ -535,6 +534,10 @@ WireGuard support.") (string-append "PREFIX=" (assoc-ref %outputs "out")) ;; Currently used only to create an empty /etc/wireguard directory. (string-append "SYSCONFDIR=no-thanks")) + ;; The test suite is meant to be run interactively. It runs Clang's + ;; scan-build static analyzer and then starts a web server to display the + ;; results. + #:tests? #f #:phases (modify-phases %standard-phases ;; No configure script -- cgit v1.2.3