i2p.scm 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. (define-module (gnu packages i2p)
  22. #:use-module (gnu packages boost)
  23. #:use-module (gnu packages compression)
  24. #:use-module (gnu packages tls)
  25. #:use-module (gnu packages upnp)
  26. #:use-module (guix packages)
  27. #:use-module (guix git-download)
  28. #:use-module (guix build-system cmake)
  29. #:use-module ((guix licenses) #:prefix license:))
  30. (define-public i2pd
  31. (package
  32. (name "i2pd")
  33. (version "2.38.0")
  34. (source
  35. (origin
  36. (method git-fetch)
  37. (uri (git-reference
  38. (url "https://github.com/PurpleI2P/i2pd")
  39. (commit version)))
  40. (file-name (git-file-name name version))
  41. (sha256
  42. (base32 "1a35grcfw5a9dsj0rnm2i86fjf4px96xbnjj3hkril7hv5jvl37k"))))
  43. (build-system cmake-build-system)
  44. (inputs
  45. `(("boost" ,boost)
  46. ("miniupnpc" ,miniupnpc)
  47. ("openssl" ,openssl)
  48. ("zlib" ,zlib)))
  49. (arguments
  50. '(#:configure-flags
  51. (let ((source (assoc-ref %build-inputs "source")))
  52. (list (string-append "-S" source "/build")
  53. "-DWITH_PCH=OFF"
  54. "-DWITH_STATIC=OFF"
  55. "-DWITH_UPNP=ON"
  56. "-DWITH_LIBRARY=ON"
  57. "-DBUILD_SHARED_LIBS=ON"
  58. "-DWITH_BINARY=ON"))
  59. #:phases
  60. (modify-phases %standard-phases
  61. (replace 'check
  62. (lambda* (#:key
  63. tests?
  64. (make-flags '())
  65. (parallel-tests? #t)
  66. #:allow-other-keys)
  67. (let ((source (assoc-ref %build-inputs "source")))
  68. (when tests?
  69. (copy-recursively (string-append source "/tests")
  70. "./tests")
  71. (with-directory-excursion "tests"
  72. (substitute* "Makefile"
  73. (("../libi2pd/") (string-append source "/libi2pd/")))
  74. (apply invoke "make" "all"
  75. `(,@(if parallel-tests?
  76. `("-j" ,(number->string
  77. (parallel-job-count)))
  78. '())
  79. ,@make-flags))))))))))
  80. (home-page "https://i2pd.website/")
  81. (synopsis "Router for an end-to-end encrypted and anonymous internet")
  82. (description "i2pd is a client for the anonymous I2P network, upon which
  83. applications for file sharing, web browsing, instant messaging, and more are
  84. built. i2pd allows people from all around the world to communicate and share
  85. information securely without restrictions.")
  86. (license license:bsd-3)))