toys.scm 13 KB

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