gnu: mesa: Update to 13.0.2.
[jackhill/guix/guix.git] / gnu / packages / gl.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013 Joshua Grant <tadni@riseup.net>
4 ;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org>
5 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
7 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages gl)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages autotools)
27 #:use-module (gnu packages bison)
28 #:use-module (gnu packages documentation)
29 #:use-module (gnu packages flex)
30 #:use-module (gnu packages fontutils)
31 #:use-module (gnu packages freedesktop)
32 #:use-module (gnu packages gettext)
33 #:use-module (gnu packages guile)
34 #:use-module (gnu packages linux)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages video)
38 #:use-module (gnu packages xdisorg)
39 #:use-module (gnu packages xml)
40 #:use-module (gnu packages xorg)
41 #:use-module (gnu packages zip)
42 #:use-module (guix download)
43 #:use-module (guix build utils)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system cmake)
46 #:use-module ((guix licenses) #:prefix license:)
47 #:use-module (guix packages)
48 #:use-module (guix utils)
49 #:use-module (ice-9 match))
50
51 (define-public glu
52 (package
53 (name "glu")
54 (version "9.0.0")
55 (source (origin
56 (method url-fetch)
57 (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/glu/glu-"
58 version ".tar.gz"))
59 (sha256
60 (base32
61 "0r72yyhj09x3krn3kn629jqbwyq50ji8w5ri2pn6zwrk35m4g1s3"))))
62 (build-system gnu-build-system)
63 (propagated-inputs
64 `(("mesa" ,mesa))) ; according to glu.pc
65 (home-page "http://www.opengl.org/archives/resources/faq/technical/glu.htm")
66 (synopsis "Mesa OpenGL Utility library")
67 (description
68 "GLU, or OpenGL Utility Library provides some higher-level functionality
69 not provided by just OpenGL itself. Some of GLU's Features
70 include: Scaling of 2D images and creation of mipmap pyramids,
71 Transformation of object coordinates into device coordinates and
72 vice versa, Support for NURBS surfaces, Support for tessellation
73 of concave or bow tie polygonal primitives, Specialty transformation
74 matrices for creating perspective and orthographic projections,
75 positioning a camera, and selection/picking, Rendering of disk,
76 cylinder, and sphere primitives, Interpreting OpenGL error values
77 as ASCII text.")
78 (license (license:x11-style "http://directory.fsf.org/wiki/License:SGIFreeBv2"))))
79
80 (define-public freeglut
81 (package
82 (name "freeglut")
83 (version "3.0.0")
84 (source (origin
85 (method url-fetch)
86 (uri (string-append
87 "mirror://sourceforge/freeglut/freeglut/"
88 version "/freeglut-" version ".tar.gz"))
89 (sha256
90 (base32
91 "18knkyczzwbmyg8hr4zh8a1i5ga01np2jzd1rwmsh7mh2n2vwhra"))))
92 (build-system cmake-build-system)
93 (arguments '(#:tests? #f)) ; no test target
94 (inputs `(("mesa" ,mesa)
95 ("libx11" ,libx11)
96 ("libxi" ,libxi)
97 ("libxrandr" ,libxrandr)
98 ("libxxf86vm" ,libxxf86vm)
99 ("inputproto" ,inputproto)
100 ("xinput" ,xinput)))
101 (propagated-inputs
102 ;; Headers from Mesa and GLU are needed.
103 `(("glu" ,glu)
104 ("mesa" ,mesa)))
105 (home-page "http://freeglut.sourceforge.net/")
106 (synopsis "Alternative to the OpenGL Utility Toolkit (GLUT)")
107 (description
108 "Freeglut is a completely Free/OpenSourced alternative to
109 the OpenGL Utility Toolkit (GLUT) library. GLUT was originally
110 written by Mark Kilgard to support the sample programs in the
111 second edition OpenGL 'RedBook'. Since then, GLUT has been used
112 in a wide variety of practical applications because it is simple,
113 widely available and highly portable.
114
115 GLUT (and hence freeglut) allows the user to create and manage windows
116 containing OpenGL contexts on a wide range of platforms and also read
117 the mouse, keyboard and joystick functions. Freeglut is released under
118 the X-Consortium license.")
119 (license license:x11)))
120
121 (define-public ftgl
122 (package
123 (name "ftgl")
124 (version "2.1.3-rc5")
125 (source (origin
126 (method url-fetch)
127 (uri (string-append
128 "mirror://sourceforge/ftgl/FTGL%20Source/2.1.3~rc5/"
129 "ftgl-" version ".tar.gz"))
130 (sha256
131 (base32
132 "0nsn4s6vnv5xcgxcw6q031amvh2zfj2smy1r5mbnjj2548hxcn2l"))))
133 (build-system gnu-build-system)
134 ;; The pkg-config file lists "freetype2" as Requires.private.
135 (propagated-inputs `(("freetype" ,freetype)))
136 (inputs `(("libx11" ,libx11)
137 ("mesa" ,mesa)
138 ("glu" ,glu)))
139 (home-page "http://ftgl.sourceforge.net")
140 (synopsis "Font rendering library for OpenGL applications")
141 (description
142 "FTGL is a font rendering library for OpenGL applications. Supported
143 rendering modes are: Bitmaps, Anti-aliased pixmaps, Texture maps, Outlines,
144 Polygon meshes, and Extruded polygon meshes.")
145 (license license:x11)))
146
147 (define-public s2tc
148 (package
149 (name "s2tc")
150 (version "1.0")
151 (source
152 (origin
153 (method url-fetch)
154 (uri (string-append
155 "https://github.com/divVerent/s2tc/archive/v" version ".tar.gz"))
156 (sha256
157 (base32 "0ibfdib277fhbqvxzan0bmglwnsl1y1rw2g8skvz82l1sfmmn752"))
158 (file-name (string-append name "-" version ".tar.gz"))))
159 (build-system gnu-build-system)
160 (native-inputs
161 `(("autoconf" ,autoconf)
162 ("automake" ,automake)
163 ("libtool" ,libtool)))
164 (inputs
165 `(("mesa-headers" ,mesa-headers)))
166 (arguments
167 '(#:phases
168 (modify-phases %standard-phases
169 (add-after 'unpack 'autogen
170 (lambda _
171 (zero? (system* "sh" "autogen.sh")))))))
172 (home-page "https://github.com/divVerent/s2tc")
173 (synopsis "S3 Texture Compression implementation")
174 (description
175 "S2TC is a patent-free implementation of S3 Texture Compression (S3TC,
176 also known as DXTn or DXTC) for Mesa.")
177 (license license:expat)))
178
179 ;;; Mesa needs LibVA headers to build its Gallium-based VA API implementation;
180 ;;; LibVA itself depends on Mesa. We use the following to solve the circular
181 ;;; dependency.
182 (define libva-without-mesa
183 ;; Delay to work around circular import problem.
184 (delay
185 (package
186 (inherit libva)
187 (name "libva-without-mesa")
188 (inputs (alist-delete "mesa" (package-inputs libva)))
189 (arguments
190 (strip-keyword-arguments
191 '(#:make-flags)
192 (substitute-keyword-arguments (package-arguments libva)
193 ((#:configure-flags flags)
194 '(list "--disable-glx" "--disable-egl"))))))))
195
196 (define-public mesa
197 (package
198 (name "mesa")
199 (version "13.0.2")
200 (source
201 (origin
202 (method url-fetch)
203 (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
204 version "/mesa-" version ".tar.xz"))
205 (sha256
206 (base32
207 "1m8n8kd8kcs5ddyvldiw09wvpi5wwpfmmxlb87d63vgl8lk65vd6"))
208 (patches
209 (search-patches "mesa-wayland-egl-symbols-check-mips.patch"))))
210 (build-system gnu-build-system)
211 (propagated-inputs
212 `(("glproto" ,glproto)
213 ;; The following are in the Requires.private field of gl.pc.
214 ("libdrm" ,libdrm)
215 ("libvdpau" ,libvdpau)
216 ("libx11" ,libx11)
217 ("libxdamage" ,libxdamage)
218 ("libxfixes" ,libxfixes)
219 ("libxshmfence" ,libxshmfence)
220 ("libxxf86vm" ,libxxf86vm)))
221 (inputs
222 `(("expat" ,expat)
223 ("dri2proto" ,dri2proto)
224 ("dri3proto" ,dri3proto)
225 ("libva" ,(force libva-without-mesa))
226 ("libxml2" ,libxml2)
227 ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support
228 ("libxvmc" ,libxvmc)
229 ("makedepend" ,makedepend)
230 ("presentproto" ,presentproto)
231 ("s2tc" ,s2tc)
232 ("wayland" ,wayland)))
233 (native-inputs
234 `(("pkg-config" ,pkg-config)
235 ("python" ,python-2)))
236 (arguments
237 `(#:configure-flags
238 '(;; drop r300 from default gallium drivers, as it requires llvm
239 "--with-gallium-drivers=r600,svga,swrast,nouveau,virgl"
240 ;; Enable various optional features. TODO: opencl requires libclc,
241 ;; omx requires libomxil-bellagio
242 "--with-egl-platforms=x11,drm,wayland"
243 "--enable-glx-tls" ;Thread Local Storage, improves performance
244 ;; "--enable-opencl"
245 ;; "--enable-omx"
246 "--enable-osmesa"
247 "--enable-xa"
248 ;; features required by wayland
249 "--enable-gles2"
250 "--enable-gbm"
251 "--enable-shared-glapi"
252
253 ;; on non-intel systems, drop i915 and i965
254 ;; from the default dri drivers
255 ,@(match (%current-system)
256 ((or "x86_64-linux" "i686-linux")
257 '())
258 (_
259 '("--with-dri-drivers=nouveau,r200,radeon,swrast"))))
260 #:phases
261 (modify-phases %standard-phases
262 (add-after
263 'unpack 'patch-create_test_cases
264 (lambda _
265 (substitute* "src/compiler/glsl/tests/lower_jumps/create_test_cases.py"
266 (("/usr/bin/env bash") (which "bash")))
267 (substitute* "src/intel/genxml/gen_pack_header.py"
268 (("/usr/bin/env python2") (which "python")))))
269 (add-before
270 'build 'fix-dlopen-libnames
271 (lambda* (#:key inputs outputs #:allow-other-keys)
272 (let ((s2tc (assoc-ref inputs "s2tc"))
273 (out (assoc-ref outputs "out")))
274 ;; Remain agnostic to .so.X.Y.Z versions while doing
275 ;; the substitutions so we're future-safe.
276 (substitute*
277 '("src/gallium/auxiliary/util/u_format_s3tc.c"
278 "src/mesa/main/texcompress_s3tc.c")
279 (("\"libtxc_dxtn\\.so")
280 (string-append "\"" s2tc "/lib/libtxc_dxtn.so")))
281 (substitute* "src/glx/dri_common.c"
282 (("dlopen\\(\"libGL\\.so")
283 (string-append "dlopen(\"" out "/lib/libGL.so")))
284 (substitute* "src/egl/drivers/dri2/egl_dri2.c"
285 (("\"libglapi\\.so")
286 (string-append "\"" out "/lib/libglapi.so")))
287 (substitute* "src/gbm/main/backend.c"
288 ;; No need to patch the gbm_gallium_drm.so reference;
289 ;; it's never installed since Mesa removed its
290 ;; egl_gallium support.
291 (("\"gbm_dri\\.so")
292 (string-append "\"" out "/lib/dri/gbm_dri.so")))))))))
293 (home-page "http://mesa3d.org/")
294 (synopsis "OpenGL implementation")
295 (description "Mesa is a free implementation of the OpenGL specification -
296 a system for rendering interactive 3D graphics. A variety of device drivers
297 allows Mesa to be used in many different environments ranging from software
298 emulation to complete hardware acceleration for modern GPUs.")
299 (license license:x11)))
300
301 (define-public mesa-headers
302 (package
303 (inherit mesa)
304 (name "mesa-headers")
305 (propagated-inputs '())
306 (inputs '())
307 (native-inputs '())
308 (arguments
309 '(#:phases
310 (modify-phases %standard-phases
311 (delete 'configure)
312 (delete 'build)
313 (delete 'check)
314 (replace 'install
315 (lambda* (#:key outputs #:allow-other-keys)
316 (copy-recursively "include" (string-append
317 (assoc-ref outputs "out")
318 "/include")))))))))
319
320 ;;; The mesa-demos distribution contains non-free files, many files with no
321 ;;; clear license information, and many demos that aren't useful for most
322 ;;; people, so we just use this for the mesa-utils package below, and possibly
323 ;;; other packages in the future. This is modeled after Debian's solution.
324 (define (mesa-demos-source version)
325 (origin
326 (method url-fetch)
327 (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/demos/" version
328 "/mesa-demos-" version ".tar.bz2"))
329 (sha256 (base32 "1vqb7s5m3fcg2csbiz45mha1pys2xx6rhw94fcyvapqdpm5iawy1"))))
330
331 (define-public mesa-utils
332 (package
333 (name "mesa-utils")
334 (version "8.3.0")
335 (source (mesa-demos-source version))
336 (build-system gnu-build-system)
337 (inputs
338 `(("mesa" ,mesa)
339 ("glut" ,freeglut)
340 ("glew" ,glew)))
341 (native-inputs
342 `(("pkg-config" ,pkg-config)))
343 (arguments
344 '(#:phases
345 (modify-phases %standard-phases
346 (replace
347 'install
348 (lambda* (#:key outputs #:allow-other-keys)
349 (let ((out (assoc-ref outputs "out")))
350 (mkdir-p (string-append out "/bin"))
351 (for-each
352 (lambda (file)
353 (copy-file file (string-append out "/bin/" (basename file))))
354 '("src/xdemos/glxdemo" "src/xdemos/glxgears"
355 "src/xdemos/glxinfo" "src/xdemos/glxheads"))))))))
356 (home-page "http://mesa3d.org/")
357 (synopsis "Utility tools for Mesa")
358 (description
359 "The mesa-utils package contains several utility tools for Mesa: glxdemo,
360 glxgears, glxheads, and glxinfo.")
361 ;; glxdemo is public domain; others expat.
362 (license (list license:expat license:public-domain))))
363
364 (define-public glew
365 (package
366 (name "glew")
367 (version "2.0.0")
368 (source (origin
369 (method url-fetch)
370 (uri (string-append "mirror://sourceforge/glew/glew/" version
371 "/glew-" version ".tgz"))
372 (sha256
373 (base32
374 "0r37fg2s1f0jrvwh6c8cz5x6v4wqmhq42qm15cs9qs349q5c6wn5"))
375 (modules '((guix build utils)))
376 (snippet
377 '(substitute* "config/Makefile.linux"
378 (("= cc") "= gcc")
379 (("/lib64") "/lib")))))
380 (build-system gnu-build-system)
381 (arguments
382 '(#:phases (alist-delete 'configure %standard-phases)
383 #:make-flags (list (string-append "GLEW_PREFIX="
384 (assoc-ref %outputs "out"))
385 (string-append "GLEW_DEST="
386 (assoc-ref %outputs "out")))
387 #:tests? #f)) ;no 'check' target
388 (inputs
389 `(("libxi" ,libxi)
390 ("libxmu" ,libxmu)
391 ("libx11" ,libx11)
392 ("mesa" ,mesa)))
393
394 ;; <GL/glew.h> includes <GL/glu.h>.
395 (propagated-inputs `(("glu" ,glu)))
396
397 (home-page "http://glew.sourceforge.net/")
398 (synopsis "OpenGL extension loading library for C and C++")
399 (description
400 "The OpenGL Extension Wrangler Library (GLEW) is a C/C++ extension
401 loading library. GLEW provides efficient run-time mechanisms for determining
402 which OpenGL extensions are supported on the target platform. OpenGL core and
403 extension functionality is exposed in a single header file.")
404 (license license:bsd-3)))
405
406 (define-public guile-opengl
407 (package
408 (name "guile-opengl")
409 (version "0.1.0")
410 (source (origin
411 (method url-fetch)
412 (uri (string-append "mirror://gnu/guile-opengl/guile-opengl-"
413 version ".tar.gz"))
414 (sha256
415 (base32
416 "13qfx4xh8baryxqrv986l848ygd0piqwm6s2s90pxk9c0m9vklim"))))
417 (build-system gnu-build-system)
418 (native-inputs `(("pkg-config" ,pkg-config)))
419 (inputs `(("guile" ,guile-2.0)
420 ("mesa" ,mesa)
421 ("glu" ,glu)
422 ("freeglut" ,freeglut)))
423 (arguments
424 '(#:phases (modify-phases %standard-phases
425 (add-after 'configure 'patch-makefile
426 (lambda _
427 ;; Install compiled Guile files in the expected place.
428 (substitute* '("Makefile")
429 (("^godir = .*$")
430 "godir = $(moddir)\n"))))
431 (add-before 'build 'patch-dynamic-link
432 (lambda* (#:key inputs outputs #:allow-other-keys)
433 (define (dynamic-link-substitute file lib input)
434 (substitute* file
435 (("dynamic-link \"lib([a-zA-Z]+)\"" _ lib)
436 (string-append "dynamic-link \""
437 (assoc-ref inputs input)
438 "/lib/lib" lib "\""))))
439 ;; Replace dynamic-link calls for libGL, libGLU, and
440 ;; libglut with absolute paths to the store.
441 (dynamic-link-substitute "glx/runtime.scm" "GL" "mesa")
442 (dynamic-link-substitute "glu/runtime.scm" "GLU" "glu")
443 (dynamic-link-substitute "glut/runtime.scm" "glut"
444 "freeglut"))))))
445 (home-page "https://gnu.org/s/guile-opengl")
446 (synopsis "Guile binding for the OpenGL graphics API")
447 (description
448 "Guile-OpenGL is a library for Guile that provides bindings to the
449 OpenGL graphics API.")
450 (license license:lgpl3+)))
451
452 (define-public libepoxy
453 (package
454 (name "libepoxy")
455 (version "1.3.1")
456 (source (origin
457 (method url-fetch)
458 (uri (string-append
459 "https://github.com/anholt/libepoxy/archive/v"
460 version
461 ".tar.gz"))
462 (file-name (string-append name "-" version ".tar.gz"))
463 (sha256
464 (base32
465 "1d1brhwfmlzgnphmdwlvn5wbcrxsdyzf1qfcf8nb89xqzznxs037"))))
466 (arguments
467 `(#:phases
468 (modify-phases %standard-phases
469 (add-after
470 'unpack 'autoreconf
471 (lambda _
472 (zero? (system* "autoreconf" "-vif"))))
473 (add-before
474 'configure 'patch-paths
475 (lambda* (#:key inputs #:allow-other-keys)
476 (let ((python (assoc-ref inputs "python"))
477 (mesa (assoc-ref inputs "mesa")))
478 (substitute* "src/gen_dispatch.py"
479 (("/usr/bin/env python") python))
480 (substitute* (find-files "." "\\.[ch]$")
481 (("libGL.so.1") (string-append mesa "/lib/libGL.so.1"))
482 (("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1")))
483
484 ;; XXX On armhf systems, we must add "GLIBC_2.4" to the list of
485 ;; versions in test/dlwrap.c:dlwrap_real_dlsym. It would be
486 ;; better to make this a normal patch, but for now we do it here
487 ;; to prevent rebuilding on other platforms.
488 ,@(if (string-prefix? "arm" (or (%current-target-system)
489 (%current-system)))
490 '((substitute* '"test/dlwrap.c"
491 (("\"GLIBC_2\\.0\"") "\"GLIBC_2.0\", \"GLIBC_2.4\"")))
492 '())
493 #t))))))
494 (build-system gnu-build-system)
495 (native-inputs
496 `(("autoconf" ,autoconf)
497 ("automake" ,automake)
498 ("libtool" ,libtool)
499 ("pkg-config" ,pkg-config)
500 ("python" ,python)))
501 (inputs
502 `(("mesa" ,mesa)))
503 (home-page "http://github.com/anholt/libepoxy/")
504 (synopsis "A library for handling OpenGL function pointer management")
505 (description
506 "A library for handling OpenGL function pointer management.")
507 (license license:x11)))
508
509 (define-public soil
510 (package
511 (name "soil")
512 (version "1.0.7")
513 (source (origin
514 (method url-fetch)
515 ;; No versioned archive available.
516 (uri "http://www.lonesock.net/files/soil.zip")
517 (sha256
518 (base32
519 "00gpwp9dldzhsdhksjvmbhsd2ialraqbv6v6dpikdmpncj6mnc52"))))
520 (build-system gnu-build-system)
521 (arguments
522 '(#:tests? #f ; no tests
523 #:phases (modify-phases %standard-phases
524 (delete 'configure)
525 (add-before 'build 'init-build
526 (lambda* (#:key outputs #:allow-other-keys)
527 (let ((out (assoc-ref outputs "out")))
528 (setenv "CFLAGS" "-fPIC") ; needed for shared library
529 ;; Use alternate Makefile
530 (copy-file "projects/makefile/alternate Makefile.txt"
531 "src/Makefile")
532 (chdir "src")
533 (substitute* '("Makefile")
534 (("INCLUDEDIR = /usr/include/SOIL")
535 (string-append "INCLUDEDIR = " out "/include/SOIL"))
536 (("LIBDIR = /usr/lib")
537 (string-append "LIBDIR = " out "/lib"))
538 ;; Remove these flags from 'install' commands.
539 (("-o root -g root") ""))))))))
540 (native-inputs
541 `(("unzip" ,unzip)))
542 (inputs
543 `(("mesa" ,mesa)))
544 (home-page "http://www.lonesock.net/soil.html")
545 (synopsis "OpenGL texture loading library")
546 (description
547 "SOIL is a tiny C library used primarily for uploading textures into
548 OpenGL.")
549 (license license:public-domain)))
550
551 (define-public glfw
552 (package
553 (name "glfw")
554 (version "3.2.1")
555 (source (origin
556 (method url-fetch)
557 (uri (string-append "https://github.com/glfw/glfw"
558 "/releases/download/" version
559 "/glfw-" version ".zip"))
560 (sha256
561 (base32
562 "09kk5yc1zhss9add8ryqrngrr16hdmc94rszgng135bhw09mxmdp"))))
563 (build-system cmake-build-system)
564 (arguments
565 '(#:tests? #f ; no test target
566 #:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
567 (native-inputs
568 `(("doxygen" ,doxygen)
569 ("unzip" ,unzip)))
570 (propagated-inputs
571 `(("mesa" ,mesa) ;included in public headers
572
573 ;; These are in 'Requires.private' of 'glfw3.pc'.
574 ("libx11" ,libx11)
575 ("libxrandr" ,libxrandr)
576 ("libxinerama" ,libxinerama)
577 ("libxcursor" ,libxcursor)
578 ("libxxf86vm" ,libxxf86vm)))
579 (home-page "http://www.glfw.org")
580 (synopsis "OpenGL application development library")
581 (description
582 "GLFW is a library for OpenGL, OpenGL ES and Vulkan development for
583 desktop computers. It provides a simple API for creating windows, contexts
584 and surfaces, receiving input and events.")
585 (license license:zlib)))
586
587 (define-public nanovg-for-extempore
588 (package
589 (name "nanovg-for-extempore")
590 (version "0.7.1")
591 (source (origin
592 (method url-fetch)
593 (uri (string-append "https://github.com/extemporelang/nanovg/"
594 "archive/" version ".tar.gz"))
595 (file-name (string-append name "-" version ".tar.gz"))
596 (sha256
597 (base32
598 "0ivs1sagq19xiw8jxd9f8w2b39svi0n9hrbmdvckwvqg95r8701g"))))
599 (build-system cmake-build-system)
600 (arguments `(#:tests? #f)) ; no tests included
601 (inputs
602 `(("mesa" ,mesa)))
603 ;; Extempore refuses to build on architectures other than x86_64
604 (supported-systems '("x86_64-linux"))
605 (home-page "https://github.com/extemporelang/nanovg")
606 (synopsis "2D vector drawing library on top of OpenGL")
607 (description "NanoVG is small antialiased vector graphics rendering
608 library for OpenGL. It has lean API modeled after HTML5 canvas API. It is
609 aimed to be a practical and fun toolset for building scalable user interfaces
610 and visualizations.")
611 (license license:zlib)))