GNU bug report logs - #36638
[PATCH 0/2] gnu: Add i2pd.

Previous Next

Package: guix-patches;

Reported by: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)

Date: Sat, 13 Jul 2019 17:53:01 UTC

Severity: normal

Tags: fixed, patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36638 in the body.
You can then email your comments to 36638 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Sat, 13 Jul 2019 17:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze):
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 13 Jul 2019 17:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] gnu: Add i2pd.
Date: Sat, 13 Jul 2019 13:52:38 -0400
[Message part 1 (text/plain, inline)]
I hope that creating an entirely new file for this isn't too intrusive.
My thinking is that, when the upstream Java implementation of the I2P
daemon is packaged, it can go in 'i2p.scm', along with any related
packages such as I2P-Bote.

Jakob L. Kreuze (2):
  gnu: Add websocketpp.
  gnu: Add i2pd.

 gnu/local.mk         |  1 +
 gnu/packages/i2p.scm | 85 ++++++++++++++++++++++++++++++++++++++++++++
 gnu/packages/web.scm | 28 +++++++++++++++
 3 files changed, 114 insertions(+)
 create mode 100644 gnu/packages/i2p.scm

-- 
2.22.0
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Sat, 13 Jul 2019 17:55:01 GMT) Full text and rfc822 format available.

Message #8 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
To: 36638 <at> debbugs.gnu.org
Subject: Re: [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
Date: Sat, 13 Jul 2019 13:53:57 -0400
[Message part 1 (text/plain, inline)]
* gnu/packages/web.scm (websocketpp): New variable.
---
 gnu/packages/web.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index d1f5ec2eb6..dfc94e4eba 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -34,6 +34,7 @@
 ;;; Copyright © 2019 Brendan Tildesley <mail <at> brendan.scot>
 ;;; Copyright © 2019 Alex Griffin <a <at> ajgrf.com>
 ;;; Copyright © 2019 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
+;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays <at> sdf.lonestar.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,6 +72,7 @@
   #:use-module (gnu packages admin)
   #:use-module (gnu packages adns)
   #:use-module (gnu packages apr)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages docbook)
@@ -854,6 +856,32 @@ for efficient socket-like bidirectional reliable communication channels.")
     ;; This is LGPLv2.1-only with extra exceptions specified in 'LICENSE'.
     (license license:lgpl2.1)))
 
