mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2025-11-16 09:24:58 +00:00
Compare commits
No commits in common. "0d15cfdb28c9e14f2810d8c991d6f958e29040ce" and "29d57819f996c4089bb61bfb243db27990a78005" have entirely different histories.
0d15cfdb28
...
29d57819f9
@ -1,49 +0,0 @@
|
||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
||||
;;;
|
||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
(define-module (rosenthal packages animation)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (gnu packages animation)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages image)
|
||||
#:use-module (guix build-system cmake)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix utils))
|
||||
|
||||
|
||||
(define-public lottie-converter
|
||||
(let ((commit "3ad34af7bbcf9197fda782a5832b18b72a3bb939")
|
||||
(revision "0"))
|
||||
(package
|
||||
(name "lottie-converter")
|
||||
(version (git-version "0.2" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/sot-tech/LottieConverter")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"12py6y05cv38cri0q813m7nsaizhqjnqnq0jp6bfviam5cq240p8"))))
|
||||
(build-system cmake-build-system)
|
||||
(arguments
|
||||
(list #:configure-flags
|
||||
#~(list "-DSYSTEM_PNG=1"
|
||||
"-DSYSTEM_RL=1"
|
||||
"-DSYSTEM_GL=1")
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(replace 'install
|
||||
(lambda _
|
||||
(let ((bindir (in-vicinity #$output "bin")))
|
||||
(install-file "lottieconverter" bindir)))))))
|
||||
(inputs (list giflib libpng rlottie zlib))
|
||||
(synopsis "Lottie animation converter")
|
||||
(description "This package provides a simple lottie animation converter.
|
||||
Animations can be converted to PNG (with transparency) or GIF.")
|
||||
(home-page "https://github.com/sot-tech/LottieConverter")
|
||||
(license license:bsd-3))))
|
||||
@ -7,55 +7,19 @@
|
||||
#:use-module (gnu packages crypto)
|
||||
#:use-module (gnu packages databases)
|
||||
#:use-module (gnu packages monitoring)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages python-build)
|
||||
#:use-module (gnu packages python-compression)
|
||||
#:use-module (gnu packages python-crypto)
|
||||
#:use-module (gnu packages python-web)
|
||||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages serialization)
|
||||
#:use-module (gnu packages video)
|
||||
#:use-module (guix build-system pyproject)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (rosenthal packages animation)
|
||||
#:use-module (rosenthal packages python-xyz))
|
||||
|
||||
(define-public heisenbridge
|
||||
(package
|
||||
(name "heisenbridge")
|
||||
(version "1.15.4")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/hifi/heisenbridge")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1viv18bkj0lccr00218xp818i923h1ax7c50kl0yn834axdz6y4l"))))
|
||||
(build-system pyproject-build-system)
|
||||
(arguments (list #:tests? #f)) ;TODO
|
||||
(native-inputs
|
||||
(list python-setuptools))
|
||||
(propagated-inputs
|
||||
(list python-aiohttp
|
||||
python-irc
|
||||
python-mautrix
|
||||
python-ruamel.yaml
|
||||
python-socks))
|
||||
(synopsis "Bouncer-style Matrix IRC bridge")
|
||||
(description
|
||||
"Heisenbridge brings IRC to Matrix by creating an environment where every
|
||||
user connects to each network individually like they would with a traditional
|
||||
IRC bouncer. Simplicity is achieved by exposing IRC in the most straightforward
|
||||
way as possible where it makes sense so it feels familiar for long time IRC
|
||||
users.")
|
||||
(home-page "https://github.com/hifi/heisenbridge")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public mautrix-telegram
|
||||
(package
|
||||
(name "mautrix-telegram")
|
||||
@ -75,7 +39,7 @@ users.")
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'install 'install-extras
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(lambda _
|
||||
(let* ((bindir (in-vicinity #$output "bin"))
|
||||
(etcdir (in-vicinity #$output "etc/mautrix-telegram"))
|
||||
(bin (in-vicinity bindir "mautrix-telegram"))
|
||||
@ -87,13 +51,8 @@ users.")
|
||||
(lambda (port)
|
||||
(format port "~
|
||||
#!/bin/sh
|
||||
PATH=~a:~a:$PATH
|
||||
~a -m mautrix_telegram \"$@\"~%"
|
||||
(dirname (dirname (search-input-file inputs "bin/ffmpeg")))
|
||||
(dirname (dirname (search-input-file inputs "bin/lottieconverter")))
|
||||
(search-input-file inputs "bin/python3"))))
|
||||
python3 -m mautrix_telegram \"$@\"~%")))
|
||||
(chmod bin #o555)))))))
|
||||
|
||||
(native-inputs
|
||||
(list python-setuptools))
|
||||
(propagated-inputs
|
||||
@ -106,10 +65,7 @@ PATH=~a:~a:$PATH
|
||||
python-ruamel.yaml
|
||||
python-tulir-telethon))
|
||||
(inputs
|
||||
(list ffmpeg
|
||||
lottie-converter
|
||||
python
|
||||
python-aiodns
|
||||
(list python-aiodns
|
||||
python-aiosqlite
|
||||
python-brotli
|
||||
python-olm
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages rust)
|
||||
#:use-module (gnu packages serialization)
|
||||
#:use-module (gnu packages time)
|
||||
#:use-module (guix build-system cargo)
|
||||
#:use-module (guix build-system pyproject)
|
||||
#:use-module (guix build-system python)
|
||||
@ -25,27 +24,6 @@
|
||||
#:use-module (guix utils)
|
||||
#:use-module (rosenthal utils cargo))
|
||||
|
||||
(define-public python-coherent-licensed
|
||||
(package
|
||||
(name "python-coherent-licensed")
|
||||
(version "0.5.2")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "coherent_licensed" version))
|
||||
(sha256
|
||||
(base32 "0va113rfa0i8sns2if8mnkzwliks0nvlzp1db71klbblrq1i81yq"))))
|
||||
(build-system pyproject-build-system)
|
||||
(native-inputs (list python-flit-core))
|
||||
(home-page "https://pypi.org/project/coherent.licensed/")
|
||||
(synopsis "License management tooling")
|
||||
(description
|
||||
"This library was built for
|
||||
@url{https://github.com/coherent-oss/coherent.build, coherent.build} and
|
||||
@url{https://blog.jaraco.com/skeleton, skeleton} projects to inject a license
|
||||
file at build time to reflect the license declared in the license expression.")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public python-cryptg
|
||||
(package
|
||||
(name "python-cryptg")
|
||||
@ -101,91 +79,6 @@ file at build time to reflect the license declared in the license expression.")
|
||||
to work with the Telegram API, which uses the uncommon AES-IGE mode for it.")
|
||||
(license license:cc0)))
|
||||
|
||||
(define-public python-irc
|
||||
(package
|
||||
(name "python-irc")
|
||||
(version "20.3.1")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "irc" version))
|
||||
(sha256
|
||||
(base32 "02r8fb15wb6b9rf4kh3cvs48a4j00slncj71s4g152sdi6pq6sw0"))))
|
||||
(build-system pyproject-build-system)
|
||||
(native-inputs
|
||||
(list python-setuptools
|
||||
python-setuptools-scm
|
||||
python-pytest))
|
||||
(propagated-inputs
|
||||
(list python-jaraco-collections
|
||||
python-jaraco-functools
|
||||
python-jaraco-logging
|
||||
python-jaraco-stream
|
||||
python-jaraco-text
|
||||
python-more-itertools
|
||||
python-pytz
|
||||
python-tempora))
|
||||
(home-page "https://github.com/jaraco/irc")
|
||||
(synopsis "Python Internet Relay Chat protocol library")
|
||||
(description
|
||||
"This library provides a low-level implementation of the @acronym{IRC,
|
||||
Internet Relay Chat} protocol for Python. It provides an event-driven IRC
|
||||
client framework. It has a fairly thorough support for the basic IRC protocol,
|
||||
@acronym{CTCP, Client-to-Client Protocol}, and @acronym{DCC, Direct
|
||||
Client-to-Client} connections.")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public python-jaraco-logging
|
||||
(package
|
||||
(name "python-jaraco-logging")
|
||||
(version "3.4.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "jaraco_logging" version))
|
||||
(sha256
|
||||
(base32 "1yvmnyq120sqfcbzvqrcjk5a35jqh0fqbvfnn6gfcz27d21xrmp7"))))
|
||||
(build-system pyproject-build-system)
|
||||
(native-inputs
|
||||
(list python-coherent-licensed
|
||||
python-pytest
|
||||
python-setuptools
|
||||
python-setuptools-scm
|
||||
python-wheel))
|
||||
(propagated-inputs
|
||||
(list python-tempora))
|
||||
(home-page "https://github.com/jaraco/jaraco.logging")
|
||||
(synopsis "Python logging facility")
|
||||
(description
|
||||
"This package provides additional facilities to supplement Python's
|
||||
standard logging module.")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public python-jaraco-stream
|
||||
(package
|
||||
(name "python-jaraco-stream")
|
||||
(version "3.0.4")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "jaraco_stream" version))
|
||||
(sha256
|
||||
(base32 "0jwk85k14zb1pvppxy6vnbln8xib7yiwjvmrab42rv91wwl51g72"))))
|
||||
(build-system pyproject-build-system)
|
||||
(native-inputs
|
||||
(list python-pytest
|
||||
python-setuptools
|
||||
python-setuptools-scm
|
||||
python-wheel))
|
||||
(propagated-inputs
|
||||
(list python-more-itertools))
|
||||
(home-page "https://github.com/jaraco/jaraco.stream")
|
||||
(synopsis "Routines for dealing with data streams")
|
||||
(description
|
||||
"This package provides routines for handling streaming data, including a
|
||||
set of generators for loading gzip data on the fly.")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public python-mautrix
|
||||
(package
|
||||
(name "python-mautrix")
|
||||
|
||||
@ -1,155 +0,0 @@
|
||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
||||
;;;
|
||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
(define-module (rosenthal services messaging)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (gnu services databases)
|
||||
#:use-module (gnu services shepherd)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu system shadow)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix modules)
|
||||
#:use-module (guix records)
|
||||
#:use-module (rosenthal packages messaging)
|
||||
#:export (heisenbridge-service-type
|
||||
heisenbridge-configuration
|
||||
|
||||
mautrix-telegram-service-type
|
||||
mautrix-telegram-configuration))
|
||||
|
||||
;;;
|
||||
;;; Heisenbridge
|
||||
;;;
|
||||
|
||||
(define-configuration/no-serialization heisenbridge-configuration
|
||||
(heisenbridge
|
||||
(file-like heisenbridge)
|
||||
"")
|
||||
(homeserver
|
||||
(string "http://localhost:8008")
|
||||
"")
|
||||
(config
|
||||
file-like
|
||||
"")
|
||||
(shepherd-provision
|
||||
(list-of-symbols '(heisenbridge))
|
||||
"")
|
||||
(shepherd-requirement
|
||||
(list-of-symbols '())
|
||||
"")
|
||||
(auto-start?
|
||||
(boolean #t)
|
||||
""))
|
||||
|
||||
(define heisenbridge-account
|
||||
(list (user-group (name "heisenbridge") (system? #t))
|
||||
(user-account
|
||||
(name "heisenbridge")
|
||||
(group "heisenbridge")
|
||||
(system? #t)
|
||||
(home-directory "/var/empty"))))
|
||||
|
||||
(define heisenbridge-shepherd
|
||||
(match-record-lambda <heisenbridge-configuration>
|
||||
(heisenbridge config homeserver shepherd-provision shepherd-requirement auto-start?)
|
||||
(list (shepherd-service
|
||||
(provision shepherd-provision)
|
||||
(requirement `(user-processes networking ,@shepherd-requirement))
|
||||
(start
|
||||
#~(make-forkexec-constructor
|
||||
(list #$(file-append heisenbridge "/bin/heisenbridge")
|
||||
"--config" #$config #$homeserver)
|
||||
#:user "heisenbridge"
|
||||
#:group "heisenbridge"
|
||||
#:environment-variables
|
||||
'("PATH=/run/current-system/profile/bin"
|
||||
"SSL_CERT_DIR=/run/current-system/profile/etc/ssl/certs"
|
||||
"SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt")))
|
||||
(stop #~(make-kill-destructor))
|
||||
(auto-start? auto-start?)
|
||||
(actions (list (shepherd-configuration-action config)))))))
|
||||
|
||||
(define heisenbridge-service-type
|
||||
(service-type
|
||||
(name 'heisenbridge)
|
||||
(extensions
|
||||
(list (service-extension account-service-type
|
||||
(const heisenbridge-account))
|
||||
(service-extension shepherd-root-service-type
|
||||
heisenbridge-shepherd)))
|
||||
(description "")))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Mautrix Telegram
|
||||
;;;
|
||||
|
||||
(define-configuration/no-serialization mautrix-telegram-configuration
|
||||
(mautrix-telegram
|
||||
(file-like mautrix-telegram)
|
||||
"")
|
||||
(config
|
||||
file-like
|
||||
"")
|
||||
(shepherd-provision
|
||||
(list-of-symbols '(mautrix-telegram))
|
||||
"")
|
||||
(shepherd-requirement
|
||||
(list-of-symbols '())
|
||||
"")
|
||||
(auto-start?
|
||||
(boolean #t)
|
||||
""))
|
||||
|
||||
(define mautrix-telegram-account
|
||||
(list (user-group (name "mautrix") (system? #t))
|
||||
(user-account
|
||||
(name "mautrix-telegram")
|
||||
(group "mautrix")
|
||||
(system? #t)
|
||||
(home-directory "/var/lib/mautrix-telegram"))))
|
||||
|
||||
(define mautrix-telegram-activation
|
||||
(with-imported-modules (source-module-closure '((gnu build activation)))
|
||||
#~(begin
|
||||
(use-modules (gnu build activation))
|
||||
(let ((user (getpwnam "mautrix-telegram")))
|
||||
(mkdir-p/perms "/var/lib/mautrix-telegram" user #o700)))))
|
||||
|
||||
(define mautrix-telegram-postgresql-role
|
||||
(list (postgresql-role
|
||||
(name "mautrix-telegram")
|
||||
(create-database? #t))))
|
||||
|
||||
(define mautrix-telegram-shepherd
|
||||
(match-record-lambda <mautrix-telegram-configuration>
|
||||
(mautrix-telegram config shepherd-provision shepherd-requirement auto-start?)
|
||||
(list (shepherd-service
|
||||
(provision shepherd-provision)
|
||||
(requirement
|
||||
`(user-processes networking postgresql ,@shepherd-requirement))
|
||||
(start
|
||||
#~(make-forkexec-constructor
|
||||
(list #$(file-append mautrix-telegram "/bin/mautrix-telegram")
|
||||
"--no-update" "--config" #$config)
|
||||
#:user "mautrix-telegram"
|
||||
#:group "mautrix"
|
||||
#:directory "/var/lib/mautrix-telegram"))
|
||||
(stop #~(make-kill-destructor))
|
||||
(auto-start? auto-start?)
|
||||
(actions (list (shepherd-configuration-action config)))))))
|
||||
|
||||
(define mautrix-telegram-service-type
|
||||
(service-type
|
||||
(name 'mautrix-telegram)
|
||||
(extensions
|
||||
(list (service-extension account-service-type
|
||||
(const mautrix-telegram-account))
|
||||
(service-extension activation-service-type
|
||||
(const mautrix-telegram-activation))
|
||||
(service-extension postgresql-role-service-type
|
||||
(const mautrix-telegram-postgresql-role))
|
||||
(service-extension shepherd-root-service-type
|
||||
mautrix-telegram-shepherd)))
|
||||
(description "")))
|
||||
Loading…
Reference in New Issue
Block a user