gnu: emacs-helm: Update to 3.8.7.
[jackhill/guix/guix.git] / gnu / packages / toys.scm
CommitLineData
5d5ad3da 1;;; GNU Guix --- Functional package management for GNU
8c2c5c2c 2;;; Copyright © 2017, 2018, 2020–2022 Tobias Geerinckx-Rice <me@tobias.gr>
57705f47 3;;; Copyright © 2019 Jesse Gibbons <jgibbons2357+guix@gmail.com>
076bbc44 4;;; Copyright © 2019, 2020, 2021 Timotej Lazar <timotej.lazar@araneo.si>
c2aecd67 5;;; Copyright © 2019 Liliana Marie Prikler <liliana.prikler@gmail.com>
61daf2db 6;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
dc68018e 7;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
5d5ad3da
TGR
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 toys)
076bbc44 25 #:use-module (gnu packages)
57705f47
JG
26 #:use-module (gnu packages bison)
27 #:use-module (gnu packages flex)
70f2920c 28 #:use-module (gnu packages gtk)
1f08a6a2 29 #:use-module (gnu packages man)
5d5ad3da 30 #:use-module (gnu packages ncurses)
57705f47 31 #:use-module (gnu packages perl)
70f2920c
TL
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages xml)
34 #:use-module (gnu packages xorg)
5d5ad3da 35 #:use-module (guix build-system gnu)
70f2920c 36 #:use-module (guix download)
49dcfb50 37 #:use-module (guix git-download)
5d5ad3da 38 #:use-module ((guix licenses) #:prefix license:)
834ab064
TGR
39 #:use-module (guix packages)
40 #:use-module (guix utils))
5d5ad3da 41
c2aecd67
TGR
42(define-public lolcat
43 (let ((commit "35dca3d0a381496d7195cd78f5b24aa7b62f2154")
44 (revision "0"))
45 (package
46 (name "lolcat")
47 (version (git-version "1.0" revision commit))
48 (source
49 (origin
50 (method git-fetch)
51 (uri (git-reference
52 (url "https://github.com/jaseg/lolcat")
53 (commit commit)))
54 (sha256
55 (base32
56 "0jjbkqcc2ikjxd1xgdyv4rb0vsw218181h89f2ywg29ffs3ypd8g"))
57 (file-name (git-file-name name version))))
58 (build-system gnu-build-system)
59 (arguments
60 `(#:tests? #f ; no check target
61 #:make-flags
62 (list ,(string-append "CC=" (cc-for-target)))
63 #:phases
64 (modify-phases %standard-phases
65 (delete 'bootstrap)
66 (delete 'configure)
67 (replace 'install
68 (lambda* (#:key outputs #:allow-other-keys)
69 (let* ((out (assoc-ref outputs "out"))
70 (dest (string-append out "/bin")))
71 (mkdir-p dest)
72 (install-file "lolcat" dest)
73 (install-file "censor" dest)
74 #t))))))
75 (home-page "https://github.com/jaseg/lolcat")
76 (synopsis "Rainbow coloring effect for text console display")
77 (description "@command{lolcat} concatenates files and streams like
78regular @command{cat}, but it also adds terminal escape codes between
79characters and lines resulting in a rainbow effect.")
80 (license license:wtfpl2))))
81
076bbc44
TL
82(define-public oneko
83 (package
84 (name "oneko")
85 (version "1.2.sakura.5")
86 (source
87 (origin
88 (method url-fetch)
89 (uri (string-append
90 "http://www.daidouji.com/oneko/distfiles/oneko-" version ".tar.gz"))
91 (sha256
92 (base32 "0bxjlbafn10sfi5d06420pg70rpvsiy5gdbm8kspd6qy4kqhabic"))
93 (patches (search-patches "oneko-remove-nonfree-characters.patch"))
94 (modules '((guix build utils)))
95 (snippet
96 ;; Remove bitmaps with copyright issues.
97 '(begin
98 (for-each delete-file-recursively
99 (cons* "bitmaps/bsd" "bitmaps/sakura" "bitmaps/tomoyo"
100 "bitmasks/bsd" "bitmasks/sakura" "bitmasks/tomoyo"
a7255dd1 101 (find-files "cursors" "(bsd|card|petal).*\\.xbm")))))))
076bbc44
TL
102 (build-system gnu-build-system)
103 (native-inputs
8394619b 104 (list imake))
076bbc44 105 (inputs
8394619b 106 (list libx11 libxext))
076bbc44
TL
107 (arguments
108 `(#:tests? #f ; no tests
109 #:phases
110 (modify-phases %standard-phases
111 (replace 'configure
112 (lambda _
113 (invoke "xmkmf")
114 ;; Fix incorrectly generated compiler flags.
115 (substitute* "Makefile"
a7255dd1 116 (("(CDEBUGFLAGS = ).*" _ front) (string-append front "-O2\n")))))
076bbc44
TL
117 (replace 'install
118 (lambda* (#:key outputs make-flags #:allow-other-keys)
119 (let* ((out (assoc-ref outputs "out"))
120 (bin (string-append out "/bin"))
121 (doc (string-append out "/share/doc/" ,name "-" ,version))
122 (man (string-append out "/share/man"))
123 (man6 (string-append man "/man6"))
124 (man6-ja (string-append man "/ja/man6")))
125 (install-file "oneko" bin)
126 (mkdir-p man6)
127 (mkdir-p man6-ja)
128 (copy-file "oneko.man" (string-append man6 "/oneko.6"))
129 (copy-file "oneko.man.jp" (string-append man6-ja "/oneko.6"))
130 (for-each (lambda (file) (install-file file doc))
a7255dd1 131 (find-files "." "README.*"))))))))
076bbc44
TL
132 (home-page "http://www.daidouji.com/oneko/")
133 (synopsis "Cute cat chasing your mouse pointer")
8c2c5c2c
TGR
134 (description
135 "Oneko displays an animated cat or dog that chases the mouse pointer---now
136an actual mouse or a bone---around the screen while you work.
137
138It was written for the X Window system and does not work well on Wayland.")
076bbc44
TL
139 (license license:public-domain))) ; see https://directory.fsf.org/wiki/Oneko
140
5d5ad3da
TGR
141(define-public sl
142 (package
143 (name "sl")
144 (version "5.02")
145 (source
146 (origin
49dcfb50
TGR
147 (method git-fetch)
148 (uri (git-reference
b0e7b699 149 (url "https://github.com/mtoyoda/sl")
49dcfb50
TGR
150 (commit version)))
151 (file-name (git-file-name name version))
5d5ad3da 152 (sha256
49dcfb50 153 (base32 "1zrfd71zx2px2xpapg45s8xvi81xii63yl0h60q72j71zh4sif8b"))))
5d5ad3da
TGR
154 (build-system gnu-build-system)
155 (inputs
8394619b 156 (list ncurses))
5d5ad3da
TGR
157 (arguments
158 `(#:phases
159 (modify-phases %standard-phases
160 (delete 'configure) ; no configure script
161 (delete 'check) ; no tests
162 (replace 'install ; no ‘make install’ target
163 (lambda* (#:key outputs #:allow-other-keys)
164 (let* ((out (assoc-ref outputs "out"))
165 (bin (string-append out "/bin"))
166 (man (string-append out "/share/man"))
167 (man1 (string-append man "/man1"))
168 (man1-ja (string-append man "/ja/man1")))
169 (install-file "sl" bin)
170 (install-file "sl.1" man1)
171 (mkdir-p man1-ja)
172 (copy-file "sl.1.ja" (string-append man1-ja "/sl.1"))
173 #t))))))
174 (home-page "http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html")
175 (synopsis "Joke command to correct typing \"sl\" by mistake")
176 (description
177 "@dfn{SL} (for Steam Locomotive) displays one of several animated trains
178on the text terminal. It serves no useful purpose but to discourage mistakenly
179typing @command{sl} instead of @command{ls}.")
180 (license (license:non-copyleft "file://LICENSE"
181 "See LICENSE in the distribution."))))
57705f47
JG
182
183(define-public filters
d7b83e2f
TGR
184 (package
185 (name "filters")
186 (version "2.55")
187 (source
188 (origin
189 (method git-fetch)
190 (uri (git-reference
dae2ac51 191 (url "git://git.joeyh.name/filters")
d7b83e2f
TGR
192 (commit version)))
193 (file-name (git-file-name name version))
194 (sha256
195 (base32 "1gaigpda1w9wxfh8an3sam1hpacc1bhxl696w4yj0vzhc6izqvxs"))
196 (modules '((guix build utils)))
197 (snippet '(begin
198 ;; kenny is under nonfree Artistic License (Perl) 1.0.
199 (delete-file "kenny")
200 (substitute* "Makefile"
201 (("kenny")
202 ""))))))
203 (build-system gnu-build-system)
204 (arguments
205 `(#:make-flags
206 (list (string-append "CC=" ,(cc-for-target))
54467202 207 (string-append "prefix=" (assoc-ref %outputs "out")))
d7b83e2f
TGR
208 #:phases
209 (modify-phases %standard-phases
210 (delete 'configure)
54467202 211 (add-after 'unpack 'respect-prefix
d7b83e2f
TGR
212 (lambda _
213 (substitute* "Makefile"
214 (("/usr/games")
54467202
TGR
215 "$(prefix)/bin/")
216 (("/usr")
217 "$(prefix)"))
d7b83e2f
TGR
218 #t)))
219 #:tests? #f)) ; no test suite
220 (native-inputs
8394619b 221 (list bison flex))
d7b83e2f 222 (inputs
8394619b 223 (list perl))
d7b83e2f
TGR
224 (home-page "https://joeyh.name/code/filters/")
225 (synopsis "Various amusing text filters")
226 (description
227 "The filters collection harks back to the late 1980s, when various text
57705f47
JG
228filters were written to munge written language in amusing ways. The earliest
229and best known were legends such as the Swedish Chef filter and B1FF.
230
231This package contains the following filter commands:
232@enumerate
233@item b1ff: a satire of a stereotypical Usenet newbie
234@item censor: comply with the @acronym{CDA, Communications Decency Act}
235@item chef: convert English to Mock Swedish
236@item cockney: Cockney English
237@item elee: k3wl hacker slang
238@item fanboy: a stereotypical fan (supports custom fandoms)
239@item fudd: Elmer Fudd
240@item jethro: hillbilly text filter
241@item jibberish: a random selection of these filters
242@item jive: Jive English
243@item ken: turn English into Cockney
244@item kraut: a bad German accent
245@item ky00te: a very cute accent
246@item LOLCAT: as seen in Internet GIFs everywhere
247@item nethackify: wiped-out text as found in nethack
248@item newspeak: à la 1984
249@item nyc: Brooklyn English
250@item pirate: talk like a pirate
251@item rasterman: straight from the keyboard of Carsten Haitzler
252@item scottish: fake Scottish (Dwarven) accent
253@item scramble: scramble the \"inner\" letters of each word
254@item spammer: turn honest text into something liable to be flagged as spam
255@item studly: studly caps.
256@item uniencode: use glorious Unicode to the fullest possible extent
257@item upside-down: flip the text upside down
258@end enumerate
259
260The GNU project hosts a similar collection of filters, the GNU talkfilters.")
d7b83e2f
TGR
261 (license ; see debian/copyright
262 (list license:gpl2+ ; most of the filters
263 license:gpl2 ; rasterman, ky00te.dir/* nethackify, pirate
264 license:gpl3+ ; scramble, scottish
265 license:public-domain ; jethro, kraut, ken, studly
266 license:gpl1+ ; cockney, jive, nyc only say "gpl"
267 license:expat)))) ; newspeak
70f2920c
TL
268
269(define-public xsnow
270 (package
271 (name "xsnow")
19109f54 272 (version "3.4.2")
70f2920c
TL
273 (source
274 (origin
275 (method url-fetch)
276 (uri (string-append
19109f54 277 "https://www.ratrabbit.nl/downloads/xsnow/xsnow-"
70f2920c
TL
278 version ".tar.gz"))
279 (sha256
19109f54 280 (base32 "17pxc955jgkjan8ax0lw3b3sibw7aikc7p9qbxsp0w7g7jkxf666"))))
70f2920c
TL
281 (build-system gnu-build-system)
282 (arguments
283 '(#:phases
284 (modify-phases %standard-phases
285 (add-before 'configure 'fix-install-path
286 (lambda _
287 ;; Install program to bin instead of games.
288 (substitute* "src/Makefile.in"
289 (("(gamesdir = \\$\\(exec_prefix\\)/)games" _ prefix)
290 (string-append prefix "bin")))
291 #t)))))
292 (inputs
cdf050be 293 (list gtk+ libx11 libxpm libxt libxml2))
70f2920c 294 (native-inputs
8394619b 295 (list pkg-config))
19109f54 296 (home-page "https://www.ratrabbit.nl/ratrabbit/xsnow/index.html")
70f2920c
TL
297 (synopsis "Let it snow on the desktop")
298 (description "@code{Xsnow} animates snowfall and Santa with reindeer on
299the desktop background. Additional customizable effects include wind, stars
300and various scenery elements.")
301 (license license:gpl3+)))
61daf2db
EF
302
303(define-public nyancat
304 (package
305 (name "nyancat")
306 (version "1.5.2")
307 (source
308 (origin
309 (method git-fetch)
310 (uri (git-reference
311 (url "https://github.com/klange/nyancat")
312 (commit version)))
313 (file-name (git-file-name name version))
314 (sha256
315 (base32
316 "1mg8nm5xzcq1xr8cvx24ym2vmafkw53rijllwcdm9miiz0p5ky9k"))))
317 (build-system gnu-build-system)
318 (arguments
9c44af6b 319 `(#:make-flags '(,(string-append "CC=" (cc-for-target)))
61daf2db
EF
320 #:phases
321 (modify-phases %standard-phases
322 (delete 'configure) ; no configure script
323 (replace 'install
324 (lambda* (#:key outputs #:allow-other-keys)
325 (let* ((out (assoc-ref outputs "out"))
326 (bin (string-append out "/bin"))
327 (man (string-append out "/share/man/man1")))
328 (install-file "src/nyancat" bin)
329 (install-file "nyancat.1" man))
330 #t)))))
331 (home-page "https://nyancat.dakko.us/")
332 (synopsis "Nyan cat telnet server")
333 (description
334 "This is an animated, color, ANSI-text telnet server that renders a loop
335of the Nyan Cat / Poptart Cat animation.")
336 (license license:ncsa)))
dc68018e
LF
337
338(define-public cbonsai
339 (package
340 (name "cbonsai")
1f08a6a2 341 (version "1.3.1")
dc68018e
LF
342 (source (origin
343 (method git-fetch)
344 (uri (git-reference
345 (url "https://gitlab.com/jallbrit/cbonsai.git")
346 (commit (string-append "v" version))))
347 (file-name (git-file-name name version))
348 (sha256
349 (base32
1f08a6a2 350 "1krsrf7gilmpnba6hjgz8mk32vs55b4i1rxlp7ajrw0v487blljw"))))
dc68018e
LF
351 (build-system gnu-build-system)
352 (arguments
353 `(#:tests? #f ; No test suite
354 #:make-flags
355 (list (string-append "CC=" ,(cc-for-target))
356 (string-append "PREFIX=" (assoc-ref %outputs "out")))
357 #:phases
358 (modify-phases %standard-phases
359 (delete 'configure) ; No ./configure script
360 (add-after 'install 'install-doc
361 (lambda* (#:key outputs #:allow-other-keys)
362 (let* ((out (assoc-ref outputs "out"))
363 (doc (string-append out "/share/doc/" ,name "-"
364 ,(package-version this-package))))
365 (install-file "README.md" doc)))))))
366 (native-inputs
8394619b 367 (list pkg-config scdoc))
dc68018e 368 (inputs
8394619b 369 (list ncurses))
dc68018e
LF
370 (home-page "https://gitlab.com/jallbrit/cbonsai")
371 (synopsis "Grow bonsai trees in a terminal")
372 (description "Cbonsai is a bonsai tree generator using ASCII art. It
373creates, colors, and positions a bonsai tree, and is configurable.")
374 (license license:gpl3+)))