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 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017 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 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>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages graphics)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages algebra)
33 #:use-module (gnu packages audio)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages bash)
36 #:use-module (gnu packages bison)
37 #:use-module (gnu packages boost)
38 #:use-module (gnu packages check)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages documentation)
41 #:use-module (gnu packages flex)
42 #:use-module (gnu packages fonts)
43 #:use-module (gnu packages fontutils)
44 #:use-module (gnu packages ghostscript)
45 #:use-module (gnu packages gl)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages graphviz)
49 #:use-module (gnu packages gtk)
50 #:use-module (gnu packages haskell)
51 #:use-module (gnu packages image)
52 #:use-module (gnu packages imagemagick)
53 #:use-module (gnu packages jemalloc)
54 #:use-module (gnu packages multiprecision)
55 #:use-module (gnu packages pdf)
56 #:use-module (gnu packages perl)
57 #:use-module (gnu packages photo)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages pth)
60 #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages python-xyz)
63 #:use-module (gnu packages qt)
64 #:use-module (gnu packages readline)
65 #:use-module (gnu packages sdl)
66 #:use-module (gnu packages swig)
67 #:use-module (gnu packages video)
68 #:use-module (gnu packages xml)
69 #:use-module (gnu packages xorg)
70 #:use-module (guix build-system cmake)
71 #:use-module (guix build-system gnu)
72 #:use-module (guix build-system python)
73 #:use-module (guix download)
74 #:use-module (guix git-download)
75 #:use-module ((guix licenses) #:prefix license:)
76 #:use-module (guix packages)
77 #:use-module (guix utils))
79 (define-public blender
81 (commit "3c3d80ea22af15e13237f978181a881b90c41e7c"))
84 (version (git-version "2.80-beta" revision commit))
88 (url "https://git.blender.org/blender.git")
90 (file-name (git-file-name name version))
93 "1hhn8pf3a5556mxyrb2ggsiy6q0h75hnkdpcgq9b6vg284jl2l4q"))))
94 (build-system cmake-build-system)
96 (let ((python-version (version-major+minor (package-version python))))
97 `(;; Test files are very large and not included in the release tarball.
100 (list "-DWITH_CODEC_FFMPEG=ON"
101 "-DWITH_CODEC_SNDFILE=ON"
103 "-DWITH_DOC_MANPAGE=ON"
105 "-DWITH_IMAGE_OPENJPEG=ON"
106 "-DWITH_INPUT_NDOF=ON"
107 "-DWITH_INSTALL_PORTABLE=OFF"
109 "-DWITH_MOD_OCEANSIM=ON"
110 "-DWITH_PYTHON_INSTALL=OFF"
111 (string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
112 (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
114 (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
115 "/include/python" ,python-version "m")
116 (string-append "-DPYTHON_VERSION=" ,python-version)
117 (string-append "-DPYTHON_NUMPY_PATH="
118 (assoc-ref %build-inputs "python-numpy")
119 "/lib/python" ,python-version "/site-packages/"))
121 (modify-phases %standard-phases
122 ;; XXX This file doesn't exist in the Git sources but will probably
123 ;; exist in the eventual 2.80 source tarball.
124 ; (add-after 'unpack 'fix-broken-import
126 ; (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
127 ; (("import encode_bin") "from . import encode_bin"))
129 (add-after 'set-paths 'add-ilmbase-include-path
130 (lambda* (#:key inputs #:allow-other-keys)
131 ;; OpenEXR propagates ilmbase, but its include files do not appear
132 ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
133 ;; the CPATH to satisfy the dependency on "half.h".
135 (string-append (assoc-ref inputs "ilmbase")
137 ":" (or (getenv "CPATH") "")))
141 ("jemalloc" ,jemalloc)
143 ("openimageio" ,openimageio)
146 ("openjpeg" ,openjpeg)
153 ("libsndfile" ,libsndfile)
154 ("freetype" ,freetype)
158 ("python-numpy" ,python-numpy)
160 (home-page "https://blender.org/")
161 (synopsis "3D graphics creation suite")
163 "Blender is a 3D graphics creation suite. It supports the entirety of
164 the 3D pipeline—modeling, rigging, animation, simulation, rendering,
165 compositing and motion tracking, even video editing and game creation. The
166 application can be customized via its API for Python scripting.
168 WARNING: This package offers a beta build of Blender, because the stable release
169 no longer works in Guix. See @uref{https://issues.guix.info/issue/33882}.")
170 (license license:gpl2+))))
172 (define-public assimp
179 (url "https://github.com/assimp/assimp.git")
180 (commit (string-append "v" version))))
181 (file-name (git-file-name name version))
184 "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
185 (build-system cmake-build-system)
188 (home-page "http://www.assimp.org/")
189 (synopsis "Asset import library")
191 "The Open Asset Import Library loads more than 40 3D file formats into
192 one unified data structure. Additionally, assimp features various mesh post
193 processing tools: normals and tangent space generation, triangulation, vertex
194 cache locality optimization, removal of degenerate primitives and duplicate
195 vertices, sorting by primitive type, merging of redundant materials and many
197 (license license:bsd-3)))
206 "https://github.com/CGAL/cgal/releases/download/releases/"
207 "CGAL-" version "/CGAL-" version ".tar.xz"))
210 "1c41yzl2jg3d6zx5k0iccwqwibp950q7dr7z7pp4xi9wlph3c87s"))))
211 (build-system cmake-build-system)
213 '(;; "RelWithDebInfo" is not supported.
214 #:build-type "Release"
222 (home-page "http://cgal.org/")
223 (synopsis "Computational geometry algorithms library")
225 "CGAL provides easy access to efficient and reliable geometric algorithms
226 in the form of a C++ library. CGAL is used in various areas needing geometric
227 computation, such as: computer graphics, scientific visualization, computer
228 aided design and modeling, geographic information systems, molecular biology,
229 medical imaging, robotics and motion planning, mesh generation, numerical
230 methods, etc. It provides data structures and algorithms such as
231 triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
234 ;; The 'LICENSE' file explains that a subset is available under more
235 ;; permissive licenses.
236 (license license:gpl3+)))
238 (define-public ilmbase
244 (uri (string-append "https://github.com/openexr/openexr/releases"
245 "/download/v" version "/ilmbase-"
249 "0qiq5bqq9rxhqjiym2k36sx4vq8adgrz6xf6qwizi9bqm78phsa5"))
250 (patches (search-patches "ilmbase-fix-tests.patch"))))
251 (build-system gnu-build-system)
252 (home-page "http://www.openexr.com/")
253 (synopsis "Utility C++ libraries for threads, maths, and exceptions")
255 "IlmBase provides several utility libraries for C++. Half is a class
256 that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
257 abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
258 quaternions and other useful 2D and 3D math functions. Iex is an
259 exception-handling library.")
260 (license license:bsd-3)))
269 (uri (string-append "https://github.com/OGRECave/" name
270 "/archive/v" version ".tar.gz"))
273 "13bdh9v4026qf8w8rbfln2rmwf0rby1a8fz55zpdvpy105i6cbpz"))
274 (file-name (string-append name "-" version ".tar.gz"))))
275 (build-system cmake-build-system)
278 (modify-phases %standard-phases
279 (add-before 'configure 'pre-configure
281 ;; It expects googletest source to be downloaded and
282 ;; be in a specific place.
283 (substitute* "Tests/CMakeLists.txt"
284 (("URL(.*)$" _ suffix)
285 (string-append "URL " suffix
287 "MD5=16877098823401d1bf2ed7891d7dce36\n")))
289 (add-before 'build 'pre-build
290 (lambda* (#:key inputs #:allow-other-keys)
291 (copy-file (assoc-ref inputs "googletest-source")
292 (string-append (getcwd)
293 "/Tests/googletest-prefix/src/"
294 "release-1.8.0.tar.gz"))
297 (list "-DOGRE_BUILD_TESTS=TRUE"
298 (string-append "-DCMAKE_INSTALL_RPATH="
299 (assoc-ref %outputs "out") "/lib:"
300 (assoc-ref %outputs "out") "/lib/OGRE:"
301 (assoc-ref %build-inputs "googletest") "/lib")
302 "-DOGRE_INSTALL_DOCS=TRUE"
303 "-DOGRE_INSTALL_SAMPLES=TRUE"
304 "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE")))
308 ("googletest-source" ,(package-source googletest))
309 ("pkg-config" ,pkg-config)))
311 `(("font-dejavu" ,font-dejavu)
312 ("freeimage" ,freeimage)
313 ("freetype" ,freetype)
315 ("googletest" ,googletest)
318 ("libxrandr" ,libxrandr)
320 ("zziplib" ,zziplib)))
321 (synopsis "Scene-oriented, flexible 3D engine written in C++")
323 "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
324 flexible 3D engine written in C++ designed to make it easier and more intuitive
325 for developers to produce applications utilising hardware-accelerated 3D
327 (home-page "http://www.ogre3d.org/")
328 (license license:expat)))
330 (define-public openexr
336 (uri (string-append "https://github.com/openexr/openexr/releases"
337 "/download/v" version "/openexr-"
341 "19jywbs9qjvsbkvlvzayzi81s976k53wg53vw4xj66lcgylb6v7x"))
342 (modules '((guix build utils)))
345 (substitute* (find-files "." "tmpDir\\.h")
349 (build-system gnu-build-system)
352 (modify-phases %standard-phases
353 (add-after 'unpack 'disable-broken-test
354 ;; This test fails on i686. Upstream developers suggest that
355 ;; this test is broken on i686 and can be safely disabled:
356 ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
358 (substitute* "IlmImfTest/main.cpp"
359 (("#include \"testOptimizedInterleavePatterns.h\"")
360 "//#include \"testOptimizedInterleavePatterns.h\"")
361 (("TEST \\(testOptimizedInterleavePatterns")
362 "//TEST (testOptimizedInterleavePatterns"))
365 `(("pkg-config" ,pkg-config)))
367 `(("ilmbase" ,ilmbase) ;used in public headers
368 ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
369 (home-page "http://www.openexr.com")
370 (synopsis "High-dynamic range file format library")
372 "OpenEXR is a high dynamic-range (HDR) image file format developed for
373 use in computer imaging applications. The IlmImf C++ libraries support
374 storage of the \"EXR\" file format for storing 16-bit floating-point images.")
375 (license license:bsd-3)))
377 (define-public openimageio
384 (url "https://github.com/OpenImageIO/oiio.git")
385 (commit (string-append "Release-" version))))
386 (file-name (git-file-name name version))
389 "0yxxy43l3lllw7maqg42dlkgqms2d4772sxzxk7kmxg4lnhsvndc"))))
390 (build-system cmake-build-system)
391 ;; FIXME: To run all tests successfully, test image sets from multiple
392 ;; third party sources have to be present. For details see
393 ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL
394 (arguments `(#:tests? #f))
396 `(("pkg-config" ,pkg-config)))
407 (synopsis "C++ library for reading and writing images")
409 "OpenImageIO is a library for reading and writing images, and a bunch of
410 related classes, utilities, and applications. There is a particular emphasis
411 on formats and functionality used in professional, large-scale animation and
412 visual effects work for film.")
413 (home-page "http://www.openimageio.org")
414 (license license:bsd-3)))
416 (define-public openscenegraph
418 (name "openscenegraph")
424 (url "https://github.com/openscenegraph/OpenSceneGraph")
425 (commit (string-append "OpenSceneGraph-" version))))
428 "0h32z15sa8sbq276j0iib0n707m8bs4p5ji9z2ah411446paad9q"))
429 (file-name (git-file-name name version))))
431 `((upstream-name . "OpenSceneGraph")))
432 (build-system cmake-build-system)
434 `(#:tests? #f ; no test target available
435 ;; Without this flag, 'rd' will be added to the name of the
436 ;; library binaries and break linking with other programs.
437 #:build-type "Release"
439 (list (string-append "-DCMAKE_INSTALL_RPATH="
440 (assoc-ref %outputs "out") "/lib:"
441 (assoc-ref %outputs "out") "/lib64"))))
443 `(("pkg-config" ,pkg-config)
449 ("libxrandr" ,libxrandr)
452 (synopsis "High performance real-time graphics toolkit")
454 "The OpenSceneGraph is a high performance 3D graphics toolkit
455 used by application developers in fields such as visual simulation, games,
456 virtual reality, scientific visualization and modeling.")
457 (home-page "http://www.openscenegraph.org")
458 ;; The 'LICENSE' file explains that the source is licensed under
459 ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
460 (license license:lgpl2.1)))
462 (define-public povray
469 (url "https://github.com/POV-Ray/povray")
470 (commit (string-append "v" version))))
471 (file-name (git-file-name name version))
474 "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
475 (modules '((guix build utils)))
478 ;; Delete bundled libraries.
479 (delete-file-recursively "libraries")
481 (build-system gnu-build-system)
483 `(("autoconf" ,autoconf)
484 ("automake" ,automake)
485 ("pkg-config" ,pkg-config)))
496 (list "COMPILED_BY=Guix"
497 (string-append "--with-boost-libdir="
498 (assoc-ref %build-inputs "boost") "/lib")
499 "CXXFLAGS=-std=c++11"
500 "--disable-optimiz-arch")
502 (modify-phases %standard-phases
503 (add-after 'unpack 'run-prebuild
505 (setenv "HOME" (getcwd))
506 (with-directory-excursion "unix"
507 (substitute* "prebuild.sh"
508 (("/bin/sh") (which "sh")))
509 (invoke "sh" "prebuild.sh"))
511 ;; The bootstrap script is run by the prebuild script in the
512 ;; "run-prebuild" phase.
513 (delete 'bootstrap))))
514 (synopsis "Tool for creating three-dimensional graphics")
516 "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
517 for producing high-quality computer graphics. @code{POV-Ray} creates
518 three-dimensional, photo-realistic images using a rendering technique called
519 ray-tracing. It reads in a text file containing information describing the
520 objects and lighting in a scene and generates an image of that scene from the
521 view point of a camera also described in the text file. Ray-tracing is not a
522 fast process by any means, but it produces very high quality images with
523 realistic reflections, shading, perspective and other effects.")
524 (home-page "http://www.povray.org/")
525 (license license:agpl3+)))
527 (define-public rapicorn
533 (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
534 "rapicorn-" version ".tar.xz"))
537 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
538 (patches (search-patches "rapicorn-isnan.patch"))))
539 (build-system gnu-build-system)
542 (modify-phases %standard-phases
543 (add-after 'unpack 'fix-tests
545 ;; Our grep does not support perl regular expressions.
546 (substitute* "taptool.sh"
547 (("grep -P") "grep -E"))
548 ;; Disable path tests because we cannot access /bin or /sbin.
549 (substitute* "rcore/tests/multitest.cc"
550 (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
552 (add-before 'check 'pre-check
554 ;; The test suite requires a running X server (with DISPLAY
555 ;; number 99 or higher).
556 (system "Xvfb :99 &")
557 (setenv "DISPLAY" ":99")
559 (add-after 'unpack 'replace-fhs-paths
561 (substitute* (cons "Makefile.decl"
562 (find-files "." "^Makefile\\.in$"))
563 (("/bin/ls") (which "ls"))
564 (("/usr/bin/env") (which "env")))
566 ;; These libraries are listed in the "Required" section of the pkg-config
569 `(("librsvg" ,librsvg)
573 ("python2-enum34" ,python2-enum34)))
575 `(("gdk-pixbuf" ,gdk-pixbuf)
576 ("libpng" ,libpng-1.2)
577 ("readline" ,readline)
578 ("libcroco" ,libcroco)
580 ("cython" ,python2-cython)))
582 `(("pandoc" ,ghc-pandoc)
586 ("graphviz" ,graphviz)
587 ("intltool" ,intltool)
588 ("pkg-config" ,pkg-config)
589 ("xvfb" ,xorg-server)))
590 (home-page "https://rapicorn.testbit.org/")
591 (synopsis "Toolkit for rapid development of user interfaces")
593 "Rapicorn is a toolkit for rapid development of user interfaces in C++
594 and Python. The user interface is designed in a declarative markup language
595 and is connected to the programming logic using data bindings and commands.")
596 (license license:mpl2.0)))
604 (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
608 "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
609 (build-system cmake-build-system)
610 (arguments '(#:tests? #f)) ;no 'test' target
612 ;; Headers include OpenEXR and IlmBase headers.
613 (propagated-inputs `(("openexr" ,openexr)))
615 (home-page "http://ampasctl.sourceforge.net")
616 (synopsis "Color Transformation Language")
618 "The Color Transformation Language, or CTL, is a small programming
619 language that was designed to serve as a building block for digital color
620 management systems. CTL allows users to describe color transforms in a
621 concise and unambiguous way by expressing them as programs. In order to apply
622 a given transform to an image, the color management system instructs a CTL
623 interpreter to load and run the CTL program that describes the transform. The
624 original and the transformed image constitute the CTL program's input and
627 ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
628 ;; and headers use different wording.
629 (license (license:non-copyleft "file://LICENSE"))))
631 (define-public brdf-explorer
632 ;; There are no release tarballs, and not even tags in the repo,
633 ;; so use the latest revision.
634 (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
637 (name "brdf-explorer")
638 (version (string-append "1.0.0-" revision "." (string-take commit 9)))
642 (url "https://github.com/wdas/brdf.git")
646 "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
647 (file-name (string-append name "-" version "-checkout"))))
648 (build-system gnu-build-system)
650 `(#:phases (modify-phases %standard-phases
652 (lambda* (#:key outputs #:allow-other-keys)
653 (let ((out (assoc-ref outputs "out")))
655 (string-append "prefix=" out)))))
656 (add-after 'install 'wrap-program
657 (lambda* (#:key outputs #:allow-other-keys)
658 (let* ((out (assoc-ref outputs "out"))
659 (bin (string-append out "/bin"))
662 (with-directory-excursion bin
663 (rename-file "brdf" ".brdf-real")
664 (call-with-output-file "brdf"
666 (format port "#!/bin/sh
667 # Run the thing from its home, otherwise it just bails out.
669 exec -a \"$0\" ~a/.brdf-real~%"
671 (chmod "brdf" #o555)))
674 `(("qttools" ,qttools))) ;for 'qmake'
679 ("freeglut" ,freeglut)
681 (home-page "http://www.disneyanimation.com/technology/brdf.html")
683 "Analyze bidirectional reflectance distribution functions (BRDFs)")
685 "BRDF Explorer is an application that allows the development and analysis
686 of bidirectional reflectance distribution functions (BRDFs). It can load and
687 plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
688 language), measured material data from the MERL database, and anisotropic
689 measured material data from MIT CSAIL. Graphs and visualizations update in
690 real time as parameters are changed, making it a useful tool for evaluating
691 and understanding different BRDFs (and other component functions).")
692 (license license:ms-pl))))
700 (uri (list (string-append
701 "ftp://ftp.fau.de/gentoo/distfiles/agg-"
704 "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
707 ;; Site was discontinued.
708 (string-append "http://www.antigrain.com/agg-"
711 (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
712 (patches (search-patches "agg-am_c_prototype.patch"))))
713 (build-system gnu-build-system)
716 (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
718 (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
720 "--disable-examples")
722 (modify-phases %standard-phases
725 ;; let's call configure from configure phase and not now
726 (substitute* "autogen.sh" (("./configure") "# ./configure"))
727 (invoke "sh" "autogen.sh"))))))
729 `(("pkg-config" ,pkg-config)
731 ("autoconf" ,autoconf)
732 ("automake" ,automake)))
735 ("freetype" ,freetype)
738 ;; Antigrain.com was discontinued.
739 (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
740 (synopsis "High-quality 2D graphics rendering engine for C++")
742 "Anti-Grain Geometry is a high quality rendering engine written in C++.
743 It supports sub-pixel resolutions and anti-aliasing. It is also library for
744 rendering SVG graphics.")
745 (license license:gpl2+)))
747 (define-public python-pastel
749 (name "python-pastel")
754 (uri (pypi-uri "pastel" version))
757 "1hqbm934n5yjwn31aq8h7shrr0rcy326wrqfc856vyn0gr0sy21i"))))
758 (build-system python-build-system)
760 `(("python-pytest" ,python-pytest)))
761 (home-page "https://github.com/sdispater/pastel")
762 (synopsis "Library to colorize strings in your terminal")
763 (description "Pastel is a simple library to help you colorize strings in
764 your terminal. It comes bundled with predefined styles:
767 @item comment: yellow
768 @item question: black on cyan
769 @item error: white on red
772 (license license:expat)))
774 (define-public python2-pastel
775 (package-with-python2 python-pastel))
777 (define-public fgallery
785 "http://www.thregr.org/~wavexx/software/fgallery/releases/"
786 "fgallery-" version ".zip"))
789 "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
790 (build-system gnu-build-system)
792 `(#:tests? #f ; no tests
794 (modify-phases %standard-phases
798 (lambda* (#:key inputs outputs #:allow-other-keys)
799 (let* ((out (assoc-ref outputs "out"))
800 (bin (string-append out "/bin/"))
801 (share (string-append out "/share/fgallery"))
802 (man (string-append out "/share/man/man1"))
803 (perl5lib (getenv "PERL5LIB"))
804 (script (string-append share "/fgallery")))
805 (define (bin-directory input-name)
806 (string-append (assoc-ref inputs input-name) "/bin"))
809 (copy-file "fgallery.1" (string-append man "/fgallery.1"))
812 (copy-recursively "." share)
814 ;; fgallery copies files from store when it is run. The
815 ;; read-only permissions from the store directories will cause
816 ;; fgallery to fail. Do not preserve file attributes when
817 ;; copying files to prevent it.
820 "'cp', '--no-preserve=all'"))
823 (symlink script (string-append out "/bin/fgallery"))
827 ,(map bin-directory '("imagemagick"
835 `("PERL5LIB" ":" prefix (,perl5lib)))
839 ;; TODO: Add missing optional dependency: facedetect.
841 `(("imagemagick" ,imagemagick)
847 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
848 ("perl-image-exiftool" ,perl-image-exiftool)
849 ("jpegoptim" ,jpegoptim)
850 ("pngcrush" ,pngcrush)
852 (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
853 (synopsis "Static photo gallery generator")
855 "FGallery is a static, JavaScript photo gallery generator with minimalist
856 look. The result can be uploaded on any web server without additional
858 (license license:gpl2+)))