[PATCH 0/2] gnu: Add i2pd.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Jakob L. Kreuze
Owner
unassigned
Submitted by
Jakob L. Kreuze
Severity
normal
J
J
Jakob L. Kreuze wrote on 13 Jul 2019 19:52
(address . guix-patches@gnu.org)
87o91xbz4p.fsf@sdf.lonestar.org
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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl0qGmYACgkQ9Qb9Fp2P
2Vp90xAApNn4L7WLNu2hkUptsbxzDysxBA1LweLDkAAfr1AZGemh5Oa3iuLYi548
zxjLw798QSMNc7nfaZ/Pf9l+fHX+LbolO1Wqik2qT2Qe6fTD2cfPK28Cyw7gMW7D
z0/YvcxeHZ28ao4hluzeboSR4tbBc1qKdCz6n6MxCNkmENEdNibD12nvU43l/78y
OoXXbluYZ9KwsemvM215PXWBRQu7Nw46Pa3TrzPcyHPTjIS6M0DMDNKH00tpVyfq
lNowsGMJT/IWN96bnAvZDXi4Sy3Ken71dy+stEmCxB2iqpkDfT/F2NWTj3YjC7o2
hyMrILaWqvWWVJyc8y7orGgnGBEwGv2LSN8JyVP9I+oDPUKJia90/DIG9mkko8G0
L2EYxGB1S6Tkl1S22xm991t6wC9XgEC7wy5KiCSy3yqMJsgQ5AgVjE/0Lk58kjgl
7eaoLffO1nF1PPinc3Gkq0z9ZbWHnqor1NJq80IQKGrP2svh6DjJRYqxVcl3oTFG
eBQUFxHFsqhRko8DTNe4ld3U8rTNTPBo8UFKUY04pCHzKzrWf3Hf4b9vC0qsIV3M
4BjVGGdanSQdsyco044rLIt5W9JKfYMYEVCXQt2pfpGSV2MaOFnSB0nIE7a7b5ga
1XEX2MZ0sAynnrGreGv0V7DXw92SxGaTP4/fa+tRCyxt7+lood4=
=Qmke
-----END PGP SIGNATURE-----

