Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / sdl.scm
CommitLineData
c3c516ea 1;;; GNU Guix --- Functional package management for GNU
e0101b54 2;;; Copyright © 2013, 2015, 2017 David Thompson <dthompson2@worcester.edu>
9cb3036f 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
df05d80a 4;;; Copyright © 2015, 2017 Sou Bunnbu <iyzsong@member.fsf.org>
40e94665 5;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
8df1ee3f 6;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
39f2433c 7;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
750db2eb 8;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
c3c516ea
DT
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25(define-module (gnu packages sdl)
6813f70a 26 #:use-module (ice-9 match)
8df1ee3f
EF
27 #:use-module (srfi srfi-1)
28 #:use-module (srfi srfi-26)
c3c516ea 29 #:use-module (gnu packages)
890024c5 30 #:use-module ((guix licenses) #:hide (freetype))
c3c516ea
DT
31 #:use-module (guix packages)
32 #:use-module (guix download)
39f2433c 33 #:use-module (guix utils)
c3c516ea 34 #:use-module (guix build-system gnu)
d6f74baf 35 #:use-module (guix build-system trivial)
a313e085 36 #:use-module (gnu packages audio)
543bd0ee 37 #:use-module (gnu packages fcitx)
890024c5 38 #:use-module (gnu packages fontutils)
39f2433c 39 #:use-module (gnu packages freedesktop)
e0101b54 40 #:use-module (gnu packages glib)
bcc046fc 41 #:use-module (gnu packages guile)
e0101b54 42 #:use-module (gnu packages ibus)
e55354b8 43 #:use-module (gnu packages image)
c3c516ea 44 #:use-module (gnu packages linux)
5cf3bcd4 45 #:use-module (gnu packages mp3)
8bf8d7c7
DT
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages pulseaudio)
200726ed 48 #:use-module (gnu packages gl)
39f2433c 49 #:use-module (gnu packages xdisorg)
54ff0b7d 50 #:use-module (gnu packages xiph)
c3c516ea 51 #:use-module (gnu packages xorg)
0160458b 52 #:export (sdl-union))
8bf8d7c7 53
0160458b 54(define-public sdl
8bf8d7c7
DT
55 (package
56 (name "sdl")
57 (version "1.2.15")
58 (source (origin
59 (method url-fetch)
60 (uri
5d5790ce 61 (string-append "https://libsdl.org/release/SDL-"
8bf8d7c7
DT
62 version ".tar.gz"))
63 (sha256
64 (base32
9cb3036f 65 "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn"))
fc1adab1 66 (patches (search-patches "sdl-libx11-1.6.patch"))))
8bf8d7c7 67 (build-system gnu-build-system)
22f33e61 68 (arguments
666aa995 69 '(;; Explicitly link against shared libraries instead of dlopening them.
83bb3a3e
SB
70 ;; For X11, ALSA, and PulseAudio.
71 ;; OpenGL library is still dlopened at runtime.
72 #:configure-flags '("--disable-alsa-shared"
73 "--disable-pulseaudio-shared"
07780c71
SB
74 "--disable-x11-shared"
75 ;; Explicitly link with mesa.
76 ;; This add mesa to libsdl's RUNPATH, to make dlopen
77 ;; finding the libGL from mesa at runtime.
78 "LDFLAGS=-lGL")
22f33e61
LC
79
80 #:tests? #f)) ; no check target
558a5122
LC
81 (propagated-inputs
82 ;; SDL headers include X11 headers.
666aa995
SB
83 `(("libx11" ,libx11)
84 ("libcap" ,libcap))) ; 'libSDL.la' contain `-lcap'.
22f33e61 85 (native-inputs `(("pkg-config" ,pkg-config)))
558a5122 86 (inputs `(("libxrandr" ,libxrandr)
8bf8d7c7 87 ("mesa" ,mesa)
83bb3a3e 88 ("glu" ,glu)
8bf8d7c7 89 ("alsa-lib" ,alsa-lib)
8bf8d7c7 90 ("pulseaudio" ,pulseaudio)))
38033318 91 (outputs '("out" "debug"))
8bf8d7c7
DT
92 (synopsis "Cross platform game development library")
93 (description "Simple DirectMedia Layer is a cross-platform development
94library designed to provide low level access to audio, keyboard, mouse,
95joystick, and graphics hardware.")
5d5790ce 96 (home-page "https://libsdl.org/")
8bf8d7c7
DT
97 (license lgpl2.1)))
98
0160458b 99(define-public sdl2
8bf8d7c7
DT
100 (package (inherit sdl)
101 (name "sdl2")
f4009ade 102 (version "2.0.8")
8bf8d7c7
DT
103 (source (origin
104 (method url-fetch)
105 (uri
5d5790ce 106 (string-append "https://libsdl.org/release/SDL2-"
8bf8d7c7
DT
107 version ".tar.gz"))
108 (sha256
109 (base32
f4009ade 110 "1v4js1gkr75hzbxzhwzzif0sf9g07234sd23x1vdaqc661bprizd"))))
39f2433c
RH
111 (arguments
112 (substitute-keyword-arguments (package-arguments sdl)
113 ((#:configure-flags flags)
114 `(append '("--disable-wayland-shared")
115 ,flags))))
e0101b54
DT
116 (inputs
117 ;; SDL2 needs to be built with ibus support otherwise some systems
118 ;; experience a bug where input events are doubled.
119 ;;
120 ;; For more information, see: https://dev.solus-project.com/T1721
121 (append `(("dbus" ,dbus)
543bd0ee 122 ("fcitx" ,fcitx) ; helps with CJK input
e0101b54 123 ("glib" ,glib)
39f2433c 124 ("ibus" ,ibus)
c695fb76
TGR
125 ("libxkbcommon" ,libxkbcommon)
126 ("wayland" ,wayland)
127 ("wayland-protocols" ,wayland-protocols))
e0101b54 128 (package-inputs sdl)))
8bf8d7c7 129 (license bsd-3)))
c3c516ea 130
0160458b 131(define-public libmikmod
c3c516ea
DT
132 (package
133 (name "libmikmod")
7d876afd 134 (version "3.3.10")
c3c516ea
DT
135 (source (origin
136 (method url-fetch)
1934769b
MW
137 (uri (list
138 (string-append "mirror://sourceforge/mikmod/libmikmod/"
139 version "/libmikmod-" version ".tar.gz")
140 ;; Older versions are sometimes moved to:
141 (string-append "mirror://sourceforge/mikmod/"
142 "outdated_versions/libmikmod/"
143 version "/libmikmod-" version ".tar.gz")))
c3c516ea
DT
144 (sha256
145 (base32
7d876afd 146 "0j7g4jpa2zgzw7x6s3rldypa7zlwjvn97rwx0sylx1iihhlzbcq0"))))
c3c516ea 147 (build-system gnu-build-system)
03920078
LC
148 (arguments
149 ;; By default, libmikmod tries to dlopen libasound etc., which won't work
150 ;; unless the right libalsa happens to be in $LD_LIBRARY_PATH. Pass
151 ;; '--disable-dl' to avoid that.
152 '(#:configure-flags '("--disable-dl")))
9e771e3b 153 (synopsis "Library for module sound formats")
c3c516ea
DT
154 (description
155 "MikMod is able to play a wide range of module formats, as well as
35b9e423 156digital sound files. It can take advantage of particular features of your
c3c516ea
DT
157system, such as sound redirection over the network.")
158 (license lgpl2.1)
159 (home-page "http://mikmod.sourceforge.net/")))
5cf3bcd4 160
0160458b 161(define-public sdl-gfx
5cf3bcd4
DT
162 (package
163 (name "sdl-gfx")
b5ceea9f 164 (version "2.0.26")
5cf3bcd4
DT
165 (source (origin
166 (method url-fetch)
167 (uri
168 (string-append "http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-"
169 version ".tar.gz"))
170 (sha256
171 (base32
b5ceea9f 172 "0ijljhs0v99dj6y27hc10z6qchyp8gdp4199y6jzngy6dzxlzsvw"))))
5cf3bcd4 173 (build-system gnu-build-system)
38033318 174 (outputs '("out" "debug"))
8df1ee3f
EF
175 (arguments
176 `(,@(if (any (cute string-prefix? <> (or (%current-system)
177 (%current-target-system)))
178 '("x86_64" "i686"))
179 ;; mmx is supported only on Intel processors.
180 '()
181 '(#:configure-flags '("--disable-mmx")))))
5cf3bcd4 182 (propagated-inputs `(("sdl" ,sdl)))
5cf3bcd4
DT
183 (synopsis "SDL graphics primitives library")
184 (description "SDL_gfx provides graphics drawing primitives, rotozoom and
185other supporting functions for SDL.")
186 (home-page "http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx")
8df1ee3f 187 (license zlib)))
5cf3bcd4 188
0160458b 189(define-public sdl-image
5cf3bcd4
DT
190 (package
191 (name "sdl-image")
192 (version "1.2.12")
193 (source (origin
194 (method url-fetch)
195 (uri
5d5790ce 196 (string-append "https://www.libsdl.org/projects/SDL_image/release/SDL_image-"
5cf3bcd4
DT
197 version ".tar.gz"))
198 (sha256
199 (base32
200 "16an9slbb8ci7d89wakkmyfvp7c0cval8xw4hkg0842nhhlp540b"))))
201 (build-system gnu-build-system)
38033318 202 (outputs '("out" "debug"))
7c3e60fb
SB
203 (arguments
204 ;; Explicitly link against shared libraries instead of dlopening them.
205 '(#:configure-flags '("--disable-jpg-shared"
206 "--disable-png-shared"
207 "--disable-tif-shared"
208 "--disable-webp-shared")))
586b6d4d 209 (native-inputs `(("pkg-config" ,pkg-config)))
586b6d4d
DT
210 ;; libjpeg, libpng, and libtiff are propagated inputs because the
211 ;; SDL_image headers include the headers of these libraries. SDL is a
212 ;; propagated input because the pkg-config file refers to SDL's pkg-config
213 ;; file.
214 (propagated-inputs `(("sdl" ,sdl)
215 ("libjpeg" ,libjpeg)
216 ("libpng" ,libpng)
6a51e95b
DT
217 ("libtiff" ,libtiff)
218 ("libwebp" ,libwebp)))
5cf3bcd4
DT
219 (synopsis "SDL image loading library")
220 (description "SDL_image is an image file loading library for SDL that
221supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF,
222WEBP, XCF, XPM, and XV.")
5d5790ce 223 (home-page "https://www.libsdl.org/projects/SDL_image/")
5cf3bcd4
DT
224 (license zlib)))
225
0160458b 226(define-public sdl-mixer
5cf3bcd4
DT
227 (package
228 (name "sdl-mixer")
229 (version "1.2.12")
230 (source (origin
231 (method url-fetch)
232 (uri
5d5790ce 233 (string-append "https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-"
5cf3bcd4
DT
234 version ".tar.gz"))
235 (sha256
236 (base32
237 "0alrhqgm40p4c92s26mimg9cm1y7rzr6m0p49687jxd9g6130i0n"))))
238 (build-system gnu-build-system)
38033318 239 (outputs '("out" "debug"))
5cf3bcd4
DT
240 ;; no check target
241 ;; use libmad instead of smpeg
3ff73390 242 ;; explicitly link against shared libraries instead of dlopening them
5cf3bcd4 243 (arguments `(#:tests? #f
3ff73390
SB
244 #:configure-flags '("--enable-music-mp3-mad-gpl"
245 "--disable-music-mod-shared"
246 "--disable-music-fluidsynth-shared"
247 "--disable-music-ogg-shared"
248 "--disable-music-flac-shared"
249 "--disable-music-mp3-shared")))
5cf3bcd4
DT
250 (inputs `(("libvorbis" ,libvorbis)
251 ("libflac" ,flac)
252 ("libmad" ,libmad)
a313e085
DT
253 ("libmikmod" ,libmikmod)
254 ("libmodplug" ,libmodplug)))
5cf3bcd4
DT
255 ;; FIXME: Add libfluidsynth
256 (propagated-inputs `(("sdl" ,sdl)))
257 (synopsis "SDL multi-channel audio mixer library")
258 (description "SDL_mixer is a multi-channel audio mixer library for SDL.
259It supports any number of simultaneously playing channels of 16 bit stereo
260audio, plus a single channel of music. Supported format include FLAC, MOD,
261MIDI, Ogg Vorbis, and MP3.")
5d5790ce 262 (home-page "https://www.libsdl.org/projects/SDL_mixer/")
5cf3bcd4
DT
263 (license zlib)))
264
0160458b 265(define-public sdl-net
5cf3bcd4
DT
266 (package
267 (name "sdl-net")
268 (version "1.2.8")
269 (source (origin
270 (method url-fetch)
271 (uri
5d5790ce 272 (string-append "https://www.libsdl.org/projects/SDL_net/release/SDL_net-"
5cf3bcd4
DT
273 version ".tar.gz"))
274 (sha256
275 (base32
276 "1d5c9xqlf4s1c01gzv6cxmg0r621pq9kfgxcg3197xw4p25pljjz"))))
277 (build-system gnu-build-system)
278 (propagated-inputs `(("sdl" ,sdl)))
41eb1198 279 (native-inputs `(("pkg-config" ,pkg-config)))
38033318 280 (outputs '("out" "debug"))
5cf3bcd4
DT
281 (synopsis "SDL networking library")
282 (description "SDL_net is a small, cross-platform networking library for
283SDL.")
5d5790ce 284 (home-page "https://www.libsdl.org/projects/SDL_net/")
5cf3bcd4
DT
285 (license zlib)))
286
0160458b 287(define-public sdl-ttf
5cf3bcd4
DT
288 (package
289 (name "sdl-ttf")
290 (version "2.0.11")
291 (source (origin
292 (method url-fetch)
293 (uri
5d5790ce 294 (string-append "https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-"
5cf3bcd4
DT
295 version ".tar.gz"))
296 (sha256
297 (base32
298 "1dydxd4f5kb1288i5n5568kdk2q7f8mqjr7i7sd33nplxjaxhk3j"))))
299 (build-system gnu-build-system)
300 (propagated-inputs `(("sdl" ,sdl)))
890024c5 301 (inputs `(("freetype" ,freetype)
41eb1198
LC
302 ("mesa" ,mesa)))
303 (native-inputs `(("pkg-config" ,pkg-config)))
38033318 304 (outputs '("out" "debug"))
5cf3bcd4
DT
305 (synopsis "SDL TrueType font library")
306 (description "SDL_ttf is a TrueType font rendering library for SDL.")
5d5790ce 307 (home-page "https://www.libsdl.org/projects/SDL_ttf/")
5cf3bcd4 308 (license zlib)))
d6f74baf 309
40e94665
AK
310(define* (sdl-union #:optional (packages (list sdl sdl-gfx sdl-net sdl-ttf
311 sdl-image sdl-mixer)))
312 "Return 'sdl-union' package which is a union of PACKAGES.
313If PACKAGES are not specified, all SDL packages are used."
d6f74baf
DT
314 (package
315 (name "sdl-union")
316 (version (package-version sdl))
317 (source #f)
318 (build-system trivial-build-system)
319 (arguments
320 '(#:modules ((guix build union))
321 #:builder (begin
322 (use-modules (ice-9 match)
323 (guix build union))
324 (match %build-inputs
325 (((names . directories) ...)
326 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
327 directories)
328 #t)))))
40e94665
AK
329 (inputs (map (lambda (package)
330 (list (package-name package) package))
331 packages))
332 (synopsis "Union of SDL libraries")
d6f74baf
DT
333 (description
334 "A union of SDL and its extension libraries. A union is required because
335sdl-config assumes that all of the headers and libraries are in the same
336directory.")
337 (home-page (package-home-page sdl))
338 (license (package-license sdl))))
bcc046fc 339
6813f70a
DT
340(define (propagated-inputs-with-sdl2 package)
341 "Replace the \"sdl\" propagated input of PACKAGE with SDL2."
342 (map (match-lambda
343 (("sdl" _)
344 `("sdl2" ,sdl2))
345 (other other))
346 (package-propagated-inputs package)))
347
348(define-public sdl2-image
349 (package (inherit sdl-image)
350 (name "sdl2-image")
2e465111 351 (version "2.0.2")
6813f70a
DT
352 (source (origin
353 (method url-fetch)
354 (uri
5d5790ce 355 (string-append "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-"
6813f70a
DT
356 version ".tar.gz"))
357 (sha256
358 (base32
2e465111 359 "1s3ciydixrgv34vlf45ak5syq5nlfaqf19wf162lbz4ixxd0gpvj"))))
6813f70a
DT
360 (propagated-inputs
361 (propagated-inputs-with-sdl2 sdl-image))))
362
855e2939
DT
363(define-public sdl2-mixer
364 (package (inherit sdl-mixer)
365 (name "sdl2-mixer")
750db2eb 366 (version "2.0.2")
855e2939
DT
367 (source (origin
368 (method url-fetch)
369 (uri
370 (string-append "http://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-"
371 version ".tar.gz"))
efd75ade 372 (modules '((guix build utils)))
6cbee49d
MW
373 (snippet '(begin
374 ;; Remove bundled libraries.
375 (delete-file-recursively "external")
376 #t))
855e2939
DT
377 (sha256
378 (base32
750db2eb 379 "1fw3kkqi5346ai5if4pxrcbhs5c4vv3a4smgz6fl6kyaxwkmwqaf"))))
855e2939
DT
380 (propagated-inputs
381 (propagated-inputs-with-sdl2 sdl-mixer))))
382
d3f6a1de
DT
383(define-public sdl2-ttf
384 (package (inherit sdl-ttf)
385 (name "sdl2-ttf")
8d506323 386 (version "2.0.14")
d3f6a1de
DT
387 (source (origin
388 (method url-fetch)
389 (uri
5d5790ce 390 (string-append "https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-"
d3f6a1de 391 version ".tar.gz"))
8d506323 392 (modules '((guix build utils)))
6cbee49d
MW
393 (snippet (begin
394 ;; Remove bundled libraries.
395 '(delete-file-recursively "external")
396 #t))
d3f6a1de
DT
397 (sha256
398 (base32
8d506323 399 "0xljwcpvd2knrjdfag5b257xqayplz55mqlszrqp0kpnphh5xnrl"))))
d3f6a1de
DT
400 (propagated-inputs
401 (propagated-inputs-with-sdl2 sdl-ttf))))
402
bcc046fc
DT
403(define-public guile-sdl
404 (package
405 (name "guile-sdl")
af87a551 406 (version "0.5.2")
bcc046fc
DT
407 (source (origin
408 (method url-fetch)
409 (uri
410 (string-append "mirror://gnu/guile-sdl/guile-sdl-"
411 version ".tar.xz"))
412 (sha256
413 (base32
af87a551 414 "0cjgs012a9922hn6xqwj66w6qmfs3nycnm56hyykx5n3g5p7ag01"))))
bcc046fc
DT
415 (build-system gnu-build-system)
416 (native-inputs
417 `(("pkg-config" ,pkg-config)
418 ;; Required by test suite.
419 ("xorg-server" ,xorg-server)
420 ("libjpeg" ,libjpeg)))
421 (inputs
8380a181 422 `(("guile" ,guile-2.2)
40e94665 423 ("sdl-union" ,(sdl-union))))
bcc046fc
DT
424 (arguments
425 '(#:configure-flags
426 (list (string-append "--with-sdl-prefix="
427 (assoc-ref %build-inputs "sdl-union")))
4fa3f796
LC
428 #:modules ((ice-9 popen)
429 (guix build utils)
430 (guix build gnu-build-system))
431
bcc046fc 432 #:parallel-build? #f ; parallel build fails
4fa3f796 433
bcc046fc 434 #:phases
dc1d3cde
KK
435 (modify-phases %standard-phases
436 (add-before 'configure 'fix-env-and-patch
437 (lambda* (#:key inputs #:allow-other-keys)
438 (setenv "GUILE_AUTO_COMPILE" "0")
439 ;; SDL_image needs to dlopen libjpeg in the test suite.
440 (setenv "LD_LIBRARY_PATH"
441 (string-append (assoc-ref inputs "libjpeg") "/lib"))
4fa3f796
LC
442
443 ;; Change the site directory /site/X.Y like Guile expects.
dc1d3cde 444 (substitute* "build-aux/guile-baux/re-prefixed-site-dirs"
4fa3f796
LC
445 (("\"/site\"")
446 (let ((effective
447 (read
448 (open-pipe* OPEN_READ
449 "guile" "-c"
450 "(write (effective-version))"))))
451 (string-append "\"/site/" effective "\""))))
af87a551 452
dc1d3cde
KK
453 ;; Skip tests that rely on sound support, which is unavailable in
454 ;; the build environment.
455 (substitute* "test/Makefile.in"
456 (("HAVE_MIXER = .*$")
457 "HAVE_MIXER = 0\n"))
458 #t))
459 (add-before 'check 'start-xorg-server
460 (lambda* (#:key inputs #:allow-other-keys)
461 ;; The test suite requires a running X server.
462 (system (format #f "~a/bin/Xvfb :1 &"
463 (assoc-ref inputs "xorg-server")))
464 (setenv "DISPLAY" ":1")
8380a181
LC
465 #t))
466 (add-before 'check 'skip-cursor-test
467 (lambda _
468 ;; XXX: This test sometimes enters an endless loop, and sometimes
469 ;; crashes with:
470 ;; guile: xcb_io.c:147: append_pending_request: Assertion `!xcb_xlib_unknown_seq_number' failed.
471 ;; Skip it.
472 (substitute* "test/cursor.scm"
473 (("\\(SDL:init .*" all)
474 (string-append "(exit 77) ;" all "\n")))
dc1d3cde 475 #t)))))
bcc046fc
DT
476 (synopsis "Guile interface for SDL (Simple DirectMedia Layer)")
477 (description "Guile-SDL is a set of bindings to the Simple DirectMedia
478Layer (SDL). With them, Guile programmers can have easy access to graphics,
479sound and device input (keyboards, joysticks, mice, etc.).")
6fd52309 480 (home-page "https://www.gnu.org/software/guile-sdl/")
bcc046fc 481 (license gpl3+)))
df05d80a
SB
482
483(define-public guile-sdl2
484 (package
485 (name "guile-sdl2")
486 (version "0.2.0")
487 (source (origin
488 (method url-fetch)
489 (uri (string-append
490 "https://files.dthompson.us/guile-sdl2/guile-sdl2-"
491 version ".tar.gz"))
492 (sha256
493 (base32
494 "0yq9lsl17cdvj77padvpk3jcw2g6g0pck9jrchc7n2767rrc012b"))))
495 (build-system gnu-build-system)
496 (arguments
497 '(#:make-flags '("GUILE_AUTO_COMPILE=0")
498 #:configure-flags
499 (list (string-append "--with-libsdl2-prefix="
500 (assoc-ref %build-inputs "sdl2"))
501 (string-append "--with-libsdl2-image-prefix="
502 (assoc-ref %build-inputs "sdl2-image"))
503 (string-append "--with-libsdl2-ttf-prefix="
504 (assoc-ref %build-inputs "sdl2-ttf"))
505 (string-append "--with-libsdl2-mixer-prefix="
506 (assoc-ref %build-inputs "sdl2-mixer")))))
507 (native-inputs
37b9be58 508 `(("guile" ,guile-2.2)
df05d80a
SB
509 ("pkg-config" ,pkg-config)))
510 (inputs
511 `(("sdl2" ,sdl2)
512 ("sdl2-image" ,sdl2-image)
513 ("sdl2-mixer" ,sdl2-mixer)
514 ("sdl2-ttf" ,sdl2-ttf)))
515 (synopsis "Guile bindings for SDL2")
516 (home-page "https://dthompson.us/projects/guile-sdl2.html")
517 (description
518 "Guile-SDL2 provides Guile Scheme bindings for the SDL2 C shared library.
519The bindings are written in pure Scheme using Guile's foreign function
520interface.")
521 (license lgpl3+)))