projects/guix·blob javascript-team · refs

315 lines · 11.3 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2019-2025 Efraim Flashner <[email protected]>
3;;; Copyright © 2019 Tobias Geerinckx-Rice <[email protected]>
4;;; Copyright © 2021 Taiju HIGASHI <[email protected]>
5;;; Copyright © 2024 Sergio Durigan Junior <[email protected]>
6;;; Copyright © 2025, 2026 Ashish SHUKLA <[email protected]>
7;;; Copyright © 2025 Herman Rimm <[email protected]>
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages fediverse)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix gexp)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system meson)
31 #:use-module (guix build-system pyproject)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix utils)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages bash)
36 #:use-module (gnu packages base)
37 #:use-module (gnu packages check)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages databases)
40 #:use-module (gnu packages freedesktop)
41 #:use-module (gnu packages gettext)
42 #:use-module (gnu packages glib)
43 #:use-module (gnu packages gnome)
44 #:use-module (gnu packages gstreamer)
45 #:use-module (gnu packages gtk)
46 #:use-module (gnu packages image)
47 #:use-module (gnu packages nss)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages python-build)
50 #:use-module (gnu packages python-check)
51 #:use-module (gnu packages python-crypto)
52 #:use-module (gnu packages python-web)
53 #:use-module (gnu packages python-xyz)
54 #:use-module (gnu packages serialization)
55 #:use-module (gnu packages time)
56 #:use-module (gnu packages tls)
57 #:use-module (gnu packages xml))
58
59(define-public cuttlefish
60 (package
61 (name "cuttlefish")
62 (version "0.1.0")
63 (source
64 (origin
65 (method git-fetch)
66 (uri (git-reference
67 (url "https://gitlab.shinice.net/artectrex/Cuttlefish")
68 (commit "9e9b97ccbb27562c86637e5b413c28beacd8cd4d")))
69 (file-name (git-file-name name version))
70 (sha256
71 (base32 "0fdkag4j66zaf2shbw4j6hspk6bw6b0kbd5l6wzvh3p7id7yj6qi"))
72 (modules '((guix build utils)))
73 (snippet
74 #~(begin (substitute* "data/ch.cuttlefish.app.gschema.xml"
75 ;; Instance does not work properly.
76 (("https://video.blender.org")
77 "https://tilvids.com"))
78 (substitute* "src/video-view.cpp"
79 ;; Top-level "files" key has an empty list.
80 (("\\[\"files\"\\]")
81 "[\"streamingPlaylists\"][0][\"files\"]"))))))
82 (build-system meson-build-system)
83 (arguments
84 (list #:glib-or-gtk? #t
85 #:phases
86 #~(modify-phases %standard-phases
87 (add-after 'glib-or-gtk-wrap 'wrap-gst-plugins
88 (lambda _
89 (wrap-program (string-append #$output "/bin/cuttlefish")
90 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix
91 (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))))))
92 (native-inputs
93 (list desktop-file-utils
94 gettext-minimal ;msgfmt
95 (list glib "bin") ;glib-compile-resources
96 gsettings-desktop-schemas ;org.gnome.system.proxy schema
97 pkg-config))
98 (inputs (list bash-minimal
99 gst-plugins-bad
100 gst-plugins-good ;playbin plugin
101 gstreamer
102 gtk
103 jsoncpp
104 libadwaita
105 libsoup-minimal-2))
106 (home-page "https://cuttlefish.ch")
107 (synopsis "GTK client for PeerTube")
108 (description
109 "Cuttlefish is a desktop client for PeerTube, but will work on
110GNU/Linux-based phones (like the Librem 5 or Pinephone) as well. Cuttlefish
111aims to provide a better experience of watching PeerTube videos and using
112PeerTube in general, via an efficient native application that can hook into
113the federation of interconnected video hosting services.")
114 ;; Logo distributed under the Creative Commons CCBY license.
115 (license license:gpl3+)))
116
117(define-public toot
118 (package
119 (name "toot")
120 (version "0.50.1")
121 (source
122 (origin
123 (method url-fetch)
124 (uri (pypi-uri "toot" version))
125 (sha256
126 (base32 "1ng0aq7nlh3agdxri6izxzky4m93mm6ki71l0bcz81jhk31ya63i"))))
127 (build-system pyproject-build-system)
128 (native-inputs
129 (list python-pillow
130 python-pytest
131 python-setuptools
132 python-setuptools-scm
133 python-wheel))
134 (inputs
135 (list python-beautifulsoup4
136 python-click
137 python-dateutil
138 python-requests
139 python-tomlkit
140 python-urwid
141 python-wcwidth
142 ;; Required to display images in the TUI
143 python-pillow
144 python-term-image))
145 (home-page "https://github.com/ihabunek/toot/")
146 (synopsis "Mastodon CLI client")
147 (description "Interact with Mastodon social network from the command line.
148Features include:
149@itemize
150@item Posting, replying, deleting statuses
151@item Support for media uploads, spoiler text, sensitive content
152@item Search by account or hash tag
153@item Following, muting and blocking accounts
154@item Simple switching between authenticated in Mastodon accounts
155@end itemize")
156 (license license:gpl3)))
157
158(define-public tuba
159 (package
160 (name "tuba")
161 (version "0.11.0")
162 (source
163 (origin
164 (method git-fetch)
165 (uri (git-reference
166 (url "https://codeberg.org/GeopJr/Tuba")
167 (commit (string-append "v" version))))
168 (file-name (git-file-name name version))
169 (sha256
170 (base32 "0y5znrrpszj6gi7l2k8y9ykzcqbh5yx44csmvnxapz5vg9830mwr"))))
171 (build-system meson-build-system)
172 (arguments
173 (list
174 #:glib-or-gtk? #t
175 #:configure-flags #~(list "-Ddistro=true")
176 #:phases
177 #~(modify-phases %standard-phases
178 (add-after 'glib-or-gtk-wrap 'lib-vars-wrap
179 (lambda _
180 (let ((gstvar "GST_PLUGIN_SYSTEM_PATH")
181 (pixvar "GDK_PIXBUF_MODULE_FILE"))
182 (wrap-program (string-append #$output "/bin/dev.geopjr.Tuba")
183 `(,gstvar ":" suffix (,(getenv gstvar)))
184 `(,pixvar ":" = (,(getenv pixvar)))))))
185 (add-after 'lib-vars-wrap 'symlink-package
186 (lambda _
187 (with-directory-excursion (string-append #$output "/bin")
188 (symlink "dev.geopjr.Tuba" "tuba")))))))
189 (native-inputs
190 (list gdk-pixbuf ; so pixbuf loader cache (for webp) is generated
191 gettext-minimal
192 `(,glib "bin") ; for glib-compile-resources
193 gsettings-desktop-schemas ; for the org.gnome.system.proxy schema
194 pkg-config))
195 (inputs
196 (list bash-minimal ; for wrap-program
197 gst-plugins-bad
198 gst-plugins-base
199 gst-plugins-good
200 gstreamer
201 gtk
202 gtksourceview
203 json-glib
204 libadwaita
205 libgee
206 libsoup-minimal
207 libsecret
208 libspelling
209 libwebp
210 libxml2
211 vala
212 webp-pixbuf-loader))
213 (home-page "https://tuba.geopjr.dev/")
214 (synopsis "GTK client for Mastodon")
215 (description "Tuba is a GTK client for Mastodon. It provides a clean,
216native interface that allows you to integrate Mastodon's social experience
217seamlessly with your desktop environment.")
218 (license license:gpl3)))
219
220(define-public python-mastodon-py
221 (package
222 (name "python-mastodon-py")
223 (version "2.1.4")
224 (source
225 (origin
226 (method url-fetch)
227 (uri (pypi-uri "mastodon_py" version))
228 (sha256
229 (base32 "1988sanhh4162jilffa7r1n9ylls5v868ndfmnsp0z5k9p5fj0k6"))))
230 (build-system pyproject-build-system)
231 (arguments
232 (list
233 #:phases
234 #~(modify-phases %standard-phases
235 (add-before 'check 'set-check-environment
236 (lambda* (#:key inputs #:allow-other-keys)
237 (setenv "TZ" "UTC")
238 (setenv "TZDIR"
239 (search-input-directory inputs
240 "share/zoneinfo")))))))
241 (native-inputs
242 (list nss-certs-for-test
243 python-pytest
244 python-pytest-mock
245 python-pytest-recording
246 python-pytest-retry
247 python-pytz
248 python-requests-mock
249 python-setuptools
250 python-vcrpy
251 tzdata-for-tests))
252 (propagated-inputs
253 (list python-blurhash
254 python-decorator
255 python-dateutil
256 python-magic
257 python-requests
258 ;; [optional]
259 python-blurhash
260 python-cryptography
261 python-grapheme ;project was not updated for 6y
262 python-http-ece))
263 (home-page "https://github.com/halcy/Mastodon.py")
264 (synopsis "Python wrapper for the Mastodon API")
265 (description
266 "This package provides a python wrapper for the Mastodon API.")
267 (license license:expat)))
268
269(define-public snac2
270 (package
271 (name "snac")
272 (version "2.95")
273 (source
274 (origin
275 (method git-fetch)
276 (uri (git-reference
277 (url "https://codeberg.org/grunfink/snac2")
278 (commit version)))
279 (file-name (git-file-name name version))
280 (sha256
281 (base32 "0i7zpyyrny8zas9ikkhb7qqliyw0r46ycng17va5lcig4w49knwj"))))
282 (build-system gnu-build-system)
283 (inputs (list curl openssl))
284 (arguments
285 (list
286 #:phases #~(modify-phases %standard-phases
287 (delete 'configure))
288 #:tests? #f ; no test target
289 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
290 (string-append "CFLAGS=-O2 -g -Wall -Wextra")
291 (string-append "PREFIX=" #$output)
292 (string-append "PREFIX_MAN=" #$output "/share/man"))))
293 (home-page "https://codeberg.org/grunfink/snac2")
294 (synopsis
295 "Simple, minimalistic ActivityPub instance written in portable C")
296 (description
297 "Snac is a simple, minimalistic ActivityPub instance written in
298portable C.
299
300It features:
301
302@itemize
303@item Lightweight, minimal dependencies
304@item Extensive support of ActivityPub operations, e.g. write public notes,
305follow users, be followed, reply to the notes of others, admire wonderful
306content (like or boost), write private messages, etc.
307@item Multiuser support
308@item Mastodon API support, so Mastodon-compatible apps can be used
309@item Simple but effective web interface
310@item Easily-accessed MUTE button to silence users
311@item Tested interoperability with related software
312@item No database needed
313@item Totally JavaScript-free; no cookies either
314@end itemize")
315 (license license:expat)))