J
J
Jakob L. Kreuze wrote on 13 Jul 2019 19:53
Re: [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
(address . 36638@debbugs.gnu.org)
87k1clbz2i.fsf@sdf.lonestar.org
* gnu/packages/web.scm (websocketpp): New variable.
---
gnu/packages/web.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (55 lines)
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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl0qGrUACgkQ9Qb9Fp2P
2VpnxQ/+In6xN6u973WOrK94yyRa3xGH+zpWpJvvCSDOyNQYnmtAs6q+iEwoht7E
OQfU9LTLl3m9BYT5hj27WUtsuHAlFhls6M5WHPWdjocgy13HQtMVua0rXtqBSO9i
mYCQBVopz0JZkg2n0HcF9lkGTnFnyZ7n8zxlIvpt7s+jtsVAMY7peyBRmbhpGJ8o
ggcC/I8KtdssV2BhaF8ZDfSf3ZnCa/KXlvLY1iJJt7EHHVgi9F4wIbnmh+Ag/20w
XqlPDzlePKp3rEuTySVuqvhG7iRixe+ku06Vfbkdxl+P9+Kiw0FZCHMNzA1EJ69D
LmhHMEltEWpdrZdWmfhTgC4RL8u/IDXZ2YsnUHITD8CyZobKmnDSe3zyYR6H+v/W
9RJ4P3VDkXJSD9Q2J7/9GNRm7GrJLhjivQbHqyTNmnLvJOgOezvtBnjchpDEJSNN
dh+oziakPWWLmfrOVZYqu0emXGZf+lj/hab0PYJ/cAfVLC6HI9GfLh19Rw2VOYSj
Je6BvVrD+7mz7PQn1KuQ01zuqmlFTxv/pdigdutZ7pVfTISybbVlehATL1kMQCu7
o4z59O3kokLEw7vSbw3zMDRdzkXT8sKaw3PYYrlaDMOySvCaLshnLJhV1Y2csCBP
qY+VdShDHyFyRYo/oBS2dAEOW8cav5AZ68btqnLqNyUq3OW61ZQ=
=O+lI
-----END PGP SIGNATURE-----

J
J
Jakob L. Kreuze wrote on 13 Jul 2019 19:54
Re: [bug#36638] [PATCH 2/2] gnu: Add i2pd.
(address . 36638@debbugs.gnu.org)
87ftn9bz0v.fsf_-_@sdf.lonestar.org
* 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

Toggle diff (105 lines)
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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl0qGvEACgkQ9Qb9Fp2P
2Voc0BAArSrlwiFD4NAu024QyxYTH1fMFlhIQJIG7y76xcVawKcrkWt9MfEvFYaW
HJkwXjv1LfrPJJbIQQFPSvj+reoH9RYsf1jwo5Wd7HrdE5MJ4zzYhsarI3AgB2j/
UMV8cJZGdRVYxkSnIeRRPec+kAA5N6Z12KFWY4RD9bIkysNMnIJeQcA64FH1N1jK
hQC2H+v3LNxuBFILzmz9YksK7z8FfrrO+pjDlKhXm2RVt0FmzxsCMMQwtwytr+0n
iqcHz+TLw7hILCahja36rh0GJq+frvP9UivyZ+3C/Sc6kju9NjOeA+7MezZL/jWs
gOy26vhHUAqYffKko/ZPzELy7x3/V2efxm/MgnC4C0Xf3Kn54ZCJCCLytNxLn3DS
WIPRzRyHN7k5V7WOPG4F40VzHFxw+/MYMYYjArrlrQn+b5uLznAVFclnEYR5amoG
Zspzs8HYajriKhlmZ5N5woVV1Rn7g119d3QwzF1EjYnauaQorJgsInf0zbLS41Zj
c8HMFdvP4V/H/b3CAJL60xnGuO7zjvYYFhtzUKe2EtObv8yNgbVSk0bDN14YoxWi
2i1Ytor8lAqdQoGxx398x8nSgpBB+PNcLWemjoD8/BsIVopkrtz+CP+AGtNIUeHC
E4CNt2LkvghcX+PQ67qvsuolzlP83pqAcg0v5Jew5TkofTkwIGA=
=i0tY
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 15 Jul 2019 18:21
Re: [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
(name . Jakob L. Kreuze)(address . zerodaysfordays@sdf.lonestar.org)(address . 36638@debbugs.gnu.org)
8736j7l155.fsf@gnu.org
Hello,

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

Toggle quote (2 lines)
> * gnu/packages/web.scm (websocketpp): New variable.

[...]

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

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

Applied, thanks!

Ludo’.
L
L
Ludovic Courtès wrote on 15 Jul 2019 18:29
Re: [bug#36638] [PATCH 2/2] gnu: Add i2pd.
(name . Jakob L. Kreuze)(address . zerodaysfordays@sdf.lonestar.org)(address . 36638@debbugs.gnu.org)
87wogjjm6m.fsf@gnu.org
zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis:

Toggle quote (3 lines)
> * 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:

Toggle snippet (21 lines)
$ 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

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’.
L
L
Ludovic Courtès wrote on 15 Jul 2019 18:31
Re: [bug#36638] [PATCH 1/2] gnu: Add websocketpp.
(name . Jakob L. Kreuze)(address . zerodaysfordays@sdf.lonestar.org)(address . 36638@debbugs.gnu.org)
87r26rjm3q.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (6 lines)
> Hello,
>
> zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis:
>
>> * gnu/packages/web.scm (websocketpp): New variable.

[...]

Toggle quote (2 lines)
> Applied, thanks!

Actually no! :-)

On closer inspection, the file layout is also fishy:

Toggle snippet (17 lines)
$ 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

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’.
J
J
Jakob L. Kreuze wrote on 16 Jul 2019 18:48
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 36638@debbugs.gnu.org)
87zhleylfx.fsf@sdf.lonestar.org
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (8 lines)
> 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.

Toggle quote (3 lines)
> 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

Toggle quote (3 lines)
> Also, there’s no .so or .a file, but that’s because it’s a header-only
> library, right?

Yes.

Regards,
Jakob
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl0t//IACgkQ9Qb9Fp2P
2VoCbhAAoEkMGgypGnkh8Hfk+yy8Ghwj7CEc7sjWRQoLazThJjwrGFy4cwWXMSVa
g/tCT0zVsMhmfLJ7HI+NNHwxLe5fz0Xv6EVcwamrslgK+Wn4ELO58lqHykP1KEQc
uTiEcMvzperCrN/SnA/HqHHRm5EDvnLQsM3U6W//vkx6Si55Tkr/d+n3zMKYa8SN
w6NysBA3+s6Cd6hM8QEZnw8pK3ITACCM4v6rr20P99fyg27bdi4WCQ6UcMz8srK6
6S24ei9JYSRsJ3TXAzQFjjzlndU3U9NSfL1CUTZtZ/JWSQEk66Azqflu6ogKUvgw
7ScUnHKJXQuNRAIm+a+AokvIBSbF/r7WKAcL+VloAFoHXzMbVdTTZI7bp9SbxI0e
7K1OtI26UvUCDmwauFTojqQZpkn7R+QcUiKH2W5+cKoaebSr16kptMo8RlRvClnc
aChVJWTbI0WZD+wouyBKTRm8tK0/3fHdl0TDJUatkQktuih6wrHk0CM2zGoova37
07anqzTMXiEqlizN7brcUGXUKBQG/F+NayDqnt0apjfrkQb6xgCQrKx90HBFhEf7
BGjV6CvF4RZubxQ5U5hxGdFPWgiNnMh3Fon1qW8N75UCGFe7VzVZKOkGcG/e9WsM
U5x/i6TYNsSnuotK+3IkS2LSTKB3bSJZwHHVwCBOLjVd2L16OjI=
=3LnY
-----END PGP SIGNATURE-----

J
J
Jakob L. Kreuze wrote on 17 Jul 2019 20:10
Re: [bug#36638] [PATCH v2 0/2] gnu: Add i2pd.
(address . 36638@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
87y30wpm68.fsf_-_@sdf.lonestar.org
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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl0vZIEACgkQ9Qb9Fp2P
2VqCaA//SmMiacTa8djMFWn4iCiVRAkMVM40b43RPK4u3dP3e4gA07ISGZ7AzrcL
uF9PV95cNmwEuh6YvjEMZ8gfbZiqUaGqVxqu0IgEe8FMVVYwvJhj6F7IJ7rGUriC
fD8L1hym7E8MvxR54xuxawhL8Wws/i3+GJLdN4SR1Khi/Q3VjMjj+NL7Q5fwmKtp
hiiZvafP5fSb88O0qTei44gKoyeiwb7vmymXdgIXmiwWE/NM0TV3Eof4qc2aHqrQ
enG6T2VLZkZeTlB+W7xorPdvi/JtzUB1OxWsFflC5kZ/JbFbQNJVDpd+9ffoWvW3
4qti8NtqJxWDekDgLeUhK4WRlHSG0/0juumD46vn5vZeLW6IKVAubFtPVtMOuvfn
bWDGK+37NAGM19lzwNl3nPKz8IdQAUwEQl3kJTI1qdCE6m9x28877mq6bG/5UZnt
UkWsyVBNFwLFWqmlTiNqkPzIotaPp5gZS0wuPPug+SkmvBr8eii6wZAXnDErj9w0
77QGLUaY38syYCRpltYfQfh35804+9k+1IvHLveEQUWEzczHTPcaDu5GrGKOOtlQ
jN083e/XYUKLo3rV5Xmrr0fcbJ0ckz3EFjWzSfMkRljjoG+RYfjVxsA8ZnOIQQGB
z998lYc7AMvS3iTKqo0M6GeXDiqzixgxRMVMmlxuAxpAeWxs4TE=
=v8ta
-----END PGP SIGNATURE-----

J
J
Jakob L. Kreuze wrote on 17 Jul 2019 20:11
Re: [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp.
(address . 36638@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
87tvbkpm4b.fsf_-_@sdf.lonestar.org
* gnu/packages/web.scm (websocketpp): New variable.
---
gnu/packages/web.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (63 lines)
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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl0vZMQACgkQ9Qb9Fp2P
2VrfEQ//YffCpuzc45mgDxABZgAwVBr8pD6YAaval6xXP0Xy3yn027+AG7W19rXI
UUQH8iuzZpkAbeI5B5xlglf6aiCehnYPIDhP/LvtuIjb5tduRzQ/6XW2IOyyVTOF
dHeYaajHewroo8e3Y4acM5cTxqPCLHCeItkKRtz7uU+6QdJa3YhXBBUKCsJQM44P
Vb+Pail+oKBBjBU/eiNJNP46Elzq8/artsZJdkytimFiBc8bfoGXroSAmBS1V9fu
n895JnMj5AQiUVBRrIsteDO8NKyJvPtj+2+YF2bbQxu9eZrjNN+oxVuoaKM0rk+d
ITJwWddUimWnQedhy1utwOgiubonxCbl4bvPqjatqcwAqjDUCipTS/bN/LRba5+v
U4zwoArvLZFD0wrLYWRloRRfmT0SeNR79UekVzDqNh1h5wwBmMXjfvxIHlqOIsK8
9nGubHeDnCTLu79RxDxGC91tJ1Ih3lncaIyvBQlgQhGYJmzpq//BeFQASxG3lIpn
6fNfhK5HkxOYEF7ddln0aFJYb5SOaJjkd0KD7f8HMVSlQ3LPQ88ozLVQGCvse11c
NpnCFwoFIhswxgU/xJ2dPDxoPvfNPRjrBylvFQabUxX1WegvHquMkPHVGo2tXYY2
CZ94Nb8pVIK+r52QWDP1UpoX5gEU9Kbhgozi5IQB3BIo/gmCz2g=
=qX4r
-----END PGP SIGNATURE-----

J
J
Jakob L. Kreuze wrote on 17 Jul 2019 20:12
Re: [bug#36638] [PATCH v2 2/2] gnu: Add i2pd.
(address . 36638@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
87pnm8pm2g.fsf_-_@sdf.lonestar.org
* 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

Toggle diff (127 lines)
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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl0vZQkACgkQ9Qb9Fp2P
2Vqs7BAAmCmI/TP2Xs0S2Ge6vbcpDw7lTcjeU6ybWDDkELftmpo+xyhwSU7JehS4
kbbqZQXPpIjqtelNyzMsifO1IxQzt7iXQgXsMxcmqCvFrQPs5yp24AppYIG6ns0t
iIbGyDSYmD1MF6rKZq3gO9IzbS0myEHZrPB0sTRnzG+5SenEOOuiUz2f6H8/Rokp
/iKTQhFwAEo2xTaYMX+1qLEoG+Nv72in6FNEfVoVLWQLsx/Qn4RKfKONDAOGnKl0
qY5yraV7WGfo7rRPHfmYq/hAKFuBxYh3mKPrubi8AlABvMOXIOq3XylTi38cgseP
SbJbXnAAN7F3n3mxA4P2k8WdrMFXcRnknGJ2RTOZVhcRz/hTAFy4eCmNUve8abmR
YuZAJziyArZlW31nVMph7rRBapd5ag4y6LdjpWDNNg5x6ebp5ideGvSDafOpMvnQ
h9lq/l1hy2J96GRzyPNfff1PNBW9xf6iqKYj1JcXXGktFhYPfs5DG37frjKSziM4
16TtawZueMtRbomsRVmF/WfGcanyKHoYNTnKVpKrAN4dVTT6ux6YO0l+JV3uASCx
Mn5H4U6Ty/PIxHzin5FTyHEKbWVjrK7if9eKyd7QJ1LPKoZX9jO1rwJrjhn4v3Ha
zBFFI+C7CXkjgDoedUdp6r0Wh/1liRrrBXge2is68AUTfkwymQI=
=LNP4
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 18 Jul 2019 11:18
Re: [bug#36638] [PATCH v2 1/2] gnu: Add websocketpp.
(name . Jakob L. Kreuze)(address . zerodaysfordays@sdf.lonestar.org)(address . 36638@debbugs.gnu.org)
87v9vzg0qb.fsf@gnu.org
Hi!

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

Toggle quote (2 lines)
> * gnu/packages/web.scm (websocketpp): New variable.

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

Thanks,
Ludo’.
Toggle diff (25 lines)
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
L
L
Ludovic Courtès wrote on 18 Jul 2019 11:20
(name . Jakob L. Kreuze)(address . zerodaysfordays@sdf.lonestar.org)(address . 36638@debbugs.gnu.org)
87sgr3g0mt.fsf@gnu.org
Hi!

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

Toggle quote (2 lines)
> * gnu/packages/web.scm (websocketpp): New variable.

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

Thanks,
Ludo’.
Toggle diff (25 lines)
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
L
L
Ludovic Courtès wrote on 18 Jul 2019 11:27
Re: [bug#36638] [PATCH v2 2/2] gnu: Add i2pd.
(name . Jakob L. Kreuze)(address . zerodaysfordays@sdf.lonestar.org)(address . 36638@debbugs.gnu.org)
87o91rg0ab.fsf@gnu.org
zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis:

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

Applied, thanks!
L
L
Ludovic Courtès wrote on 18 Jul 2019 11:29
Re: [bug#36638] [PATCH v2 0/2] gnu: Add i2pd.
(name . Jakob L. Kreuze)(address . zerodaysfordays@sdf.lonestar.org)(address . 36638@debbugs.gnu.org)
87k1cfg07m.fsf@gnu.org
zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis:

Toggle quote (5 lines)
> 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’.
L
L
Ludovic Courtès wrote on 18 Jul 2019 11:29
control message for bug #36638
(address . control@debbugs.gnu.org)
87imrzg072.fsf@gnu.org
tags 36638 fixed
close 36638
quit
?