gnu: r-biocviews: Update to 1.64.1.
[jackhill/guix/guix.git] / gnu / packages / i2p.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
3 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
5 ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages i2p)
23 #:use-module (gnu packages boost)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages tls)
26 #:use-module (gnu packages upnp)
27 #:use-module (guix packages)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system cmake)
30 #:use-module ((guix licenses) #:prefix license:))
31
32 (define-public i2pd
33 (package
34 (name "i2pd")
35 (version "2.41.0")
36 (source
37 (origin
38 (method git-fetch)
39 (uri (git-reference
40 (url "https://github.com/PurpleI2P/i2pd")
41 (commit version)))
42 (file-name (git-file-name name version))
43 (sha256
44 (base32 "0kh03lb4m8fvlfvq06d4hgwmk43pk7yp7n7y36kb2vplhrjrn2kx"))))
45 (build-system cmake-build-system)
46 (inputs
47 (list boost miniupnpc openssl zlib))
48 (arguments
49 '(#:configure-flags
50 (let ((source (assoc-ref %build-inputs "source")))
51 (list (string-append "-S" source "/build")
52 "-DWITH_PCH=OFF"
53 "-DWITH_STATIC=OFF"
54 "-DWITH_UPNP=ON"
55 "-DWITH_LIBRARY=ON"
56 "-DBUILD_SHARED_LIBS=ON"
57 "-DWITH_BINARY=ON"))
58 #:phases
59 (modify-phases %standard-phases
60 (replace 'check
61 (lambda* (#:key
62 tests?
63 (make-flags '())
64 (parallel-tests? #t)
65 #:allow-other-keys)
66 (let ((source (assoc-ref %build-inputs "source")))
67 (when tests?
68 (copy-recursively (string-append source "/tests")
69 "./tests")
70 (with-directory-excursion "tests"
71 (substitute* "Makefile"
72 (("../libi2pd") (string-append source "/libi2pd")))
73 (apply invoke "make" "all"
74 `(,@(if parallel-tests?
75 `("-j" ,(number->string
76 (parallel-job-count)))
77 '())
78 ,@make-flags))))))))))
79 (home-page "https://i2pd.website/")
80 (synopsis "Router for an end-to-end encrypted and anonymous internet")
81 (description "i2pd is a client for the anonymous I2P network, upon which
82 applications for file sharing, web browsing, instant messaging, and more are
83 built. i2pd allows people from all around the world to communicate and share
84 information securely without restrictions.")
85 (license license:bsd-3)))