You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
5.2 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
  3. ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (gnu packages matrix)
  20. #:use-module ((guix licenses) #:prefix license:)
  21. #:use-module (gnu packages check)
  22. #:use-module (gnu packages databases)
  23. #:use-module (gnu packages monitoring)
  24. #:use-module (gnu packages python-crypto)
  25. #:use-module (gnu packages python-web)
  26. #:use-module (gnu packages python-xyz)
  27. #:use-module (gnu packages xml)
  28. #:use-module (guix build-system python)
  29. #:use-module (guix download)
  30. #:use-module (guix packages))
  31. (define-public python-matrix-synapse-ldap3
  32. (package
  33. (name "python-matrix-synapse-ldap3")
  34. (version "0.1.4")
  35. (source
  36. (origin
  37. (method url-fetch)
  38. (uri (pypi-uri "matrix-synapse-ldap3" version))
  39. (sha256
  40. (base32
  41. "01bms89sl16nyh9f141idsz4mnhxvjrc3gj721wxh1fhikps0djx"))))
  42. (build-system python-build-system)
  43. (arguments
  44. ;; tests require synapse, creating a circular dependency.
  45. '(#:tests? #f))
  46. (propagated-inputs
  47. `(("python-twisted" ,python-twisted)
  48. ("python-ldap3" ,python-ldap3)
  49. ("python-service-identity" ,python-service-identity)))
  50. (home-page "https://github.com/matrix-org/matrix-synapse-ldap3")
  51. (synopsis "LDAP3 auth provider for Synapse")
  52. (description
  53. "This package allows Synapse to use LDAP as a password provider.
  54. This lets users log in to Synapse with their username and password from
  55. an LDAP server.")
  56. (license license:asl2.0)))
  57. (define-public synapse
  58. (package
  59. (name "synapse")
  60. (version "1.14.0")
  61. (source (origin
  62. (method url-fetch)
  63. (uri (pypi-uri "matrix-synapse" version))
  64. (sha256
  65. (base32
  66. "09drdqcjvpk9s3hq5rx9yxsxq0wak5fg5gfaiqfnbnxav2c2v7kq"))))
  67. (build-system python-build-system)
  68. ;; TODO Run tests with ‘PYTHONPATH=. trial3 tests’.
  69. (propagated-inputs
  70. `(("python-simplejson" ,python-simplejson) ; not attested but required
  71. ;; requirements (synapse/python_dependencies.py)
  72. ("python-jsonschema" ,python-jsonschema)
  73. ("python-frozendict" ,python-frozendict)
  74. ("python-unpaddedbase64" ,python-unpaddedbase64)
  75. ("python-canonicaljson" ,python-canonicaljson)
  76. ("python-signedjson" ,python-signedjson)
  77. ("python-pynacl" ,python-pynacl)
  78. ("python-idna" ,python-idna)
  79. ("python-service-identity" ,python-service-identity)
  80. ("python-twisted" ,python-twisted)
  81. ("python-treq" ,python-treq)
  82. ("python-pyopenssl" ,python-pyopenssl)
  83. ("python-pyyaml" ,python-pyyaml)
  84. ("python-pyasn1" ,python-pyasn1)
  85. ("python-pyasn1-modules" ,python-pyasn1-modules)
  86. ("python-daemonize" ,python-daemonize)
  87. ("python-bcrypt" ,python-bcrypt)
  88. ("python-pillow" ,python-pillow)
  89. ("python-sortedcontainers" ,python-sortedcontainers)
  90. ("python-pymacaroons" ,python-pymacaroons)
  91. ("python-msgpack" ,python-msgpack)
  92. ("python-phonenumbers" ,python-phonenumbers)
  93. ("python-six" ,python-six)
  94. ("python-prometheus-client" ,python-prometheus-client)
  95. ("python-attrs" ,python-attrs)
  96. ("python-netaddr" ,python-netaddr)
  97. ("python-jinja2" ,python-jinja2)
  98. ("python-bleach" ,python-bleach)
  99. ("python-typing-extensions" ,python-typing-extensions)
  100. ;; conditional requirements (synapse/python_dependencies.py)
  101. ;;("python-hiredis" ,python-hiredis)
  102. ("python-matrix-synapse-ldap3" ,python-matrix-synapse-ldap3)
  103. ("python-psycopg2" ,python-psycopg2)
  104. ("python-jinja2" ,python-jinja2)
  105. ("python-txacme" ,python-txacme)
  106. ("python-pysaml2" ,python-pysaml2)
  107. ("python-lxml" ,python-lxml)
  108. ;; sentry-sdk, jaeger-client, and opentracing could be included, but
  109. ;; all are monitoring aids and not essential.
  110. ("python-pyjwt" ,python-pyjwt)))
  111. (native-inputs
  112. `(("python-mock" ,python-mock)
  113. ("python-parameterized" ,python-parameterized)))
  114. (home-page "https://github.com/matrix-org/synapse")
  115. (synopsis "Matrix reference homeserver")
  116. (description "Synapse is a reference \"homeserver\" implementation of
  117. Matrix from the core development team at matrix.org, written in
  118. Python/Twisted. It is intended to showcase the concept of Matrix and let
  119. folks see the spec in the context of a codebase and let you run your own
  120. homeserver and generally help bootstrap the ecosystem.")
  121. (license license:asl2.0)))