| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz> |
| 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
| 4 | ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> |
| 5 | ;;; Copyright © 2015 Alex Kost <alezost@gmail.com> |
| 6 | ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> |
| 7 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
| 8 | ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org> |
| 9 | ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> |
| 10 | ;;; Copyright © 2016 Julian Graham <joolean@gmail.com> |
| 11 | ;;; |
| 12 | ;;; This file is part of GNU Guix. |
| 13 | ;;; |
| 14 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 15 | ;;; under the terms of the GNU General Public License as published by |
| 16 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 17 | ;;; your option) any later version. |
| 18 | ;;; |
| 19 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 20 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | ;;; GNU General Public License for more details. |
| 23 | ;;; |
| 24 | ;;; You should have received a copy of the GNU General Public License |
| 25 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 26 | |
| 27 | (define-module (gnu packages game-development) |
| 28 | #:use-module ((guix licenses) #:prefix license:) |
| 29 | #:use-module (guix packages) |
| 30 | #:use-module (guix download) |
| 31 | #:use-module (guix git-download) |
| 32 | #:use-module (guix build-system cmake) |
| 33 | #:use-module (guix build-system gnu) |
| 34 | #:use-module (guix build-system python) |
| 35 | #:use-module (gnu packages) |
| 36 | #:use-module (gnu packages curl) |
| 37 | #:use-module (gnu packages databases) |
| 38 | #:use-module (gnu packages documentation) |
| 39 | #:use-module (gnu packages fontutils) |
| 40 | #:use-module (gnu packages fribidi) |
| 41 | #:use-module (gnu packages glib) |
| 42 | #:use-module (gnu packages gnunet) |
| 43 | #:use-module (gnu packages guile) |
| 44 | #:use-module (gnu packages multiprecision) |
| 45 | #:use-module (gnu packages music) |
| 46 | #:use-module (gnu packages ncurses) |
| 47 | #:use-module (gnu packages python) |
| 48 | #:use-module (gnu packages qt) |
| 49 | #:use-module (gnu packages video) |
| 50 | #:use-module (gnu packages compression) |
| 51 | #:use-module (gnu packages zip) |
| 52 | #:use-module (gnu packages gl) |
| 53 | #:use-module (gnu packages linux) |
| 54 | #:use-module (gnu packages xorg) |
| 55 | #:use-module (gnu packages xdisorg) |
| 56 | #:use-module (gnu packages fontutils) |
| 57 | #:use-module (gnu packages image) |
| 58 | #:use-module (gnu packages audio) |
| 59 | #:use-module (gnu packages pulseaudio) |
| 60 | #:use-module (gnu packages gnome) |
| 61 | #:use-module (gnu packages gtk) |
| 62 | #:use-module (gnu packages sdl) |
| 63 | #:use-module (gnu packages pkg-config) |
| 64 | #:use-module (gnu packages xiph) |
| 65 | #:use-module (gnu packages lua) |
| 66 | #:use-module (gnu packages mp3) |
| 67 | #:use-module (gnu packages xml)) |
| 68 | |
| 69 | (define-public bullet |
| 70 | (package |
| 71 | (name "bullet") |
| 72 | (version "2.85.1") |
| 73 | (source (origin |
| 74 | (method url-fetch) |
| 75 | (uri (string-append "https://github.com/bulletphysics/bullet3/" |
| 76 | "archive/" version ".tar.gz")) |
| 77 | (file-name (string-append name "-" version ".tar.gz")) |
| 78 | (sha256 |
| 79 | (base32 |
| 80 | "0qpd37ws0xlxwy55dg058a5b4yw2jxiz09yyc3lc0frpa05pq5bf")))) |
| 81 | (build-system cmake-build-system) |
| 82 | (arguments |
| 83 | '(#:configure-flags (list (string-append |
| 84 | "-DBUILD_SHARED_LIBS=ON " |
| 85 | "-DCMAKE_CXX_FLAGS=-fPIC " |
| 86 | (or (getenv "CXXFLAGS") ""))))) |
| 87 | (inputs |
| 88 | `(("glu" ,glu) |
| 89 | ("libx11" ,libx11) |
| 90 | ("mesa" ,mesa))) |
| 91 | (home-page "http://bulletphysics.org/") |
| 92 | (synopsis "3D physics engine library") |
| 93 | (description |
| 94 | "Bullet is a physics engine library usable for collision detection. It |
| 95 | is used in some video games and movies.") |
| 96 | (license license:zlib))) |
| 97 | |
| 98 | (define-public gzochi |
| 99 | (package |
| 100 | (name "gzochi") |
| 101 | (version "0.10.1") |
| 102 | (source (origin |
| 103 | (method url-fetch) |
| 104 | (uri (string-append "mirror://savannah/gzochi/gzochi-" |
| 105 | version ".tar.gz")) |
| 106 | (sha256 |
| 107 | (base32 |
| 108 | "166rawdal45kvanhvi0bkzy1d2pwf1p0lzslb287lcnm9vdw97yy")))) |
| 109 | (build-system gnu-build-system) |
| 110 | (arguments |
| 111 | '(#:phases (modify-phases %standard-phases |
| 112 | (add-before 'configure 'remove-Werror |
| 113 | (lambda _ |
| 114 | ;; We can't build with '-Werror', notably |
| 115 | ;; because deprecated functions of |
| 116 | ;; libmicrohttpd are being used. |
| 117 | (substitute* (find-files "." "^Makefile\\.in$") |
| 118 | (("-Werror") |
| 119 | "")) |
| 120 | #t))))) |
| 121 | (native-inputs `(("pkgconfig" ,pkg-config))) |
| 122 | (inputs `(("bdb" ,bdb) |
| 123 | ("glib" ,glib) |
| 124 | ("guile" ,guile-2.0) |
| 125 | ("libmicrohttpd" ,libmicrohttpd) |
| 126 | ("ncurses" ,ncurses) |
| 127 | ("sdl" ,sdl) |
| 128 | ("zlib" ,zlib))) |
| 129 | (home-page "http://www.nongnu.org/gzochi/") |
| 130 | (synopsis "Scalable middleware for multiplayer games") |
| 131 | (description |
| 132 | "gzochi is a framework for developing massively multiplayer online games. |
| 133 | A server container provides services to deployed games, which are written in |
| 134 | Guile Scheme, that abstract and simplify some of the most challenging and |
| 135 | error-prone aspects of online game development: Concurrency, data persistence, |
| 136 | and network communications. A very thin client library can be embedded to |
| 137 | provide connectivity for client applications written in any language.") |
| 138 | (license license:gpl3+))) |
| 139 | |
| 140 | (define-public tiled |
| 141 | (package |
| 142 | (name "tiled") |
| 143 | (version "0.18.0") |
| 144 | (source (origin |
| 145 | (method url-fetch) |
| 146 | (uri (string-append "https://github.com/bjorn/tiled/archive/v" |
| 147 | version ".tar.gz")) |
| 148 | (file-name (string-append name "-" version ".tar.gz")) |
| 149 | (sha256 |
| 150 | (base32 |
| 151 | "0csrwf7k3fxv6bv580w6wxjk1q2j9mj9k0xba3nb1ms6jiz1bvzk")))) |
| 152 | (build-system gnu-build-system) |
| 153 | (inputs `(("qt" ,qt) |
| 154 | ("zlib" ,zlib))) |
| 155 | (arguments |
| 156 | '(#:phases |
| 157 | (modify-phases %standard-phases |
| 158 | (replace 'configure |
| 159 | (lambda* (#:key outputs #:allow-other-keys) |
| 160 | (let ((out (assoc-ref outputs "out"))) |
| 161 | (system* "qmake" |
| 162 | (string-append "PREFIX=" out)))))))) |
| 163 | (home-page "http://www.mapeditor.org/") |
| 164 | (synopsis "Tile map editor") |
| 165 | (description |
| 166 | "Tiled is a general purpose tile map editor. It is meant to be used for |
| 167 | editing maps of any tile-based game, be it an RPG, a platformer or a Breakout |
| 168 | clone.") |
| 169 | |
| 170 | ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is |
| 171 | ;; under BSD-2. |
| 172 | (license license:gpl2+))) |
| 173 | |
| 174 | (define-public sfml |
| 175 | (package |
| 176 | (name "sfml") |
| 177 | (version "2.3.2") |
| 178 | (source (origin |
| 179 | (method url-fetch) |
| 180 | ;; Do not fetch the archives from |
| 181 | ;; http://mirror0.sfml-dev.org/files/ because files there seem |
| 182 | ;; to be changed in place. |
| 183 | (uri (string-append "https://github.com/SFML/SFML/archive/" |
| 184 | version ".tar.gz")) |
| 185 | (file-name (string-append name "-" version ".tar.gz")) |
| 186 | (sha256 |
| 187 | (base32 |
| 188 | "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm")))) |
| 189 | (build-system cmake-build-system) |
| 190 | (arguments |
| 191 | '(#:configure-flags |
| 192 | (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE") |
| 193 | #:tests? #f)) ; no tests |
| 194 | (inputs |
| 195 | `(("mesa" ,mesa) |
| 196 | ("glew" ,glew) |
| 197 | ("flac" ,flac) |
| 198 | ("libvorbis" ,libvorbis) |
| 199 | ("libx11" ,libx11) |
| 200 | ("xcb-util-image" ,xcb-util-image) |
| 201 | ("libxrandr" ,libxrandr) |
| 202 | ("eudev" ,eudev) |
| 203 | ("freetype" ,freetype) |
| 204 | ("libjpeg" ,libjpeg) |
| 205 | ("libsndfile" ,libsndfile) |
| 206 | ("openal" ,openal))) |
| 207 | (home-page "http://www.sfml-dev.org") |
| 208 | (synopsis "Simple and Fast Multimedia Library") |
| 209 | (description |
| 210 | "SFML provides a simple interface to the various computer components, |
| 211 | to ease the development of games and multimedia applications. It is composed |
| 212 | of five modules: system, window, graphics, audio and network.") |
| 213 | (license license:zlib))) |
| 214 | |
| 215 | (define-public sfxr |
| 216 | (package |
| 217 | (name "sfxr") |
| 218 | (version "1.2.1") |
| 219 | (source (origin |
| 220 | (method url-fetch) |
| 221 | (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz")) |
| 222 | (sha256 |
| 223 | (base32 |
| 224 | "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya")))) |
| 225 | (build-system gnu-build-system) |
| 226 | (arguments |
| 227 | `(#:phases (modify-phases %standard-phases |
| 228 | (delete 'configure) ; no configure script |
| 229 | (add-before 'build 'patch-makefile |
| 230 | (lambda* (#:key outputs #:allow-other-keys) |
| 231 | (let ((out (assoc-ref outputs "out"))) |
| 232 | (substitute* "Makefile" |
| 233 | (("\\$\\(DESTDIR\\)/usr") out)) |
| 234 | (substitute* "main.cpp" |
| 235 | (("/usr/share") |
| 236 | (string-append out "/share"))) |
| 237 | #t)))) |
| 238 | #:tests? #f)) ; no tests |
| 239 | (native-inputs |
| 240 | `(("pkg-config" ,pkg-config) |
| 241 | ("desktop-file-utils" ,desktop-file-utils))) |
| 242 | (inputs |
| 243 | `(("sdl" ,sdl) |
| 244 | ("gtk+" ,gtk+))) |
| 245 | (synopsis "Simple sound effect generator") |
| 246 | (description "Sfxr is a tool for quickly generating simple sound effects. |
| 247 | Originally created for use in video game prototypes, it can generate random |
| 248 | sounds from presets such as \"explosion\" or \"powerup\".") |
| 249 | (home-page "http://www.drpetter.se/project_sfxr.html") |
| 250 | (license license:expat))) |
| 251 | |
| 252 | (define-public physfs |
| 253 | (package |
| 254 | (name "physfs") |
| 255 | (version "2.0.3") |
| 256 | (source (origin |
| 257 | (method url-fetch) |
| 258 | (uri (string-append |
| 259 | "http://icculus.org/physfs/downloads/physfs-" |
| 260 | version ".tar.bz2")) |
| 261 | (file-name (string-append name "-" version ".tar.gz")) |
| 262 | (sha256 |
| 263 | (base32 |
| 264 | "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na")))) |
| 265 | (build-system cmake-build-system) |
| 266 | (arguments |
| 267 | '(#:tests? #f)) ; no check target |
| 268 | (inputs |
| 269 | `(("zlib" ,zlib))) |
| 270 | (native-inputs |
| 271 | `(("doxygen" ,doxygen))) |
| 272 | (home-page "http://icculus.org/physfs") |
| 273 | (synopsis "File system abstraction library") |
| 274 | (description |
| 275 | "PhysicsFS is a library to provide abstract access to various archives. |
| 276 | It is intended for use in video games. For security, no file writing done |
| 277 | through the PhysicsFS API can leave a defined @emph{write directory}. For |
| 278 | file reading, a @emph{search path} with archives and directories is defined, |
| 279 | and it becomes a single, transparent hierarchical file system. So archive |
| 280 | files can be accessed in the same way as you access files directly on a disk, |
| 281 | and it makes it easy to ship a new archive that will override a previous |
| 282 | archive on a per-file basis.") |
| 283 | (license license:zlib))) |
| 284 | |
| 285 | (define-public love |
| 286 | (package |
| 287 | (name "love") |
| 288 | (version "0.10.2") |
| 289 | (source (origin |
| 290 | (method url-fetch) |
| 291 | (uri (string-append "https://bitbucket.org/rude/love/downloads/" |
| 292 | "love-" version "-linux-src.tar.gz")) |
| 293 | (sha256 |
| 294 | (base32 |
| 295 | "11x346pw0gqad8nmkmywzx4xpcbfc3dslbrdw5x94n1i25mk0sxj")))) |
| 296 | (build-system gnu-build-system) |
| 297 | (native-inputs |
| 298 | `(("pkg-config" ,pkg-config))) |
| 299 | (inputs |
| 300 | `(("devil" ,devil) |
| 301 | ("freetype" ,freetype) |
| 302 | ("libmodplug" ,libmodplug) |
| 303 | ("libtheora" ,libtheora) |
| 304 | ("libvorbis" ,libvorbis) |
| 305 | ("luajit" ,luajit) |
| 306 | ("mesa" ,mesa) |
| 307 | ("mpg123" ,mpg123) |
| 308 | ("openal" ,openal) |
| 309 | ("physfs" ,physfs) |
| 310 | ("sdl2" ,sdl2) |
| 311 | ("zlib" ,zlib))) |
| 312 | (synopsis "2D game framework for Lua") |
| 313 | (description "LÖVE is a framework for making 2D games in the Lua |
| 314 | programming language.") |
| 315 | (home-page "https://love2d.org/") |
| 316 | (license license:zlib))) |
| 317 | |
| 318 | (define-public allegro-4 |
| 319 | (package |
| 320 | (name "allegro") |
| 321 | (version "4.4.2") |
| 322 | (source (origin |
| 323 | (method url-fetch) |
| 324 | (uri (string-append "http://download.gna.org/allegro/allegro/" |
| 325 | version "/allegro-" version ".tar.gz")) |
| 326 | (sha256 |
| 327 | (base32 |
| 328 | "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v")))) |
| 329 | (build-system cmake-build-system) |
| 330 | (arguments |
| 331 | '(#:phases |
| 332 | (modify-phases %standard-phases |
| 333 | (add-after 'unpack 'patch-build-system |
| 334 | (lambda _ |
| 335 | ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE |
| 336 | ;; via a command line option doesn't work because it is |
| 337 | ;; unconditionally clobbered in the build script. |
| 338 | (substitute* '("CMakeLists.txt") |
| 339 | (("ADDON_LINKAGE STATIC") |
| 340 | "ADDON_LINKAGE SHARED")) |
| 341 | #t))))) |
| 342 | (inputs |
| 343 | `(("glu" ,glu) |
| 344 | ("libpng" ,libpng) |
| 345 | ("libvorbis" ,libvorbis) |
| 346 | ("mesa" ,mesa) |
| 347 | ("zlib" ,zlib))) |
| 348 | (synopsis "Game programming library") |
| 349 | (description "Allegro is a library mainly aimed at video game and |
| 350 | multimedia programming. It handles common, low-level tasks such as creating |
| 351 | windows, accepting user input, loading data, drawing images, playing sounds, |
| 352 | etc.") |
| 353 | (home-page "http://liballeg.org") |
| 354 | (license license:giftware))) |
| 355 | |
| 356 | (define-public allegro |
| 357 | (package |
| 358 | (name "allegro") |
| 359 | (version "5.2.0") |
| 360 | (source (origin |
| 361 | (method url-fetch) |
| 362 | (uri (string-append "http://download.gna.org/allegro/allegro/" |
| 363 | version "/allegro-" version ".tar.gz")) |
| 364 | (sha256 |
| 365 | (base32 |
| 366 | "1mwzgzc4nb5k5zkbq7yrc6hg63yxq3wk69lmjag1h19x8b6njnmg")))) |
| 367 | (build-system cmake-build-system) |
| 368 | (arguments `(#:tests? #f)) ; there are no tests |
| 369 | (inputs |
| 370 | ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb |
| 371 | `(("flac" ,flac) |
| 372 | ("freetype" ,freetype) |
| 373 | ("glu" ,glu) |
| 374 | ("gtk" ,gtk+-2) |
| 375 | ("libjpeg" ,libjpeg) |
| 376 | ("libpng" ,libpng) |
| 377 | ("libtheora" ,libtheora) |
| 378 | ("libvorbis" ,libvorbis) |
| 379 | ("libxcursor" ,libxcursor) |
| 380 | ("libxinerama" ,libxinerama) |
| 381 | ("libxrandr" ,libxrandr) |
| 382 | ("mesa" ,mesa) |
| 383 | ("openal" ,openal) |
| 384 | ("physfs" ,physfs) |
| 385 | ("zlib" ,zlib))) |
| 386 | (native-inputs |
| 387 | `(("pkg-config" ,pkg-config))) |
| 388 | (synopsis "Game programming library") |
| 389 | (description "Allegro is a library mainly aimed at video game and |
| 390 | multimedia programming. It handles common, low-level tasks such as creating |
| 391 | windows, accepting user input, loading data, drawing images, playing sounds, |
| 392 | etc.") |
| 393 | (home-page "http://liballeg.org") |
| 394 | (license license:bsd-3))) |
| 395 | |
| 396 | (define-public allegro-5.0 |
| 397 | (package (inherit allegro) |
| 398 | (name "allegro") |
| 399 | (version "5.0.11") |
| 400 | (source (origin |
| 401 | (method url-fetch) |
| 402 | (uri (string-append "http://download.gna.org/allegro/allegro/" |
| 403 | version "/allegro-" version ".tar.gz")) |
| 404 | (sha256 |
| 405 | (base32 |
| 406 | "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9")))))) |
| 407 | |
| 408 | (define-public aseprite |
| 409 | (package |
| 410 | (name "aseprite") |
| 411 | (version "1.1.1") |
| 412 | ;; The release tarball isn't good enough because it's missing some |
| 413 | ;; necessary code that is only in git submodules. |
| 414 | (source (origin |
| 415 | (method git-fetch) |
| 416 | (uri (git-reference |
| 417 | (url "https://github.com/aseprite/aseprite.git") |
| 418 | (commit "v1.1.1") |
| 419 | (recursive? #t))) |
| 420 | (sha256 |
| 421 | (base32 |
| 422 | "1yr0l3bc68lyrffrzxgw98zznv8yz5ldl98lyvp6s5grny4s4jyk")))) |
| 423 | (build-system cmake-build-system) |
| 424 | (arguments |
| 425 | '(#:configure-flags |
| 426 | ;; Use shared libraries instead of building bundled source. |
| 427 | (list "-DWITH_WEBP_SUPPORT=1" |
| 428 | "-DUSE_SHARED_CURL=1" |
| 429 | "-DUSE_SHARED_GIFLIB=1" |
| 430 | "-DUSE_SHARED_JPEGLIB=1" |
| 431 | "-DUSE_SHARED_ZLIB=1" |
| 432 | "-DUSE_SHARED_LIBPNG=1" |
| 433 | "-DUSE_SHARED_LIBLOADPNG=1" |
| 434 | "-DUSE_SHARED_LIBWEBP=1" |
| 435 | "-DUSE_SHARED_TINYXML=1" |
| 436 | "-DUSE_SHARED_PIXMAN=1" |
| 437 | "-DUSE_SHARED_FREETYPE=1" |
| 438 | "-DUSE_SHARED_ALLEGRO4=1" |
| 439 | "-DENABLE_UPDATER=0" ; no auto-updates |
| 440 | (string-append "-DFREETYPE_INCLUDE_DIR=" |
| 441 | (assoc-ref %build-inputs "freetype") |
| 442 | "/include/freetype2")))) |
| 443 | (native-inputs |
| 444 | `(("pkg-config" ,pkg-config))) |
| 445 | ;; TODO: Use a patched Allegro 4 that supports window resizing. This |
| 446 | ;; patched version is bundled with Aseprite, but the patches should be |
| 447 | ;; extracted and applied on top of a standalone Allegro 4 package. |
| 448 | (inputs |
| 449 | `(("allegro" ,allegro-4) |
| 450 | ("curl" ,curl) |
| 451 | ("freetype" ,freetype) |
| 452 | ("giflib" ,giflib) |
| 453 | ("libjpeg" ,libjpeg) |
| 454 | ("libpng" ,libpng) |
| 455 | ("libwebp" ,libwebp) |
| 456 | ("libx11" ,libx11) |
| 457 | ("libxext" ,libxext) |
| 458 | ("libxxf86vm" ,libxxf86vm) |
| 459 | ("pixman" ,pixman) |
| 460 | ("tinyxml" ,tinyxml) |
| 461 | ("zlib" ,zlib))) |
| 462 | (synopsis "Animated sprite editor and pixel art tool") |
| 463 | (description "Aseprite is a tool for creating 2D pixel art for video |
| 464 | games. In addition to basic pixel editing features, Aseprite can assist in |
| 465 | the creation of animations, tiled graphics, texture atlases, and more.") |
| 466 | (home-page "http://www.aseprite.org/") |
| 467 | (license license:gpl2+))) |
| 468 | |
| 469 | (define-public qqwing |
| 470 | (package |
| 471 | (name "qqwing") |
| 472 | (version "1.3.4") |
| 473 | (source (origin |
| 474 | (method url-fetch) |
| 475 | (uri (string-append |
| 476 | "https://qqwing.com/" |
| 477 | name "-" version ".tar.gz")) |
| 478 | (sha256 |
| 479 | (base32 |
| 480 | "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp")))) |
| 481 | (build-system gnu-build-system) |
| 482 | (native-inputs |
| 483 | `(("pkg-config" ,pkg-config))) |
| 484 | (home-page "https://qqwing.com/") |
| 485 | (synopsis "Sudoku puzzle solver and generator") |
| 486 | (description |
| 487 | "QQWing is a Sudoku puzzle generator and solver. |
| 488 | It offers the following features: |
| 489 | @enumerate |
| 490 | @item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds. |
| 491 | @item Uses logic. Uses as many solve techniques as possible when solving |
| 492 | puzzles rather than guessing. |
| 493 | @item Rates puzzles. Most generators don't give an indication of the difficulty |
| 494 | of a Sudoku puzzle. QQwing does. |
| 495 | @item Can print solve instructions for any puzzle. |
| 496 | @item Customizable output style, including a CSV style that is easy to |
| 497 | import into a database. |
| 498 | @end enumerate") |
| 499 | (license license:gpl2+))) |
| 500 | |
| 501 | (define-public quesoglc |
| 502 | (package |
| 503 | (name "quesoglc") |
| 504 | (version "0.7.2") |
| 505 | (source (origin |
| 506 | (method url-fetch) |
| 507 | (uri (string-append "mirror://sourceforge/" name "/" version "/" |
| 508 | name "-" version "-free.tar.bz2")) |
| 509 | (sha256 |
| 510 | (base32 |
| 511 | "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks")))) |
| 512 | (build-system gnu-build-system) |
| 513 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 514 | (inputs `(("fontconfig" ,fontconfig) |
| 515 | ("freeglute" ,freeglut) |
| 516 | ("fribidi" ,fribidi) |
| 517 | ("glew" ,glew))) |
| 518 | (home-page "http://quesoglc.sourceforge.net") |
| 519 | (synopsis "Implementation of the OpenGL Character Renderer (GLC)") |
| 520 | (description |
| 521 | "The OpenGL Character Renderer (GLC) is a state machine that provides |
| 522 | OpenGL programs with character rendering services via an application programming |
| 523 | interface (API).") |
| 524 | (license (list license:expat license:lgpl2.1+)))) |
| 525 | |
| 526 | (define-public python-pygame |
| 527 | (package |
| 528 | (name "python-pygame") |
| 529 | (version "1.9.3") |
| 530 | (source (origin |
| 531 | (method url-fetch) |
| 532 | (uri (pypi-uri "pygame" version)) |
| 533 | (sha256 |
| 534 | (base32 |
| 535 | "1hlydiyygl444bq5m5g8n3jsxsgrdyxlm42ipmfbw36wkf0j243m")))) |
| 536 | (build-system python-build-system) |
| 537 | (arguments |
| 538 | `(#:tests? #f ; Tests require pygame to be installed first. |
| 539 | #:phases |
| 540 | (modify-phases %standard-phases |
| 541 | ;; Set the paths to the dependencies manually because |
| 542 | ;; the configure script does not allow passing them as |
| 543 | ;; parameters. This also means we can skip the configure |
| 544 | ;; phase. |
| 545 | (add-before 'build 'set-library-paths |
| 546 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 547 | (let ((sdl-ref (assoc-ref inputs "sdl")) |
| 548 | (font-ref (assoc-ref inputs "sdl-ttf")) |
| 549 | (image-ref (assoc-ref inputs "sdl-image")) |
| 550 | (mixer-ref (assoc-ref inputs "sdl-mixer")) |
| 551 | (smpeg-ref (assoc-ref inputs "libsmpeg")) |
| 552 | (png-ref (assoc-ref inputs "libpng")) |
| 553 | (jpeg-ref (assoc-ref inputs "libjpeg")) |
| 554 | (freetype-ref (assoc-ref inputs "freetype")) |
| 555 | (v4l-ref (assoc-ref inputs "v4l-utils")) |
| 556 | (out-ref (assoc-ref outputs "out"))) |
| 557 | (substitute* "Setup.in" |
| 558 | (("SDL = -I/usr/include/SDL") |
| 559 | (string-append "SDL = -I" sdl-ref "/include/SDL -I."))) |
| 560 | (substitute* "Setup.in" |
| 561 | (("FONT = -lSDL_ttf") |
| 562 | (string-append "FONT = -I" font-ref "/include/SDL -L" |
| 563 | font-ref "/lib -lSDL_ttf"))) |
| 564 | (substitute* "Setup.in" |
| 565 | (("IMAGE = -lSDL_image") |
| 566 | (string-append "IMAGE = -I" image-ref "/include/SDL -L" |
| 567 | image-ref "/lib -lSDL_image"))) |
| 568 | (substitute* "Setup.in" |
| 569 | (("MIXER = -lSDL_mixer") |
| 570 | (string-append "MIXER = -I" mixer-ref "/include/SDL -L" |
| 571 | mixer-ref "/lib -lSDL_mixer"))) |
| 572 | (substitute* "Setup.in" |
| 573 | (("SMPEG = -lsmpeg") |
| 574 | (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L" |
| 575 | smpeg-ref "/lib -lsmpeg"))) |
| 576 | (substitute* "Setup.in" |
| 577 | (("PNG = -lpng") |
| 578 | (string-append "PNG = -I" png-ref "/include -L" |
| 579 | png-ref "/lib -lpng"))) |
| 580 | (substitute* "Setup.in" |
| 581 | (("JPEG = -ljpeg") |
| 582 | (string-append "JPEG = -I" jpeg-ref "/include -L" |
| 583 | jpeg-ref "/lib -ljpeg"))) |
| 584 | |
| 585 | (substitute* "Setup.in" |
| 586 | (("FREETYPE = -lfreetype") |
| 587 | (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L" |
| 588 | freetype-ref "/lib -lfreetype"))) |
| 589 | |
| 590 | (substitute* "Setup.in" |
| 591 | (("^pypm") "#pypm")) |
| 592 | ;; Create a path to a header file provided by v4l-utils. |
| 593 | (system* "mkdir" "linux") |
| 594 | (system* "ln" "--symbolic" |
| 595 | (string-append v4l-ref "/include/libv4l1-videodev.h") |
| 596 | "linux/videodev.h") |
| 597 | (system* "ln" "--symbolic" "Setup.in" "Setup"))))))) |
| 598 | (inputs |
| 599 | `(("freetype" ,freetype) |
| 600 | ("sdl" ,sdl) |
| 601 | ("sdl-image" ,sdl-image) |
| 602 | ("sdl-mixer" ,sdl-mixer) |
| 603 | ("sdl-ttf" ,sdl-ttf) |
| 604 | ("sdl-gfx" ,sdl-gfx) |
| 605 | ("libjpeg" ,libjpeg) |
| 606 | ("libpng" ,libpng) |
| 607 | ("libX11" ,libx11) |
| 608 | ("libsmpeg" ,libsmpeg) |
| 609 | ("portmidi" ,portmidi) |
| 610 | ("v4l-utils" ,v4l-utils))) |
| 611 | (home-page "http://www.pygame.org") |
| 612 | (synopsis "SDL wrapper for Python") |
| 613 | (description "Pygame is a set of Python modules designed for writing games. |
| 614 | Pygame adds functionality on top of the excellent SDL library. This allows you |
| 615 | to create fully featured games and multimedia programs in the python language.") |
| 616 | (license (list license:bsd-2 |
| 617 | ;; python numeric license as listed by Debian looks like |
| 618 | ;; an Expat-style license with a warranty disclaimer for |
| 619 | ;; the U.S. government and the University of California. |
| 620 | license:expat |
| 621 | license:lgpl2.0+ |
| 622 | license:lgpl2.1+ |
| 623 | license:gpl3+ |
| 624 | license:psfl |
| 625 | license:public-domain |
| 626 | license:lgpl2.1+)))) |
| 627 | |
| 628 | (define-public python2-pygame |
| 629 | (package-with-python2 python-pygame)) |