+(define-public websocketpp
+  (package
+   (name "websocketpp")
+   (version "0.8.1")
+   (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/zaphoyd/websocketpp.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "12ffczcrryh74c1xssww35ic6yiy2l2xgdd30lshiq9wnzl2brgy"))))
+   (build-system cmake-build-system)
+   (inputs `(("boost" ,boost)
+             ("openssl" ,openssl)))
+   (arguments '(#:configure-flags
+                '("-DBUILD_TESTS=ON")))
+   (home-page "https://www.zaphoyd.com/websocketpp/")
+   (synopsis "C++ library implementing the WebSocket protocol.")
+   (description "WebSocket++ is a C++ library that can be used to implement
+WebSocket functionality.  The goals of the project are to provide a WebSocket
+implementation that is simple, portable, flexible, lightweight, low level, and
+high performance.")
+   (license license:bsd-3)))
+
 (define-public libpsl
   (package
     (name "libpsl")
-- 
2.22.0

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Sat, 13 Jul 2019 17:56:02 GMT) Full text and rfc822 format available.

Message #11 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
To: 36638 <at> debbugs.gnu.org
Subject: Re: [bug#36638] [PATCH 2/2] gnu: Add i2pd.
Date: Sat, 13 Jul 2019 13:54:56 -0400
[Message part 1 (text/plain, inline)]
* gnu/packages/i2p.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk         |  1 +
 gnu/packages/i2p.scm | 85 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 gnu/packages/i2p.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 67d9eb703a..b94e9fb97e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -243,6 +243,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/hugs.scm				\
   %D%/packages/hurd.scm				\
   %D%/packages/hyperledger.scm			\
+  %D%/packages/i2p.scm				\
   %D%/packages/ibus.scm				\
   %D%/packages/icu4c.scm			\
   %D%/packages/idris.scm			\
diff --git a/gnu/packages/i2p.scm b/gnu/packages/i2p.scm
new file mode 100644
index 0000000000..f67461a260
--- /dev/null
+++ b/gnu/packages/i2p.scm
@@ -0,0 +1,85 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays <at> sdf.lonestar.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages i2p)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages upnp)
+  #:use-module (gnu packages web)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system cmake)
+  #:use-module ((guix licenses) #:prefix license:))
+
+(define-public i2pd
+  (package
+    (name "i2pd")
+    (version "2.27.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/PurpleI2P/i2pd.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "00y0y57z84gakwa88zzm0g3ixgc6y7zm35rjiysiajzvmdq5w1wf"))))
+    (build-system cmake-build-system)
+    (inputs `(("boost" ,boost)
+              ("miniupnpc" ,miniupnpc)
+              ("openssl" ,openssl)
+              ("websocketpp" ,websocketpp)
+              ("zlib" ,zlib)))
+    (arguments '(#:configure-flags
+                 (let ((source (assoc-ref %build-inputs "source")))
+                   (list (string-append "-S" source "/build")
+                         "-DWITH_PCH=OFF"
+                         "-DWITH_STATIC=OFF"
+                         "-DWITH_UPNP=ON"
+                         "-DWITH_WEBSOCKETS=ON"
+                         "-DWITH_LIBRARY=ON"
+                         "-DWITH_BINARY=ON"))
+                 #:phases
+                 (modify-phases %standard-phases
+                   (replace 'check
+                     (lambda* (#:key
+                               (make-flags '())
+                               (parallel-tests? #t)
+                               #:allow-other-keys)
+                       (let ((oldpwd (getcwd))
+                             (source (assoc-ref %build-inputs "source")))
+                         (copy-recursively (string-append source "/tests")
+                                           "./tests")
+                         (chdir "./tests")
+                         (substitute* "Makefile"
+                           (("../libi2pd/") (string-append source "/libi2pd/")))
+                         (apply invoke "make" "all"
+                                `(,@(if parallel-tests?
+                                        `("-j" ,(number->string
+                                                 (parallel-job-count)))
+                                        '())
+                                  ,@make-flags))
+                         (chdir oldpwd)))))))
+    (home-page "https://i2pd.website/")
+    (synopsis "Router for an end-to-end encrypted and anonymous internet")
+    (description "i2pd is a client for the anonymous I2P network, upon which
+applications for file sharing, web browsing, instant messaging, and more are
+built. i2pd allows people from all around the world to communicate and share
+information securely without restrictions.")
+    (license license:bsd-3)))
-- 
2.22.0

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Mon, 15 Jul 2019 16:22:02 GMT) Full text and rfc822 format available.

Message #14 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
Cc: 36638 <at> debbugs.gnu.org
Subject: Re: [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
Date: Mon, 15 Jul 2019 18:21:10 +0200
Hello,

zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze) skribis:

> * gnu/packages/web.scm (websocketpp): New variable.

[...]

> +(define-public websocketpp
> +  (package
> +   (name "websocketpp")
      ^
I indented with an extra space here…

> +   (synopsis "C++ library implementing the WebSocket protocol.")
                                                                ^
… and removed this period.  :-)

Applied, thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Mon, 15 Jul 2019 16:30:03 GMT) Full text and rfc822 format available.

Message #17 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
Cc: 36638 <at> debbugs.gnu.org
Subject: Re: [bug#36638] [PATCH 2/2] gnu: Add i2pd.
Date: Mon, 15 Jul 2019 18:29:37 +0200
zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze) skribis:

> * gnu/packages/i2p.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

