graphics.scm 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015, 2016, 2021 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, 2021 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–2021 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, 2020 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, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  23. ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
  24. ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  25. ;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
  26. ;;; Copyright © 2021 Antoine Côté <antoine.cote@posteo.net>
  27. ;;; Copyright © 2021 Andy Tai <atai@atai.org>
  28. ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
  29. ;;;
  30. ;;; This file is part of GNU Guix.
  31. ;;;
  32. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  33. ;;; under the terms of the GNU General Public License as published by
  34. ;;; the Free Software Foundation; either version 3 of the License, or (at
  35. ;;; your option) any later version.
  36. ;;;
  37. ;;; GNU Guix is distributed in the hope that it will be useful, but
  38. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  39. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  40. ;;; GNU General Public License for more details.
  41. ;;;
  42. ;;; You should have received a copy of the GNU General Public License
  43. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  44. (define-module (gnu packages graphics)
  45. #:use-module (gnu packages)
  46. #:use-module (gnu packages algebra)
  47. #:use-module (gnu packages audio)
  48. #:use-module (gnu packages autotools)
  49. #:use-module (gnu packages base)
  50. #:use-module (gnu packages bash)
  51. #:use-module (gnu packages bison)
  52. #:use-module (gnu packages boost)
  53. #:use-module (gnu packages cdrom)
  54. #:use-module (gnu packages check)
  55. #:use-module (gnu packages compression)
  56. #:use-module (gnu packages crypto)
  57. #:use-module (gnu packages datastructures)
  58. #:use-module (gnu packages documentation)
  59. #:use-module (gnu packages flex)
  60. #:use-module (gnu packages fonts)
  61. #:use-module (gnu packages fontutils)
  62. #:use-module (gnu packages freedesktop)
  63. #:use-module (gnu packages gettext)
  64. #:use-module (gnu packages ghostscript)
  65. #:use-module (gnu packages gl)
  66. #:use-module (gnu packages glib)
  67. #:use-module (gnu packages gnome)
  68. #:use-module (gnu packages gnunet)
  69. #:use-module (gnu packages graphviz)
  70. #:use-module (gnu packages gstreamer)
  71. #:use-module (gnu packages gtk)
  72. #:use-module (gnu packages haskell-xyz)
  73. #:use-module (gnu packages image)
  74. #:use-module (gnu packages image-processing)
  75. #:use-module (gnu packages imagemagick)
  76. #:use-module (gnu packages jemalloc)
  77. #:use-module (gnu packages kde-frameworks)
  78. #:use-module (gnu packages libusb)
  79. #:use-module (gnu packages linux)
  80. #:use-module (gnu packages lua)
  81. #:use-module (gnu packages maths)
  82. #:use-module (gnu packages mp3)
  83. #:use-module (gnu packages multiprecision)
  84. #:use-module (gnu packages pdf)
  85. #:use-module (gnu packages perl)
  86. #:use-module (gnu packages photo)
  87. #:use-module (gnu packages pkg-config)
  88. #:use-module (gnu packages plotutils)
  89. #:use-module (gnu packages pretty-print)
  90. #:use-module (gnu packages pth)
  91. #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
  92. #:use-module (gnu packages python)
  93. #:use-module (gnu packages python-xyz)
  94. #:use-module (gnu packages qt)
  95. #:use-module (gnu packages readline)
  96. #:use-module (gnu packages sdl)
  97. #:use-module (gnu packages stb)
  98. #:use-module (gnu packages swig)
  99. #:use-module (gnu packages tbb)
  100. #:use-module (gnu packages upnp)
  101. #:use-module (gnu packages video)
  102. #:use-module (gnu packages vulkan)
  103. #:use-module (gnu packages xiph)
  104. #:use-module (gnu packages xml)
  105. #:use-module (gnu packages xorg)
  106. #:use-module (gnu packages xdisorg)
  107. #:use-module (guix build-system copy)
  108. #:use-module (guix build-system cmake)
  109. #:use-module (guix build-system gnu)
  110. #:use-module (guix build-system meson)
  111. #:use-module (guix build-system python)
  112. #:use-module (guix build-system qt)
  113. #:use-module (guix download)
  114. #:use-module (guix git-download)
  115. #:use-module (guix hg-download)
  116. #:use-module ((guix licenses) #:prefix license:)
  117. #:use-module (guix packages)
  118. #:use-module (guix utils))
  119. (define-public eglexternalplatform
  120. (package
  121. (name "eglexternalplatform")
  122. (version "1.1")
  123. (source
  124. (origin
  125. (method git-fetch)
  126. (uri
  127. (git-reference
  128. (url "https://github.com/NVIDIA/eglexternalplatform")
  129. (commit version)))
  130. (file-name
  131. (git-file-name name version))
  132. (sha256
  133. (base32 "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"))))
  134. (build-system copy-build-system)
  135. (arguments
  136. `(#:phases
  137. (modify-phases %standard-phases
  138. (add-after 'unpack 'patch-pkgconfig
  139. (lambda* (#:key outputs #:allow-other-keys)
  140. (substitute* "eglexternalplatform.pc"
  141. (("/usr")
  142. (assoc-ref outputs "out")))
  143. #t))
  144. (add-after 'install 'revise
  145. (lambda* (#:key outputs #:allow-other-keys)
  146. (let* ((out (assoc-ref outputs "out")))
  147. (mkdir-p (string-append out "/include/EGL"))
  148. (rename-file
  149. (string-append out "/interface")
  150. (string-append out "/include/EGL"))
  151. (mkdir-p (string-append out "/share/pkgconfig"))
  152. (rename-file
  153. (string-append out "/eglexternalplatform.pc")
  154. (string-append out "/share/pkgconfig/eglexternalplatform.pc"))
  155. (for-each delete-file-recursively
  156. (list
  157. (string-append out "/samples")
  158. (string-append out "/COPYING")
  159. (string-append out "/README.md"))))
  160. #t)))))
  161. (synopsis "EGL External Platform interface")
  162. (description "EGLExternalPlatform is an specification of the EGL External
  163. Platform interface for writing EGL platforms and their interactions with modern
  164. window systems on top of existing low-level EGL platform implementations. This
  165. keeps window system implementation specifics out of EGL drivers by using
  166. application-facing EGL functions.")
  167. (home-page "https://github.com/NVIDIA/eglexternalplatform")
  168. (license license:expat)))
  169. (define-public egl-wayland
  170. (package
  171. (name "egl-wayland")
  172. (version "1.1.7")
  173. (source
  174. (origin
  175. (method git-fetch)
  176. (uri (git-reference
  177. (url "https://github.com/NVIDIA/egl-wayland")
  178. (commit version)))
  179. (file-name (git-file-name name version))
  180. (sha256
  181. (base32 "0xcx1132zwyp4qps074m72ngjlfmysi1jc2d0lp1ml1r9bllkam6"))))
  182. (build-system meson-build-system)
  183. (native-inputs
  184. `(("pkg-config" ,pkg-config)))
  185. (inputs
  186. `(("mesa" ,mesa)
  187. ("wayland" ,wayland)))
  188. (propagated-inputs
  189. `(("eglexternalplatform" ,eglexternalplatform)))
  190. (synopsis "EGLStream-based Wayland external platform")
  191. (description "EGL-Wayland is an implementation of a EGL External Platform
  192. library to add client-side Wayland support to EGL on top of EGLDevice and
  193. EGLStream families of extensions.")
  194. (home-page "https://github.com/NVIDIA/egl-wayland")
  195. (license license:expat)))
  196. (define-public mmm
  197. (package
  198. (name "mmm")
  199. (version "0.1.1")
  200. (source
  201. (origin
  202. (method git-fetch)
  203. (uri
  204. (git-reference
  205. (url "https://github.com/hodefoting/mmm")
  206. (commit version)))
  207. (file-name
  208. (git-file-name name version))
  209. (sha256
  210. (base32 "1xmcv6rwinqsbr863rgl9005h2jlmd7k2qrwsc1h4fb8r61ykpjl"))))
  211. (build-system meson-build-system)
  212. (native-inputs
  213. `(("luajit" ,luajit)
  214. ("pkg-config" ,pkg-config)))
  215. (inputs
  216. `(("alsa" ,alsa-lib)
  217. ("sdl" ,sdl)
  218. ("sdl2" ,sdl2)))
  219. (synopsis "Memory Mapped Machine")
  220. (description "MMM is a shared memory protocol for virtualising access to
  221. framebuffer graphics, audio output and input event.")
  222. (home-page "https://github.com/hodefoting/mrg")
  223. (license license:isc)))
  224. (define-public directfb
  225. (package
  226. (name "directfb")
  227. (version "1.7.7")
  228. (source
  229. (origin
  230. (method git-fetch)
  231. (uri
  232. (git-reference
  233. (url "https://github.com/deniskropp/DirectFB")
  234. (commit "DIRECTFB_1_7_7")))
  235. (file-name (git-file-name name version))
  236. (sha256
  237. (base32 "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"))))
  238. (build-system gnu-build-system)
  239. (arguments
  240. `(#:phases
  241. (modify-phases %standard-phases
  242. (add-after 'unpack 'disable-configure-during-bootstrap
  243. (lambda _
  244. (substitute* "autogen.sh"
  245. (("^.*\\$srcdir/configure.*") ""))
  246. #t)))))
  247. (native-inputs
  248. `(("autoconf" ,autoconf)
  249. ("automake" ,automake)
  250. ("libtool" ,libtool)
  251. ("perl" ,perl)
  252. ("pkg-config" ,pkg-config)))
  253. (inputs
  254. `(("alsa" ,alsa-lib)
  255. ("ffmpeg" ,ffmpeg)
  256. ("freetype" ,freetype)
  257. ("glu" ,glu)
  258. ("gstreamer" ,gstreamer)
  259. ("imlib2" ,imlib2)
  260. ("jasper" ,jasper)
  261. ("jpeg" ,libjpeg-turbo)
  262. ("libcddb" ,libcddb)
  263. ("libdrm" ,libdrm)
  264. ("libtimidity" ,libtimidity)
  265. ("linux-headers" ,linux-libre-headers)
  266. ("mad" ,libmad)
  267. ("mng" ,libmng)
  268. ("mpeg2" ,libmpeg2)
  269. ("mpeg3" ,libmpeg3)
  270. ("opengl" ,mesa)
  271. ("png" ,libpng)
  272. ("sdl" ,sdl)
  273. ("svg" ,librsvg)
  274. ("tiff" ,libtiff)
  275. ("tslib" ,tslib)
  276. ("vdpau" ,libvdpau)
  277. ("vorbisfile" ,libvorbis)
  278. ("wayland" ,wayland)
  279. ("webp" ,libwebp)
  280. ("x11" ,libx11)
  281. ("xcomposite" ,libxcomposite)
  282. ("xext" ,libxext)
  283. ("xproto" ,xorgproto)
  284. ("zlib" ,zlib)))
  285. (propagated-inputs
  286. `(("flux" ,flux)))
  287. (synopsis "DFB Graphics Library")
  288. (description "DirectFB is a graphics library which was designed with embedded
  289. systems in mind. It offers maximum hardware accelerated performance at a
  290. minimum of resource usage and overhead.")
  291. (home-page "https://github.com/deniskropp/DirectFB")
  292. (license license:lgpl2.1+)))
  293. (define-public flux
  294. (package
  295. (name "flux")
  296. (version "1.4.4")
  297. (source
  298. (origin
  299. (method git-fetch)
  300. (uri
  301. (git-reference
  302. (url "https://github.com/deniskropp/flux")
  303. (commit "e45758a")))
  304. (file-name (git-file-name name version))
  305. (sha256
  306. (base32 "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410"))))
  307. (build-system gnu-build-system)
  308. (native-inputs
  309. `(("autoconf" ,autoconf)
  310. ("automake" ,automake)
  311. ("libtool" ,libtool)
  312. ("pkg-config" ,pkg-config)))
  313. (synopsis "Interface description language")
  314. (description "Flux is an interface description language used by DirectFB.
  315. Fluxcomp compiles .flux files to .cpp or .c files.")
  316. (home-page "https://www.directfb.org/")
  317. (license license:lgpl2.1+))) ; Same as DirectFB
  318. (define-public fox
  319. (package
  320. (name "fox")
  321. (version "1.6.57")
  322. (source
  323. (origin
  324. (method url-fetch)
  325. (uri
  326. (string-append "https://fox-toolkit.org/ftp/fox-" version ".tar.gz"))
  327. (sha256
  328. (base32 "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5"))))
  329. (build-system gnu-build-system)
  330. (arguments
  331. `(#:phases
  332. (modify-phases %standard-phases
  333. (add-after 'unpack 'patch
  334. (lambda _
  335. (substitute* "configure"
  336. (("-I/usr/include/freetype2")
  337. (string-append "-I"
  338. (string-append
  339. (assoc-ref %build-inputs "freetype")
  340. "/include/freetype2"))))
  341. #t)))))
  342. (native-inputs
  343. `(("doxygen" ,doxygen)))
  344. (inputs
  345. `(("bzip2" ,lbzip2)
  346. ("freetype" ,freetype)
  347. ("gl" ,mesa)
  348. ("glu" ,glu)
  349. ("jpeg" ,libjpeg-turbo)
  350. ("png" ,libpng)
  351. ("tiff" ,libtiff)
  352. ("x11" ,libx11)
  353. ("xcursor" ,libxcursor)
  354. ("xext" ,libxext)
  355. ("xfixes" ,libxfixes)
  356. ("xft" ,libxft)
  357. ("xinput" ,libxi)
  358. ("xrandr" ,libxrandr)
  359. ("xrender" ,libxrender)
  360. ("xshm" ,libxshmfence)
  361. ("zlib" ,zlib)))
  362. (synopsis "Widget Toolkit for building GUI")
  363. (description"FOX (Free Objects for X) is a C++ based Toolkit for developing
  364. Graphical User Interfaces easily and effectively. It offers a wide, and
  365. growing, collection of Controls, and provides state of the art facilities such
  366. as drag and drop, selection, as well as OpenGL widgets for 3D graphical
  367. manipulation. FOX also implements icons, images, and user-convenience features
  368. such as status line help, and tooltips. Tooltips may even be used for 3D
  369. objects!")
  370. (home-page "http://www.fox-toolkit.org")
  371. (license license:lgpl2.1+)))
  372. (define-public autotrace
  373. (let ((commit "travis-20190624.59")
  374. (version-base "0.40.0"))
  375. (package
  376. (name "autotrace")
  377. (version (string-append version-base "-"
  378. (if (string-prefix? "travis-" commit)
  379. (string-drop commit 7)
  380. commit)))
  381. (source (origin
  382. (method git-fetch)
  383. (uri (git-reference
  384. (url "https://github.com/autotrace/autotrace")
  385. (commit commit)))
  386. (file-name (git-file-name name version))
  387. (patches (search-patches "autotrace-glib-compat.patch"))
  388. (sha256
  389. (base32
  390. "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
  391. (build-system gnu-build-system)
  392. (arguments
  393. `(#:phases (modify-phases %standard-phases
  394. ;; See: https://github.com/autotrace/autotrace/issues/27.
  395. (add-after 'unpack 'include-spline.h-header
  396. (lambda _
  397. (substitute* "Makefile.am"
  398. ((".*src/types.h.*" all)
  399. (string-append all "\t\tsrc/spline.h \\\n")))
  400. #t))
  401. ;; See: https://github.com/autotrace/autotrace/issues/26.
  402. (replace 'check
  403. (lambda _
  404. (invoke "sh" "tests/runtests.sh"))))))
  405. (native-inputs
  406. `(("which" ,which)
  407. ("pkg-config" ,pkg-config)
  408. ("autoconf" ,autoconf)
  409. ("automake" ,automake)
  410. ("intltool" ,intltool)
  411. ("libtool" ,libtool)
  412. ("gettext" ,gettext-minimal)))
  413. (inputs
  414. `(("glib" ,glib)
  415. ("libjpeg" ,libjpeg-turbo)
  416. ("libpng" ,libpng)
  417. ("imagemagick" ,imagemagick)
  418. ("pstoedit" ,pstoedit)))
  419. (home-page "https://github.com/autotrace/autotrace")
  420. (synopsis "Bitmap to vector graphics converter")
  421. (description "AutoTrace is a utility for converting bitmap into vector
  422. graphics. It can trace outlines and midlines, effect color reduction or
  423. despeckling and has support for many input and output formats. It can be used
  424. with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
  425. (license (list license:gpl2+ ;for the utility itself
  426. license:lgpl2.1+))))) ;for use as a library
  427. (define-public embree
  428. (package
  429. (name "embree")
  430. (version "3.12.1")
  431. (source (origin
  432. (method git-fetch)
  433. (uri (git-reference
  434. (url "https://github.com/embree/embree")
  435. (commit (string-append "v" version))))
  436. (file-name (git-file-name name version))
  437. (sha256
  438. (base32
  439. "0aznd16n7h8g3f6jcahzfp1dq4r7wayqvn03wsaskiq2dvsi4srd"))))
  440. (build-system cmake-build-system)
  441. (arguments
  442. `(#:tests? #f ; no tests (apparently)
  443. #:configure-flags
  444. (list
  445. "-DEMBREE_ISPC_SUPPORT=OFF")))
  446. (inputs
  447. `(("tbb" ,tbb)
  448. ("glfw" ,glfw)))
  449. (home-page "https://www.embree.org/")
  450. (synopsis "High performance ray tracing kernels")
  451. (description
  452. "Embree is a collection of high-performance ray tracing kernels.
  453. Embree is meant to increase performance of photo-realistic rendering
  454. applications.")
  455. (license license:asl2.0)))
  456. (define-public openvdb
  457. (package
  458. (name "openvdb")
  459. (version "8.0.1")
  460. (source (origin
  461. (method git-fetch)
  462. (uri (git-reference
  463. (url "https://github.com/AcademySoftwareFoundation/openvdb/")
  464. (commit (string-append "v" version))
  465. (recursive? #t)))
  466. (file-name (git-file-name name version))
  467. (sha256
  468. (base32
  469. "0qzx6l5c183k6j9zki31gg9aixf5s1j46wdi7wr1h3bz7k53syg9"))))
  470. (build-system cmake-build-system)
  471. (arguments
  472. `(#:configure-flags
  473. (list (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
  474. (assoc-ref %outputs "out") "/lib"))))
  475. (inputs
  476. `(("boost" ,boost)
  477. ("c-blosc" ,c-blosc)
  478. ("ilmbase" ,ilmbase)
  479. ("tbb" ,tbb)
  480. ("zlib" ,zlib)))
  481. (native-inputs
  482. `(("pkg-config" ,pkg-config)))
  483. (home-page "https://www.openvdb.org/")
  484. (synopsis "Sparse volume data structure and tools")
  485. (description "OpenVDB is a C++ library comprising a hierarchical data
  486. structure and a large suite of tools for the efficient storage and
  487. manipulation of sparse volumetric data discretized on three-dimensional grids.
  488. It was developed by DreamWorks Animation for use in volumetric applications
  489. typically encountered in feature film production.")
  490. (license license:mpl2.0)))
  491. (define-public blender
  492. (package
  493. (name "blender")
  494. (version "2.92.0")
  495. (source (origin
  496. (method url-fetch)
  497. (uri (string-append "https://download.blender.org/source/"
  498. "blender-" version ".tar.xz"))
  499. (sha256
  500. (base32
  501. "15a5vffn18a920286x0avbc2rap56k6y531wgibq68r90g2cz4g7"))))
  502. (build-system cmake-build-system)
  503. (arguments
  504. (let ((python-version (version-major+minor (package-version python))))
  505. `(;; Test files are very large and not included in the release tarball.
  506. #:tests? #f
  507. #:configure-flags
  508. (list "-DWITH_CODEC_FFMPEG=ON"
  509. "-DWITH_CODEC_SNDFILE=ON"
  510. "-DWITH_CYCLES=ON"
  511. "-DWITH_DOC_MANPAGE=ON"
  512. "-DWITH_FFTW3=ON"
  513. "-DWITH_IMAGE_OPENJPEG=ON"
  514. "-DWITH_INPUT_NDOF=ON"
  515. "-DWITH_INSTALL_PORTABLE=OFF"
  516. "-DWITH_JACK=ON"
  517. "-DWITH_MOD_OCEANSIM=ON"
  518. "-DWITH_OPENVDB=ON"
  519. "-DWITH_OPENSUBDIV=ON"
  520. "-DWITH_PYTHON_INSTALL=OFF"
  521. (string-append "-DPYTHON_LIBRARY=python" ,python-version)
  522. (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
  523. "/lib")
  524. (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
  525. "/include/python" ,python-version)
  526. (string-append "-DPYTHON_VERSION=" ,python-version)
  527. (string-append "-DPYTHON_NUMPY_INCLUDE_DIRS="
  528. (assoc-ref %build-inputs "python-numpy")
  529. "/lib/python" ,python-version "/site-packages/numpy/core/include/")
  530. (string-append "-DPYTHON_NUMPY_PATH="
  531. (assoc-ref %build-inputs "python-numpy")
  532. "/lib/python" ,python-version "/site-packages/"))
  533. #:phases
  534. (modify-phases %standard-phases
  535. ;; XXX This file doesn't exist in the Git sources but will probably
  536. ;; exist in the eventual 2.80 source tarball.
  537. (add-after 'unpack 'fix-broken-import
  538. (lambda _
  539. (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
  540. (("import encode_bin") "from . import encode_bin"))
  541. #t))
  542. (add-after 'set-paths 'add-ilmbase-include-path
  543. (lambda* (#:key inputs #:allow-other-keys)
  544. ;; OpenEXR propagates ilmbase, but its include files do not appear
  545. ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
  546. ;; the CPATH to satisfy the dependency on "half.h".
  547. (setenv "CPATH"
  548. (string-append
  549. (search-input-directory inputs "include/OpenEXR")
  550. ":" (or (getenv "CPATH") "")))))))))
  551. (inputs
  552. `(("boost" ,boost)
  553. ("jemalloc" ,jemalloc)
  554. ("libx11" ,libx11)
  555. ("libxi" ,libxi)
  556. ("libxrender" ,libxrender)
  557. ("opencolorio" ,opencolorio)
  558. ("openimageio" ,openimageio)
  559. ("openexr" ,openexr)
  560. ("opensubdiv" ,opensubdiv)
  561. ("ilmbase" ,ilmbase)
  562. ("openjpeg" ,openjpeg)
  563. ("libjpeg" ,libjpeg-turbo)
  564. ("libpng" ,libpng)
  565. ("libtiff" ,libtiff)
  566. ("ffmpeg" ,ffmpeg)
  567. ("fftw" ,fftw)
  568. ("jack" ,jack-1)
  569. ("libsndfile" ,libsndfile)
  570. ("freetype" ,freetype)
  571. ("glew" ,glew)
  572. ("openal" ,openal)
  573. ("pugixml" ,pugixml)
  574. ("python" ,python)
  575. ("python-numpy" ,python-numpy)
  576. ("openvdb" ,openvdb)
  577. ("tbb" ,tbb)
  578. ("zlib" ,zlib)
  579. ("embree" ,embree)))
  580. (home-page "https://blender.org/")
  581. (synopsis "3D graphics creation suite")
  582. (description
  583. "Blender is a 3D graphics creation suite. It supports the entirety of
  584. the 3D pipeline—modeling, rigging, animation, simulation, rendering,
  585. compositing and motion tracking, even video editing and game creation. The
  586. application can be customized via its API for Python scripting.")
  587. (license license:gpl2+)))
  588. (define-public blender-2.79
  589. (package
  590. (name "blender")
  591. (version "2.79b")
  592. (source (origin
  593. (method url-fetch)
  594. (uri (string-append "https://download.blender.org/source/"
  595. "blender-" version ".tar.gz"))
  596. (sha256
  597. (base32
  598. "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c"))
  599. (patches (search-patches "blender-2.79-newer-ffmpeg.patch"
  600. "blender-2.79-oiio2.patch"
  601. ;; The following patches may be
  602. ;; needed when the default GCC is
  603. ;; updated:
  604. ;; "blender-2.79-gcc8.patch"
  605. ;; "blender-2.79-gcc9.patch"
  606. "blender-2.79-python-3.7-fix.patch"
  607. "blender-2.79-python-3.8-fix.patch"))))
  608. (build-system cmake-build-system)
  609. (arguments
  610. (let ((python-version (version-major+minor (package-version python))))
  611. `(;; Test files are very large and not included in the release tarball.
  612. #:tests? #f
  613. #:configure-flags
  614. (list "-DWITH_CODEC_FFMPEG=ON"
  615. "-DWITH_CODEC_SNDFILE=ON"
  616. "-DWITH_CYCLES=ON"
  617. "-DWITH_DOC_MANPAGE=ON"
  618. "-DWITH_FFTW3=ON"
  619. "-DWITH_GAMEENGINE=ON"
  620. "-DWITH_IMAGE_OPENJPEG=ON"
  621. "-DWITH_INPUT_NDOF=ON"
  622. "-DWITH_INSTALL_PORTABLE=OFF"
  623. "-DWITH_JACK=ON"
  624. "-DWITH_MOD_OCEANSIM=ON"
  625. "-DWITH_PLAYER=ON"
  626. "-DWITH_PYTHON_INSTALL=OFF"
  627. "-DWITH_PYTHON_INSTALL=OFF"
  628. "-DWITH_SYSTEM_OPENJPEG=ON"
  629. (string-append "-DPYTHON_LIBRARY=python" ,python-version)
  630. (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
  631. "/lib")
  632. (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
  633. "/include/python" ,python-version)
  634. (string-append "-DPYTHON_VERSION=" ,python-version))
  635. #:phases
  636. (modify-phases %standard-phases
  637. (add-after 'unpack 'fix-broken-import
  638. (lambda _
  639. (substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
  640. (("import encode_bin") "from . import encode_bin"))
  641. #t))
  642. (add-after 'set-paths 'add-ilmbase-include-path
  643. (lambda* (#:key inputs #:allow-other-keys)
  644. ;; OpenEXR propagates ilmbase, but its include files do not appear
  645. ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
  646. ;; the CPATH to satisfy the dependency on "half.h".
  647. (setenv "CPATH"
  648. (string-append
  649. (search-input-directory inputs "include/OpenEXR")
  650. ":" (or (getenv "CPATH") "")))))))))
  651. (inputs
  652. `(("boost" ,boost)
  653. ("jemalloc" ,jemalloc)
  654. ("libx11" ,libx11)
  655. ("opencolorio" ,opencolorio)
  656. ("openimageio" ,openimageio)
  657. ("openexr" ,openexr)
  658. ("ilmbase" ,ilmbase)
  659. ("openjpeg" ,openjpeg)
  660. ("libjpeg" ,libjpeg-turbo)
  661. ("libpng" ,libpng)
  662. ("libtiff" ,libtiff)
  663. ("ffmpeg" ,ffmpeg)
  664. ("fftw" ,fftw)
  665. ("jack" ,jack-1)
  666. ("libsndfile" ,libsndfile)
  667. ("freetype" ,freetype)
  668. ("glew" ,glew)
  669. ("openal" ,openal)
  670. ("pugixml" ,pugixml)
  671. ("python" ,python)
  672. ("zlib" ,zlib)))
  673. (home-page "https://blender.org/")
  674. (synopsis "3D graphics creation suite")
  675. (description
  676. "Blender is a 3D graphics creation suite. It supports the entirety of
  677. the 3D pipeline—modeling, rigging, animation, simulation, rendering,
  678. compositing and motion tracking, even video editing and game creation. The
  679. application can be customized via its API for Python scripting.
  680. NOTE: This older version of Blender is the last release that does not require
  681. OpenGL 3. It is retained for use with older computers.")
  682. (license license:gpl2+)))
  683. (define-public goxel
  684. (package
  685. (name "goxel")
  686. (version "0.10.7")
  687. (source (origin
  688. (method git-fetch)
  689. (uri (git-reference
  690. (url "https://github.com/guillaumechereau/goxel")
  691. (commit (string-append "v" version))))
  692. (file-name (git-file-name name version))
  693. (sha256
  694. (base32
  695. "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039"))))
  696. (build-system gnu-build-system)
  697. (arguments
  698. '(#:tests? #f
  699. #:phases (modify-phases %standard-phases (delete 'configure))
  700. #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
  701. "release")))
  702. (native-inputs
  703. `(("pkg-config" ,pkg-config)))
  704. (inputs
  705. `(("gtk3" ,gtk+)
  706. ("glfw" ,glfw)
  707. ("scons" ,scons)))
  708. (home-page "https://goxel.xyz/")
  709. (synopsis "Voxel editor")
  710. (description
  711. "Goxel is a voxel editor that features unlimited scene size, unlimited
  712. history buffer, 24-bit RGB colors, layers, procedural rendering, ray tracing,
  713. and export to various formats including the format used by Magicavoxel.")
  714. (license license:gpl3+)))
  715. (define-public assimp
  716. (package
  717. (name "assimp")
  718. (version "4.1.0")
  719. (source (origin
  720. (method git-fetch)
  721. (uri (git-reference
  722. (url "https://github.com/assimp/assimp")
  723. (commit (string-append "v" version))))
  724. (file-name (git-file-name name version))
  725. (sha256
  726. (base32
  727. "1rhyqfhzifdj7yibyanph3rh13ykw3i98dnn8mz65j780472hw28"))))
  728. (build-system cmake-build-system)
  729. (inputs
  730. `(("zlib" ,zlib)))
  731. (home-page "http://www.assimp.org/")
  732. (synopsis "Asset import library")
  733. (description
  734. "The Open Asset Import Library loads more than 40 3D file formats into
  735. one unified data structure. Additionally, assimp features various mesh post
  736. processing tools: normals and tangent space generation, triangulation, vertex
  737. cache locality optimization, removal of degenerate primitives and duplicate
  738. vertices, sorting by primitive type, merging of redundant materials and many
  739. more.")
  740. (license license:bsd-3)))
  741. (define-public cgal
  742. (package
  743. (name "cgal")
  744. (version "5.2.2")
  745. (source (origin
  746. (method url-fetch)
  747. (uri (string-append
  748. "https://github.com/CGAL/cgal/releases/download/v" version
  749. "/CGAL-" version ".tar.xz"))
  750. (sha256
  751. (base32
  752. "0yjzq12ivizp23y7zqm30x20psv9gzwbcdrhyd3f7h0ds94m1c40"))))
  753. (build-system cmake-build-system)
  754. (arguments
  755. `(#:configure-flags
  756. ;; Prevent two mostly-duplicate directories. Use Guix's versioned
  757. ;; default for licences instead of CGAL's unversioned one.
  758. (list (string-append "-DCGAL_INSTALL_DOC_DIR=share/doc/"
  759. ,name "-" ,version))
  760. #:tests? #f)) ; no test target
  761. (inputs
  762. `(("mpfr" ,mpfr)
  763. ("gmp" ,gmp)
  764. ("boost" ,boost)))
  765. (home-page "https://www.cgal.org/")
  766. (synopsis "Computational geometry algorithms library")
  767. (description
  768. "CGAL provides easy access to efficient and reliable geometric algorithms
  769. in the form of a C++ library. CGAL is used in various areas needing geometric
  770. computation, such as: computer graphics, scientific visualization, computer
  771. aided design and modeling, geographic information systems, molecular biology,
  772. medical imaging, robotics and motion planning, mesh generation, numerical
  773. methods, etc. It provides data structures and algorithms such as
  774. triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
  775. many more.")
  776. ;; The 'LICENSE' file explains that a subset is available under more
  777. ;; permissive licenses.
  778. (license license:gpl3+)))
  779. (define-public ilmbase
  780. (package
  781. (name "ilmbase")
  782. (version "2.5.7")
  783. (source (origin
  784. (method git-fetch)
  785. (uri (git-reference
  786. (url "https://github.com/openexr/openexr")
  787. (commit (string-append "v" version))))
  788. (file-name (git-file-name "ilmbase" version))
  789. (sha256
  790. (base32
  791. "1vja0rbilcd1wn184w8nbcmck00n7bfwlddwiaxw8dhj64nx4468"))
  792. (patches (search-patches "ilmbase-fix-tests.patch"))))
  793. (build-system cmake-build-system)
  794. (arguments
  795. `(#:phases (modify-phases %standard-phases
  796. (add-after 'unpack 'change-directory
  797. (lambda _
  798. (chdir "IlmBase")
  799. #t)))))
  800. (home-page "https://www.openexr.com/")
  801. (synopsis "Utility C++ libraries for threads, maths, and exceptions")
  802. (description
  803. "IlmBase provides several utility libraries for C++. Half is a class
  804. that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread
  805. abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
  806. quaternions and other useful 2D and 3D math functions. Iex is an
  807. exception-handling library.")
  808. (license license:bsd-3)))
  809. (define-public lib2geom
  810. ;; Use the latest master commit, as the 1.0 release suffer build problems.
  811. (let ((revision "4")
  812. (commit "b29d60e49a58f4e8069544b44863b1a623e4ee59"))
  813. (package
  814. (name "lib2geom")
  815. (version (git-version "1.0" revision commit))
  816. (source (origin
  817. (method git-fetch)
  818. (uri (git-reference
  819. (url "https://gitlab.com/inkscape/lib2geom.git")
  820. (commit commit)))
  821. (file-name (git-file-name name version))
  822. (sha256
  823. (base32
  824. "0xd8f3cgfnipdav4w8j54r7hzy9f3m7xk42ppcfhdjz2hriggyk6"))
  825. (patches
  826. ;; Patch submitted to upstream (see:
  827. ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
  828. (search-patches "lib2geom-fix-tests.patch"))
  829. (modules '((guix build utils)))
  830. (snippet
  831. '(begin
  832. ;; Fix py2geom module initialization (see:
  833. ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
  834. (substitute* "src/py2geom/__init__.py"
  835. (("_py2geom") "py2geom._py2geom"))
  836. #t))))
  837. (build-system cmake-build-system)
  838. (arguments
  839. `(#:imported-modules ((guix build python-build-system)
  840. ,@%cmake-build-system-modules)
  841. #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
  842. "-D2GEOM_BOOST_PYTHON=ON"
  843. ;; Compiling the Cython bindings fail (see:
  844. ;; https://gitlab.com/inkscape/lib2geom/issues/21).
  845. "-D2GEOM_CYTHON_BINDINGS=OFF")
  846. #:phases
  847. (modify-phases %standard-phases
  848. (add-after 'unpack 'patch-python-lib-install-path
  849. (lambda* (#:key inputs outputs #:allow-other-keys)
  850. (let* ((python-version (@ (guix build python-build-system)
  851. python-version))
  852. (python-maj-min-version (python-version
  853. (assoc-ref inputs "python")))
  854. (site-package (string-append
  855. (assoc-ref outputs "out")
  856. "/lib/python" python-maj-min-version
  857. "/site-packages")))
  858. (substitute* '("src/cython/CMakeLists.txt"
  859. "src/py2geom/CMakeLists.txt")
  860. (("PYTHON_LIB_INSTALL \"[^\"]*\"")
  861. (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
  862. #t)))))
  863. (native-inputs `(("python" ,python-wrapper)
  864. ("googletest" ,googletest)
  865. ("pkg-config" ,pkg-config)))
  866. (inputs `(("cairo" ,cairo)
  867. ("pycairo" ,python-pycairo)
  868. ("double-conversion" ,double-conversion)
  869. ("glib" ,glib)
  870. ("gsl" ,gsl)))
  871. (propagated-inputs
  872. `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
  873. (home-page "https://gitlab.com/inkscape/lib2geom/")
  874. (synopsis "C++ 2D graphics library")
  875. (description "2geom is a C++ library of mathematics for paths, curves,
  876. and other geometric calculations. Designed for vector graphics, it tackles
  877. Bézier curves, conic sections, paths, intersections, transformations, and
  878. basic geometries.")
  879. ;; Because the library is linked with the GNU Scientific Library
  880. ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
  881. ;; https://gitlab.com/inkscape/inkscape/issues/784).
  882. (license license:gpl3+))))
  883. (define-public pstoedit
  884. (package
  885. (name "pstoedit")
  886. (version "3.75")
  887. (source (origin
  888. (method url-fetch)
  889. (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
  890. version "/pstoedit-" version ".tar.gz"))
  891. (sha256
  892. (base32
  893. "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp"))))
  894. (build-system gnu-build-system)
  895. (native-inputs
  896. `(("pkg-config" ,pkg-config)))
  897. (inputs
  898. `(("ghostscript" ,ghostscript)
  899. ("imagemagick" ,imagemagick)
  900. ("libplot" ,plotutils)
  901. ("libjpeg" ,libjpeg-turbo)
  902. ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to link
  903. (home-page "http://www.pstoedit.net/")
  904. (synopsis "Converter for PostScript and PDF graphics")
  905. (description "The @code{pstoedit} utility allows translating graphics
  906. in the PostScript or PDF (Portable Document Format) formats to various
  907. other vector formats such as:
  908. @itemize
  909. @item Tgif (.obj)
  910. @item gnuplot
  911. @item xfig (.fig)
  912. @item Flattened PostScript
  913. @item DXF, a CAD (Computed-Aided Design) exchange format
  914. @item PIC (for troff/groff)
  915. @item MetaPost (for usage with TeX/LaTeX)
  916. @item LaTeX2e picture
  917. @item GNU Metafile (for use with plotutils/libplot)
  918. @item Any format supported by ImageMagick
  919. @end itemize")
  920. (license license:gpl2+)))
  921. (define-public dear-imgui
  922. (package
  923. (name "dear-imgui")
  924. (version "1.79")
  925. (source
  926. (origin
  927. (method git-fetch)
  928. (uri (git-reference
  929. (url "https://github.com/ocornut/imgui")
  930. (commit (string-append "v" version))))
  931. (file-name (git-file-name name version))
  932. (sha256
  933. (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q"))))
  934. (build-system gnu-build-system)
  935. (arguments
  936. `(#:make-flags
  937. (list (string-append "CC=" ,(cc-for-target))
  938. (string-append "PREFIX=" (assoc-ref %outputs "out"))
  939. (string-append "VERSION=" ,version))
  940. #:tests? #f ; no test suite
  941. #:phases
  942. (modify-phases %standard-phases
  943. (add-after 'unpack 'unpack-debian-files
  944. (lambda* (#:key inputs #:allow-other-keys)
  945. (invoke "tar" "xvf" (assoc-ref inputs "debian-files"))
  946. (apply invoke "patch" "-Np1" "-i"
  947. (find-files "debian/patches" "\\.patch$"))
  948. (substitute* "Makefile"
  949. (("<stb/") "<") ; Guix doesn't use this subdirectory
  950. ;; Don't build or install the static library.
  951. (("^all: .*") "all: $(SHLIB) $(PCFILE)"))
  952. (substitute* (list "imgui.pc.in"
  953. "Makefile")
  954. ;; Don't link against a non-existent library.
  955. (("-lstb") ""))
  956. #t))
  957. (delete 'configure) ; no configure script
  958. (replace 'install
  959. ;; The default ‘install’ target installs the static library. Don't.
  960. (lambda* (#:key make-flags #:allow-other-keys)
  961. (apply invoke "make" "install-shared" "install-header"
  962. make-flags))))))
  963. (native-inputs
  964. `(("debian-files"
  965. ;; Upstream doesn't provide a build system. Use Debian's.
  966. ,(origin
  967. (method url-fetch)
  968. (uri (string-append "mirror://debian/pool/main/i/imgui/imgui_"
  969. version "+ds-1.debian.tar.xz"))
  970. (sha256
  971. (base32 "1xhk34pzpha6k5l2j150capq66y8czhmsi04ib09wvb34ahqxpby"))))
  972. ("pkg-config" ,pkg-config)))
  973. (inputs
  974. `(("freetype" ,freetype)
  975. ("stb-rect-pack" ,stb-rect-pack)
  976. ("stb-truetype" ,stb-truetype)))
  977. (home-page "https://github.com/ocornut/imgui")
  978. (synopsis "Immediate-mode C++ GUI library with minimal dependencies")
  979. (description
  980. "Dear ImGui is a @acronym{GUI, graphical user interface} library for C++.
  981. It creates optimized vertex buffers that you can render anytime in your
  982. 3D-pipeline-enabled application. It's portable, renderer-agnostic, and
  983. self-contained, without external dependencies.
  984. Dear ImGui is aimed at content creation, visualization, and debugging tools as
  985. opposed to average end-user interfaces. Hence it favors simplicity and
  986. productivity but lacks certain features often found in higher-level libraries.
  987. It is particularly suited to integration in game engine tooling, real-time 3D
  988. applications, full-screen applications, and embedded platforms without standard
  989. operating system features.")
  990. (license license:expat))) ; some examples/ use the zlib licence
  991. (define-public ogre
  992. (package
  993. (name "ogre")
  994. (version "1.12.9")
  995. (source
  996. (origin
  997. (method git-fetch)
  998. (uri (git-reference
  999. (url "https://github.com/OGRECave/ogre")
  1000. (commit (string-append "v" version))))
  1001. (file-name (git-file-name name version))
  1002. (sha256
  1003. (base32 "0b0pwh31nykrfhka6jqwclfx1pxzhj11vkl91951d63kwr5bbzms"))))
  1004. (build-system cmake-build-system)
  1005. (arguments
  1006. '(#:phases
  1007. (modify-phases %standard-phases
  1008. (add-before 'configure 'unpack-dear-imgui
  1009. (lambda* (#:key inputs #:allow-other-keys)
  1010. (copy-recursively (assoc-ref inputs "dear-imgui-source")
  1011. "../dear-imgui-source")
  1012. #t))
  1013. (add-before 'configure 'pre-configure
  1014. ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
  1015. ;; a consequence, we cannot suggest ours in configure flags. Fix
  1016. ;; it.
  1017. (lambda* (#:key inputs outputs #:allow-other-keys)
  1018. (substitute* "CMakeLists.txt"
  1019. (("set\\(CMAKE_INSTALL_RPATH .*") ""))
  1020. #t)))
  1021. #:configure-flags
  1022. (let* ((out (assoc-ref %outputs "out"))
  1023. (runpath
  1024. (string-join (list (string-append out "/lib")
  1025. (string-append out "/lib/OGRE"))
  1026. ";")))
  1027. (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
  1028. "-DIMGUI_DIR=../dear-imgui-source"
  1029. "-DOGRE_BUILD_DEPENDENCIES=OFF"
  1030. "-DOGRE_BUILD_TESTS=TRUE"
  1031. "-DOGRE_INSTALL_DOCS=TRUE"
  1032. "-DOGRE_INSTALL_SAMPLES=TRUE"
  1033. "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
  1034. (native-inputs
  1035. `(("boost" ,boost)
  1036. ("dear-imgui-source" ,(package-source dear-imgui))
  1037. ("doxygen" ,doxygen)
  1038. ("googletest" ,googletest-1.8)
  1039. ("pkg-config" ,pkg-config)))
  1040. (inputs
  1041. `(("font-dejavu" ,font-dejavu)
  1042. ("freeimage" ,freeimage)
  1043. ("freetype" ,freetype)
  1044. ("glu" ,glu)
  1045. ("libxaw" ,libxaw)
  1046. ("libxrandr" ,libxrandr)
  1047. ("pugixml" ,pugixml)
  1048. ("sdl2" ,sdl2)
  1049. ("tinyxml" ,tinyxml)
  1050. ("zziplib" ,zziplib)))
  1051. (synopsis "Scene-oriented, flexible 3D engine written in C++")
  1052. (description
  1053. "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
  1054. flexible 3D engine written in C++ designed to make it easier and more intuitive
  1055. for developers to produce applications utilising hardware-accelerated 3D
  1056. graphics.")
  1057. (home-page "https://www.ogre3d.org/")
  1058. (license license:expat)))
  1059. (define-public openexr
  1060. (package
  1061. (name "openexr")
  1062. (version (package-version ilmbase))
  1063. (source (origin
  1064. (inherit (package-source ilmbase))
  1065. (file-name (git-file-name "openexr" version))
  1066. (modules '((guix build utils)))
  1067. (snippet
  1068. '(begin
  1069. (substitute* (find-files "OpenEXR" "tmpDir\\.h")
  1070. (("\"/var/tmp/\"")
  1071. "\"/tmp/\""))
  1072. #t))))
  1073. (build-system cmake-build-system)
  1074. (arguments
  1075. `(#:phases
  1076. (modify-phases %standard-phases
  1077. (add-after 'unpack 'change-directory
  1078. (lambda _
  1079. (chdir "OpenEXR")
  1080. #t))
  1081. (add-after 'change-directory 'increase-test-timeout
  1082. (lambda _
  1083. ;; On armhf-linux, we need to override the CTest default
  1084. ;; timeout of 1500 seconds for the OpenEXR.IlmImf test.
  1085. (substitute* "IlmImfTest/CMakeLists.txt"
  1086. (("add_test\\(NAME OpenEXR\\.IlmImf.*" all)
  1087. (string-append
  1088. all
  1089. "set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 2000)")))
  1090. #t))
  1091. ,@(if (not (target-64bit?))
  1092. `((add-after 'change-directory 'disable-broken-test
  1093. ;; This test fails on i686. Upstream developers suggest that
  1094. ;; this test is broken on i686 and can be safely disabled:
  1095. ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748
  1096. (lambda _
  1097. (substitute* "IlmImfTest/main.cpp"
  1098. ((".*testOptimizedInterleavePatterns.*") ""))
  1099. #t)))
  1100. '()))))
  1101. (native-inputs
  1102. `(("pkg-config" ,pkg-config)))
  1103. (propagated-inputs
  1104. `(("ilmbase" ,ilmbase) ;used in public headers
  1105. ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz"
  1106. (home-page "https://www.openexr.com/")
  1107. (synopsis "High-dynamic range file format library")
  1108. (description
  1109. "OpenEXR is a high dynamic-range (HDR) image file format developed for
  1110. use in computer imaging applications. The IlmImf C++ libraries support
  1111. storage of the \"EXR\" file format for storing 16-bit floating-point images.")
  1112. (license license:bsd-3)))
  1113. (define-public openimageio
  1114. (package
  1115. (name "openimageio")
  1116. (version "2.2.11.1")
  1117. (source (origin
  1118. (method git-fetch)
  1119. (uri (git-reference
  1120. (url "https://github.com/OpenImageIO/oiio")
  1121. (commit (string-append "Release-" version))))
  1122. (file-name (git-file-name name version))
  1123. (sha256
  1124. (base32
  1125. "1i9r6vgz15aj1yzbf5a9lqhlyakjs793yrw5gw720l84lcyigad7"))))
  1126. (build-system cmake-build-system)
  1127. ;; FIXME: To run all tests successfully, test image sets from multiple
  1128. ;; third party sources have to be present. For details see
  1129. ;; <https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md>
  1130. (arguments
  1131. `(#:tests? #f
  1132. #:configure-flags (list "-DUSE_EXTERNAL_PUGIXML=1")))
  1133. (native-inputs
  1134. `(("pkg-config" ,pkg-config)))
  1135. (inputs
  1136. `(("boost" ,boost)
  1137. ("fmt" ,fmt)
  1138. ("libheif" ,libheif)
  1139. ("libpng" ,libpng)
  1140. ("libjpeg" ,libjpeg-turbo)
  1141. ("libtiff" ,libtiff)
  1142. ("giflib" ,giflib)
  1143. ("openexr" ,openexr)
  1144. ("ilmbase" ,ilmbase)
  1145. ("pugixml" ,pugixml)
  1146. ("python" ,python-wrapper)
  1147. ("pybind11" ,pybind11)
  1148. ("robin-map" ,robin-map)
  1149. ("zlib" ,zlib)))
  1150. (synopsis "C++ library for reading and writing images")
  1151. (description
  1152. "OpenImageIO is a library for reading and writing images, and a bunch of
  1153. related classes, utilities, and applications. There is a particular emphasis
  1154. on formats and functionality used in professional, large-scale animation and
  1155. visual effects work for film.")
  1156. (home-page "https://www.openimageio.org")
  1157. (license license:bsd-3)))
  1158. (define-public openscenegraph
  1159. (package
  1160. (name "openscenegraph")
  1161. (version "3.6.5")
  1162. (source
  1163. (origin
  1164. (method git-fetch)
  1165. (uri (git-reference
  1166. (url "https://github.com/openscenegraph/OpenSceneGraph")
  1167. (commit (string-append "OpenSceneGraph-" version))))
  1168. (sha256
  1169. (base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
  1170. (file-name (git-file-name name version))))
  1171. (properties
  1172. `((upstream-name . "OpenSceneGraph")))
  1173. (build-system cmake-build-system)
  1174. (arguments
  1175. `(#:tests? #f ; no test target available
  1176. ;; Without this flag, 'rd' will be added to the name of the
  1177. ;; library binaries and break linking with other programs.
  1178. #:build-type "Release"
  1179. #:configure-flags
  1180. (list (string-append "-DCMAKE_INSTALL_RPATH="
  1181. (assoc-ref %outputs "out") "/lib:"
  1182. (assoc-ref %outputs "out") "/lib64"))))
  1183. (native-inputs
  1184. `(("pkg-config" ,pkg-config)
  1185. ("unzip" ,unzip)))
  1186. (inputs
  1187. `(("giflib" ,giflib)
  1188. ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin.
  1189. ("jasper" ,jasper)
  1190. ("librsvg" ,librsvg)
  1191. ("libxrandr" ,libxrandr)
  1192. ("ffmpeg" ,ffmpeg)
  1193. ("mesa" ,mesa)))
  1194. (synopsis "High-performance real-time graphics toolkit")
  1195. (description
  1196. "The OpenSceneGraph is a high-performance 3D graphics toolkit
  1197. used by application developers in fields such as visual simulation, games,
  1198. virtual reality, scientific visualization and modeling.")
  1199. (home-page "http://www.openscenegraph.org")
  1200. ;; The 'LICENSE' file explains that the source is licensed under
  1201. ;; LGPL 2.1, but with 4 exceptions. This version is called OSGPL.
  1202. (license license:lgpl2.1)))
  1203. ;; We need this for simgear
  1204. (define-public openscenegraph-3.4
  1205. (package (inherit openscenegraph)
  1206. (name "openscenegraph")
  1207. (version "3.4.1")
  1208. (source
  1209. (origin
  1210. (method git-fetch)
  1211. (uri (git-reference
  1212. (url "https://github.com/openscenegraph/OpenSceneGraph")
  1213. (commit (string-append "OpenSceneGraph-" version))))
  1214. (file-name (git-file-name name version))
  1215. (sha256
  1216. (base32
  1217. "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9"))))
  1218. (arguments
  1219. (substitute-keyword-arguments (package-arguments openscenegraph)
  1220. ((#:configure-flags flags)
  1221. `(cons
  1222. ;; The jpeg plugin requires conversion between integers and booleans
  1223. "-DCMAKE_CXX_FLAGS=-fpermissive"
  1224. ,flags))))
  1225. (inputs
  1226. `(("libjpeg" ,libjpeg-turbo)
  1227. ,@(package-inputs openscenegraph)))))
  1228. (define-public openmw-openscenegraph
  1229. ;; OpenMW prefers its own fork of openscenegraph:
  1230. ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph.
  1231. (let ((commit "36a962845a2c87a6671fd822157e0729d164e940"))
  1232. (hidden-package
  1233. (package
  1234. (inherit openscenegraph)
  1235. (version (git-version "3.6" "1" commit))
  1236. (source
  1237. (origin
  1238. (method git-fetch)
  1239. (uri (git-reference
  1240. (url "https://github.com/OpenMW/osg/")
  1241. (commit commit)))
  1242. (file-name (git-file-name (package-name openscenegraph) version))
  1243. (sha256
  1244. (base32
  1245. "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia"))))
  1246. (arguments
  1247. (substitute-keyword-arguments (package-arguments openscenegraph)
  1248. ((#:configure-flags flags)
  1249. ;; As per the above wiki link, the following plugins are enough:
  1250. `(append
  1251. '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
  1252. "-DBUILD_OSG_PLUGIN_OSG=1"
  1253. "-DBUILD_OSG_PLUGIN_DDS=1"
  1254. "-DBUILD_OSG_PLUGIN_TGA=1"
  1255. "-DBUILD_OSG_PLUGIN_BMP=1"
  1256. "-DBUILD_OSG_PLUGIN_JPEG=1"
  1257. "-DBUILD_OSG_PLUGIN_PNG=1"
  1258. "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
  1259. ;; The jpeg plugin requires conversion between integers and booleans
  1260. "-DCMAKE_CXX_FLAGS=-fpermissive")
  1261. ,flags))))))))
  1262. (define-public povray
  1263. (package
  1264. (name "povray")
  1265. (version "3.7.0.8")
  1266. (source (origin
  1267. (method git-fetch)
  1268. (uri (git-reference
  1269. (url "https://github.com/POV-Ray/povray")
  1270. (commit (string-append "v" version))))
  1271. (file-name (git-file-name name version))
  1272. (sha256
  1273. (base32
  1274. "1q114n4m3r7qy3yn954fq7p46rg7ypdax5fazxr9yj1jklf1lh6z"))
  1275. (modules '((guix build utils)))
  1276. (snippet
  1277. '(begin
  1278. ;; Delete bundled libraries.
  1279. (delete-file-recursively "libraries")
  1280. #t))))
  1281. (build-system gnu-build-system)
  1282. (native-inputs
  1283. `(("autoconf" ,autoconf)
  1284. ("automake" ,automake)
  1285. ("pkg-config" ,pkg-config)))
  1286. (inputs
  1287. `(("boost" ,boost)
  1288. ("libjpeg" ,libjpeg-turbo)
  1289. ("libpng" ,libpng)
  1290. ("libtiff" ,libtiff)
  1291. ("openexr" ,openexr)
  1292. ("sdl" ,sdl)
  1293. ("zlib" ,zlib)))
  1294. (arguments
  1295. '(#:configure-flags
  1296. (list "COMPILED_BY=Guix"
  1297. (string-append "--with-boost-libdir="
  1298. (assoc-ref %build-inputs "boost") "/lib")
  1299. "--disable-optimiz-arch")
  1300. #:phases
  1301. (modify-phases %standard-phases
  1302. (add-after 'unpack 'run-prebuild
  1303. (lambda _
  1304. (setenv "HOME" (getcwd))
  1305. (with-directory-excursion "unix"
  1306. (substitute* "prebuild.sh"
  1307. (("/bin/sh") (which "sh")))
  1308. (invoke "sh" "prebuild.sh"))
  1309. #t))
  1310. ;; The bootstrap script is run by the prebuild script in the
  1311. ;; "run-prebuild" phase.
  1312. (delete 'bootstrap))))
  1313. (synopsis "Tool for creating three-dimensional graphics")
  1314. (description
  1315. "@code{POV-Ray} is short for the Persistence of Vision Raytracer, a tool
  1316. for producing high-quality computer graphics. @code{POV-Ray} creates
  1317. three-dimensional, photo-realistic images using a rendering technique called
  1318. ray-tracing. It reads in a text file containing information describing the
  1319. objects and lighting in a scene and generates an image of that scene from the
  1320. view point of a camera also described in the text file. Ray-tracing is not a
  1321. fast process by any means, but it produces very high quality images with
  1322. realistic reflections, shading, perspective and other effects.")
  1323. (home-page "http://www.povray.org/")
  1324. (license license:agpl3+)))
  1325. (define-public rapicorn
  1326. (package
  1327. (name "rapicorn")
  1328. (version "16.0.0")
  1329. (source (origin
  1330. (method url-fetch)
  1331. (uri (string-append "https://testbit.eu/pub/dists/rapicorn/"
  1332. "rapicorn-" version ".tar.xz"))
  1333. (sha256
  1334. (base32
  1335. "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
  1336. (patches (search-patches "rapicorn-isnan.patch"))))
  1337. (build-system gnu-build-system)
  1338. (arguments
  1339. `(#:phases
  1340. (modify-phases %standard-phases
  1341. (add-after 'unpack 'fix-tests
  1342. (lambda _
  1343. ;; Our grep does not support perl regular expressions.
  1344. (substitute* "taptool.sh"
  1345. (("grep -P") "grep -E"))
  1346. ;; Disable path tests because we cannot access /bin or /sbin.
  1347. (substitute* "rcore/tests/multitest.cc"
  1348. (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
  1349. #t))
  1350. (add-before 'check 'pre-check
  1351. (lambda _
  1352. ;; The test suite requires a running X server (with DISPLAY
  1353. ;; number 99 or higher).
  1354. (system "Xvfb :99 &")
  1355. (setenv "DISPLAY" ":99")
  1356. #t))
  1357. (add-after 'unpack 'replace-fhs-paths
  1358. (lambda _
  1359. (substitute* (cons "Makefile.decl"
  1360. (find-files "." "^Makefile\\.in$"))
  1361. (("/bin/ls") (which "ls"))
  1362. (("/usr/bin/env") (which "env")))
  1363. #t)))))
  1364. ;; These libraries are listed in the "Required" section of the pkg-config
  1365. ;; file.
  1366. (propagated-inputs
  1367. `(("librsvg" ,librsvg)
  1368. ("cairo" ,cairo)
  1369. ("pango" ,pango)
  1370. ("libxml2" ,libxml2)
  1371. ("python2-enum34" ,python2-enum34)))
  1372. (inputs
  1373. `(("gdk-pixbuf" ,gdk-pixbuf)
  1374. ("libpng" ,libpng-1.2)
  1375. ("readline" ,readline)
  1376. ("libcroco" ,libcroco)
  1377. ("python" ,python-2)
  1378. ("cython" ,python2-cython)))
  1379. (native-inputs
  1380. `(("pandoc" ,pandoc)
  1381. ("bison" ,bison)
  1382. ("flex" ,flex)
  1383. ("doxygen" ,doxygen)
  1384. ("graphviz" ,graphviz)
  1385. ("intltool" ,intltool)
  1386. ("pkg-config" ,pkg-config)
  1387. ("xvfb" ,xorg-server-for-tests)))
  1388. (home-page "https://rapicorn.testbit.org/")
  1389. (synopsis "Toolkit for rapid development of user interfaces")
  1390. (description
  1391. "Rapicorn is a toolkit for rapid development of user interfaces in C++
  1392. and Python. The user interface is designed in a declarative markup language
  1393. and is connected to the programming logic using data bindings and commands.")
  1394. (license license:mpl2.0)))
  1395. (define-public ctl
  1396. (package
  1397. (name "ctl")
  1398. (version "1.5.2")
  1399. (source (origin
  1400. (method url-fetch)
  1401. (uri (string-append "https://github.com/ampas/CTL/archive/ctl-"
  1402. version ".tar.gz"))
  1403. (sha256
  1404. (base32
  1405. "1gg04pyvw0m398akn0s1l07g5b1haqv5na1wpi5dii1jjd1w3ynp"))))
  1406. (build-system cmake-build-system)
  1407. (arguments '(#:tests? #f)) ;no 'test' target
  1408. ;; Headers include OpenEXR and IlmBase headers.
  1409. (propagated-inputs `(("openexr" ,openexr)))
  1410. (home-page "http://ampasctl.sourceforge.net")
  1411. (synopsis "Color Transformation Language")
  1412. (description
  1413. "The Color Transformation Language, or CTL, is a small programming
  1414. language that was designed to serve as a building block for digital color
  1415. management systems. CTL allows users to describe color transforms in a
  1416. concise and unambiguous way by expressing them as programs. In order to apply
  1417. a given transform to an image, the color management system instructs a CTL
  1418. interpreter to load and run the CTL program that describes the transform. The
  1419. original and the transformed image constitute the CTL program's input and
  1420. output.")
  1421. ;; The web site says it's under a BSD-3 license, but the 'LICENSE' file
  1422. ;; and headers use different wording.
  1423. (license (license:non-copyleft "file://LICENSE"))))
  1424. (define-public brdf-explorer
  1425. ;; There are no release tarballs, and not even tags in the repo,
  1426. ;; so use the latest revision.
  1427. (let ((commit "5b2cd46f38a06e47207fa7229b72d37beb945019")
  1428. (revision "1"))
  1429. (package
  1430. (name "brdf-explorer")
  1431. (version (string-append "1.0.0-" revision "." (string-take commit 9)))
  1432. (source (origin
  1433. (method git-fetch)
  1434. (uri (git-reference
  1435. (url "https://github.com/wdas/brdf")
  1436. (commit commit)))
  1437. (sha256
  1438. (base32
  1439. "06vzbiajzbi2xl8jlff5d45bc9wd68i3jdndfab1f3jgfrd8bsgx"))
  1440. (file-name (string-append name "-" version "-checkout"))))
  1441. (build-system gnu-build-system)
  1442. (arguments
  1443. `(#:phases (modify-phases %standard-phases
  1444. (replace 'configure
  1445. (lambda* (#:key outputs #:allow-other-keys)
  1446. (let ((out (assoc-ref outputs "out")))
  1447. (invoke "qmake"
  1448. (string-append "prefix=" out)))))
  1449. (add-after 'install 'wrap-program
  1450. (lambda* (#:key outputs #:allow-other-keys)
  1451. (let* ((out (assoc-ref outputs "out"))
  1452. (bin (string-append out "/bin"))
  1453. (data (string-append
  1454. out "/share/brdf")))
  1455. (with-directory-excursion bin
  1456. (rename-file "brdf" ".brdf-real")
  1457. (call-with-output-file "brdf"
  1458. (lambda (port)
  1459. (format port "#!/bin/sh
  1460. # Run the thing from its home, otherwise it just bails out.
  1461. cd \"~a\"
  1462. exec -a \"$0\" ~a/.brdf-real~%"
  1463. data bin)))
  1464. (chmod "brdf" #o555)))
  1465. #t)))))
  1466. (native-inputs
  1467. `(("qttools" ,qttools))) ;for 'qmake'
  1468. (inputs
  1469. `(("qtbase" ,qtbase-5)
  1470. ("mesa" ,mesa)
  1471. ("glew" ,glew)
  1472. ("freeglut" ,freeglut)
  1473. ("zlib" ,zlib)))
  1474. (home-page "https://www.disneyanimation.com/technology/brdf.html")
  1475. (synopsis
  1476. "Analyze bidirectional reflectance distribution functions (BRDFs)")
  1477. (description
  1478. "BRDF Explorer is an application that allows the development and analysis
  1479. of bidirectional reflectance distribution functions (BRDFs). It can load and
  1480. plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader
  1481. language), measured material data from the MERL database, and anisotropic
  1482. measured material data from MIT CSAIL. Graphs and visualizations update in
  1483. real time as parameters are changed, making it a useful tool for evaluating
  1484. and understanding different BRDFs (and other component functions).")
  1485. (license license:ms-pl))))
  1486. (define-public agg
  1487. (package
  1488. (name "agg")
  1489. (version "2.5")
  1490. (source (origin
  1491. (method url-fetch)
  1492. (uri (list (string-append
  1493. "ftp://ftp.fau.de/gentoo/distfiles/agg-"
  1494. version ".tar.gz")
  1495. (string-append
  1496. "ftp://ftp.ula.ve/gentoo/distfiles/agg-"
  1497. version ".tar.gz")
  1498. ;; Site was discontinued.
  1499. (string-append "http://www.antigrain.com/agg-"
  1500. version ".tar.gz")))
  1501. (sha256
  1502. (base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
  1503. (patches (search-patches "agg-am_c_prototype.patch"))))
  1504. (build-system gnu-build-system)
  1505. (arguments
  1506. '(#:configure-flags
  1507. (list (string-append "--x-includes=" (assoc-ref %build-inputs "libx11")
  1508. "/include")
  1509. (string-append "--x-libraries=" (assoc-ref %build-inputs "libx11")
  1510. "/lib")
  1511. "--disable-examples")
  1512. #:phases
  1513. (modify-phases %standard-phases
  1514. (replace 'bootstrap
  1515. (lambda _
  1516. ;; let's call configure from configure phase and not now
  1517. (substitute* "autogen.sh" (("./configure") "# ./configure"))
  1518. (invoke "sh" "autogen.sh"))))))
  1519. (native-inputs
  1520. `(("pkg-config" ,pkg-config)
  1521. ("libtool" ,libtool)
  1522. ("autoconf" ,autoconf)
  1523. ("automake" ,automake)))
  1524. (inputs
  1525. `(("libx11" ,libx11)
  1526. ("freetype" ,freetype)
  1527. ("sdl" ,sdl)))
  1528. ;; Antigrain.com was discontinued.
  1529. (home-page "http://agg.sourceforge.net/antigrain.com/index.html")
  1530. (synopsis "High-quality 2D graphics rendering engine for C++")
  1531. (description
  1532. "Anti-Grain Geometry is a high quality rendering engine written in C++.
  1533. It supports sub-pixel resolutions and anti-aliasing. It is also a library for
  1534. rendering @acronym{SVG, Scalable Vector Graphics}.")
  1535. (license license:gpl2+)))
  1536. (define-public python-pastel
  1537. (package
  1538. (name "python-pastel")
  1539. (version "0.2.0")
  1540. (source
  1541. (origin
  1542. (method url-fetch)
  1543. (uri (pypi-uri "pastel" version))
  1544. (sha256
  1545. (base32
  1546. "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6"))))
  1547. (build-system python-build-system)
  1548. (arguments
  1549. `(#:phases (modify-phases %standard-phases
  1550. (replace 'check
  1551. (lambda _ (invoke "pytest" "pastel" "tests/"))))))
  1552. (native-inputs
  1553. `(("python-pytest" ,python-pytest)))
  1554. (home-page "https://github.com/sdispater/pastel")
  1555. (synopsis "Library to colorize strings in your terminal")
  1556. (description "Pastel is a simple library to help you colorize strings in
  1557. your terminal.")
  1558. (license license:expat)))
  1559. (define-public python2-pastel
  1560. (package-with-python2 python-pastel))
  1561. (define-public fgallery
  1562. (package
  1563. (name "fgallery")
  1564. (version "1.8.2")
  1565. (source (origin
  1566. (method url-fetch)
  1567. (uri
  1568. (string-append
  1569. "http://www.thregr.org/~wavexx/software/fgallery/releases/"
  1570. "fgallery-" version ".zip"))
  1571. (sha256
  1572. (base32
  1573. "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf"))))
  1574. (build-system gnu-build-system)
  1575. (arguments
  1576. `(#:tests? #f ; no tests
  1577. #:phases
  1578. (modify-phases %standard-phases
  1579. (delete 'configure)
  1580. (delete 'build)
  1581. (replace 'install
  1582. (lambda* (#:key inputs outputs #:allow-other-keys)
  1583. (let* ((out (assoc-ref outputs "out"))
  1584. (bin (string-append out "/bin/"))
  1585. (share (string-append out "/share/fgallery"))
  1586. (man (string-append out "/share/man/man1"))
  1587. (perl5lib (getenv "PERL5LIB"))
  1588. (script (string-append share "/fgallery")))
  1589. (define (bin-directory input-name)
  1590. (string-append (assoc-ref inputs input-name) "/bin"))
  1591. (mkdir-p man)
  1592. (copy-file "fgallery.1" (string-append man "/fgallery.1"))
  1593. (mkdir-p share)
  1594. (copy-recursively "." share)
  1595. ;; fgallery copies files from store when it is run. The
  1596. ;; read-only permissions from the store directories will cause
  1597. ;; fgallery to fail. Do not preserve file attributes when
  1598. ;; copying files to prevent it.
  1599. (substitute* script
  1600. (("'cp'")
  1601. "'cp', '--no-preserve=all'"))
  1602. (mkdir-p bin)
  1603. (symlink script (string-append out "/bin/fgallery"))
  1604. (wrap-program script
  1605. `("PATH" ":" prefix
  1606. ,(map bin-directory '("imagemagick"
  1607. "lcms"
  1608. "fbida"
  1609. "libjpeg"
  1610. "zip"
  1611. "jpegoptim"
  1612. "pngcrush"
  1613. "p7zip")))
  1614. `("PERL5LIB" ":" prefix (,perl5lib)))
  1615. #t))))))
  1616. (native-inputs
  1617. `(("unzip" ,unzip)))
  1618. ;; TODO: Add missing optional dependency: facedetect.
  1619. (inputs
  1620. `(("imagemagick" ,imagemagick)
  1621. ("lcms" ,lcms)
  1622. ("fbida" ,fbida)
  1623. ("libjpeg" ,libjpeg-turbo)
  1624. ("zip" ,zip)
  1625. ("perl" ,perl)
  1626. ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
  1627. ("perl-image-exiftool" ,perl-image-exiftool)
  1628. ("jpegoptim" ,jpegoptim)
  1629. ("pngcrush" ,pngcrush)
  1630. ("p7zip" ,p7zip)))
  1631. (home-page "http://www.thregr.org/~wavexx/software/fgallery/")
  1632. (synopsis "Static photo gallery generator")
  1633. (description
  1634. "FGallery is a static, JavaScript photo gallery generator with minimalist
  1635. look. The result can be uploaded on any web server without additional
  1636. requirements.")
  1637. (license license:gpl2+)))
  1638. (define-public opensubdiv
  1639. (package
  1640. (name "opensubdiv")
  1641. (version "3.4.0")
  1642. (source (origin
  1643. (method git-fetch)
  1644. (uri (git-reference
  1645. (url "https://github.com/PixarAnimationStudios/OpenSubdiv")
  1646. (commit (string-append "v" (string-join (string-split version #\.)
  1647. "_")))))
  1648. (file-name (git-file-name name version))
  1649. (sha256
  1650. (base32
  1651. "0cippg6aqc5dlya1cmh3908pwssrg52fwgyylnvz5343yrxmgk12"))))
  1652. (build-system cmake-build-system)
  1653. (arguments
  1654. `(#:phases (modify-phases %standard-phases
  1655. (add-before 'configure 'set-glew-location
  1656. (lambda* (#:key inputs #:allow-other-keys)
  1657. (setenv "GLEW_LOCATION" (assoc-ref inputs "glew"))
  1658. #t))
  1659. (add-before 'check 'start-xorg-server
  1660. (lambda* (#:key inputs #:allow-other-keys)
  1661. ;; The test suite requires a running X server.
  1662. (system "Xvfb :1 &")
  1663. (setenv "DISPLAY" ":1")
  1664. #t)))))
  1665. (native-inputs
  1666. `(("xorg-server" ,xorg-server-for-tests)))
  1667. (inputs
  1668. `(("glew" ,glew)
  1669. ("libxrandr" ,libxrandr)
  1670. ("libxcursor" ,libxcursor)
  1671. ("libxinerama" ,libxinerama)
  1672. ("libxi" ,libxi)
  1673. ("zlib" ,zlib)
  1674. ("glfw" ,glfw)))
  1675. (home-page "https://graphics.pixar.com/opensubdiv/")
  1676. (synopsis "High performance subdivision surface evaluation")
  1677. (description "OpenSubdiv is a set of libraries that implement high
  1678. performance subdivision surface (subdiv) evaluation on massively parallel CPU
  1679. and GPU architectures.")
  1680. (license license:asl2.0)))
  1681. (define-public opencsg
  1682. (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
  1683. (package
  1684. (name "opencsg")
  1685. (version "1.4.2")
  1686. (source
  1687. (origin
  1688. (method git-fetch)
  1689. (uri (git-reference
  1690. (url "https://github.com/floriankirsch/OpenCSG")
  1691. (commit (string-append "opencsg-"
  1692. (string-map dot-to-dash version)
  1693. "-release"))))
  1694. (file-name (git-file-name name version))
  1695. (sha256
  1696. (base32
  1697. "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
  1698. (build-system gnu-build-system)
  1699. (arguments
  1700. `(#:phases
  1701. (modify-phases %standard-phases
  1702. (replace 'configure
  1703. (lambda* (#:key outputs #:allow-other-keys)
  1704. (substitute* "src/Makefile"
  1705. (("/usr/local") (assoc-ref outputs "out")))
  1706. #t))
  1707. (add-before 'build 'skip-example
  1708. (lambda _ (chdir "src") #t)))))
  1709. (inputs
  1710. `(("glew" ,glew)
  1711. ("freeglut" ,freeglut)))
  1712. (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
  1713. (description
  1714. "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) using
  1715. OpenGL. CSG is an approach for modeling complex 3D-shapes using simpler ones.
  1716. For example, two shapes can be combined by uniting them, by intersecting them,
  1717. or by subtracting one shape from the other.")
  1718. (home-page "http://www.opencsg.org/")
  1719. (license license:gpl2))))
  1720. (define-public coin3D
  1721. ;; The ‘4.0.0’ zip archive isn't stable, nor in fact a release. See:
  1722. ;; https://bitbucket.org/Coin3D/coin/issues/179/coin-400-srczip-has-been-modified
  1723. (let ((revision 1)
  1724. (changeset "ab8d0e47a4de3230a8137feb39c142d6ba45f97d"))
  1725. (package
  1726. (name "coin3D")
  1727. (version
  1728. (simple-format #f "3.1.3-~A-~A" revision (string-take changeset 7)))
  1729. (source
  1730. (origin
  1731. (method hg-fetch)
  1732. (uri (hg-reference
  1733. (url "https://bitbucket.org/Coin3D/coin")
  1734. (changeset changeset)))
  1735. (file-name (git-file-name name version))
  1736. (sha256
  1737. (base32 "1ff44jz6lg4rylljvy69n1hcjh9y6achbv9jpn1cv2sf8cxn3r2j"))
  1738. (modules '((guix build utils)))
  1739. (snippet
  1740. '(begin
  1741. (for-each delete-file
  1742. '("cfg/csubst.exe"
  1743. "cfg/wrapmsvc.exe"))
  1744. #t))))
  1745. (build-system cmake-build-system)
  1746. (native-inputs
  1747. `(("doxygen" ,doxygen)
  1748. ("graphviz" ,graphviz)))
  1749. (inputs
  1750. `(("boost" ,boost)
  1751. ("freeglut" ,freeglut)
  1752. ("glew" ,glew)))
  1753. (arguments
  1754. `(#:configure-flags
  1755. (list
  1756. "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
  1757. (string-append "-DBOOST_ROOT="
  1758. (assoc-ref %build-inputs "boost")))))
  1759. (home-page "https://bitbucket.org/Coin3D/coin/wiki/Home")
  1760. (synopsis
  1761. "High-level 3D visualization library with Open Inventor 2.1 API")
  1762. (description
  1763. "Coin is a 3D graphics library with an Application Programming Interface
  1764. based on the Open Inventor 2.1 API. For those who are not familiar with
  1765. Open Inventor, it is a scene-graph based retain-mode rendering and model
  1766. interaction library, written in C++, which has become the de facto
  1767. standard graphics library for 3D visualization and visual simulation
  1768. software in the scientific and engineering community.")
  1769. (license license:bsd-3))))
  1770. (define-public coin3D-4
  1771. (package
  1772. (name "coin3D")
  1773. (version "4.0.0")
  1774. (source
  1775. (origin
  1776. (method git-fetch)
  1777. (uri (git-reference
  1778. (url "https://github.com/coin3d/coin")
  1779. (commit (string-append "Coin-" version))
  1780. (recursive? #t)))
  1781. (file-name (git-file-name name version))
  1782. (sha256
  1783. (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
  1784. (modules '((guix build utils)))
  1785. (snippet
  1786. '(begin
  1787. ;; Delete binaries
  1788. (for-each delete-file
  1789. '("cfg/csubst.exe"
  1790. "cfg/wrapmsvc.exe"))
  1791. ;; Delete references to packaging tool cpack. Otherwise the build
  1792. ;; fails with "add_subdirectory given source "cpack.d" which is not
  1793. ;; an existing directory."
  1794. (substitute* "CMakeLists.txt"
  1795. ((".*cpack.d.*") ""))
  1796. #t))))
  1797. (build-system cmake-build-system)
  1798. (native-inputs
  1799. `(("doxygen" ,doxygen)
  1800. ("graphviz" ,graphviz)))
  1801. (inputs
  1802. `(("boost" ,boost)
  1803. ("freeglut" ,freeglut)
  1804. ("glew" ,glew)))
  1805. (arguments
  1806. `(#:configure-flags
  1807. (list
  1808. "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
  1809. (string-append "-DBOOST_ROOT="
  1810. (assoc-ref %build-inputs "boost")))))
  1811. (home-page "https://github.com/coin3d/coin")
  1812. (synopsis
  1813. "High-level 3D visualization library with Open Inventor 2.1 API")
  1814. (description
  1815. "Coin is a 3D graphics library with an Application Programming Interface
  1816. based on the Open Inventor 2.1 API. For those who are not familiar with Open
  1817. Inventor, it is a scene-graph based retain-mode rendering and model interaction
  1818. library, written in C++, which has become the de facto standard graphics
  1819. library for 3D visualization and visual simulation software in the scientific
  1820. and engineering community.")
  1821. (license license:bsd-3)))
  1822. (define-public superfamiconv
  1823. (package
  1824. (name "superfamiconv")
  1825. (version "0.8.8")
  1826. (source
  1827. (origin
  1828. (method git-fetch)
  1829. (uri (git-reference
  1830. (url "https://github.com/Optiroc/SuperFamiconv")
  1831. (commit (string-append "v" version))))
  1832. (file-name (git-file-name name version))
  1833. (sha256
  1834. (base32
  1835. "0848szv6a2b8wdganh6mw5i8vn8cqvn1kbwzx7mb9wlrf5wzqn37"))))
  1836. (build-system gnu-build-system)
  1837. (arguments
  1838. `(#:tests? #f ; no tests
  1839. #:phases
  1840. (modify-phases %standard-phases
  1841. (delete 'configure)
  1842. (replace 'install
  1843. (lambda* (#:key outputs #:allow-other-keys)
  1844. (let* ((outdir (assoc-ref outputs "out"))
  1845. (bindir (string-append outdir "/bin")))
  1846. (install-file "bin/superfamiconv" bindir)
  1847. #t))))))
  1848. (home-page "https://github.com/Optiroc/SuperFamiconv")
  1849. (synopsis "Tile graphics converter supporting SNES, Game Boy Color
  1850. and PC Engine formats")
  1851. (description "SuperFamiconv is a converter for tiled graphics, supporting
  1852. the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
  1853. Automated palette selection is supported.")
  1854. (license license:expat)))
  1855. (define-public drawpile
  1856. ;; This commit fix building with libmicrohttpd>=0.71.
  1857. (let ((commit "ed1a75deb113da2d1df91a28f557509c4897130e")
  1858. (revision "1"))
  1859. (package
  1860. (name "drawpile")
  1861. (version (string-append "2.1.17-" revision "." (string-take commit 9)))
  1862. (source (origin
  1863. (method git-fetch)
  1864. (uri (git-reference
  1865. (url "https://github.com/drawpile/Drawpile")
  1866. (commit commit)))
  1867. (file-name (git-file-name name version))
  1868. (sha256
  1869. (base32
  1870. "1y21h1hk9ipkjvhjgas0c5hkjyan92vsxbxrn60c906hzqln2fr1"))))
  1871. (build-system qt-build-system)
  1872. (arguments
  1873. '(#:configure-flags
  1874. (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
  1875. (native-inputs
  1876. `(("extra-cmake-modules" ,extra-cmake-modules)
  1877. ("pkg-config" ,pkg-config)))
  1878. (inputs
  1879. `(("giflib" ,giflib)
  1880. ("karchive" ,karchive)
  1881. ("kdnssd" ,kdnssd)
  1882. ("libmicrohttpd" ,libmicrohttpd)
  1883. ("libsodium" ,libsodium)
  1884. ("libvpx" ,libvpx)
  1885. ("libxi" ,libxi)
  1886. ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
  1887. ("qtbase" ,qtbase-5)
  1888. ("qtkeychain" ,qtkeychain)
  1889. ("qtmultimedia" ,qtmultimedia)
  1890. ("qtsvg" ,qtsvg)
  1891. ("qtx11extras" ,qtx11extras)))
  1892. (home-page "https://drawpile.net")
  1893. (synopsis "Collaborative drawing program")
  1894. (description "Drawpile is a drawing program that allows share the canvas
  1895. with other users in real time.
  1896. Some feature highlights:
  1897. @itemize
  1898. @item Shared canvas using the built-in server or a dedicated server
  1899. @item Record, play back and export drawing sessions
  1900. @item Simple animation support
  1901. @item Layers and blending modes
  1902. @item Text layers
  1903. @item Supports pressure sensitive Wacom tablets
  1904. @item Built-in chat
  1905. @item Supports OpenRaster file format
  1906. @item Encrypted connections using SSL
  1907. @item Automatic port forwarding with UPnP
  1908. @end itemize\n")
  1909. (license license:gpl3+))))
  1910. (define-public monado
  1911. (package
  1912. (name "monado")
  1913. (version "21.0.0")
  1914. (source (origin
  1915. (method url-fetch)
  1916. (uri (string-append "https://gitlab.freedesktop.org/" name "/"
  1917. name "/-/archive/v" version "/"
  1918. name "-v" version ".tar.bz2"))
  1919. (sha256
  1920. (base32
  1921. "0n04k7a8b0i8ga0kbzh7qxmvni1ijawgk98s83519vxg4d0yyjbq"))))
  1922. (build-system meson-build-system)
  1923. (inputs
  1924. `(("ffmpeg" ,ffmpeg)
  1925. ("glslang" ,glslang)
  1926. ("libudev" ,eudev)
  1927. ("libusb" ,libusb)
  1928. ("libxcb" ,libxcb)
  1929. ("libxrandr" ,libxrandr)
  1930. ("opengl" ,mesa)
  1931. ("v4l" ,v4l-utils)
  1932. ("vulkan-loader" ,vulkan-loader)))
  1933. (native-inputs
  1934. `(("eigen" ,eigen)
  1935. ("pkg-config" ,pkg-config)
  1936. ("vulkan-headers" ,vulkan-headers)))
  1937. (arguments
  1938. `(#:configure-flags
  1939. (list "-Dinstall-active-runtime=false")))
  1940. (home-page "https://monado.freedesktop.org/")
  1941. (synopsis "OpenXR runtime")
  1942. (description "Monado is an OpenXR runtime delivering immersive experiences
  1943. such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be
  1944. a complete and conforming implementation of the OpenXR API made by Khronos.")
  1945. (license license:boost1.0)))