Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / games.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages games)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (gnu packages gettext)
25 #:use-module (gnu packages gl)
26 #:use-module (gnu packages glib)
27 #:use-module (gnu packages gnome)
28 #:use-module (gnu packages gtk)
29 #:use-module (gnu packages guile)
30 #:use-module (gnu packages libcanberra)
31 #:use-module (gnu packages python)
32 #:use-module (gnu packages readline)
33 #:use-module (gnu packages xorg)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages sqlite)
36 #:use-module (gnu packages sdl)
37 #:use-module (guix build-system gnu))
38
39 (define-public gnubg
40 (package
41 (name "gnubg")
42 (version "1.02")
43 (source
44 (origin
45 (method url-fetch)
46 (uri (string-append "http://files.gnubg.org/media/sources/gnubg-release-"
47 version ".000-sources." "tar.gz"))
48 (sha256
49 (base32
50 "015mvjk2iw1cg1kxwxfnvp2rxb9cylf6yc39i30fdy414k07zkky"))))
51 (build-system gnu-build-system)
52 (inputs `(("glib" ,glib)
53 ("readline" ,readline)
54 ("gtk+" ,gtk+-2)
55 ("mesa" ,mesa)
56 ("gtkglext" ,gtkglext)
57 ("sqlite" ,sqlite)
58 ("libcanberra" ,libcanberra)))
59 (native-inputs `(("python-2" ,python-2)
60 ("pkg-config" ,pkg-config)))
61 (home-page "https://gnubg.org")
62 (synopsis "Backgammon game")
63 (description "The GNU backgammon application can be used for playing, analyzing and
64 teaching the game. It has an advanced evaluation engine based on artificial
65 neural networks suitable for both beginners and advanced players. In
66 addition to a command-line interface, it also features an attractive, 3D
67 representation of the playing board.")
68 (license gpl3+)))
69
70 (define-public gnubik
71 (package
72 (name "gnubik")
73 (version "2.4.1")
74 (source
75 (origin
76 (method url-fetch)
77 (uri (string-append "mirror://gnu/gnubik/gnubik-"
78 version ".tar.gz"))
79 (sha256
80 (base32
81 "0mfpwz341i1qpzi2qgslpc5i7d4fv7i01kv392m11pczqdc7i7m5"))))
82 (build-system gnu-build-system)
83 (inputs `(("gtk+" ,gtk+-2)
84 ("mesa" ,mesa)
85 ("libx11" ,libx11)
86 ("guile" ,guile-2.0)
87 ("gtkglext" ,gtkglext)))
88 (native-inputs `(("gettext" ,gnu-gettext)
89 ("pkg-config" ,pkg-config)))
90 (home-page "https://www.gnu.org/software/gnubik/")
91 (synopsis "3d Rubik's cube game")
92 (description
93 "GNUbik is a puzzle game in which you must manipulate a cube to make
94 each of its faces have a uniform color. The game is customizable, allowing
95 you to set the size of the cube (the default is 3x3) or to change the colors.
96 You may even apply photos to the faces instead of colors. The game is
97 scriptable with Guile.")
98 (license gpl3+)))
99
100 (define-public abbaye
101 (package
102 (name "abbaye")
103 (version "1.13")
104 (source
105 (origin
106 (method url-fetch)
107 (uri (string-append "http://abbaye-for-linux.googlecode.com/files/abbaye-for-linux-src-"
108 version ".tar.gz"))
109 (sha256
110 (base32
111 "1wgvckgqa2084rbskxif58wbb83xbas8s1i8s7d57xbj08ryq8rk"))))
112 (build-system gnu-build-system)
113 (arguments
114 '(#:modules ((ice-9 match)
115 (guix build gnu-build-system)
116 (guix build utils))
117 #:phases (alist-cons-after
118 'set-paths 'set-sdl-paths
119 (lambda* (#:key inputs outputs (search-paths '()) #:allow-other-keys)
120 (define input-directories
121 (match inputs
122 (((_ . dir) ...)
123 dir)))
124 ;; This package does not use pkg-config, so modify CPATH
125 ;; variable to point to include/SDL for SDL header files.
126 (set-path-environment-variable "CPATH"
127 '("include/SDL")
128 input-directories))
129 (alist-cons-after
130 'patch-source-shebangs 'patch-makefile
131 (lambda* (#:key outputs #:allow-other-keys)
132 ;; Replace /usr with package output directory.
133 (for-each (lambda (file)
134 (substitute* file
135 (("/usr") (assoc-ref outputs "out"))))
136 '("makefile" "src/pantallas.c" "src/comun.h")))
137 (alist-cons-before
138 'install 'make-install-dirs
139 (lambda* (#:key outputs #:allow-other-keys)
140 (let ((prefix (assoc-ref outputs "out")))
141 ;; Create directories that the makefile assumes exist.
142 (mkdir-p (string-append prefix "/bin"))
143 (mkdir-p (string-append prefix "/share/applications"))))
144 ;; No configure script.
145 (alist-delete 'configure %standard-phases))))
146 #:tests? #f)) ;; No check target.
147 (native-inputs `(("pkg-config" ,pkg-config)))
148 (inputs `(("sdl" ,sdl)
149 ("sdl-gfx" ,sdl-gfx)
150 ("sdl-image" ,sdl-image)
151 ("sdl-mixer" ,sdl-mixer)
152 ("sdl-ttf" ,sdl-ttf)))
153 (home-page "http://code.google.com/p/abbaye-for-linux/")
154 (synopsis "GNU/Linux port of the indie game \"l'Abbaye des Morts\"")
155 (description "L'Abbaye des Morts is a 2D platform game set in 13th century
156 France. The Cathars, who preach about good Christian beliefs, were being
157 expelled by the Catholic Church out of the Languedoc region in France. One of
158 them, called Jean Raymond, found an old church in which to hide, not knowing
159 that beneath its ruins lay buried an ancient evil.")
160 (license gpl3+)))