The package definition LGTM but… “make install” installs too many
things, and in the wrong place:

--8<---------------cut here---------------start------------->8---
$ find /gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/lib
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/lib/libi2pdclient.a
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/lib/libi2pd.a
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/bin
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/bin/i2pd
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/src
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/src/version.h
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/src/TunnelConfig.h
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/src/Poly1305.h
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/src/Gzip.cpp
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/src/Ed25519.h
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/src/Siphash.h
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/src/MatchedDestination.cpp
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/src/api.cpp
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/src/WebSocks.cpp
[…]
/gnu/store/yyddprfp7ypjhr8kswi004smmrryh3lc-i2pd-2.27.0/LICENSE
--8<---------------cut here---------------end--------------->8---

We should at least remove everything under src/ as well as the top-level
‘LICENSE’ file.

As for the .a files, we should either not install them at all, or
install .so files instead.

Could you take a look?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Mon, 15 Jul 2019 16:32:01 GMT) Full text and rfc822 format available.

Message #20 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
Cc: 36638 <at> debbugs.gnu.org
Subject: Re: [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
Date: Mon, 15 Jul 2019 18:31:21 +0200
Ludovic Courtès <ludo <at> gnu.org> skribis:

> Hello,
>
> zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze) skribis:
>
>> * gnu/packages/web.scm (websocketpp): New variable.

[...]

> Applied, thanks!

Actually no!  :-)

On closer inspection, the file layout is also fishy:

--8<---------------cut here---------------start------------->8---
$ find /gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/lib
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/lib/cmake
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/lib/cmake/websocketpp
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/lib/cmake/websocketpp/websocketpp-configVersion.cmake
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/lib/cmake/websocketpp/websocketpp-config.cmake
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/bin
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/bin/test_processor_hybi00
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/bin/test_sha1
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/bin/test_transport_iostream_base
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/bin/test_transport_asio_timers
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/bin/test_processor_hybi08
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/bin/test_transport
/gnu/store/rm6a4v8m8plzskjmig2vmly91qxl4z8q-websocketpp-0.8.1/bin/test_utilities
--8<---------------cut here---------------end--------------->8---

All of bin/ should be removed I think, because these look like unit
tests, no?

Also, there’s no .so or .a file, but that’s because it’s a header-only
library, right?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Tue, 16 Jul 2019 16:49:02 GMT) Full text and rfc822 format available.

Message #23 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 36638 <at> debbugs.gnu.org
Subject: Re: [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
Date: Tue, 16 Jul 2019 12:48:50 -0400
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> We should at least remove everything under src/ as well as the
> top-level ‘LICENSE’ file.
>
> As for the .a files, we should either not install them at all, or
> install .so files instead.
>
> Could you take a look?

I'll sit down and take a closer look when I get the chance. It seems to
be a funny build system setup; the libi2pd header files are installed to
'src/', and given the CMake flags I'm using, we /should/ be getting .so
files instead of .a files.

> All of bin/ should be removed I think, because these look like unit
> tests, no?

Good catch! I need to start looking at the output directories for the
packages I write :p  I wouldn't have expected 'make install' to install
the unit tests as well

> Also, there’s no .so or .a file, but that’s because it’s a header-only
> library, right?

Yes.

Regards,
Jakob
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Wed, 17 Jul 2019 18:11:01 GMT) Full text and rfc822 format available.

Message #26 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
To: 36638 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#36638] [PATCH v2 0/2] gnu: Add i2pd.
Date: Wed, 17 Jul 2019 14:10:07 -0400
[Message part 1 (text/plain, inline)]
Should be fixed now. BUILD_SHARED_LIBS was disabled by default.

On an unrelated note, is there a way to obtain the source directory when
patches are applied to 'origin'? '(assoc-ref %build-inputs "source")'
works fine here, but if I were to use a patch to deal with the
extraneous files installed by i2pd, it points to an xzipped archive.

