@@ -34,6 +34,8 @@ (define-module (gnu packages matrix)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages syncthing)
+ #:use-module (gnu packages video)
#:use-module (gnu packages xml)
#:use-module (guix build-system python)
#:use-module (guix build-system go)
@@ -88,6 +90,77 @@ (define-public go-maunium-net-go-mautrix
@end itemize")
(license license:mpl2.0)))
+(define-public mautrix-whatsapp
+ (package
+ (name "mautrix-whatsapp")
+ (version "0.8.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mautrix/whatsapp")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1061fx06xk1mf1j1sbgyfcc5g1jkn5jpv56r04cj0gixd0lqlb5d"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:install-source? #f
+ #:import-path "maunium.net/go/mautrix-whatsapp"
+ #:go go-1.19
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'fix-symlinks
+ (lambda _
+ (delete-file-recursively "src/go.mau.fi/whatsmeow")
+ (copy-recursively (string-append #$(this-package-input
+ "go-mau-fi-whatsmeow")
+ "/src/go.mau.fi/whatsmeow")
+ (string-append (getenv "GOPATH")
+ "/src/go.mau.fi/whatsmeow"))
+ (delete-file-recursively
+ "src/github.com/chai2010/webp")
+ (copy-recursively
+ (string-append #$(this-package-input
+ "go-github-com-chai2010-webp")
+ "/src/github.com/chai2010/webp")
+ (string-append (getenv "GOPATH")
+ "/src/github.com/chai2010/webp"))
+ (delete-file-recursively
+ "src/maunium.net/go/mautrix")
+ (copy-recursively
+ (string-append #$(this-package-input
+ "go-maunium-net-go-mautrix")
+ "/src/maunium.net/go/mautrix")
+ (string-append (getenv "GOPATH")
+ "/src/maunium.net/go/mautrix")))))))
+ (native-inputs (list libolm ffmpeg))
+ (propagated-inputs
+ (list go-github-com-chai2010-webp
+ go-github-com-gorilla-mux
+ go-github-com-gorilla-websocket
+ go-github-com-lib-pq
+ go-github-com-mattn-go-sqlite3
+ go-github-com-prometheus-client-golang
+ go-github-com-skip2-go-qrcode
+ go-github-com-tidwall-gjson
+ go-github-com-tidwall-sjson
+ go-github-com-yuin-goldmark
+ go-golang-org-x-image
+ go-golang-org-x-text
+ go-google-golang-org-protobuf-proto
+ go-gopkg-in-yaml-v2
+ go-mau-fi-whatsmeow
+ go-maunium-net-go-mauflag
+ go-maunium-net-go-maulogger
+ go-maunium-net-go-mautrix))
+ (home-page "https://github.com/mautrix/whatsapp")
+ (synopsis "A Matrix-WhatsApp puppeting bridge")
+ (description "A Matrix-WhatsApp puppeting bridge based on
+@code{whatsmeow}.")
+ (license license:agpl3)))
+
(define-public python-matrix-client
(package
(name "python-matrix-client")