gnu: ruby-pandoc-ruby: Use pandoc instead of ghc-pandoc.
[jackhill/guix/guix.git] / gnu / packages / toys.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
3 ;;; Copyright © 2019 Jesse Gibbons <jgibbons2357+guix@gmail.com>
4 ;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
5 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages toys)
23 #:use-module (gnu packages bison)
24 #:use-module (gnu packages flex)
25 #:use-module (gnu packages gtk)
26 #:use-module (gnu packages ncurses)
27 #:use-module (gnu packages perl)
28 #:use-module (gnu packages pkg-config)
29 #:use-module (gnu packages xml)
30 #:use-module (gnu packages xorg)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages))
36
37 (define-public sl
38 (package
39 (name "sl")
40 (version "5.02")
41 (source
42 (origin
43 (method git-fetch)
44 (uri (git-reference
45 (url "https://github.com/mtoyoda/sl")
46 (commit version)))
47 (file-name (git-file-name name version))
48 (sha256
49 (base32 "1zrfd71zx2px2xpapg45s8xvi81xii63yl0h60q72j71zh4sif8b"))))
50 (build-system gnu-build-system)
51 (inputs
52 `(("ncurses" ,ncurses)))
53 (arguments
54 `(#:phases
55 (modify-phases %standard-phases
56 (delete 'configure) ; no configure script
57 (delete 'check) ; no tests
58 (replace 'install ; no ‘make install’ target
59 (lambda* (#:key outputs #:allow-other-keys)
60 (let* ((out (assoc-ref outputs "out"))
61 (bin (string-append out "/bin"))
62 (man (string-append out "/share/man"))
63 (man1 (string-append man "/man1"))
64 (man1-ja (string-append man "/ja/man1")))
65 (install-file "sl" bin)
66 (install-file "sl.1" man1)
67 (mkdir-p man1-ja)
68 (copy-file "sl.1.ja" (string-append man1-ja "/sl.1"))
69 #t))))))
70 (home-page "http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html")
71 (synopsis "Joke command to correct typing \"sl\" by mistake")
72 (description
73 "@dfn{SL} (for Steam Locomotive) displays one of several animated trains
74 on the text terminal. It serves no useful purpose but to discourage mistakenly
75 typing @command{sl} instead of @command{ls}.")
76 (license (license:non-copyleft "file://LICENSE"
77 "See LICENSE in the distribution."))))
78
79 (define-public filters
80 (let ((version "2.55")
81 (commit "c5c291916b52ed9e6418448a8eee30475fb9adcf"))
82 (package
83 (name "filters")
84 (version "2.55")
85 (source
86 (origin
87 (method git-fetch)
88 (uri (git-reference
89 (url "https://git.joeyh.name/filters")
90 (commit commit)))
91 (file-name (git-file-name name version))
92 (sha256
93 (base32 "1gaigpda1w9wxfh8an3sam1hpacc1bhxl696w4yj0vzhc6izqvxs"))
94 (modules '((guix build utils)))
95 (snippet '(begin
96 ;; kenny is under nonfree Artistic License (Perl) 1.0.
97 (delete-file "kenny")
98 (substitute* "Makefile"
99 (("kenny")
100 ""))))))
101 (build-system gnu-build-system)
102 (arguments
103 `(#:make-flags
104 (list "CC=gcc" (string-append "DESTDIR=" %output))
105 #:phases
106 (modify-phases %standard-phases
107 (delete 'configure)
108 (add-after 'unpack 'fix-install-directories
109 (lambda _
110 (substitute* "Makefile"
111 (("/usr/games")
112 "/bin/")
113 (("/usr/share/")
114 "/share/"))
115 #t)))
116 #:tests? #f)) ; no test suite
117 (native-inputs
118 `(("bison" ,bison)
119 ("flex" ,flex)))
120 (inputs
121 `(("perl" ,perl)))
122 (home-page "https://joeyh.name/code/filters/")
123 (synopsis "Various amusing text filters")
124 (description
125 "The filters collection harks back to the late 1980s, when various text
126 filters were written to munge written language in amusing ways. The earliest
127 and best known were legends such as the Swedish Chef filter and B1FF.
128
129 This package contains the following filter commands:
130 @enumerate
131 @item b1ff: a satire of a stereotypical Usenet newbie
132 @item censor: comply with the @acronym{CDA, Communications Decency Act}
133 @item chef: convert English to Mock Swedish
134 @item cockney: Cockney English
135 @item elee: k3wl hacker slang
136 @item fanboy: a stereotypical fan (supports custom fandoms)
137 @item fudd: Elmer Fudd
138 @item jethro: hillbilly text filter
139 @item jibberish: a random selection of these filters
140 @item jive: Jive English
141 @item ken: turn English into Cockney
142 @item kraut: a bad German accent
143 @item ky00te: a very cute accent
144 @item LOLCAT: as seen in Internet GIFs everywhere
145 @item nethackify: wiped-out text as found in nethack
146 @item newspeak: à la 1984
147 @item nyc: Brooklyn English
148 @item pirate: talk like a pirate
149 @item rasterman: straight from the keyboard of Carsten Haitzler
150 @item scottish: fake Scottish (Dwarven) accent
151 @item scramble: scramble the \"inner\" letters of each word
152 @item spammer: turn honest text into something liable to be flagged as spam
153 @item studly: studly caps.
154 @item uniencode: use glorious Unicode to the fullest possible extent
155 @item upside-down: flip the text upside down
156 @end enumerate
157
158 The GNU project hosts a similar collection of filters, the GNU talkfilters.")
159 (license ; see debian/copyright
160 (list license:gpl2+ ; most of the filters
161 license:gpl2 ; rasterman, ky00te.dir/* nethackify, pirate
162 license:gpl3+ ; scramble, scottish
163 license:public-domain ; jethro, kraut, ken, studly
164 license:gpl1+ ; cockney, jive, nyc only say "gpl"
165 license:expat))))) ; newspeak
166
167 (define-public xsnow
168 (package
169 (name "xsnow")
170 (version "2.0.22")
171 (source
172 (origin
173 (method url-fetch)
174 (uri (string-append
175 "https://www.ratrabbit.nl/ratrabbit/system/files/xsnow/xsnow-"
176 version ".tar.gz"))
177 (sha256
178 (base32 "1880643fal6l7bskqbm4zfbr2s719698mkx4pchrxkjpb240sj0z"))))
179 (build-system gnu-build-system)
180 (arguments
181 '(#:phases
182 (modify-phases %standard-phases
183 (add-before 'configure 'fix-install-path
184 (lambda _
185 ;; Install program to bin instead of games.
186 (substitute* "src/Makefile.in"
187 (("(gamesdir = \\$\\(exec_prefix\\)/)games" _ prefix)
188 (string-append prefix "bin")))
189 #t)))))
190 (inputs
191 `(("gtk+" ,gtk+)
192 ("libx11" ,libx11)
193 ("libxpm" ,libxpm)
194 ("libxt" ,libxt)
195 ("libxxml2" ,libxml2)))
196 (native-inputs
197 `(("pkg-config" ,pkg-config)))
198 (home-page "https://www.ratrabbit.nl/ratrabbit/content/xsnow/introduction")
199 (synopsis "Let it snow on the desktop")
200 (description "@code{Xsnow} animates snowfall and Santa with reindeer on
201 the desktop background. Additional customizable effects include wind, stars
202 and various scenery elements.")
203 (license license:gpl3+)))
204
205 (define-public nyancat
206 (package
207 (name "nyancat")
208 (version "1.5.2")
209 (source
210 (origin
211 (method git-fetch)
212 (uri (git-reference
213 (url "https://github.com/klange/nyancat")
214 (commit version)))
215 (file-name (git-file-name name version))
216 (sha256
217 (base32
218 "1mg8nm5xzcq1xr8cvx24ym2vmafkw53rijllwcdm9miiz0p5ky9k"))))
219 (build-system gnu-build-system)
220 (arguments
221 '(#:make-flags '("CC=gcc")
222 #:phases
223 (modify-phases %standard-phases
224 (delete 'configure) ; no configure script
225 (replace 'install
226 (lambda* (#:key outputs #:allow-other-keys)
227 (let* ((out (assoc-ref outputs "out"))
228 (bin (string-append out "/bin"))
229 (man (string-append out "/share/man/man1")))
230 (install-file "src/nyancat" bin)
231 (install-file "nyancat.1" man))
232 #t)))))
233 (home-page "https://nyancat.dakko.us/")
234 (synopsis "Nyan cat telnet server")
235 (description
236 "This is an animated, color, ANSI-text telnet server that renders a loop
237 of the Nyan Cat / Poptart Cat animation.")
238 (license license:ncsa)))