1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org>
4 ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
8 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
9 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
10 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
12 ;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
13 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
14 ;;; Copyright © 2019 Mark H Weaver <mhw@netris.org>
15 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
16 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
17 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
18 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
19 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
21 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
22 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
23 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
25 ;;; This file is part of GNU Guix.
27 ;;; GNU Guix is free software; you can redistribute it and/or modify it
28 ;;; under the terms of the GNU General Public License as published by
29 ;;; the Free Software Foundation; either version 3 of the License, or (at
30 ;;; your option) any later version.
32 ;;; GNU Guix is distributed in the hope that it will be useful, but
33 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 ;;; GNU General Public License for more details.
37 ;;; You should have received a copy of the GNU General Public License
38 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40 (define-module (gnu packages graphics)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages algebra)
43 #:use-module (gnu packages audio)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages bison)
47 #:use-module (gnu packages boost)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages documentation)
51 #:use-module (gnu packages flex)
52 #:use-module (gnu packages fonts)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages ghostscript)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages graphviz)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages haskell-xyz)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages imagemagick)
63 #:use-module (gnu packages jemalloc)
64 #:use-module (gnu packages multiprecision)
65 #:use-module (gnu packages pdf)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages photo)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages pth)
70 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages python-xyz)
73 #:use-module (gnu packages qt)
74 #:use-module (gnu packages readline)
75 #:use-module (gnu packages sdl)
76 #:use-module (gnu packages swig)
77 #:use-module (gnu packages tbb)
78 #:use-module (gnu packages video)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg)
81 #:use-module (guix build-system cmake)
82 #:use-module (guix build-system gnu)
83 #:use-module (guix build-system python)
84 #:use-module (guix download)
85 #:use-module (guix git-download)
86 #:use-module (guix hg-download)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (guix packages)
89 #:use-module (guix utils))
99 (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
101 (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
102 (build-system gnu-build-system)
105 (modify-phases %standard-phases
106 (add-after 'unpack 'patch
108 (substitute* "configure"
109 (("-I/usr/include/freetype2")
112 (assoc-ref %build-inputs "freetype")
113 "/include/freetype2"))))
116 `(("doxygen" ,doxygen)))
119 ("freetype" ,freetype)
122 ("jpeg" ,libjpeg-turbo)
126 ("xcursor" ,libxcursor)
128 ("xfixes" ,libxfixes)
131 ("xrandr" ,libxrandr)
132 ("xrender" ,libxrender)
133 ("xshm" ,libxshmfence)
135 (synopsis "Widget Toolkit for building GUI")
136 (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
137 Graphical User Interfaces easily and effectively. It offers a wide, and
138 growing, collection of Controls, and provides state of the art facilities such
139 as drag and drop, selection, as well as OpenGL widgets for 3D graphical
140 manipulation. FOX also implements icons, images, and user-convenience features
141 such as status line help, and tooltips. Tooltips may even be used for 3D
143 (home-page "http://www.fox-toolkit.org")
144 (license license:lgpl2.1+)))
146 (define-public blender
152 (uri (string-append "https://download.blender.org/source/"
153 "blender-" version ".tar.xz"))
156 "18zbdgas6qf2kmvvlimxgnq7y9kj7hdxcgixrs6fj50x40q01q2d"))))
157 (build-system cmake-build-system)
159 (let ((python-version (version-major+minor (package-version python))))
160 `(;; Test files are very large and not included in the release tarball.
163 (list "-DWITH_CODEC_FFMPEG=ON"
164 "-DWITH_CODEC_SNDFILE=ON"
166 "-DWITH_DOC_MANPAGE=ON"
168 "-DWITH_IMAGE_OPENJPEG=ON"
169 "-DWITH_INPUT_NDOF=ON"
170 "-DWITH_INSTALL_PORTABLE=OFF"
172 "-DWITH_MOD_OCEANSIM=ON"
173 "-DWITH_OPENSUBDIV=ON"
174 "-DWITH_PYTHON_INSTALL=OFF"
175 (string-append "-DPYTHON_LIBRARY=python" ,python-version)
176 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
178 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
179 "/include/python" ,python-version)
180 (string-append "-DPYTHON_VERSION=" ,python-version)
181 (string-append "-DPYTHON_NUMPY_PATH="
182 (assoc-ref %build-inputs "python-numpy")
183 "/lib/python" ,python-version "/site-packages/"))
185 (modify-phases %standard-phases
186 ;; XXX This file doesn't exist in the Git sources but will probably
187 ;; exist in the eventual 2.80 source tarball.
188 (add-after 'unpack 'fix-broken-import
190 (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
191 (("import encode_bin") "from . import encode_bin"))
193 (add-after 'set-paths 'add-ilmbase-include-path
194 (lambda* (#:key inputs #:allow-other-keys)
195 ;; OpenEXR propagates ilmbase, but its include files do not appear
196 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
197 ;; the CPATH to satisfy the dependency on "half.h".
199 (string-append (assoc-ref inputs "ilmbase")
201 ":" (or (getenv "CPATH") "")))
205 ("jemalloc" ,jemalloc)
208 ("libxrender" ,libxrender)
209 ("openimageio" ,openimageio)
211 ("opensubdiv" ,opensubdiv)
213 ("openjpeg" ,openjpeg)
214 ("libjpeg" ,libjpeg-turbo)
220 ("libsndfile" ,libsndfile)
221 ("freetype" ,freetype)
225 ("python-numpy" ,python-numpy)
228 (home-page "https://blender.org/")
229 (synopsis "3D graphics creation suite")
231 "Blender is a 3D graphics creation suite. It supports the entirety of
232 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
233 compositing and motion tracking, even video editing and game creation. The
234 application can be customized via its API for Python scripting.")
235 (license license:gpl2+)))
237 (define-public assimp
244 (url "https://github.com/assimp/assimp.git")
245 (commit (string-append "v" version))))
246 (file-name (git-file-name name version))
249 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
250 (build-system cmake-build-system)
253 (home-page "http://www.assimp.org/")
254 (synopsis "Asset import library")
256 "The Open Asset Import Library loads more than 40 3D file formats into
257 one unified data structure. Additionally, assimp features various mesh post
258 processing tools: normals and tangent space generation, triangulation, vertex
259 cache locality optimization, removal of degenerate primitives and duplicate
260 vertices, sorting by primitive type, merging of redundant materials and many
262 (license license:bsd-3)))
271 "https://github.com/CGAL/cgal/releases/download/releases/"
272 "CGAL-" version "/CGAL-" version ".tar.xz"))
275 "08lrp3hfwdypggz4138bnkh6bjxn441zg2y9xnq5mrjfc5ini6w1"))))
276 (build-system cmake-build-system)
278 '(#:tests? #f)) ; no test target
283 (home-page "https://www.cgal.org/")
284 (synopsis "Computational geometry algorithms library")
286 "CGAL provides easy access to efficient and reliable geometric algorithms
287 in the form of a C++ library. CGAL is used in various areas needing geometric
288 computation, such as: computer graphics, scientific visualization, computer
289 aided design and modeling, geographic information systems, molecular biology,
290 medical imaging, robotics and motion planning, mesh generation, numerical
291 methods, etc. It provides data structures and algorithms such as
292 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
295 ;; The 'LICENSE' file explains that a subset is available under more
296 ;; permissive licenses.
297 (license license:gpl3+)))
299 (define-public ilmbase
306 (url "https://github.com/openexr/openexr")
307 (commit (string-append "v" version))))
308 (file-name (git-file-name "ilmbase" version))
311 "020gyl8zv83ag6gbcchmqiyx9rh2jca7j8n52zx1gk4rck7kwc01"))
312 (patches (search-patches "ilmbase-fix-tests.patch"
313 "ilmbase-openexr-pkg-config.patch"))))
314 (build-system cmake-build-system)
316 `(#:phases (modify-phases %standard-phases
317 (add-after 'unpack 'change-directory
321 (home-page "https://www.openexr.com/")
322 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
324 "IlmBase provides several utility libraries for C++. Half is a class
325 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
326 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
327 quaternions and other useful 2D and 3D math functions. Iex is an
328 exception-handling library.")
329 (license license:bsd-3)))
339 (url "https://github.com/OGRECave/ogre.git")
340 (commit (string-append "v" version))
341 (recursive? #t))) ;for Dear ImGui submodule
342 (file-name (git-file-name name version))
344 (base32 "1sx0jsw4kmb4ycf62bgx3ygwv8k1cgjx52y47d7dk07z6gk6wpyj"))))
345 (build-system cmake-build-system)
348 (modify-phases %standard-phases
349 (add-before 'configure 'pre-configure
350 ;; CMakeLists.txt forces CMAKE_INSTALL_RPATH value. As
351 ;; a consequence, we cannot suggest ours in configure flags. Fix
353 (lambda* (#:key inputs outputs #:allow-other-keys)
354 (substitute* "CMakeLists.txt"
355 (("set\\(CMAKE_INSTALL_RPATH .*") ""))
358 (let* ((out (assoc-ref %outputs "out"))
360 (string-join (list (string-append out "/lib")
361 (string-append out "/lib/OGRE"))
363 (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
364 "-DOGRE_BUILD_DEPENDENCIES=OFF"
365 "-DOGRE_BUILD_TESTS=TRUE"
366 "-DOGRE_INSTALL_DOCS=TRUE"
367 "-DOGRE_INSTALL_SAMPLES=TRUE"
368 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
372 ("googletest" ,googletest-1.8)
373 ("pkg-config" ,pkg-config)))
375 `(("font-dejavu" ,font-dejavu)
376 ("freeimage" ,freeimage)
377 ("freetype" ,freetype)
380 ("libxrandr" ,libxrandr)
384 ("zziplib" ,zziplib)))
385 (synopsis "Scene-oriented, flexible 3D engine written in C++")
387 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
388 flexible 3D engine written in C++ designed to make it easier and more intuitive
389 for developers to produce applications utilising hardware-accelerated 3D
391 (home-page "https://www.ogre3d.org/")
392 (license license:expat)))
394 (define-public openexr
397 (version (package-version ilmbase))
399 (inherit (package-source ilmbase))
400 (file-name (git-file-name "openexr" version))
401 (modules '((guix build utils)))
404 (substitute* (find-files "OpenEXR" "tmpDir\\.h")
408 (build-system cmake-build-system)
411 (modify-phases %standard-phases
412 (add-after 'unpack 'change-directory
416 (add-before 'check 'increase-test-timeout
418 ;; On armhf-linux, we need to override the CTest default
419 ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
420 (setenv "CTEST_TEST_TIMEOUT" "2000")
422 ,@(if (not (target-64bit?))
423 `((add-after 'change-directory 'disable-broken-test
424 ;; This test fails on i686. Upstream developers suggest that
425 ;; this test is broken on i686 and can be safely disabled:
426 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
428 (substitute* "IlmImfTest/main.cpp"
429 ((".*testOptimizedInterleavePatterns.*") "")
430 ;; This test is broken in 2.4.0 and will be fixed in a later
431 ;; release: <https://github.com/openexr/openexr/issues/571>.
432 ((".*testLargeDataWindowOffsets.*") ""))
436 `(("pkg-config" ,pkg-config)))
438 `(("ilmbase" ,ilmbase) ;used in public headers
439 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
440 (home-page "https://www.openexr.com/")
441 (synopsis "High-dynamic range file format library")
443 "OpenEXR is a high dynamic-range (HDR) image file format developed for
444 use in computer imaging applications. The IlmImf C++ libraries support
445 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
446 (license license:bsd-3)))
448 (define-public openimageio
455 (url "https://github.com/OpenImageIO/oiio.git")
456 (commit (string-append "Release-" version))))
457 (file-name (git-file-name name version))
460 "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2"))))
461 (build-system cmake-build-system)
462 ;; FIXME: To run all tests successfully, test image sets from multiple
463 ;; third party sources have to be present. For details see
464 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
468 `(("pkg-config" ,pkg-config)))
472 ("libjpeg" ,libjpeg-turbo)
479 (synopsis "C++ library for reading and writing images")
481 "OpenImageIO is a library for reading and writing images, and a bunch of
482 related classes, utilities, and applications. There is a particular emphasis
483 on formats and functionality used in professional, large-scale animation and
484 visual effects work for film.")
485 (home-page "https://www.openimageio.org")
486 (license license:bsd-3)))
488 ;; This older version of OpenImageIO is required for Blender 2.79.
489 (define-public openimageio-1.7
491 (inherit openimageio)
497 (url "https://github.com/OpenImageIO/oiio.git")
498 (commit (string-append "Release-" version))))
499 (file-name (git-file-name name version))
502 "0yxxy43l3lllw7maqg42dlkgqms2d4772sxzxk7kmxg4lnhsvndc"))))))
504 (define-public openscenegraph
506 (name "openscenegraph")
512 (url "https://github.com/openscenegraph/OpenSceneGraph")
513 (commit (string-append "OpenSceneGraph-" version))))
515 (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
516 (file-name (git-file-name name version))))
518 `((upstream-name . "OpenSceneGraph")))
519 (build-system cmake-build-system)
521 `(#:tests? #f ; no test target available
522 ;; Without this flag, 'rd' will be added to the name of the
523 ;; library binaries and break linking with other programs.
524 #:build-type "Release"
526 (list (string-append "-DCMAKE_INSTALL_RPATH="
527 (assoc-ref %outputs "out") "/lib:"
528 (assoc-ref %outputs "out") "/lib64"))))
530 `(("pkg-config" ,pkg-config)
534 ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
537 ("libxrandr" ,libxrandr)
540 (synopsis "High-performance real-time graphics toolkit")
542 "The OpenSceneGraph is a high-performance 3D graphics toolkit
543 used by application developers in fields such as visual simulation, games,
544 virtual reality, scientific visualization and modeling.")
545 (home-page "http://www.openscenegraph.org")
546 ;; The 'LICENSE' file explains that the source is licensed under
547 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
548 (license license:lgpl2.1)))
550 ;; We need this for simgear
551 (define-public openscenegraph-3.4
552 (package (inherit openscenegraph)
553 (name "openscenegraph")
559 (url "https://github.com/openscenegraph/OpenSceneGraph")
560 (commit (string-append "OpenSceneGraph-" version))))
561 (file-name (git-file-name name version))
564 "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
566 (substitute-keyword-arguments (package-arguments openscenegraph)
567 ((#:configure-flags flags)
569 ;; The jpeg plugin requires conversion between integers and booleans
570 "-DCMAKE_CXX_FLAGS=-fpermissive"
573 `(("libjpeg" ,libjpeg-turbo)
574 ,@(package-inputs openscenegraph)))))
577 (define-public openmw-openscenegraph
578 ;; OpenMW prefers its own fork of openscenegraph:
579 ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
580 (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
583 (inherit openscenegraph)
584 (version (git-version "3.6" "1" commit))
589 (url "https://github.com/OpenMW/osg/")
591 (file-name (git-file-name (package-name openscenegraph) version))
594 "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
596 (substitute-keyword-arguments (package-arguments openscenegraph)
597 ((#:configure-flags flags)
598 ;; As per the above wiki link, the following plugins are enough:
600 '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
601 "-DBUILD_OSG_PLUGIN_OSG=1"
602 "-DBUILD_OSG_PLUGIN_DDS=1"
603 "-DBUILD_OSG_PLUGIN_TGA=1"
604 "-DBUILD_OSG_PLUGIN_BMP=1"
605 "-DBUILD_OSG_PLUGIN_JPEG=1"
606 "-DBUILD_OSG_PLUGIN_PNG=1"
607 "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
608 ;; The jpeg plugin requires conversion between integers and booleans
609 "-DCMAKE_CXX_FLAGS=-fpermissive")
612 (define-public povray
619 (url "https://github.com/POV-Ray/povray")
620 (commit (string-append "v" version))))
621 (file-name (git-file-name name version))
624 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
625 (modules '((guix build utils)))
628 ;; Delete bundled libraries.
629 (delete-file-recursively "libraries")
631 (build-system gnu-build-system)
633 `(("autoconf" ,autoconf)
634 ("automake" ,automake)
635 ("pkg-config" ,pkg-config)))
638 ("libjpeg" ,libjpeg-turbo)
646 (list "COMPILED_BY=Guix"
647 (string-append "--with-boost-libdir="
648 (assoc-ref %build-inputs "boost") "/lib")
649 "--disable-optimiz-arch")
651 (modify-phases %standard-phases
652 (add-after 'unpack 'run-prebuild
654 (setenv "HOME" (getcwd))
655 (with-directory-excursion "unix"
656 (substitute* "prebuild.sh"
657 (("/bin/sh") (which "sh")))
658 (invoke "sh" "prebuild.sh"))
660 ;; The bootstrap script is run by the prebuild script in the
661 ;; "run-prebuild" phase.
662 (delete 'bootstrap))))
663 (synopsis "Tool for creating three-dimensional graphics")
665 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
666 for producing high-quality computer graphics. @code{POV-Ray} creates
667 three-dimensional, photo-realistic images using a rendering technique called
668 ray-tracing. It reads in a text file containing information describing the
669 objects and lighting in a scene and generates an image of that scene from the
670 view point of a camera also described in the text file. Ray-tracing is not a
671 fast process by any means, but it produces very high quality images with
672 realistic reflections, shading, perspective and other effects.")
673 (home-page "http://www.povray.org/")
674 (license license:agpl3+)))
676 (define-public rapicorn
682 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
683 "rapicorn-" version ".tar.xz"))
686 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
687 (patches (search-patches "rapicorn-isnan.patch"))))
688 (build-system gnu-build-system)
691 (modify-phases %standard-phases
692 (add-after 'unpack 'fix-tests
694 ;; Our grep does not support perl regular expressions.
695 (substitute* "taptool.sh"
696 (("grep -P") "grep -E"))
697 ;; Disable path tests because we cannot access /bin or /sbin.
698 (substitute* "rcore/tests/multitest.cc"
699 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
701 (add-before 'check 'pre-check
703 ;; The test suite requires a running X server (with DISPLAY
704 ;; number 99 or higher).
705 (system "Xvfb :99 &")
706 (setenv "DISPLAY" ":99")
708 (add-after 'unpack 'replace-fhs-paths
710 (substitute* (cons "Makefile.decl"
711 (find-files "." "^Makefile\\.in$"))
712 (("/bin/ls") (which "ls"))
713 (("/usr/bin/env") (which "env")))
715 ;; These libraries are listed in the "Required" section of the pkg-config
718 `(("librsvg" ,librsvg)
722 ("python2-enum34" ,python2-enum34)))
724 `(("gdk-pixbuf" ,gdk-pixbuf)
725 ("libpng" ,libpng-1.2)
726 ("readline" ,readline)
727 ("libcroco" ,libcroco)
729 ("cython" ,python2-cython)))
731 `(("pandoc" ,ghc-pandoc)
735 ("graphviz" ,graphviz)
736 ("intltool" ,intltool)
737 ("pkg-config" ,pkg-config)
738 ("xvfb" ,xorg-server-for-tests)))
739 (home-page "https://rapicorn.testbit.org/")
740 (synopsis "Toolkit for rapid development of user interfaces")
742 "Rapicorn is a toolkit for rapid development of user interfaces in C++
743 and Python. The user interface is designed in a declarative markup language
744 and is connected to the programming logic using data bindings and commands.")
745 (license license:mpl2.0)))
753 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
757 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
758 (build-system cmake-build-system)
759 (arguments '(#:tests? #f)) ;no 'test' target
761 ;; Headers include OpenEXR and IlmBase headers.
762 (propagated-inputs `(("openexr" ,openexr)))
764 (home-page "http://ampasctl.sourceforge.net")
765 (synopsis "Color Transformation Language")
767 "The Color Transformation Language, or CTL, is a small programming
768 language that was designed to serve as a building block for digital color
769 management systems. CTL allows users to describe color transforms in a
770 concise and unambiguous way by expressing them as programs. In order to apply
771 a given transform to an image, the color management system instructs a CTL
772 interpreter to load and run the CTL program that describes the transform. The
773 original and the transformed image constitute the CTL program's input and
776 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
777 ;; and headers use different wording.
778 (license (license:non-copyleft "file://LICENSE"))))
780 (define-public brdf-explorer
781 ;; There are no release tarballs, and not even tags in the repo,
782 ;; so use the latest revision.
783 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
786 (name "brdf-explorer")
787 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
791 (url "https://github.com/wdas/brdf.git")
795 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
796 (file-name (string-append name "-" version "-checkout"))))
797 (build-system gnu-build-system)
799 `(#:phases (modify-phases %standard-phases
801 (lambda* (#:key outputs #:allow-other-keys)
802 (let ((out (assoc-ref outputs "out")))
804 (string-append "prefix=" out)))))
805 (add-after 'install 'wrap-program
806 (lambda* (#:key outputs #:allow-other-keys)
807 (let* ((out (assoc-ref outputs "out"))
808 (bin (string-append out "/bin"))
811 (with-directory-excursion bin
812 (rename-file "brdf" ".brdf-real")
813 (call-with-output-file "brdf"
815 (format port "#!/bin/sh
816 # Run the thing from its home, otherwise it just bails out.
818 exec -a \"$0\" ~a/.brdf-real~%"
820 (chmod "brdf" #o555)))
823 `(("qttools" ,qttools))) ;for 'qmake'
828 ("freeglut" ,freeglut)
830 (home-page "https://www.disneyanimation.com/technology/brdf.html")
832 "Analyze bidirectional reflectance distribution functions (BRDFs)")
834 "BRDF Explorer is an application that allows the development and analysis
835 of bidirectional reflectance distribution functions (BRDFs). It can load and
836 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
837 language), measured material data from the MERL database, and anisotropic
838 measured material data from MIT CSAIL. Graphs and visualizations update in
839 real time as parameters are changed, making it a useful tool for evaluating
840 and understanding different BRDFs (and other component functions).")
841 (license license:ms-pl))))
849 (uri (list (string-append
850 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
853 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
856 ;; Site was discontinued.
857 (string-append "http://www.antigrain.com/agg-"
860 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
861 (patches (search-patches "agg-am_c_prototype.patch"))))
862 (build-system gnu-build-system)
865 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
867 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
869 "--disable-examples")
871 (modify-phases %standard-phases
874 ;; let's call configure from configure phase and not now
875 (substitute* "autogen.sh" (("./configure") "# ./configure"))
876 (invoke "sh" "autogen.sh"))))))
878 `(("pkg-config" ,pkg-config)
880 ("autoconf" ,autoconf)
881 ("automake" ,automake)))
884 ("freetype" ,freetype)
887 ;; Antigrain.com was discontinued.
888 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
889 (synopsis "High-quality 2D graphics rendering engine for C++")
891 "Anti-Grain Geometry is a high quality rendering engine written in C++.
892 It supports sub-pixel resolutions and anti-aliasing. It is also library for
893 rendering SVG graphics.")
894 (license license:gpl2+)))
896 (define-public python-pastel
898 (name "python-pastel")
903 (uri (pypi-uri "pastel" version))
906 "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
907 (build-system python-build-system)
909 `(#:phases (modify-phases %standard-phases
911 (lambda _ (invoke "pytest" "pastel" "tests/"))))))
913 `(("python-pytest" ,python-pytest)))
914 (home-page "https://github.com/sdispater/pastel")
915 (synopsis "Library to colorize strings in your terminal")
916 (description "Pastel is a simple library to help you colorize strings in
918 (license license:expat)))
920 (define-public python2-pastel
921 (package-with-python2 python-pastel))
923 (define-public fgallery
931 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
932 "fgallery-" version ".zip"))
935 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
936 (build-system gnu-build-system)
938 `(#:tests? #f ; no tests
940 (modify-phases %standard-phases
944 (lambda* (#:key inputs outputs #:allow-other-keys)
945 (let* ((out (assoc-ref outputs "out"))
946 (bin (string-append out "/bin/"))
947 (share (string-append out "/share/fgallery"))
948 (man (string-append out "/share/man/man1"))
949 (perl5lib (getenv "PERL5LIB"))
950 (script (string-append share "/fgallery")))
951 (define (bin-directory input-name)
952 (string-append (assoc-ref inputs input-name) "/bin"))
955 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
958 (copy-recursively "." share)
960 ;; fgallery copies files from store when it is run. The
961 ;; read-only permissions from the store directories will cause
962 ;; fgallery to fail. Do not preserve file attributes when
963 ;; copying files to prevent it.
966 "'cp', '--no-preserve=all'"))
969 (symlink script (string-append out "/bin/fgallery"))
973 ,(map bin-directory '("imagemagick"
981 `("PERL5LIB" ":" prefix (,perl5lib)))
985 ;; TODO: Add missing optional dependency: facedetect.
987 `(("imagemagick" ,imagemagick)
990 ("libjpeg" ,libjpeg-turbo)
993 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
994 ("perl-image-exiftool" ,perl-image-exiftool)
995 ("jpegoptim" ,jpegoptim)
996 ("pngcrush" ,pngcrush)
998 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
999 (synopsis "Static photo gallery generator")
1001 "FGallery is a static, JavaScript photo gallery generator with minimalist
1002 look. The result can be uploaded on any web server without additional
1004 (license license:gpl2+)))
1006 (define-public opensubdiv
1013 (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
1014 (commit (string-append "v" (string-join (string-split version #\.)
1016 (file-name (git-file-name name version))
1019 "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
1020 (build-system cmake-build-system)
1022 `(#:phases (modify-phases %standard-phases
1023 (add-before 'configure 'set-glew-location
1024 (lambda* (#:key inputs #:allow-other-keys)
1025 (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
1027 (add-before 'check 'start-xorg-server
1028 (lambda* (#:key inputs #:allow-other-keys)
1029 ;; The test suite requires a running X server.
1030 (system (string-append (assoc-ref inputs "xorg-server")
1032 (setenv "DISPLAY" ":1")
1035 `(("xorg-server" ,xorg-server-for-tests)))
1038 ("libxrandr" ,libxrandr)
1039 ("libxcursor" ,libxcursor)
1040 ("libxinerama" ,libxinerama)
1044 (home-page "https://graphics.pixar.com/opensubdiv/")
1045 (synopsis "High performance subdivision surface evaluation")
1046 (description "OpenSubdiv is a set of libraries that implement high
1047 performance subdivision surface (subdiv) evaluation on massively parallel CPU
1048 and GPU architectures.")
1049 (license license:asl2.0)))
1051 (define-public opencsg
1052 (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
1060 (url "https://github.com/floriankirsch/OpenCSG.git")
1061 (commit (string-append "opencsg-"
1062 (string-map dot-to-dash version)
1064 (file-name (git-file-name name version))
1067 "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
1068 (build-system gnu-build-system)
1071 (modify-phases %standard-phases
1073 (lambda* (#:key outputs #:allow-other-keys)
1074 (substitute* "src/Makefile"
1075 (("/usr/local") (assoc-ref outputs "out")))
1077 (add-before 'build 'skip-example
1078 (lambda _ (chdir "src") #t)))))
1081 ("freeglut" ,freeglut)))
1082 (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
1084 "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
1085 OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
1086 For example, two shapes can be combined by uniting them, by intersecting them,
1087 or by subtracting one shape from the other.")
1088 (home-page "http://www.opencsg.org/")
1089 (license license:gpl2))))
1091 (define-public coin3D
1092 ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
1093 ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
1095 (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
1099 (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
1104 (url "https://bitbucket.org/Coin3D/coin")
1105 (changeset changeset)))
1106 (file-name (git-file-name name version))
1108 (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
1109 (modules '((guix build utils)))
1112 (for-each delete-file
1114 "cfg/wrapmsvc.exe"))
1116 (build-system cmake-build-system)
1118 `(("doxygen" ,doxygen)
1119 ("graphviz" ,graphviz)))
1122 ("freeglut" ,freeglut)
1127 "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
1128 (string-append "-DBOOST_ROOT="
1129 (assoc-ref %build-inputs "boost")))))
1130 (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
1132 "High-level 3D visualization library with Open Inventor 2.1 API")
1134 "Coin is a 3D graphics library with an Application Programming Interface
1135 based on the Open Inventor 2.1 API. For those who are not familiar with
1136 Open Inventor, it is a scene-graph based retain-mode rendering and model
1137 interaction library, written in C++, which has become the de facto
1138 standard graphics library for 3D visualization and visual simulation
1139 software in the scientific and engineering community.")
1140 (license license:bsd-3))))
1142 (define-public superfamiconv
1144 (name "superfamiconv")
1150 (url "https://github.com/Optiroc/SuperFamiconv")
1151 (commit (string-append "v" version))))
1152 (file-name (git-file-name name version))
1155 "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
1156 (build-system gnu-build-system)
1158 `(#:tests? #f ; no tests
1160 (modify-phases %standard-phases
1163 (lambda* (#:key outputs #:allow-other-keys)
1164 (let* ((outdir (assoc-ref outputs "out"))
1165 (bindir (string-append outdir "/bin")))
1166 (install-file "bin/superfamiconv" bindir)
1168 (home-page "https://github.com/Optiroc/SuperFamiconv")
1169 (synopsis "Tile graphics converter supporting SNES, Game Boy Color
1170 and PC Engine formats")
1171 (description "SuperFamiconv is a converter for tiled graphics, supporting
1172 the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
1173 Automated palette selection is supported.")
1174 (license license:expat)))