Jakob L. Kreuze (2):
  gnu: Add websocketpp.
  gnu: Add i2pd.

 gnu/local.mk         |   1 +
 gnu/packages/i2p.scm | 107 +++++++++++++++++++++++++++++++++++++++++++
 gnu/packages/web.scm |  36 +++++++++++++++
 3 files changed, 144 insertions(+)
 create mode 100644 gnu/packages/i2p.scm

-- 
2.22.0

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Wed, 17 Jul 2019 18:12:01 GMT) Full text and rfc822 format available.

Message #29 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
To: 36638 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp.
Date: Wed, 17 Jul 2019 14:11:16 -0400
[Message part 1 (text/plain, inline)]
* gnu/packages/web.scm (websocketpp): New variable.
---
 gnu/packages/web.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index d1f5ec2eb6..e61bbba695 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -34,6 +34,7 @@
 ;;; Copyright © 2019 Brendan Tildesley <mail <at> brendan.scot>
 ;;; Copyright © 2019 Alex Griffin <a <at> ajgrf.com>
 ;;; Copyright © 2019 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
+;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays <at> sdf.lonestar.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,6 +72,7 @@
   #:use-module (gnu packages admin)
   #:use-module (gnu packages adns)
   #:use-module (gnu packages apr)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages docbook)
@@ -854,6 +856,40 @@ for efficient socket-like bidirectional reliable communication channels.")
     ;; This is LGPLv2.1-only with extra exceptions specified in 'LICENSE'.
     (license license:lgpl2.1)))
 
