1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: Add mautrix-whatsapp.

It was proposed in #62284 on <2023-03-20>.

* gnu/packages/matrix.scm: Add (gnu packages golang), (gnu packages
golang-build), (gnu packages golang-web), (gnu packages golang-xyz)
and (guix build-system go).
(mautrix-whatsapp): New variable.

Co-authored-by: conses <contact@conses.eu>
Co-authored-by: Miguel Ángel Moreno <mail@migalmoreno.com>
Change-Id: I4371f3f0d5939e875e7d7dc4748b9f82558e1248
This commit is contained in:
Sharlatan Hellseher
2025-02-13 14:45:16 +00:00
parent 6cc5c59dd9
commit dd54202db4

View File

@@ -5,8 +5,11 @@
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
;;; Copyright © 2022 Morgan Smith <Morgan.J.Smith@outlook.com>
;;; Copyright © 2023 Miguel Ángel Moreno <mail@migalmoreno.com>
;;; Copyright © 2023 conses <contact@conses.eu>
;;; Copyright © 2025 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2025 Arjan Adriaanse <arjan@adriaan.se>
;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,6 +32,11 @@
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
#:use-module (gnu packages glib)
#:use-module (gnu packages golang)
#:use-module (gnu packages golang-build)
#:use-module (gnu packages golang-crypto)
#:use-module (gnu packages golang-web)
#:use-module (gnu packages golang-xyz)
#:use-module (gnu packages monitoring)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
@@ -36,6 +44,7 @@
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages xml)
#:use-module (guix build-system go)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix download)
@@ -43,6 +52,80 @@
#:use-module (guix git-download)
#:use-module (guix packages))
(define-public mautrix-whatsapp
(package
(name "mautrix-whatsapp")
(version "0.11.2")
(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 "0wn9kldhh865w5mbg3cl61m0db9nr7zl1j8lqs2dixsaihv1lbnx"))))
(build-system go-build-system)
(arguments
(list
#:go go-1.23
#:install-source? #f
#:tests? #f ; no tests provided
#:import-path "go.mau.fi/mautrix-whatsapp/cmd/mautrix-whatsapp"
#:unpack-path "go.mau.fi/mautrix-whatsapp"
#:build-flags
#~(list (string-append "-ldflags=-X main.Tag=" #$version))
#:embed-files
#~(list
;; go.mau.fi/whatsmeow/proto/<...> pattern <...>.pb.raw: cannot embed
;; irregular file <...>.pb.raw
".*\\.pb\\.raw$"
;; maunium.net/go/mautrix/bridgev2/database/upgrades/upgrades.go
;; maunium.net/go/mautrix/crypto/sql_store_upgrade/upgrade.go
;; maunium.net/go/mautrix/sqlstatestore/statestore.go
;;
;; pattern *.sql: cannot embed irregular file <...>.sql
".*\\.sql"
;; golang.org/x/net/publicsuffix/table.go:63:12: pattern
;; data/children: cannot embed irregular file data/children
"children"
;; golang.org/x/net/publicsuffix/table.go:48:12: pattern data/nodes:
;; cannot embed irregular file data/nodes
"nodes"
;; golang.org/x/net/publicsuffix/table.go:33:12: pattern data/text:
;; cannot embed irregular file data/text
"text"
;; maunium.net/go/mautrix/bridgev2/matrix/mxmain/config.go:17:12:
;; pattern example-config.yaml: cannot embed irregular file
;; example-config.yaml
"example-config\\.yaml"
;; go.mau.fi/webp/webp.go:14:12: pattern internal: cannot embed
;; directory internal: contains no embeddable files
".*\\.c"
".*\\.h")))
(native-inputs
(list olm
go-github-com-gorilla-mux
go-github-com-gorilla-websocket
go-github-com-lib-pq
go-github-com-rs-zerolog
go-go-mau-fi-util
go-go-mau-fi-webp
go-go-mau-fi-whatsmeow
go-golang-org-x-exp
go-golang-org-x-image
go-golang-org-x-net
go-golang-org-x-sync
go-google-golang-org-protobuf
go-gopkg-in-yaml-v3
go-maunium-net-go-mautrix))
(home-page "https://go.mau.fi/mautrix-whatsapp")
(synopsis "Matrix <-> WhatsApp puppeting bridge")
(description
"This package provides a @code{Matrix<->WhatsApp} puppeting bridge based
on @url{https://github.com/tulir/whatsmeow, whatsmeow}.")
(license license:agpl3+)))
(define-public python-matrix-client
(package
(name "python-matrix-client")