unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#36638] [PATCH 0/2] gnu: Add i2pd.
@ 2019-07-13 17:52 Jakob L. Kreuze
  2019-07-13 17:53 ` [bug#36638] [PATCH 1/2] gnu: Add websocketpp Jakob L. Kreuze
  0 siblings, 1 reply; 14+ messages in thread
From: Jakob L. Kreuze @ 2019-07-13 17:52 UTC (permalink / raw)
  To: 36638

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
  2019-07-13 17:52 [bug#36638] [PATCH 0/2] gnu: Add i2pd Jakob L. Kreuze
@ 2019-07-13 17:53 ` Jakob L. Kreuze
  2019-07-13 17:54   ` [bug#36638] [PATCH 2/2] gnu: Add i2pd Jakob L. Kreuze
  2019-07-15 16:21   ` [bug#36638] [PATCH 1/2] gnu: Add websocketpp Ludovic Courtès
  0 siblings, 2 replies; 14+ messages in thread
From: Jakob L. Kreuze @ 2019-07-13 17:53 UTC (permalink / raw)
  To: 36638

[-- Attachment #1: Type: text/plain, Size: 2231 bytes --]

* 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@brendan.scot>
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH 2/2] gnu: Add i2pd.
  2019-07-13 17:53 ` [bug#36638] [PATCH 1/2] gnu: Add websocketpp Jakob L. Kreuze
@ 2019-07-13 17:54   ` Jakob L. Kreuze
  2019-07-15 16:29     ` Ludovic Courtès
  2019-07-15 16:21   ` [bug#36638] [PATCH 1/2] gnu: Add websocketpp Ludovic Courtès
  1 sibling, 1 reply; 14+ messages in thread
From: Jakob L. Kreuze @ 2019-07-13 17:54 UTC (permalink / raw)
  To: 36638

[-- Attachment #1: Type: text/plain, Size: 4761 bytes --]

* 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@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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
  2019-07-13 17:53 ` [bug#36638] [PATCH 1/2] gnu: Add websocketpp Jakob L. Kreuze
  2019-07-13 17:54   ` [bug#36638] [PATCH 2/2] gnu: Add i2pd Jakob L. Kreuze
@ 2019-07-15 16:21   ` Ludovic Courtès
  2019-07-15 16:31     ` Ludovic Courtès
  1 sibling, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2019-07-15 16:21 UTC (permalink / raw)
  To: Jakob L. Kreuze; +Cc: 36638

Hello,

zerodaysfordays@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’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH 2/2] gnu: Add i2pd.
  2019-07-13 17:54   ` [bug#36638] [PATCH 2/2] gnu: Add i2pd Jakob L. Kreuze
@ 2019-07-15 16:29     ` Ludovic Courtès
  0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2019-07-15 16:29 UTC (permalink / raw)
  To: Jakob L. Kreuze; +Cc: 36638

zerodaysfordays@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’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
  2019-07-15 16:21   ` [bug#36638] [PATCH 1/2] gnu: Add websocketpp Ludovic Courtès
@ 2019-07-15 16:31     ` Ludovic Courtès
  2019-07-16 16:48       ` Jakob L. Kreuze
  2019-07-17 18:10       ` [bug#36638] [PATCH v2 0/2] gnu: Add i2pd Jakob L. Kreuze
  0 siblings, 2 replies; 14+ messages in thread
From: Ludovic Courtès @ 2019-07-15 16:31 UTC (permalink / raw)
  To: Jakob L. Kreuze; +Cc: 36638

Ludovic Courtès <ludo@gnu.org> skribis:

> Hello,
>
> zerodaysfordays@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’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
  2019-07-15 16:31     ` Ludovic Courtès
@ 2019-07-16 16:48       ` Jakob L. Kreuze
  2019-07-17 18:10       ` [bug#36638] [PATCH v2 0/2] gnu: Add i2pd Jakob L. Kreuze
  1 sibling, 0 replies; 14+ messages in thread
From: Jakob L. Kreuze @ 2019-07-16 16:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 36638

[-- Attachment #1: Type: text/plain, Size: 908 bytes --]

Ludovic Courtès <ludo@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH v2 0/2] gnu: Add i2pd.
  2019-07-15 16:31     ` Ludovic Courtès
  2019-07-16 16:48       ` Jakob L. Kreuze
@ 2019-07-17 18:10       ` Jakob L. Kreuze
  2019-07-17 18:11         ` [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp Jakob L. Kreuze
  2019-07-18  9:29         ` [bug#36638] [PATCH v2 0/2] gnu: Add i2pd Ludovic Courtès
  1 sibling, 2 replies; 14+ messages in thread
From: Jakob L. Kreuze @ 2019-07-17 18:10 UTC (permalink / raw)
  To: 36638

[-- Attachment #1: Type: text/plain, Size: 660 bytes --]

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp.
  2019-07-17 18:10       ` [bug#36638] [PATCH v2 0/2] gnu: Add i2pd Jakob L. Kreuze
@ 2019-07-17 18:11         ` Jakob L. Kreuze
  2019-07-17 18:12           ` [bug#36638] [PATCH v2 2/2] gnu: Add i2pd Jakob L. Kreuze
                             ` (2 more replies)
  2019-07-18  9:29         ` [bug#36638] [PATCH v2 0/2] gnu: Add i2pd Ludovic Courtès
  1 sibling, 3 replies; 14+ messages in thread
From: Jakob L. Kreuze @ 2019-07-17 18:11 UTC (permalink / raw)
  To: 36638

[-- Attachment #1: Type: text/plain, Size: 2697 bytes --]

* 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@brendan.scot>
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH v2 2/2] gnu: Add i2pd.
  2019-07-17 18:11         ` [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp Jakob L. Kreuze
@ 2019-07-17 18:12           ` Jakob L. Kreuze
  2019-07-18  9:27             ` Ludovic Courtès
  2019-07-18  9:18           ` [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp Ludovic Courtès
  2019-07-18  9:20           ` Ludovic Courtès
  2 siblings, 1 reply; 14+ messages in thread
From: Jakob L. Kreuze @ 2019-07-17 18:12 UTC (permalink / raw)
  To: 36638

[-- Attachment #1: Type: text/plain, Size: 6137 bytes --]

* 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@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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp.
  2019-07-17 18:11         ` [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp Jakob L. Kreuze
  2019-07-17 18:12           ` [bug#36638] [PATCH v2 2/2] gnu: Add i2pd Jakob L. Kreuze
@ 2019-07-18  9:18           ` Ludovic Courtès
  2019-07-18  9:20           ` Ludovic Courtès
  2 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2019-07-18  9:18 UTC (permalink / raw)
  To: Jakob L. Kreuze; +Cc: 36638

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

Hi!

zerodaysfordays@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’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1291 bytes --]

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp.
  2019-07-17 18:11         ` [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp Jakob L. Kreuze
  2019-07-17 18:12           ` [bug#36638] [PATCH v2 2/2] gnu: Add i2pd Jakob L. Kreuze
  2019-07-18  9:18           ` [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp Ludovic Courtès
@ 2019-07-18  9:20           ` Ludovic Courtès
  2 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2019-07-18  9:20 UTC (permalink / raw)
  To: Jakob L. Kreuze; +Cc: 36638

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

Hi!

zerodaysfordays@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’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1291 bytes --]

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH v2 2/2] gnu: Add i2pd.
  2019-07-17 18:12           ` [bug#36638] [PATCH v2 2/2] gnu: Add i2pd Jakob L. Kreuze
@ 2019-07-18  9:27             ` Ludovic Courtès
  0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2019-07-18  9:27 UTC (permalink / raw)
  To: Jakob L. Kreuze; +Cc: 36638

zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis:

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

Applied, thanks!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#36638] [PATCH v2 0/2] gnu: Add i2pd.
  2019-07-17 18:10       ` [bug#36638] [PATCH v2 0/2] gnu: Add i2pd Jakob L. Kreuze
  2019-07-17 18:11         ` [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp Jakob L. Kreuze
@ 2019-07-18  9:29         ` Ludovic Courtès
  1 sibling, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2019-07-18  9:29 UTC (permalink / raw)
  To: Jakob L. Kreuze; +Cc: 36638

zerodaysfordays@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’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-07-18  9:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-13 17:52 [bug#36638] [PATCH 0/2] gnu: Add i2pd Jakob L. Kreuze
2019-07-13 17:53 ` [bug#36638] [PATCH 1/2] gnu: Add websocketpp Jakob L. Kreuze
2019-07-13 17:54   ` [bug#36638] [PATCH 2/2] gnu: Add i2pd Jakob L. Kreuze
2019-07-15 16:29     ` Ludovic Courtès
2019-07-15 16:21   ` [bug#36638] [PATCH 1/2] gnu: Add websocketpp Ludovic Courtès
2019-07-15 16:31     ` Ludovic Courtès
2019-07-16 16:48       ` Jakob L. Kreuze
2019-07-17 18:10       ` [bug#36638] [PATCH v2 0/2] gnu: Add i2pd Jakob L. Kreuze
2019-07-17 18:11         ` [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp Jakob L. Kreuze
2019-07-17 18:12           ` [bug#36638] [PATCH v2 2/2] gnu: Add i2pd Jakob L. Kreuze
2019-07-18  9:27             ` Ludovic Courtès
2019-07-18  9:18           ` [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp Ludovic Courtès
2019-07-18  9:20           ` Ludovic Courtès
2019-07-18  9:29         ` [bug#36638] [PATCH v2 0/2] gnu: Add i2pd Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).