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