+(define-public websocketpp
+  (package
+    (name "websocketpp")
+    (version "0.8.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/zaphoyd/websocketpp.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "12ffczcrryh74c1xssww35ic6yiy2l2xgdd30lshiq9wnzl2brgy"))))
+    (build-system cmake-build-system)
+    (inputs `(("boost" ,boost)
+              ("openssl" ,openssl)))
+    (arguments '(#:configure-flags
+                 '("-DBUILD_TESTS=ON")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (add-after 'install 'remove-tests
+                     (lambda* (#:key outputs
+                               #:allow-other-keys)
+                       (let* ((install-dir (assoc-ref outputs "out"))
+                              (bin-dir (string-append install-dir "/bin")))
+                         (delete-file-recursively bin-dir)))))))
+    (home-page "https://www.zaphoyd.com/websocketpp/")
+    (synopsis "C++ library implementing the WebSocket protocol")
+    (description "WebSocket++ is a C++ library that can be used to implement
+WebSocket functionality.  The goals of the project are to provide a WebSocket
+implementation that is simple, portable, flexible, lightweight, low level, and
+high performance.")
+    (license license:bsd-3)))
+
 (define-public libpsl
   (package
     (name "libpsl")
-- 
2.22.0
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Wed, 17 Jul 2019 18:13:01 GMT) Full text and rfc822 format available.

Message #32 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
To: 36638 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#36638] [PATCH v2 2/2] gnu: Add i2pd.
Date: Wed, 17 Jul 2019 14:12:23 -0400
[Message part 1 (text/plain, inline)]
* gnu/packages/i2p.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk         |   1 +
 gnu/packages/i2p.scm | 107 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+)
 create mode 100644 gnu/packages/i2p.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index e6fca384a0..20f77c89f0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -243,6 +243,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/hugs.scm				\
   %D%/packages/hurd.scm				\
   %D%/packages/hyperledger.scm			\
+  %D%/packages/i2p.scm				\
   %D%/packages/ibus.scm				\
   %D%/packages/icu4c.scm			\
   %D%/packages/idris.scm			\
diff --git a/gnu/packages/i2p.scm b/gnu/packages/i2p.scm
new file mode 100644
index 0000000000..0f6aa2133a
--- /dev/null
+++ b/gnu/packages/i2p.scm
@@ -0,0 +1,107 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays <at> sdf.lonestar.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages i2p)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages upnp)
+  #:use-module (gnu packages web)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system cmake)
+  #:use-module ((guix licenses) #:prefix license:))
+
+(define-public i2pd
+  (package
+    (name "i2pd")
+    (version "2.27.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/PurpleI2P/i2pd.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "00y0y57z84gakwa88zzm0g3ixgc6y7zm35rjiysiajzvmdq5w1wf"))))
+    (build-system cmake-build-system)
+    (inputs `(("boost" ,boost)
+              ("miniupnpc" ,miniupnpc)
+              ("openssl" ,openssl)
+              ("websocketpp" ,websocketpp)
+              ("zlib" ,zlib)))
+    (arguments '(#:configure-flags
+                 (let ((source (assoc-ref %build-inputs "source")))
+                   (list (string-append "-S" source "/build")
+                         "-DWITH_PCH=OFF"
+                         "-DWITH_STATIC=OFF"
+                         "-DWITH_UPNP=ON"
+                         "-DWITH_WEBSOCKETS=ON"
+                         "-DWITH_LIBRARY=ON"
+                         "-DBUILD_SHARED_LIBS=ON"
+                         "-DWITH_BINARY=ON"))
+                 #:phases
+                 (modify-phases %standard-phases
+                   (replace 'check
+                     (lambda* (#:key
+                               (make-flags '())
+                               (parallel-tests? #t)
+                               #:allow-other-keys)
+                       (let ((oldpwd (getcwd))
+                             (source (assoc-ref %build-inputs "source")))
+                         (copy-recursively (string-append source "/tests")
+                                           "./tests")
+                         (chdir "./tests")
+                         (substitute* "Makefile"
+                           (("../libi2pd/") (string-append source "/libi2pd/")))
+                         (apply invoke "make" "all"
+                                `(,@(if parallel-tests?
+                                        `("-j" ,(number->string
+                                                 (parallel-job-count)))
+                                        '())
+                                  ,@make-flags))
+                         (chdir oldpwd))))
+                   (add-after 'install 'install-headers
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((install-dir (assoc-ref outputs "out"))
+                              (src-dir (string-append install-dir "/src"))
+                              (include-dir
+                               (string-append install-dir "/include")))
+                         (mkdir-p include-dir)
+                         ;; This is the only header file that's relevant to the
+                         ;; public interface.
+                         ;; <https://github.com/PurpleI2P/i2pd/issues/1378>
+                         (install-file (string-append src-dir "/api.h")
+                                       include-dir)
+                         #t)))
+                   (add-after 'install-headers 'remove-source
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((install-dir (assoc-ref outputs "out"))
+                              (src-dir (string-append install-dir "/src")))
+                         (delete-file-recursively src-dir)
+                         (delete-file (string-append install-dir
+                                                     "/LICENSE"))
+                         #t))))))
+    (home-page "https://i2pd.website/")
+    (synopsis "Router for an end-to-end encrypted and anonymous internet")
+    (description "i2pd is a client for the anonymous I2P network, upon which
+applications for file sharing, web browsing, instant messaging, and more are
+built. i2pd allows people from all around the world to communicate and share
+information securely without restrictions.")
+    (license license:bsd-3)))
-- 
2.22.0

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Thu, 18 Jul 2019 09:20:01 GMT) Full text and rfc822 format available.

Message #35 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
Cc: 36638 <at> debbugs.gnu.org
Subject: Re: [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp.
Date: Thu, 18 Jul 2019 11:18:04 +0200
[Message part 1 (text/plain, inline)]
Hi!

zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze) skribis:

> * gnu/packages/web.scm (websocketpp): New variable.

Applied with the minor changes below, in particular returning #t from
the build phase.

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index e61bbba695..f1083505ee 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -872,16 +872,15 @@ for efficient socket-like bidirectional reliable communication channels.")
     (build-system cmake-build-system)
     (inputs `(("boost" ,boost)
               ("openssl" ,openssl)))
-    (arguments '(#:configure-flags
-                 '("-DBUILD_TESTS=ON")
+    (arguments '(#:configure-flags '("-DBUILD_TESTS=ON")
                  #:phases
                  (modify-phases %standard-phases
                    (add-after 'install 'remove-tests
-                     (lambda* (#:key outputs
-                               #:allow-other-keys)
+                     (lambda* (#:key outputs #:allow-other-keys)
                        (let* ((install-dir (assoc-ref outputs "out"))
                               (bin-dir (string-append install-dir "/bin")))
-                         (delete-file-recursively bin-dir)))))))
+                         (delete-file-recursively bin-dir)
+                         #t))))))
     (home-page "https://www.zaphoyd.com/websocketpp/")
     (synopsis "C++ library implementing the WebSocket protocol")
     (description "WebSocket++ is a C++ library that can be used to implement

Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Thu, 18 Jul 2019 09:21:02 GMT) Full text and rfc822 format available.

Message #38 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
Cc: 36638 <at> debbugs.gnu.org
Subject: Re: [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp.
Date: Thu, 18 Jul 2019 11:20:10 +0200
[Message part 1 (text/plain, inline)]
Hi!

zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze) skribis:

> * gnu/packages/web.scm (websocketpp): New variable.

Applied with the minor changes below, in particular returning #t from
the build phase.

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index e61bbba695..f1083505ee 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -872,16 +872,15 @@ for efficient socket-like bidirectional reliable communication channels.")
     (build-system cmake-build-system)
     (inputs `(("boost" ,boost)
               ("openssl" ,openssl)))
-    (arguments '(#:configure-flags
-                 '("-DBUILD_TESTS=ON")
+    (arguments '(#:configure-flags '("-DBUILD_TESTS=ON")
                  #:phases
                  (modify-phases %standard-phases
                    (add-after 'install 'remove-tests
-                     (lambda* (#:key outputs
-                               #:allow-other-keys)
+                     (lambda* (#:key outputs #:allow-other-keys)
                        (let* ((install-dir (assoc-ref outputs "out"))
                               (bin-dir (string-append install-dir "/bin")))
-                         (delete-file-recursively bin-dir)))))))
+                         (delete-file-recursively bin-dir)
+                         #t))))))
     (home-page "https://www.zaphoyd.com/websocketpp/")
     (synopsis "C++ library implementing the WebSocket protocol")
     (description "WebSocket++ is a C++ library that can be used to implement

Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Thu, 18 Jul 2019 09:28:01 GMT) Full text and rfc822 format available.

Message #41 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
Cc: 36638 <at> debbugs.gnu.org
Subject: Re: [bug#36638] [PATCH v2 2/2] gnu: Add i2pd.
Date: Thu, 18 Jul 2019 11:27:40 +0200
zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze) skribis:

> * gnu/packages/i2p.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Applied, thanks!




Information forwarded to guix-patches <at> gnu.org:
bug#36638; Package guix-patches. (Thu, 18 Jul 2019 09:30:02 GMT) Full text and rfc822 format available.

Message #44 received at 36638 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
Cc: 36638 <at> debbugs.gnu.org
Subject: Re: [bug#36638] [PATCH v2 0/2] gnu: Add i2pd.
Date: Thu, 18 Jul 2019 11:29:17 +0200
zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze) skribis:

> On an unrelated note, is there a way to obtain the source directory when
> patches are applied to 'origin'? '(assoc-ref %build-inputs "source")'
> works fine here, but if I were to use a patch to deal with the
> extraneous files installed by i2pd, it points to an xzipped archive.

The current working when the ‘snippet’ is executed is the source
directory.  But maybe I’m overlooking something?

Thanks,
Ludo’.




Added tag(s) fixed. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 18 Jul 2019 09:30:05 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 36638 <at> debbugs.gnu.org and zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze) Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 18 Jul 2019 09:30:05 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 15 Aug 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.