--- Begin Message ---
Subject: |
[PATCH] gnu: Add n2n. |
Date: |
Mon, 17 Jan 2022 14:47:36 +0000 |
>From c9d69917251e377c3291443dda0090cfa5e46956 Mon Sep 17 00:00:00 2001
From: Lu Hui <luhux76@gmail.com>
Date: Mon, 17 Jan 2022 10:48:44 +0800
Subject: [PATCH] gnu: Add n2n.
* gnu/packages/vpn.scm (n2n-2): New variable
---
gnu/packages/vpn.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 4ad555ef1b..542d6518fd 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2021 Domagoj Stolfa <ds815@gmx.com>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2022 Lu hui <luhux76@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1093,3 +1094,39 @@ (define-public xl2tpd
"xl2tpd is an implementation of the Layer 2 Tunnelling Protocol
(RFC 2661).
L2TP allows you to tunnel PPP over UDP.")
(license license:gpl2)))
+
+(define-public n2n-2
+ (package
+ (name "n2n")
+ (version "2.8")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ntop/n2n")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1ph2npvnqh1xnmkp96pdzpxm033jkb8zznd3nc59l9arhn0pq4nv"))))
+ (build-system gnu-build-system)
+ (native-inputs (list autoconf automake))
+ (arguments
+ `(#:make-flags (list (string-append "PREFIX=" %output) "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'bootstrap 'move-configure
+ ;; don't execute configure script in bootstrap
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "autogen.sh"
+ (("./configure") ""))))
+ (add-before 'configure 'fix-configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "configure"
+ (("/bin/sh") (which "sh"))))))
+ #:tests? #f)) ;there is no check target
+ (home-page "https://github.com/ntop/n2n")
+ (synopsis "Peer-to-peer VPN client and server")
+ (description
+ "A light VPN software which makes it
+easy to create virtual networks bypassing intermediate firewalls.")
+ (license license:gpl3+)))
--
2.34.0
--- End Message ---
--- Begin Message ---
Subject: |
Re: [bug#53319] [PATCH] gnu: Add n2n. |
Date: |
Tue, 22 Feb 2022 12:20:19 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hello,
路辉 <luhux76@gmail.com> writes:
> Subject: [PATCH] gnu: Add n2n.
Thank you. I applied your patch with the changes below.
>
> +(define-public n2n-2
I renamed it to n2n.
> + (native-inputs (list autoconf automake))
I added pkg-config and bash-minimal.
> + (arguments
> + `(#:make-flags (list (string-append "PREFIX=" %output) "CC=gcc")
Using G-expressions I wrote
#:make-flags
#~(list (string-append "PREFIX=" #$output)
(string-append "CC=" #$(cc-for-target)))
...
> + (substitute* "configure"
> + (("/bin/sh") (which "sh"))))))
Here I wrote
(("/bin/sh") (search-inputs-file input "/bin/sh"))
> + #:tests? #f)) ;there is no check target
> + (home-page "https://github.com/ntop/n2n")
> + (synopsis "Peer-to-peer VPN client and server")
> + (description
> + "A light VPN software which makes it
I turned the description into complete sentences.
Regards,
--
Nicolas Goaziou
--- End Message ---