gtk.scm 115 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
  3. ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
  4. ;;; Copyright © 2014, 2015, 2017, 2018, 2019, 2021 Mark H Weaver <mhw@netris.org>
  5. ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
  6. ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
  7. ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
  8. ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
  9. ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
  10. ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
  11. ;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
  12. ;;; Copyright © 2016, 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  13. ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
  14. ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
  15. ;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
  16. ;;; Copyright © 2016 Nikita <nikita@n0.is>
  17. ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
  18. ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  19. ;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
  20. ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
  21. ;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
  22. ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
  23. ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
  24. ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
  25. ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
  26. ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
  27. ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  28. ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
  29. ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
  30. ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
  31. ;;;
  32. ;;; This file is part of GNU Guix.
  33. ;;;
  34. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  35. ;;; under the terms of the GNU General Public License as published by
  36. ;;; the Free Software Foundation; either version 3 of the License, or (at
  37. ;;; your option) any later version.
  38. ;;;
  39. ;;; GNU Guix is distributed in the hope that it will be useful, but
  40. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  41. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  42. ;;; GNU General Public License for more details.
  43. ;;;
  44. ;;; You should have received a copy of the GNU General Public License
  45. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  46. (define-module (gnu packages gtk)
  47. #:use-module ((guix licenses) #:prefix license:)
  48. #:use-module (guix gexp)
  49. #:use-module (guix utils)
  50. #:use-module (guix packages)
  51. #:use-module (guix download)
  52. #:use-module (guix git-download)
  53. #:use-module ((guix build utils) #:select (alist-replace))
  54. #:use-module (guix build-system glib-or-gtk)
  55. #:use-module (guix build-system gnu)
  56. #:use-module (guix build-system meson)
  57. #:use-module (guix build-system perl)
  58. #:use-module (guix build-system python)
  59. #:use-module (guix build-system waf)
  60. #:use-module (gnu packages)
  61. #:use-module (gnu packages algebra)
  62. #:use-module (gnu packages autotools)
  63. #:use-module (gnu packages base)
  64. #:use-module (gnu packages bash)
  65. #:use-module (gnu packages boost)
  66. #:use-module (gnu packages build-tools)
  67. #:use-module (gnu packages texinfo)
  68. #:use-module (gnu packages check)
  69. #:use-module (gnu packages compression)
  70. #:use-module (gnu packages docbook)
  71. #:use-module (gnu packages documentation)
  72. #:use-module (gnu packages enchant)
  73. #:use-module (gnu packages fontutils)
  74. #:use-module (gnu packages freedesktop)
  75. #:use-module (gnu packages fribidi)
  76. #:use-module (gnu packages gettext)
  77. #:use-module (gnu packages ghostscript)
  78. #:use-module (gnu packages gl)
  79. #:use-module (gnu packages glib)
  80. #:use-module (gnu packages gnome)
  81. #:use-module (gnu packages graphviz)
  82. #:use-module (gnu packages icu4c)
  83. #:use-module (gnu packages image)
  84. #:use-module (gnu packages iso-codes)
  85. #:use-module (gnu packages libffi)
  86. #:use-module (gnu packages linux)
  87. #:use-module (gnu packages m4)
  88. #:use-module (gnu packages man)
  89. #:use-module (gnu packages pdf)
  90. #:use-module (gnu packages perl)
  91. #:use-module (gnu packages perl-check)
  92. #:use-module (gnu packages pkg-config)
  93. #:use-module (gnu packages pretty-print)
  94. #:use-module (gnu packages python)
  95. #:use-module (gnu packages python-build)
  96. #:use-module (gnu packages python-xyz)
  97. #:use-module (gnu packages gstreamer)
  98. #:use-module (gnu packages guile)
  99. #:use-module (gnu packages guile-xyz)
  100. #:use-module (gnu packages cups)
  101. #:use-module (gnu packages version-control)
  102. #:use-module (gnu packages video)
  103. #:use-module (gnu packages vulkan)
  104. #:use-module (gnu packages web)
  105. #:use-module (gnu packages xml)
  106. #:use-module (gnu packages xorg)
  107. #:use-module (gnu packages xdisorg)
  108. #:use-module (gnu packages pulseaudio)
  109. #:use-module (srfi srfi-1)
  110. #:use-module (srfi srfi-26)
  111. #:use-module (ice-9 match))
  112. (define-public atk
  113. (package
  114. (name "atk")
  115. (version "2.36.0")
  116. (source (origin
  117. (method url-fetch)
  118. (uri (string-append "mirror://gnome/sources/" name "/"
  119. (version-major+minor version) "/"
  120. name "-" version ".tar.xz"))
  121. (sha256
  122. (base32
  123. "1217cmmykjgkkim0zr1lv5j13733m4w5vipmy4ivw0ll6rz28xpv"))))
  124. (build-system meson-build-system)
  125. (arguments
  126. `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
  127. ,@(if (%current-target-system)
  128. `(#:configure-flags
  129. ;; introspection requires running binaries for the host system
  130. ;; on the build system.
  131. '("-Dintrospection=false"))
  132. '())))
  133. (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
  134. (native-inputs
  135. `(("gettext" ,gettext-minimal)
  136. ("glib" ,glib "bin") ; glib-mkenums, etc.
  137. ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
  138. ("pkg-config" ,pkg-config)))
  139. (synopsis "GNOME accessibility toolkit")
  140. (description
  141. "ATK provides the set of accessibility interfaces that are implemented
  142. by other toolkits and applications. Using the ATK interfaces, accessibility
  143. tools have full access to view and control running applications.")
  144. (license license:lgpl2.1+)
  145. (home-page "https://wiki.gnome.org/Accessibility")))
  146. (define-public cairo
  147. (package
  148. (name "cairo")
  149. (version "1.16.0")
  150. (source
  151. (origin
  152. (method url-fetch)
  153. (uri
  154. (string-append "https://cairographics.org/releases/cairo-"
  155. version ".tar.xz"))
  156. (sha256
  157. (base32 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))
  158. (patches (search-patches
  159. "cairo-CVE-2018-19876.patch"
  160. "cairo-CVE-2020-35492.patch"))))
  161. (build-system glib-or-gtk-build-system)
  162. (outputs '("out" "doc"))
  163. (arguments
  164. `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
  165. #:configure-flags
  166. (list
  167. "--disable-static"
  168. ;; XXX: To be enabled.
  169. ;; "--enable-gallium=yes"
  170. ;; "--enable-gl=yes"
  171. ;; " --enable-glesv2=yes"
  172. ;; "--enable-glesv3=yes"
  173. ;; "--enable-cogl=yes"
  174. ;; "--enable-directfb=yes"
  175. ;; "--enable-vg=yes"
  176. "--enable-tee=yes" ;needed for GNU IceCat
  177. "--enable-xml=yes" ;for cairo-xml support
  178. (string-append "--with-html-dir="
  179. (assoc-ref %outputs "doc")
  180. "/share/gtk-doc/html"))))
  181. (native-inputs
  182. `(("gobject-introspection" ,gobject-introspection)
  183. ("pkg-config" ,pkg-config)
  184. ("python" ,python-wrapper)))
  185. (inputs
  186. ;; TODO(core-updates): make this unconditional
  187. `(,@(if (%current-target-system)
  188. `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
  189. '())
  190. ("drm" ,libdrm)
  191. ("ghostscript" ,ghostscript)
  192. ("libspectre" ,libspectre)
  193. ("poppler" ,poppler)))
  194. (propagated-inputs
  195. `( ;; ("cogl" ,cogl)
  196. ;; ("directfb" ,directfb)
  197. ("fontconfig" ,fontconfig)
  198. ("freetype" ,freetype)
  199. ("glib" ,glib)
  200. ;; ("gtk+" ,gtk+)
  201. ("libpng" ,libpng)
  202. ;; ("librsvg" ,librsvg)
  203. ;; ("opengl" ,mesa)
  204. ("pixman" ,pixman)
  205. ("x11" ,libx11)
  206. ("xcb" ,libxcb)
  207. ("xext" ,libxext)
  208. ("xrender" ,libxrender)))
  209. (synopsis "Multi-platform 2D graphics library")
  210. (description "Cairo is a 2D graphics library with support for multiple output
  211. devices. Currently supported output targets include the X Window System (via
  212. both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
  213. output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.")
  214. (home-page "https://cairographics.org/")
  215. (license
  216. ;; This project is dual-licensed.
  217. (list
  218. license:lgpl2.1+
  219. license:mpl1.1))))
  220. (define-public cairo-sans-poppler
  221. ;; Variant used to break the dependency cycle between Poppler and Cairo.
  222. (package/inherit cairo
  223. (inputs (alist-delete "poppler" (package-inputs cairo)))
  224. (properties `((hidden? . #t)))))
  225. (define-public cairo-xcb
  226. (package/inherit cairo
  227. (name "cairo-xcb")
  228. (inputs
  229. `(("mesa" ,mesa)
  230. ,@(package-inputs cairo)))
  231. (arguments
  232. `(#:tests? #f
  233. #:configure-flags
  234. '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
  235. (synopsis "2D graphics library (with X11 support)")))
  236. (define-public harfbuzz
  237. (package
  238. (name "harfbuzz")
  239. (version "2.8.2")
  240. (source (origin
  241. (method url-fetch)
  242. (uri (string-append "https://github.com/harfbuzz/harfbuzz"
  243. "/releases/download/" version "/harfbuzz-"
  244. version ".tar.xz"))
  245. (sha256
  246. (base32
  247. "1rvv86wpm3y04fqns1655268rhvhvms469837709v2z2bhwn316m"))))
  248. (build-system gnu-build-system)
  249. (outputs '("out"
  250. "bin")) ; 160K, only hb-view depend on cairo
  251. (inputs
  252. `(("cairo" ,cairo)))
  253. (propagated-inputs
  254. ;; There are all in the Requires or Requires.private field of '.pc'.
  255. `(("glib" ,glib)
  256. ("graphite2" ,graphite2)
  257. ("icu4c" ,icu4c)))
  258. (native-inputs
  259. `(("glib:bin" ,glib "bin") ;for glib-mkenums
  260. ("gobject-introspection" ,gobject-introspection)
  261. ("pkg-config" ,pkg-config)
  262. ("python" ,python-wrapper)
  263. ("which" ,which)))
  264. (arguments
  265. `(#:configure-flags `("--with-graphite2"
  266. "--with-gobject"
  267. ,(string-append
  268. "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
  269. (synopsis "OpenType text shaping engine")
  270. (description
  271. "HarfBuzz is an OpenType text shaping engine.")
  272. (license (license:x11-style "file://COPYING"
  273. "See 'COPYING' in the distribution."))
  274. (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
  275. (define-public libdatrie
  276. (package
  277. (name "libdatrie")
  278. (version "0.2.13")
  279. (source
  280. (origin
  281. (method url-fetch)
  282. (uri
  283. (string-append "https://linux.thai.net/pub/ThaiLinux/software/"
  284. "libthai/libdatrie-" version ".tar.xz"))
  285. (sha256
  286. (base32 "1gplcx9ddglpxmqm10qn38kjmvdh4hnhj14rzgqag095psr1n8qj"))))
  287. (build-system gnu-build-system)
  288. (outputs '("out" "doc"))
  289. (arguments
  290. (list #:configure-flags
  291. #~(list (string-append "--with-html-docdir=" #$output:doc
  292. "/share/doc/datrie/html"))
  293. ;; Several tests refer to the 'test.tri' file, leading to race
  294. ;; conditions when running tests in parallel.
  295. #:parallel-tests? #f))
  296. (native-inputs
  297. `(("doxygen" ,doxygen)
  298. ("pkg-config" ,pkg-config)))
  299. (synopsis "Double-Array Trie Library")
  300. (description "Libdatrie is an implementation of double-array structure for
  301. representing trie. Trie is a kind of digital search tree.")
  302. (home-page "https://linux.thai.net/~thep/datrie/datrie.html")
  303. (license license:lgpl2.1+)))
  304. (define-public libthai
  305. (package
  306. (name "libthai")
  307. (version "0.1.28")
  308. (source
  309. (origin
  310. (method url-fetch)
  311. (uri
  312. (string-append "https://linux.thai.net/pub/thailinux/software/"
  313. "libthai/libthai-" version ".tar.xz"))
  314. (sha256
  315. (base32 "04g93bgxrcnay9fglpq2lj9nr7x1xh06i60m7haip8as9dxs3q7z"))))
  316. (build-system gnu-build-system)
  317. (outputs '("out" "doc"))
  318. (arguments
  319. `(#:configure-flags
  320. (list
  321. (string-append "--with-html-docdir="
  322. (assoc-ref %outputs "doc")
  323. "/share/doc/libthai/html"))))
  324. (native-inputs
  325. `(("doxygen" ,doxygen)
  326. ("pkg-config" ,pkg-config)
  327. ;; TODO(core-updates): Make this input unconditional.
  328. ,@(if (%current-target-system)
  329. `(("datrie" ,libdatrie)) ; for 'trietool'
  330. '())))
  331. (propagated-inputs
  332. `(("datrie" ,libdatrie)))
  333. (synopsis "Thai language support library")
  334. (description "LibThai is a set of Thai language support routines aimed to
  335. ease developers’ tasks to incorporate Thai language support in their
  336. applications.")
  337. (home-page "https://linux.thai.net/projects/libthai")
  338. (license license:lgpl2.1+)))
  339. (define-public pango
  340. (package
  341. (name "pango")
  342. (version "1.48.9")
  343. (source (origin
  344. (method url-fetch)
  345. (uri (string-append "mirror://gnome/sources/pango/"
  346. (version-major+minor version) "/"
  347. name "-" version ".tar.xz"))
  348. (patches (search-patches "pango-skip-libthai-test.patch"))
  349. (sha256
  350. (base32
  351. "1akj11n0ycqrm1rvi0fdfldqk7l5zk9vb8sq77009ap57xyna4x9"))))
  352. (build-system meson-build-system)
  353. (arguments
  354. '(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
  355. #:phases (modify-phases %standard-phases
  356. (add-after 'unpack 'disable-cantarell-tests
  357. (lambda _
  358. (substitute* "tests/meson.build"
  359. ;; XXX FIXME: These tests require "font-cantarell", but
  360. ;; adding it here would introduce a circular dependency.
  361. (("\\[ 'test-layout'.*") "")
  362. (("\\[ 'test-itemize'.*") "")
  363. (("\\[ 'test-font'.*") "")
  364. (("\\[ 'test-harfbuzz'.*") ""))
  365. #t)))))
  366. (propagated-inputs
  367. ;; These are all in Requires or Requires.private of the '.pc' files.
  368. `(("cairo" ,cairo)
  369. ("fontconfig" ,fontconfig)
  370. ("freetype" ,freetype)
  371. ("fribidi" ,fribidi)
  372. ("glib" ,glib)
  373. ("harfbuzz" ,harfbuzz)
  374. ("libthai" ,libthai)
  375. ;; Some packages, such as Openbox, expect Pango to be built with the
  376. ;; optional libxft support.
  377. ("libxft" ,libxft)
  378. ("libxrender" ,libxrender)))
  379. (inputs
  380. ;; TODO(core-updates): Unconditionally add "bash-minimal"
  381. `(,@(if (%current-target-system)
  382. `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
  383. '())
  384. ("zlib" ,zlib)))
  385. (native-inputs
  386. `(("glib" ,glib "bin") ; glib-mkenums, etc.
  387. ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
  388. ("help2man" ,help2man)
  389. ("perl" ,perl)
  390. ("pkg-config" ,pkg-config)
  391. ("python" ,python-wrapper)))
  392. (synopsis "Text and font handling library")
  393. (description "Pango is a library for laying out and rendering of text, with
  394. an emphasis on internationalization. Pango can be used anywhere that text
  395. layout is needed, though most of the work on Pango so far has been done in the
  396. context of the GTK+ widget toolkit. Pango forms the core of text and font
  397. handling for GTK+-2.x.")
  398. (home-page "https://pango.gnome.org/")
  399. (license license:lgpl2.0+)))
  400. (define-public pango-1.42
  401. (package
  402. (inherit pango)
  403. (version "1.42.4")
  404. (source (origin
  405. (method url-fetch)
  406. (uri (string-append "mirror://gnome/sources/pango/"
  407. (version-major+minor version) "/"
  408. "pango-" version ".tar.xz"))
  409. (sha256
  410. (base32
  411. "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
  412. (build-system gnu-build-system)
  413. (arguments
  414. '(#:phases (modify-phases %standard-phases
  415. (add-after 'configure 'disable-layout-test
  416. (lambda _
  417. ;; This test requires that fontconfig uses bitmap fonts
  418. ;; such as "font-ghostscript"; however providing such a
  419. ;; package alone is not enough, as the requirement comes
  420. ;; from deeper in the font stack. Since this version of
  421. ;; Pango is only used for librsvg, simply disable the
  422. ;; test.
  423. (substitute* "tests/Makefile"
  424. (("test-layout\\$\\(EXEEXT\\)") ""))
  425. #t)))))))
  426. (define-public pangox-compat
  427. (package
  428. (name "pangox-compat")
  429. (version "0.0.2")
  430. (source (origin
  431. (method url-fetch)
  432. (uri (string-append "mirror://gnome/sources/" name "/"
  433. (version-major+minor version) "/"
  434. name "-" version ".tar.xz"))
  435. (sha256
  436. (base32
  437. "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
  438. (build-system gnu-build-system)
  439. (inputs
  440. `(("glib" ,glib)
  441. ("pango" ,pango-1.42)))
  442. (native-inputs
  443. `(("intltool" ,intltool)
  444. ("pkg-config" ,pkg-config)))
  445. (home-page "https://developer.gnome.org/pango")
  446. (synopsis "Obsolete pango functions")
  447. (description "Pangox was a X backend to pango. It is now obsolete and no
  448. longer provided by recent pango releases. pangox-compat provides the
  449. functions which were removed.")
  450. (license license:lgpl2.0+)))
  451. (define-public ganv
  452. (package
  453. (name "ganv")
  454. (version "1.6.0")
  455. (source (origin
  456. (method url-fetch)
  457. (uri (string-append "https://download.drobilla.net/ganv-"
  458. version ".tar.bz2"))
  459. (sha256
  460. (base32
  461. "0pik2d3995z0rjcjhb4hsj5fsph3m8khg6j10k6mx4j2j727aq6l"))))
  462. (build-system waf-build-system)
  463. (arguments
  464. `(#:phases
  465. (modify-phases %standard-phases
  466. (add-before 'configure 'set-flags
  467. (lambda* (#:key outputs #:allow-other-keys)
  468. ;; Allow 'bin/ganv_bench' to find libganv-1.so.
  469. (setenv "LDFLAGS"
  470. (string-append "-Wl,-rpath="
  471. (assoc-ref outputs "out") "/lib"))
  472. #t)))
  473. #:tests? #f)) ; no check target
  474. (inputs
  475. `(("gtk" ,gtk+-2)
  476. ("gtkmm" ,gtkmm-2)))
  477. (native-inputs
  478. `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
  479. ("pkg-config" ,pkg-config)))
  480. (home-page "https://drobilla.net/software/ganv/")
  481. (synopsis "GTK+ widget for interactive graph-like environments")
  482. (description
  483. "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
  484. graph-like environments, e.g. modular synths or finite state machine
  485. diagrams.")
  486. (license license:gpl3+)))
  487. (define-public gtksourceview-2
  488. (package
  489. (name "gtksourceview")
  490. (version "2.10.5") ; This is the last version which builds against gtk+2
  491. (source (origin
  492. (method url-fetch)
  493. (uri (string-append "mirror://gnome/sources/" name "/"
  494. (version-major+minor version) "/"
  495. name "-" version ".tar.bz2"))
  496. (sha256
  497. (base32
  498. "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
  499. (patches
  500. (search-patches
  501. "gtksourceview-2-add-default-directory.patch"))))
  502. (build-system gnu-build-system)
  503. (native-inputs
  504. `(("intltool" ,intltool)
  505. ("glib" ,glib "bin") ; for glib-genmarshal, etc.
  506. ("pkg-config" ,pkg-config)
  507. ;; For testing.
  508. ("xorg-server" ,xorg-server-for-tests)
  509. ("shared-mime-info" ,shared-mime-info)))
  510. (propagated-inputs
  511. ;; As per the pkg-config file.
  512. `(("gtk" ,gtk+-2)
  513. ("libxml2" ,libxml2)))
  514. (arguments
  515. `(#:phases
  516. ;; Unfortunately, some of the tests in "make check" are highly dependent
  517. ;; on the environment therefore, some black magic is required.
  518. (modify-phases %standard-phases
  519. (add-before 'check 'start-xserver
  520. (lambda* (#:key inputs #:allow-other-keys)
  521. (let ((xorg-server (assoc-ref inputs "xorg-server"))
  522. (mime (assoc-ref inputs "shared-mime-info")))
  523. ;; There must be a running X server and make check doesn't start one.
  524. ;; Therefore we must do it.
  525. (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
  526. (setenv "DISPLAY" ":1")
  527. ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
  528. (system "ln -s gtksourceview gtksourceview-2.0")
  529. (setenv "XDG_DATA_HOME" (getcwd))
  530. ;; Finally, the mimetypes must be available.
  531. (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
  532. #t)))))
  533. (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
  534. (description
  535. "GtkSourceView is a portable C library that extends the standard GTK+
  536. framework for multiline text editing with support for configurable syntax
  537. highlighting, unlimited undo/redo, search and replace, a completion framework,
  538. printing and other features typical of a source code editor.")
  539. (license license:lgpl2.0+)
  540. (home-page "https://developer.gnome.org/gtksourceview/")))
  541. (define-public gtksourceview
  542. (package
  543. (name "gtksourceview")
  544. (version "4.2.0")
  545. (source (origin
  546. (method url-fetch)
  547. (uri (string-append "mirror://gnome/sources/gtksourceview/"
  548. (version-major+minor version) "/"
  549. "gtksourceview-" version ".tar.xz"))
  550. (sha256
  551. (base32
  552. "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
  553. (build-system gnu-build-system)
  554. (arguments
  555. '(#:phases
  556. (modify-phases %standard-phases
  557. (add-before
  558. 'check 'pre-check
  559. (lambda* (#:key inputs #:allow-other-keys)
  560. (let ((xorg-server (assoc-ref inputs "xorg-server")))
  561. ;; Tests require a running X server.
  562. (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
  563. (setenv "DISPLAY" ":1")
  564. ;; For the missing /etc/machine-id.
  565. (setenv "DBUS_FATAL_WARNINGS" "0")
  566. #t))))))
  567. (native-inputs
  568. `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
  569. ("intltool" ,intltool)
  570. ("itstool" ,itstool)
  571. ("gobject-introspection" ,gobject-introspection)
  572. ("pkg-config" ,pkg-config)
  573. ("vala" ,vala)
  574. ;; For testing.
  575. ("xorg-server" ,xorg-server-for-tests)
  576. ("shared-mime-info" ,shared-mime-info)))
  577. (propagated-inputs
  578. ;; gtksourceview-3.0.pc refers to all these.
  579. `(("glib" ,glib)
  580. ("gtk+" ,gtk+)
  581. ("libxml2" ,libxml2)))
  582. (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
  583. (synopsis "GNOME source code widget")
  584. (description "GtkSourceView is a text widget that extends the standard
  585. GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
  586. highlighting and other features typical of a source code editor.")
  587. (license license:lgpl2.1+)))
  588. (define-public gtksourceview-3
  589. (package (inherit gtksourceview)
  590. (name "gtksourceview")
  591. (version "3.24.10")
  592. (source (origin
  593. (method url-fetch)
  594. (uri (string-append "mirror://gnome/sources/" name "/"
  595. (version-major+minor version) "/"
  596. name "-" version ".tar.xz"))
  597. (sha256
  598. (base32
  599. "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
  600. (define-public gdk-pixbuf
  601. (package
  602. (name "gdk-pixbuf")
  603. (version "2.42.4")
  604. (source (origin
  605. (method url-fetch)
  606. (uri (string-append "mirror://gnome/sources/" name "/"
  607. (version-major+minor version) "/"
  608. name "-" version ".tar.xz"))
  609. (sha256
  610. (base32
  611. "0k9f9177qxaryaxprwrhqnv5p2gdq4a8i6y05gm98qa8izc5v77y"))))
  612. (build-system meson-build-system)
  613. (arguments
  614. `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
  615. #:configure-flags '("-Dinstalled_tests=false" "-Djasper=true")
  616. #:phases
  617. (modify-phases %standard-phases
  618. (add-after 'unpack 'patch-docbook
  619. ;; TODO(core-updates): Unconditionally look in (or native-inputs inputs)
  620. (lambda* (#:key ,@(if (%current-target-system)
  621. '(native-inputs)
  622. '())
  623. inputs #:allow-other-keys)
  624. (with-directory-excursion "docs"
  625. (substitute* "meson.build"
  626. (("http://docbook.sourceforge.net/release/xsl/current/")
  627. (string-append (assoc-ref ,(if (%current-target-system)
  628. '(or native-inputs inputs)
  629. 'inputs) "docbook-xsl")
  630. "/xml/xsl/docbook-xsl-1.79.2/")))
  631. (substitute* (find-files "." "\\.xml$")
  632. (("http://www.oasis-open.org/docbook/xml/4\\.3/")
  633. (string-append (assoc-ref ,(if (%current-target-system)
  634. '(or native-inputs inputs)
  635. 'inputs) "docbook-xml")
  636. "/xml/dtd/docbook/"))))
  637. #t))
  638. (add-before 'configure 'disable-failing-tests
  639. (lambda _
  640. (substitute* "tests/meson.build"
  641. (("\\[ 'pixbuf-fail', \\['conform', 'slow'\\], \\],")
  642. ""))
  643. #t))
  644. ;; The slow tests take longer than the specified timeout.
  645. ,@(if (any (cute string=? <> (%current-system))
  646. '("armhf-linux" "aarch64-linux"))
  647. '((replace 'check
  648. (lambda _
  649. (invoke "meson" "test" "--timeout-multiplier" "5"))))
  650. '()))))
  651. (propagated-inputs
  652. `( ;; Required by gdk-pixbuf-2.0.pc
  653. ("glib" ,glib)
  654. ;; Required by gdk-pixbuf-xlib-2.0.pc
  655. ("libx11" ,libx11)
  656. ;; Used for testing and required at runtime.
  657. ("shared-mime-info" ,shared-mime-info)))
  658. (inputs
  659. `(,@(if (%current-target-system)
  660. `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
  661. '())
  662. ("jasper" ,jasper)
  663. ("libjpeg" ,libjpeg-turbo)
  664. ("libpng" ,libpng)
  665. ("libtiff" ,libtiff)))
  666. (native-inputs
  667. `(("docbook-xml" ,docbook-xml-4.3)
  668. ("docbook-xsl" ,docbook-xsl)
  669. ("gettext" ,gettext-minimal)
  670. ("glib" ,glib "bin") ; glib-mkenums, etc.
  671. ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
  672. ("perl" ,perl)
  673. ("pkg-config" ,pkg-config)
  674. ("xsltproc" ,libxslt)))
  675. (synopsis "Image loading library")
  676. (description "GdkPixbuf is a library that loads image data in various
  677. formats and stores it as linear buffers in memory. The buffers can then be
  678. scaled, composited, modified, saved, or rendered.")
  679. (home-page "https://wiki.gnome.org/Projects/GdkPixbuf")
  680. (license license:lgpl2.1+)))
  681. ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
  682. ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
  683. ;; closure size.
  684. (define-public gdk-pixbuf+svg
  685. (package/inherit gdk-pixbuf
  686. (name "gdk-pixbuf+svg")
  687. (inputs
  688. `(("librsvg" ,librsvg)
  689. ,@(package-inputs gdk-pixbuf)))
  690. (arguments
  691. (substitute-keyword-arguments (package-arguments gdk-pixbuf)
  692. ((#:phases phases)
  693. `(modify-phases ,phases
  694. (add-after 'install 'register-svg-loader
  695. (lambda* (#:key inputs outputs #:allow-other-keys)
  696. (let* ((out (assoc-ref outputs "out"))
  697. (librsvg (assoc-ref inputs "librsvg"))
  698. (loaders
  699. (append
  700. (find-files out "^libpixbufloader-.*\\.so$")
  701. (find-files librsvg "^libpixbufloader-.*\\.so$")))
  702. (gdk-pixbuf-query-loaders
  703. (string-append out "/bin/gdk-pixbuf-query-loaders")))
  704. (apply invoke
  705. gdk-pixbuf-query-loaders
  706. "--update-cache"
  707. loaders))))))))
  708. (synopsis "Image loading library, with SVG support")))
  709. (define-public at-spi2-core
  710. (package
  711. (name "at-spi2-core")
  712. (version "2.40.0")
  713. (source (origin
  714. (method url-fetch)
  715. (uri (string-append "mirror://gnome/sources/" name "/"
  716. (version-major+minor version) "/"
  717. name "-" version ".tar.xz"))
  718. (sha256
  719. (base32
  720. "0a9l6cfxynjn6jcp29d72i75xbkrzs1l5kmqcwmfal801b9sg5j1"))))
  721. (build-system meson-build-system)
  722. (outputs '("out" "doc"))
  723. (arguments
  724. `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
  725. #:configure-flags
  726. ;; Generating documentation requires running binaries for the host
  727. ;; on the build machine.
  728. (list ,(if (%current-target-system)
  729. "-Ddocs=false"
  730. "-Ddocs=true"))
  731. #:phases
  732. (modify-phases %standard-phases
  733. (add-after 'unpack 'set-documentation-path
  734. (lambda* (#:key outputs #:allow-other-keys)
  735. ;; Ensure that the cross-references point to the "doc" output.
  736. (substitute* "doc/libatspi/meson.build"
  737. (("docpath =.*")
  738. (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
  739. #t))
  740. (add-before 'install 'prepare-doc-directory
  741. (lambda* (#:key outputs #:allow-other-keys)
  742. (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
  743. #t))
  744. ;; TODO(core-updates): Unconditionally use (or native-inputs inputs)
  745. (add-after 'unpack 'patch-docbook-sgml
  746. (lambda* (#:key ,@(if (%current-target-system)
  747. '(native-inputs)
  748. '()) inputs #:allow-other-keys)
  749. (let* ((xmldoc
  750. (string-append (assoc-ref ,(if (%current-target-system)
  751. '(or native-inputs inputs)
  752. 'inputs)
  753. "docbook-xml")
  754. "/xml/dtd/docbook")))
  755. (substitute* "doc/libatspi/libatspi-docs.sgml"
  756. (("http://.*/docbookx\\.dtd")
  757. (string-append xmldoc "/docbookx.dtd")))
  758. #t)))
  759. ,@(if (%current-target-system)
  760. '()
  761. '((add-after 'install 'move-documentation
  762. (lambda* (#:key outputs #:allow-other-keys)
  763. (let ((out (assoc-ref outputs "out"))
  764. (doc (assoc-ref outputs "doc")))
  765. (copy-recursively
  766. (string-append out "/share/gtk-doc")
  767. (string-append doc "/share/gtk-doc"))
  768. (delete-file-recursively
  769. (string-append out "/share/gtk-doc")))
  770. #t))))
  771. (add-after 'install 'check
  772. (lambda _
  773. (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
  774. ;; Run test-suite under a dbus session.
  775. (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
  776. (string-append %output "/share"))
  777. ;; Don't fail on missing '/etc/machine-id'.
  778. (setenv "DBUS_FATAL_WARNINGS" "0") ;
  779. (invoke "dbus-launch" "ninja" "test")))
  780. (delete 'check))))
  781. (inputs
  782. ;; TODO(core-updates): Make this input unconditional.
  783. (if (%current-target-system)
  784. `(("bash-minimal" ,bash-minimal))
  785. '()))
  786. (propagated-inputs
  787. ;; atspi-2.pc refers to all these.
  788. `(("dbus" ,dbus)
  789. ("glib" ,glib)
  790. ("libx11" ,libx11)
  791. ("libxi" ,libxi)
  792. ("libxtst" ,libxtst)))
  793. (native-inputs
  794. `(("docbook-xml" ,docbook-xml-4.3)
  795. ("gettext" ,gettext-minimal)
  796. ("glib" ,glib "bin")
  797. ("gobject-introspection" ,gobject-introspection)
  798. ("gtk-doc" ,gtk-doc)
  799. ("pkg-config" ,pkg-config)
  800. ("python" ,python-wrapper)))
  801. (synopsis "Assistive Technology Service Provider Interface, core components")
  802. (description
  803. "The Assistive Technology Service Provider Interface, core components,
  804. is part of the GNOME accessibility project.")
  805. (license license:lgpl2.1+)
  806. (home-page "https://wiki.gnome.org/Accessibility/")))
  807. ;;; A minimal variant used to prevent a cycle with Inkscape.
  808. (define at-spi2-core-minimal
  809. (package
  810. (inherit at-spi2-core)
  811. (name "at-spi2-core-minimal")
  812. (outputs (delete "doc" (package-outputs at-spi2-core)))
  813. (arguments
  814. (substitute-keyword-arguments (package-arguments at-spi2-core)
  815. ((#:configure-flags configure-flags)
  816. `(delete "-Ddocs=true" ,configure-flags))
  817. ((#:phases phases)
  818. `(modify-phases ,phases
  819. (delete 'set-documentation-path)
  820. (delete 'prepare-doc-directory)
  821. (delete 'move-documentation)))))
  822. (native-inputs
  823. (alist-delete "gtk-doc" (package-native-inputs at-spi2-core)))))
  824. (define-public at-spi2-atk
  825. (package
  826. (name "at-spi2-atk")
  827. (version "2.38.0")
  828. (source (origin
  829. (method url-fetch)
  830. (uri (string-append "mirror://gnome/sources/" name "/"
  831. (version-major+minor version) "/"
  832. name "-" version ".tar.xz"))
  833. (sha256
  834. (base32
  835. "0ks6r9sx27l80n3a7yjmkilxv48cqj183wc7cap3caw2myjhi86g"))))
  836. (build-system meson-build-system)
  837. (arguments
  838. `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
  839. ;; Compiling tests requires "libxml2" to be in 'inputs'.
  840. ,@(if (%current-target-system)
  841. `(#:configure-flags '("-Dtests=false"))
  842. '())
  843. #:phases
  844. (modify-phases %standard-phases
  845. (replace 'check
  846. ;; Run test-suite under a dbus session.
  847. (lambda _
  848. (setenv "DBUS_FATAL_WARNINGS" "0")
  849. (invoke "dbus-launch" "meson" "test"))))))
  850. (propagated-inputs
  851. ;; TODO: Replace by at-spi2-core-minimal in the next staging window, or
  852. ;; when Inkscape 0.92 is upgraded to 1.0 to avoid a cycle.
  853. `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
  854. (inputs
  855. `(("atk" ,atk)
  856. ("glib" ,glib)))
  857. (native-inputs
  858. `(("dbus" ,dbus) ; For tests
  859. ("gobject-introspection" ,gobject-introspection)
  860. ("libxml2" ,libxml2)
  861. ("pkg-config" ,pkg-config)))
  862. (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
  863. (description
  864. "The Assistive Technology Service Provider Interface
  865. is part of the GNOME accessibility project.")
  866. (license license:lgpl2.1+)
  867. (home-page "https://wiki.gnome.org/Accessibility/")))
  868. (define-public gtk+-2
  869. (package
  870. (name "gtk+")
  871. (version "2.24.33")
  872. (source (origin
  873. (method url-fetch)
  874. (uri (string-append "mirror://gnome/sources/" name "/"
  875. (version-major+minor version) "/"
  876. name "-" version ".tar.xz"))
  877. (sha256
  878. (base32
  879. "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
  880. (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
  881. "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
  882. "gtk2-theme-paths.patch"))))
  883. (build-system gnu-build-system)
  884. (outputs '("out" "bin" "doc"))
  885. (propagated-inputs
  886. `(("atk" ,atk)
  887. ("cairo" ,cairo)
  888. ;; SVG support is optional and requires librsvg, which pulls in rust.
  889. ;; Rust is not supported well on every architecture yet.
  890. ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system)
  891. (%current-system)))
  892. gdk-pixbuf+svg
  893. gdk-pixbuf))
  894. ("glib" ,glib)
  895. ("pango" ,pango)))
  896. (inputs
  897. `(("cups" ,cups)
  898. ("libx11" ,libx11)
  899. ("libxcomposite" ,libxcomposite)
  900. ("libxcursor" ,libxcursor)
  901. ("libxext" ,libxext)
  902. ("libxdamage" ,libxdamage)
  903. ("libxi" ,libxi)
  904. ("libxinerama" ,libxinerama)
  905. ("libxkbcommon" ,libxkbcommon)
  906. ("libxrandr" ,libxrandr)
  907. ("libxrender" ,libxrender)
  908. ("libxshmfence" ,libxshmfence)))
  909. (native-inputs
  910. `(("gettext" ,gettext-minimal)
  911. ("glib" ,glib "bin")
  912. ("gobject-introspection" ,gobject-introspection)
  913. ("intltool" ,intltool)
  914. ("perl" ,perl)
  915. ("pkg-config" ,pkg-config)
  916. ("python-wrapper" ,python-wrapper)
  917. ("xorg-server" ,xorg-server-for-tests)))
  918. (arguments
  919. `(#:parallel-tests? #f
  920. #:configure-flags
  921. (list "--with-xinput=yes"
  922. (string-append "--with-html-dir="
  923. (assoc-ref %outputs "doc")
  924. "/share/gtk-doc/html"))
  925. #:phases
  926. (modify-phases %standard-phases
  927. (add-after 'unpack 'disable-failing-tests
  928. (lambda _
  929. (substitute* "gtk/Makefile.in"
  930. (("aliasfilescheck\\.sh") ""))
  931. (substitute* "gtk/tests/recentmanager.c"
  932. (("g_test_add_func \\(\"/recent-manager.*;") ""))
  933. (substitute* "gtk/tests/defaultvalue.c"
  934. (("return g_test_run\\(\\);") ""))
  935. #t))
  936. (add-before 'check 'pre-check
  937. (lambda _
  938. ;; Tests require a running X server.
  939. (system "Xvfb :1 +extension GLX &")
  940. (setenv "DISPLAY" ":1")
  941. ;; Tests write to $HOME.
  942. (setenv "HOME" (getcwd))
  943. ;; Tests look for $XDG_RUNTIME_DIR.
  944. (setenv "XDG_RUNTIME_DIR" (getcwd))
  945. ;; For missing '/etc/machine-id'.
  946. (setenv "DBUS_FATAL_WARNINGS" "0")
  947. #t))
  948. (add-after 'install 'remove-cache
  949. (lambda* (#:key outputs #:allow-other-keys)
  950. (for-each
  951. delete-file
  952. (find-files (assoc-ref outputs "out") "immodules.cache"))
  953. #t)))))
  954. (native-search-paths
  955. (list (search-path-specification
  956. (variable "GUIX_GTK2_PATH")
  957. (files '("lib/gtk-2.0")))))
  958. (search-paths native-search-paths)
  959. (synopsis "Cross-platform toolkit for creating graphical user interfaces")
  960. (description
  961. "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
  962. graphical user interfaces. Offering a complete set of widgets, GTK+ is
  963. suitable for projects ranging from small one-off tools to complete
  964. application suites.")
  965. (license license:lgpl2.0+)
  966. (home-page "https://www.gtk.org/")))
  967. (define-public gtk+
  968. (package
  969. (inherit gtk+-2)
  970. (name "gtk+")
  971. (version "3.24.30")
  972. (source
  973. (origin
  974. (method url-fetch)
  975. (uri (string-append "mirror://gnome/sources/" name "/"
  976. (version-major+minor version) "/"
  977. name "-" version ".tar.xz"))
  978. (sha256
  979. (base32
  980. "1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds"))
  981. (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
  982. "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
  983. (propagated-inputs
  984. `(("atk" ,atk)
  985. ("at-spi2-atk" ,at-spi2-atk)
  986. ("cairo" ,cairo)
  987. ("fribidi" ,fribidi)
  988. ("fontconfig" ,fontconfig)
  989. ("freetype" ,freetype)
  990. ;; SVG support is optional and requires librsvg, which pulls in rust.
  991. ;; Rust is not supported well on every architecture yet.
  992. ("gdk-pixbuf" ,(if (target-x86-64?)
  993. gdk-pixbuf+svg
  994. gdk-pixbuf))
  995. ("glib" ,glib)
  996. ("libcloudproviders" ,libcloudproviders)
  997. ("libepoxy" ,libepoxy)
  998. ("libx11" ,libx11)
  999. ("libxcomposite" ,libxcomposite)
  1000. ("libxcursor" ,libxcursor)
  1001. ("libxdamage" ,libxdamage)
  1002. ("libxext" ,libxext)
  1003. ("libxfixes" ,libxfixes)
  1004. ("libxi" ,libxi)
  1005. ("libxinerama" ,libxinerama)
  1006. ("libxkbcommon" ,libxkbcommon)
  1007. ("libxrandr" ,libxrandr)
  1008. ("libxrender" ,libxrender)
  1009. ("mesa" ,mesa)
  1010. ("pango" ,pango)
  1011. ("wayland" ,wayland)
  1012. ("wayland-protocols" ,wayland-protocols)))
  1013. (inputs
  1014. `(("colord" ,colord)
  1015. ("cups" ,cups)
  1016. ("graphene" ,graphene)
  1017. ("harfbuzz" ,harfbuzz)
  1018. ("iso-codes" ,iso-codes)
  1019. ("json-glib" ,json-glib)
  1020. ("libxml2" ,libxml2)
  1021. ("rest" ,rest)))
  1022. (native-inputs
  1023. `(("docbook-xml" ,docbook-xml-4.1.2)
  1024. ("gettext" ,gettext-minimal)
  1025. ("glib" ,glib "bin")
  1026. ("gobject-introspection" ,gobject-introspection)
  1027. ("hicolor-icon-theme" ,hicolor-icon-theme)
  1028. ("perl" ,perl)
  1029. ("pkg-config" ,pkg-config)
  1030. ("python-wrapper" ,python-wrapper)
  1031. ("sassc" ,sassc)
  1032. ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
  1033. ;; of updating xorg-server directly on the master branch.
  1034. ("xorg-server" ,xorg-server-for-tests)
  1035. ("xsltproc" ,libxslt)))
  1036. (arguments
  1037. `(#:disallowed-references (,xorg-server-for-tests)
  1038. ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
  1039. ;; to "doc".
  1040. #:configure-flags (list (string-append "--with-html-dir="
  1041. (assoc-ref %outputs "doc")
  1042. "/share/gtk-doc/html")
  1043. "--enable-cloudproviders"
  1044. ;; The header file <gdk/gdkwayland.h> is required
  1045. ;; by gnome-control-center
  1046. "--enable-wayland-backend"
  1047. ;; This is necessary to build both backends.
  1048. "--enable-x11-backend"
  1049. ;; This enables the HTML5 websocket backend.
  1050. "--enable-broadway-backend")
  1051. #:phases
  1052. (modify-phases %standard-phases
  1053. (add-after 'unpack 'disable-failing-tests
  1054. (lambda _
  1055. (substitute* "testsuite/gtk/Makefile.in"
  1056. (("builderparser cellarea check-icon-names check-cursor-names")
  1057. "builderparser cellarea check-cursor-names")
  1058. (("notify no-gtk-init object objects-finalize papersize rbtree")
  1059. "no-gtk-init papersize rbtree")
  1060. (("stylecontext templates textbuffer textiter treemodel treepath")
  1061. "stylecontext textbuffer textiter treemodel treepath")
  1062. ;; The ‘icontheme’ test needs SVG support.
  1063. ,@(if (not (target-x86-64?))
  1064. '((("floating focus gestures grid gtkmenu icontheme keyhash listbox")
  1065. "floating focus gestures grid gtkmenu keyhash listbox"))
  1066. '()))
  1067. (substitute* "testsuite/a11y/Makefile.in"
  1068. (("accessibility-dump tree-performance text children derive")
  1069. "tree-performance text children derive"))
  1070. (substitute* "testsuite/reftests/Makefile.in"
  1071. (("TEST_PROGS = gtk-reftest")
  1072. "TEST_PROGS = "))
  1073. #t))
  1074. (add-before 'check 'pre-check
  1075. (lambda _
  1076. ;; Tests require a running X server.
  1077. (system "Xvfb :1 +extension GLX &")
  1078. (setenv "DISPLAY" ":1")
  1079. ;; Tests write to $HOME.
  1080. (setenv "HOME" (getcwd))
  1081. ;; Tests look for $XDG_RUNTIME_DIR.
  1082. (setenv "XDG_RUNTIME_DIR" (getcwd))
  1083. ;; For missing '/etc/machine-id'.
  1084. (setenv "DBUS_FATAL_WARNINGS" "0")
  1085. #t))
  1086. (add-after 'install 'move-desktop-files
  1087. ;; Move desktop files into 'bin' to avoid cycle references.
  1088. (lambda* (#:key outputs #:allow-other-keys)
  1089. (let ((out (assoc-ref outputs "out"))
  1090. (bin (assoc-ref outputs "bin")))
  1091. (mkdir-p (string-append bin "/share"))
  1092. (rename-file (string-append out "/share/applications")
  1093. (string-append bin "/share/applications"))
  1094. #t))))))
  1095. (native-search-paths
  1096. (list (search-path-specification
  1097. (variable "GUIX_GTK3_PATH")
  1098. (files '("lib/gtk-3.0")))))))
  1099. (define-public gtk
  1100. (package
  1101. (name "gtk")
  1102. (version "4.2.1")
  1103. (source
  1104. (origin
  1105. (method url-fetch)
  1106. (uri (string-append "mirror://gnome/sources/" name "/"
  1107. (version-major+minor version) "/"
  1108. name "-" version ".tar.xz"))
  1109. (sha256
  1110. (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
  1111. (patches
  1112. (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch"))))
  1113. (build-system meson-build-system)
  1114. (outputs '("out" "bin" "doc"))
  1115. (arguments
  1116. `(#:configure-flags
  1117. (list
  1118. "-Dbroadway-backend=true" ;for broadway display-backend
  1119. "-Dcloudproviders=enabled" ;for cloud-providers support
  1120. "-Dtracker=enabled" ;for filechooser search support
  1121. "-Dcolord=enabled" ;for color printing support
  1122. ,@(if (%current-target-system)
  1123. ;; If true, gtkdoc-scangobj will try to execute a
  1124. ;; cross-compiled binary.
  1125. '("-Dgtk_doc=false")
  1126. '("-Dgtk_doc=true"))
  1127. "-Dman-pages=true")
  1128. #:phases
  1129. (modify-phases %standard-phases
  1130. (add-after 'unpack 'patch
  1131. (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
  1132. ;; Correct DTD resources of docbook.
  1133. (substitute* (find-files "docs" "\\.xml$")
  1134. (("http://www.oasis-open.org/docbook/xml/4.3/")
  1135. (string-append
  1136. (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
  1137. "/xml/dtd/docbook/")))
  1138. ;; Disable building of icon cache.
  1139. (substitute* "meson.build"
  1140. (("gtk_update_icon_cache: true")
  1141. "gtk_update_icon_cache: false"))
  1142. ;; Disable failing tests.
  1143. (substitute* (find-files "testsuite" "meson.build")
  1144. (("[ \t]*'empty-text.node',") "")
  1145. (("[ \t]*'testswitch.node',") "")
  1146. (("[ \t]*'widgetfactory.node',") ""))
  1147. (substitute* "testsuite/reftests/meson.build"
  1148. (("[ \t]*'label-wrap-justify.ui',") "")) ))
  1149. (add-before 'build 'set-cache
  1150. (lambda _
  1151. (setenv "XDG_CACHE_HOME" (getcwd))))
  1152. (add-before 'check 'pre-check
  1153. (lambda _
  1154. ;; Tests require a running X server.
  1155. (system "Xvfb :1 +extension GLX &")
  1156. (setenv "DISPLAY" ":1")
  1157. ;; Tests write to $HOME.
  1158. (setenv "HOME" (getcwd))
  1159. ;; Tests look for those variables.
  1160. (setenv "XDG_RUNTIME_DIR" (getcwd))
  1161. ;; For missing '/etc/machine-id'.
  1162. (setenv "DBUS_FATAL_WARNINGS" "0")))
  1163. (replace 'check
  1164. (lambda* (#:key tests? #:allow-other-keys)
  1165. (when tests?
  1166. (setenv "MESON_TESTTHREADS" "1")
  1167. ;; Run tests using the x11 setup,
  1168. ;; instead of the default wayland.
  1169. (invoke "meson" "test" "--setup=x11"))))
  1170. (add-after 'install 'move-files
  1171. (lambda* (#:key outputs #:allow-other-keys)
  1172. (let* ((out (assoc-ref outputs "out"))
  1173. (bin (assoc-ref outputs "bin"))
  1174. (doc (assoc-ref outputs "doc")))
  1175. (for-each mkdir-p
  1176. (list
  1177. (string-append bin "/bin")
  1178. (string-append bin "/share/applications")
  1179. (string-append bin "/share/icons")
  1180. (string-append bin "/share/man")
  1181. (string-append bin "/share/metainfo")
  1182. (string-append doc "/share/doc")))
  1183. ;; Move programs and related files to output 'bin'.
  1184. (for-each (lambda (dir)
  1185. (rename-file
  1186. (string-append out dir)
  1187. (string-append bin dir)))
  1188. (list
  1189. "/bin"
  1190. "/share/applications"
  1191. "/share/icons"
  1192. "/share/man"
  1193. "/share/metainfo"))
  1194. ;; Move HTML documentation to output 'doc'.
  1195. (rename-file
  1196. (string-append out "/share/doc")
  1197. (string-append doc "/share/doc"))))))))
  1198. (native-inputs
  1199. `(("docbook-xml-4.3" ,docbook-xml-4.3)
  1200. ("docbook-xsl" ,docbook-xsl)
  1201. ("gettext-minimal" ,gettext-minimal)
  1202. ("glib:bin" ,glib "bin")
  1203. ("gobject-introspection" ,gobject-introspection) ;for building introspection data
  1204. ("gtk-doc" ,gtk-doc) ;for building documentation
  1205. ("intltool" ,intltool)
  1206. ("libxslt" ,libxslt) ;for building man-pages
  1207. ("pkg-config" ,pkg-config)
  1208. ;; These python modules are required for building documentation.
  1209. ("python-jinja2" ,python-jinja2)
  1210. ("python-markdown" ,python-markdown)
  1211. ("python-markupsafe" ,python-markupsafe)
  1212. ("python-pygments" ,python-pygments)
  1213. ("python-toml" ,python-toml)
  1214. ("python-typogrify" ,python-typogrify)
  1215. ("sassc" ,sassc) ;for building themes
  1216. ("vala" ,vala)
  1217. ("xorg-server-for-tests" ,xorg-server-for-tests)))
  1218. (inputs
  1219. `(("colord" ,colord) ;for color printing support
  1220. ("cups" ,cups) ;for CUPS print-backend
  1221. ("ffmpeg" ,ffmpeg) ;for ffmpeg media-backend
  1222. ("fribidi" ,fribidi)
  1223. ("gstreamer" ,gstreamer) ;for gstreamer media-backend
  1224. ("gst-plugins-bad" ,gst-plugins-bad) ;provides gstreamer-player
  1225. ("gst-plugins-base" ,gst-plugins-base) ;provides gstreamer-gl
  1226. ("harfbuzz" ,harfbuzz)
  1227. ("iso-codes" ,iso-codes)
  1228. ("json-glib" ,json-glib)
  1229. ("libcloudproviders" ,libcloudproviders) ;for cloud-providers support
  1230. ("librsvg" ,librsvg)
  1231. ("python" ,python)
  1232. ("rest" ,rest)
  1233. ("tracker" ,tracker))) ;for filechooser search support
  1234. (propagated-inputs
  1235. ;; Following dependencies are referenced in .pc files.
  1236. `(("cairo" ,cairo)
  1237. ("fontconfig" ,fontconfig)
  1238. ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
  1239. ("glib" ,glib)
  1240. ("graphene" ,graphene)
  1241. ("libepoxy" ,libepoxy)
  1242. ("libx11" ,libx11) ;for x11 display-backend
  1243. ("libxcomposite" ,libxcomposite)
  1244. ("libxcursor" ,libxcursor)
  1245. ("libxdamage" ,libxdamage)
  1246. ("libxext" ,libxext)
  1247. ("libxfixes" ,libxfixes)
  1248. ("libxi" ,libxi)
  1249. ("libxinerama" ,libxinerama) ;for xinerama support
  1250. ("libxkbcommon" ,libxkbcommon)
  1251. ("libxrandr" ,libxrandr)
  1252. ("libxrender" ,libxrender)
  1253. ("pango" ,pango)
  1254. ("vulkan-headers" ,vulkan-headers)
  1255. ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
  1256. ("wayland" ,wayland) ;for wayland display-backend
  1257. ("wayland-protocols" ,wayland-protocols)))
  1258. (native-search-paths
  1259. (list
  1260. (search-path-specification
  1261. (variable "GUIX_GTK4_PATH")
  1262. (files '("lib/gtk-4.0")))))
  1263. (search-paths native-search-paths)
  1264. (home-page "https://www.gtk.org/")
  1265. (synopsis "Cross-platform widget toolkit")
  1266. (description "GTK is a multi-platform toolkit for creating graphical user
  1267. interfaces. Offering a complete set of widgets, GTK is suitable for projects
  1268. ranging from small one-off tools to complete application suites.")
  1269. (license license:lgpl2.1+)))
  1270. ;;;
  1271. ;;; Guile bindings.
  1272. ;;;
  1273. (define-public guile-cairo
  1274. (package
  1275. (name "guile-cairo")
  1276. (version "1.11.2")
  1277. (source (origin
  1278. (method url-fetch)
  1279. (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
  1280. version ".tar.gz"))
  1281. (sha256
  1282. (base32
  1283. "0yx0844p61ljd4d3d63qrawiygiw6ks02fwv2cqx7nav5kfd8ck2"))
  1284. (modules '((guix build utils)))
  1285. (snippet
  1286. (begin
  1287. '(begin
  1288. ;; Install Scheme files in …/guile/site/X.Y.
  1289. (substitute* (find-files "." "^Makefile\\.in$")
  1290. (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
  1291. (string-append name "dir = " prefix
  1292. "/guile/site/@GUILE_EFFECTIVE_VERSION@"
  1293. suffix)))
  1294. #t)))))
  1295. (build-system gnu-build-system)
  1296. (arguments
  1297. ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
  1298. ;; because of them.
  1299. `(#:configure-flags '("--disable-Werror")
  1300. #:make-flags '("GUILE_AUTO_COMPILE=0") ; to prevent guild warnings
  1301. #:modules ((guix build gnu-build-system)
  1302. (guix build utils)
  1303. (ice-9 rdelim)
  1304. (ice-9 popen))
  1305. #:phases
  1306. (modify-phases %standard-phases
  1307. (add-after 'install 'install-go-files
  1308. (lambda* (#:key outputs inputs #:allow-other-keys)
  1309. (let* ((out (assoc-ref outputs "out"))
  1310. (effective (read-line
  1311. (open-pipe* OPEN_READ
  1312. "guile" "-c"
  1313. "(display (effective-version))")))
  1314. (module-dir (string-append out "/share/guile/site/"
  1315. effective))
  1316. (object-dir (string-append out "/lib/guile/" effective
  1317. "/site-ccache"))
  1318. (prefix (string-length module-dir)))
  1319. ;; compile to the destination
  1320. (for-each (lambda (file)
  1321. (let* ((base (string-drop (string-drop-right file 4)
  1322. prefix))
  1323. (go (string-append object-dir base ".go")))
  1324. (invoke "guild" "compile" "-L" module-dir
  1325. file "-o" go)))
  1326. (find-files module-dir "\\.scm$"))
  1327. #t))))))
  1328. (inputs
  1329. `(("guile-lib" ,guile-lib)
  1330. ("expat" ,expat)
  1331. ("guile" ,guile-3.0)))
  1332. (propagated-inputs
  1333. ;; The .pc file refers to 'cairo'.
  1334. `(("cairo" ,cairo)))
  1335. (native-inputs
  1336. `(("pkg-config" ,pkg-config)))
  1337. (home-page "https://www.nongnu.org/guile-cairo/")
  1338. (synopsis "Cairo bindings for GNU Guile")
  1339. (description
  1340. "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
  1341. Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
  1342. stable, providing a firm base on which to do graphics work. Finally, and
  1343. importantly, it is pleasant to use. You get a powerful and well-maintained
  1344. graphics library with all of the benefits of Scheme: memory management,
  1345. exceptions, macros, and a dynamic programming environment.")
  1346. (license license:lgpl3+)))
  1347. (define-public guile2.2-cairo
  1348. (package
  1349. (inherit guile-cairo)
  1350. (name "guile2.2-cairo")
  1351. (inputs
  1352. `(("guile" ,guile-2.2)
  1353. ("guile-lib" ,guile2.2-lib)
  1354. ,@(fold alist-delete (package-inputs guile-cairo)
  1355. '("guile" "guile-lib"))))))
  1356. (define-public guile3.0-cairo
  1357. (deprecated-package "guile3.0-cairo" guile-cairo))
  1358. (define-public guile-rsvg
  1359. ;; Use a recent snapshot that supports Guile 2.2 and beyond.
  1360. (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
  1361. (revision "0"))
  1362. (package
  1363. (name "guile-rsvg")
  1364. (version (string-append "2.18.1-" revision "."
  1365. (string-take commit 7)))
  1366. (source (origin
  1367. (method git-fetch)
  1368. (uri (git-reference
  1369. (url "https://gitlab.com/wingo/guile-rsvg/")
  1370. (commit commit)))
  1371. (sha256
  1372. (base32
  1373. "0cnbl40df2sbhpc32cma6j6w312rfvcgbxxqaixgf0ymim3fb248"))
  1374. (patches (search-patches "guile-rsvg-pkgconfig.patch"))
  1375. (modules '((guix build utils)))
  1376. (snippet
  1377. '(begin
  1378. (substitute* (find-files "." "Makefile\\.am")
  1379. (("/share/guile/site")
  1380. "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
  1381. #t))
  1382. (file-name (string-append name "-" version ".tar.gz"))))
  1383. (build-system gnu-build-system)
  1384. (arguments
  1385. `(#:modules ((guix build gnu-build-system)
  1386. (guix build utils)
  1387. (ice-9 rdelim)
  1388. (ice-9 popen))
  1389. #:phases
  1390. (modify-phases %standard-phases
  1391. (replace 'bootstrap
  1392. (lambda _
  1393. (invoke "autoreconf" "-vfi")))
  1394. (add-after 'install 'install-go-files
  1395. (lambda* (#:key outputs inputs #:allow-other-keys)
  1396. (let* ((out (assoc-ref outputs "out"))
  1397. (effective (read-line
  1398. (open-pipe* OPEN_READ
  1399. "guile" "-c"
  1400. "(display (effective-version))")))
  1401. (module-dir (string-append out "/share/guile/site/"
  1402. effective))
  1403. (object-dir (string-append out "/lib/guile/" effective
  1404. "/site-ccache"))
  1405. (prefix (string-length module-dir)))
  1406. ;; compile to the destination
  1407. (for-each (lambda (file)
  1408. (let* ((base (string-drop (string-drop-right file 4)
  1409. prefix))
  1410. (go (string-append object-dir base ".go")))
  1411. (invoke "guild" "compile" "-L" module-dir
  1412. file "-o" go)))
  1413. (find-files module-dir "\\.scm$"))
  1414. #t))))))
  1415. (native-inputs `(("pkg-config" ,pkg-config)
  1416. ("autoconf" ,autoconf)
  1417. ("automake" ,automake)
  1418. ("libtool" ,libtool)
  1419. ("texinfo" ,texinfo)))
  1420. (inputs `(("guile" ,guile-3.0)
  1421. ("librsvg" ,librsvg)
  1422. ("guile-lib" ,guile-lib))) ;for (unit-test)
  1423. (propagated-inputs `(("guile-cairo" ,guile-cairo)))
  1424. (synopsis "Render SVG images using Cairo from Guile")
  1425. (description
  1426. "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
  1427. images onto Cairo surfaces.")
  1428. (home-page "https://wingolog.org/projects/guile-rsvg/")
  1429. (license license:lgpl2.1+))))
  1430. (define-public guile2.2-rsvg
  1431. (package
  1432. (inherit guile-rsvg)
  1433. (name "guile2.2-rsvg")
  1434. (inputs
  1435. `(("guile" ,guile-2.2)
  1436. ("guile-lib" ,guile2.2-lib)
  1437. ,@(fold alist-delete (package-inputs guile-rsvg)
  1438. '("guile" "guile-lib"))))
  1439. (propagated-inputs `(("guile-cairo" ,guile2.2-cairo)))))
  1440. (define-public guile3.0-rsvg
  1441. (deprecated-package "guile3.0-rsvg" guile-rsvg))
  1442. (define-public guile-present
  1443. (package
  1444. (name "guile-present")
  1445. (version "0.3.0")
  1446. (source (origin
  1447. (method url-fetch)
  1448. (uri (string-append "http://wingolog.org/pub/guile-present/"
  1449. "guile-present-" version ".tar.gz"))
  1450. (sha256
  1451. (base32
  1452. "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
  1453. (patches (search-patches "guile-present-coding.patch"))
  1454. (modules '((guix build utils)))
  1455. (snippet
  1456. '(begin
  1457. ;; Allow builds with Guile 3.0.
  1458. (substitute* "configure"
  1459. (("2\\.2 2\\.0")
  1460. "3.0 2.2 2.0"))
  1461. ;; Install .go files in the right place.
  1462. (substitute* "Makefile.in"
  1463. (("/ccache") "/site-ccache"))
  1464. #t))))
  1465. (build-system gnu-build-system)
  1466. (arguments
  1467. `(#:phases
  1468. (modify-phases %standard-phases
  1469. (add-after 'install 'post-install
  1470. (lambda* (#:key inputs outputs #:allow-other-keys)
  1471. (let* ((out (assoc-ref outputs "out"))
  1472. (bin (string-append out "/bin"))
  1473. (guile (assoc-ref inputs "guile"))
  1474. (version
  1475. ,(match (assoc "guile" (package-inputs this-package))
  1476. (("guile" guile)
  1477. (version-major+minor (package-version guile))))))
  1478. (substitute* (find-files bin ".*")
  1479. (("guile")
  1480. (string-append guile "/bin/guile -L "
  1481. out "/share/guile/site/" version " -C "
  1482. out "/lib/guile/" version "/site-ccache "))))
  1483. #t)))))
  1484. (native-inputs `(("pkg-config" ,pkg-config)))
  1485. (inputs `(("guile" ,guile-3.0)))
  1486. (propagated-inputs
  1487. ;; These are used by the (present …) modules.
  1488. `(("guile-lib" ,guile-lib)
  1489. ("guile-cairo" ,guile-cairo)
  1490. ("guile-rsvg" ,guile-rsvg)))
  1491. (home-page "https://wingolog.org/software/guile-present/")
  1492. (synopsis "Create SVG or PDF presentations in Guile")
  1493. (description
  1494. "Guile-Present defines a declarative vocabulary for presentations,
  1495. together with tools to render presentation documents as SVG or PDF.
  1496. Guile-Present can be used to make presentations programmatically, but also
  1497. includes a tools to generate PDF presentations out of Org mode and Texinfo
  1498. documents.")
  1499. (license license:lgpl3+)))
  1500. (define-public guile2.2-present
  1501. (package
  1502. (inherit guile-present)
  1503. (name "guile2.2-present")
  1504. (inputs `(("guile" ,guile-2.2)))
  1505. (propagated-inputs
  1506. `(("guile-lib" ,guile2.2-lib)
  1507. ("guile-cairo" ,guile2.2-cairo)
  1508. ("guile-rsvg" ,guile2.2-rsvg)))))
  1509. (define-public guile3.0-present
  1510. (deprecated-package "guile3.0-present" guile-present))
  1511. (define-public guile-gnome
  1512. (package
  1513. (name "guile-gnome")
  1514. (version "2.16.5")
  1515. (source (origin
  1516. (method url-fetch)
  1517. (uri
  1518. (string-append "mirror://gnu/" name
  1519. "/guile-gnome-platform/guile-gnome-platform-"
  1520. version ".tar.gz"))
  1521. (sha256
  1522. (base32
  1523. "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
  1524. (build-system gnu-build-system)
  1525. (native-inputs
  1526. `(("pkg-config" ,pkg-config)
  1527. ("atk" ,atk)
  1528. ;;("corba" ,corba) ; not packaged yet
  1529. ("gconf" ,gconf)
  1530. ("gobject-introspection" ,gobject-introspection)
  1531. ;;("gthread" ,gthread) ; not packaged yet
  1532. ("gnome-vfs" ,gnome-vfs)
  1533. ("gdk-pixbuf" ,gdk-pixbuf)
  1534. ("gtk+" ,gtk+-2)
  1535. ("libglade" ,libglade)
  1536. ("libgnome" ,libgnome)
  1537. ("libgnomecanvas" ,libgnomecanvas)
  1538. ("libgnomeui" ,libgnomeui)
  1539. ("pango" ,pango)
  1540. ("libffi" ,libffi)
  1541. ("glib" ,glib)))
  1542. (inputs `(("guile" ,guile-2.2)))
  1543. (propagated-inputs
  1544. `(("guile-cairo" ,guile2.2-cairo)
  1545. ("g-wrap" ,g-wrap)
  1546. ("guile-lib" ,guile2.2-lib)))
  1547. (arguments
  1548. `(#:tests? #f ;FIXME
  1549. #:phases (modify-phases %standard-phases
  1550. (add-before 'configure 'pre-configure
  1551. (lambda* (#:key outputs #:allow-other-keys)
  1552. (let ((out (assoc-ref outputs "out")))
  1553. (substitute* (find-files "." "^Makefile.in$")
  1554. (("guilesite :=.*guile/site" all)
  1555. (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
  1556. #t))))))
  1557. (outputs '("out" "debug"))
  1558. (synopsis "Guile interface for GTK+ programming for GNOME")
  1559. (description
  1560. "Includes guile-clutter, guile-gnome-gstreamer,
  1561. guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
  1562. (home-page "https://www.gnu.org/software/guile-gnome/")
  1563. (license license:gpl2+)
  1564. (properties '((upstream-name . "guile-gnome-platform")
  1565. (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
  1566. ;;;
  1567. ;;; C++ bindings.
  1568. ;;;
  1569. (define-public cairomm
  1570. (package
  1571. (name "cairomm")
  1572. (version "1.16.0")
  1573. (source (origin
  1574. (method url-fetch)
  1575. (uri (string-append "https://www.cairographics.org/releases/"
  1576. name "-" version ".tar.xz"))
  1577. (sha256
  1578. (base32
  1579. "1ya4y7qa000cjawqwswbqv26y5icfkmhs5iiiil4dxgrqn91923y"))))
  1580. (build-system meson-build-system)
  1581. (outputs '("out" "doc"))
  1582. (arguments
  1583. `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
  1584. #:configure-flags
  1585. (list
  1586. "-Dbuild-documentation=true"
  1587. "-Dboost-shared=true")
  1588. #:phases
  1589. (modify-phases %standard-phases
  1590. (add-after 'install 'move-doc
  1591. (lambda* (#:key outputs #:allow-other-keys)
  1592. (let* ((out (assoc-ref outputs "out"))
  1593. (doc (assoc-ref outputs "doc")))
  1594. (mkdir-p (string-append doc "/share"))
  1595. (rename-file
  1596. (string-append out "/share/doc")
  1597. (string-append doc "/share/doc"))
  1598. #t))))))
  1599. (native-inputs
  1600. `(("boost" ,boost)
  1601. ("dot" ,graphviz)
  1602. ("doxygen" ,doxygen)
  1603. ("mm-common" ,mm-common)
  1604. ("perl" ,perl)
  1605. ("pkg-config" ,pkg-config)
  1606. ("xsltproc" ,libxslt)))
  1607. (inputs
  1608. `(("fontconfig" ,fontconfig)))
  1609. (propagated-inputs
  1610. `(("libsigc++" ,libsigc++)
  1611. ("cairo" ,cairo)))
  1612. (home-page "https://cairographics.org/")
  1613. (synopsis "C++ bindings to the Cairo 2D graphics library")
  1614. (description
  1615. "Cairomm provides a C++ programming interface to the Cairo 2D graphics
  1616. library.")
  1617. (license license:lgpl2.0+)))
  1618. (define-public cairomm-1.14
  1619. (package
  1620. (inherit cairomm)
  1621. (name "cairomm")
  1622. (version "1.14.2")
  1623. (source
  1624. (origin
  1625. (method url-fetch)
  1626. (uri
  1627. (string-append "https://www.cairographics.org/releases/"
  1628. name "-" version ".tar.xz"))
  1629. (sha256
  1630. (base32 "1qwdj9xw1w651kqwh82nipbryimm1ir5n3c6q34nphsx576bj9h1"))))
  1631. (propagated-inputs
  1632. `(("libsigc++" ,libsigc++-2)
  1633. ,@(package-propagated-inputs cairomm)))))
  1634. (define-public pangomm
  1635. (package
  1636. (name "pangomm")
  1637. (version "2.48.0")
  1638. (source (origin
  1639. (method url-fetch)
  1640. (uri (string-append "mirror://gnome/sources/" name "/"
  1641. (version-major+minor version) "/"
  1642. name "-" version ".tar.xz"))
  1643. (sha256
  1644. (base32
  1645. "0y2vyp6azvhrii6rzs89kr08wg8z1p562awyr812131zqdsd83ly"))))
  1646. (build-system meson-build-system)
  1647. (outputs '("out" "doc"))
  1648. (arguments
  1649. `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
  1650. #:configure-flags
  1651. (list
  1652. "-Dbuild-documentation=true")
  1653. #:phases
  1654. (modify-phases %standard-phases
  1655. (add-after 'install 'move-doc
  1656. (lambda* (#:key outputs #:allow-other-keys)
  1657. (let* ((out (assoc-ref outputs "out"))
  1658. (doc (assoc-ref outputs "doc")))
  1659. (mkdir-p (string-append doc "/share"))
  1660. (rename-file
  1661. (string-append out "/share/doc")
  1662. (string-append doc "/share/doc"))
  1663. #t))))))
  1664. (native-inputs
  1665. `(("dot" ,graphviz)
  1666. ("doxygen" ,doxygen)
  1667. ("m4" ,m4)
  1668. ("mm-common" ,mm-common)
  1669. ("perl" ,perl)
  1670. ("pkg-config" ,pkg-config)
  1671. ("xsltproc" ,libxslt)))
  1672. (propagated-inputs
  1673. `(("cairo" ,cairo)
  1674. ("cairomm" ,cairomm)
  1675. ("glibmm" ,glibmm)
  1676. ("pango" ,pango)))
  1677. (home-page "https://pango.gnome.org//")
  1678. (synopsis "C++ interface to the Pango text rendering library")
  1679. (description
  1680. "Pangomm provides a C++ programming interface to the Pango text rendering
  1681. library.")
  1682. (license license:lgpl2.1+)))
  1683. (define-public pangomm-2.46
  1684. (package
  1685. (inherit pangomm)
  1686. (name "pangomm")
  1687. (version "2.46.0")
  1688. (source
  1689. (origin
  1690. (method url-fetch)
  1691. (uri
  1692. (string-append "mirror://gnome/sources/" name "/"
  1693. (version-major+minor version) "/"
  1694. name "-" version ".tar.xz"))
  1695. (sha256
  1696. (base32 "06zczkaxf5p5kjgnzrfylzi40w9a8lxpndgs7rpn12qrsq27sy6k"))))
  1697. (propagated-inputs
  1698. `(("cairomm" ,cairomm-1.14)
  1699. ("glibmm" ,glibmm-2.64)
  1700. ("pango" ,pango)))))
  1701. (define-public atkmm
  1702. (package
  1703. (name "atkmm")
  1704. (version "2.36.0")
  1705. (source (origin
  1706. (method url-fetch)
  1707. (uri (string-append "mirror://gnome/sources/" name "/"
  1708. (version-major+minor version) "/"
  1709. name "-" version ".tar.xz"))
  1710. (sha256
  1711. (base32
  1712. "0wwr0663jrqx2klsasffd9wpk3kqnwisj1y3ahdkjdk5hzrsjgy9"))))
  1713. (build-system meson-build-system)
  1714. (outputs '("out" "doc"))
  1715. (arguments
  1716. `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
  1717. #:configure-flags
  1718. (list
  1719. "-Dbuild-documentation=true")
  1720. #:phases
  1721. (modify-phases %standard-phases
  1722. (add-after 'install 'move-doc
  1723. (lambda* (#:key outputs #:allow-other-keys)
  1724. (let* ((out (assoc-ref outputs "out"))
  1725. (doc (assoc-ref outputs "doc")))
  1726. (mkdir-p (string-append doc "/share"))
  1727. (rename-file
  1728. (string-append out "/share/doc")
  1729. (string-append doc "/share/doc"))
  1730. #t))))))
  1731. (native-inputs
  1732. `(("dot" ,graphviz)
  1733. ("doxygen" ,doxygen)
  1734. ("m4" ,m4)
  1735. ("mm-common" ,mm-common)
  1736. ("perl" ,perl)
  1737. ("pkg-config" ,pkg-config)
  1738. ("xsltproc" ,libxslt)))
  1739. (propagated-inputs
  1740. `(("glibmm" ,glibmm) ("atk" ,atk)))
  1741. (synopsis "C++ bindings for ATK")
  1742. (description "ATKmm is the C++ binding for the ATK library.")
  1743. (home-page "https://wiki.gnome.org/Accessibility")
  1744. (license
  1745. (list
  1746. ;; Library
  1747. license:lgpl2.1+
  1748. ;; Tools
  1749. license:gpl2+))))
  1750. (define-public atkmm-2.28
  1751. (package
  1752. (inherit atkmm)
  1753. (name "atkmm")
  1754. (version "2.28.1")
  1755. (source
  1756. (origin
  1757. (method url-fetch)
  1758. (uri
  1759. (string-append "mirror://gnome/sources/" name "/"
  1760. (version-major+minor version) "/"
  1761. name "-" version ".tar.xz"))
  1762. (sha256
  1763. (base32 "1b8vycqzr3lfvk2l73f4kk74hj48081zbh9r1r2ilr3h8xh7cs0i"))))
  1764. (propagated-inputs
  1765. `(("glibmm" ,glibmm-2.64)
  1766. ,@(package-propagated-inputs atkmm)))))
  1767. (define-public gtkmm
  1768. (package
  1769. (name "gtkmm")
  1770. (version "4.2.0")
  1771. (source
  1772. (origin
  1773. (method url-fetch)
  1774. (uri
  1775. (string-append "mirror://gnome/sources/" name "/"
  1776. (version-major+minor version) "/"
  1777. name "-" version ".tar.xz"))
  1778. (sha256
  1779. (base32 "12x9j82y37r4v0ngs22rzp4wmw7k2bbb9d3bymcczzz7y8w4q328"))))
  1780. (build-system meson-build-system)
  1781. (outputs '("out" "doc"))
  1782. (arguments
  1783. `(#:configure-flags '("-Dbuild-documentation=true")
  1784. #:phases
  1785. (modify-phases %standard-phases
  1786. (add-before 'build 'set-cache
  1787. (lambda _
  1788. (setenv "XDG_CACHE_HOME" (getcwd))))
  1789. (add-before 'check 'pre-check
  1790. (lambda _
  1791. ;; Tests require a running X server.
  1792. (system "Xvfb :1 +extension GLX &")
  1793. (setenv "DISPLAY" ":1")
  1794. ;; Tests write to $HOME.
  1795. (setenv "HOME" (getcwd))
  1796. (setenv "XDG_RUNTIME_DIR" (getcwd))
  1797. ;; For missing '/etc/machine-id'.
  1798. (setenv "DBUS_FATAL_WARNINGS" "0")
  1799. #t))
  1800. (add-after 'install 'move-doc
  1801. (lambda* (#:key outputs #:allow-other-keys)
  1802. (let* ((out (assoc-ref outputs "out"))
  1803. (doc (assoc-ref outputs "doc")))
  1804. (mkdir-p (string-append doc "/share"))
  1805. (rename-file
  1806. (string-append out "/share/doc")
  1807. (string-append doc "/share/doc"))
  1808. #t))))))
  1809. (native-inputs
  1810. `(("dot" ,graphviz)
  1811. ("doxygen" ,doxygen)
  1812. ("glib:bin" ,glib "bin")
  1813. ("m4" ,m4)
  1814. ("mm-common" ,mm-common)
  1815. ("perl" ,perl)
  1816. ("pkg-config" ,pkg-config)
  1817. ("xsltproc" ,libxslt)
  1818. ("xorg-server" ,xorg-server-for-tests)))
  1819. (propagated-inputs
  1820. `(("atkmm" ,atkmm)
  1821. ("cairomm" ,cairomm)
  1822. ("glibmm" ,glibmm)
  1823. ("gtk" ,gtk)
  1824. ("pangomm" ,pangomm)))
  1825. (synopsis "C++ Interfaces for GTK+ and GNOME")
  1826. (description "GTKmm is the official C++ interface for the popular GUI
  1827. library GTK+. Highlights include typesafe callbacks, and a comprehensive set
  1828. of widgets that are easily extensible via inheritance. You can create user
  1829. interfaces either in code or with the Glade User Interface designer, using
  1830. libglademm. There's extensive documentation, including API reference and a
  1831. tutorial.")
  1832. (home-page "https://gtkmm.org/")
  1833. (license
  1834. (list
  1835. ;; Library
  1836. license:lgpl2.1+
  1837. ;; Tools
  1838. license:gpl2+))))
  1839. (define-public gtkmm-3
  1840. (package
  1841. (inherit gtkmm)
  1842. (name "gtkmm")
  1843. (version "3.24.4")
  1844. (source
  1845. (origin
  1846. (method url-fetch)
  1847. (uri
  1848. (string-append "mirror://gnome/sources/" name "/"
  1849. (version-major+minor version) "/"
  1850. name "-" version ".tar.xz"))
  1851. (sha256
  1852. (base32 "0hv7pviln4cpjvpz7m7ga5krcsbibqzixdcn0dwzpz0cx71p3swv"))))
  1853. (propagated-inputs
  1854. `(("atkmm-2.28" ,atkmm-2.28)
  1855. ("cairomm-1.14" ,cairomm-1.14)
  1856. ("glibmm" ,glibmm)
  1857. ("gtk+" ,gtk+)
  1858. ("pangomm-2.42" ,pangomm-2.46)))))
  1859. (define-public gtkmm-2
  1860. (package
  1861. (inherit gtkmm)
  1862. (name "gtkmm")
  1863. (version "2.24.5")
  1864. (source
  1865. (origin
  1866. (method url-fetch)
  1867. (uri
  1868. (string-append "mirror://gnome/sources/" name "/"
  1869. (version-major+minor version) "/"
  1870. name "-" version ".tar.xz"))
  1871. (sha256
  1872. (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
  1873. (build-system gnu-build-system)
  1874. (arguments
  1875. (strip-keyword-arguments
  1876. '(#:configure-flags) (package-arguments gtkmm)))
  1877. (propagated-inputs
  1878. `(("atkmm" ,atkmm-2.28)
  1879. ("cairomm" ,cairomm-1.14)
  1880. ("glibmm" ,glibmm-2.64)
  1881. ("gtk+" ,gtk+-2)
  1882. ("pangomm" ,pangomm-2.46)))))
  1883. (define-public gtksourceviewmm
  1884. (package
  1885. (name "gtksourceviewmm")
  1886. (version "3.18.0")
  1887. (source (origin
  1888. (method url-fetch)
  1889. (uri (string-append "mirror://gnome/sources/" name "/"
  1890. (version-major+minor version) "/"
  1891. name "-" version ".tar.xz"))
  1892. (sha256
  1893. (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
  1894. (build-system gnu-build-system)
  1895. (native-inputs
  1896. `(("pkg-config" ,pkg-config)))
  1897. (propagated-inputs
  1898. ;; In 'Requires' of gtksourceviewmm-3.0.pc.
  1899. `(("glibmm" ,glibmm)
  1900. ("gtkmm" ,gtkmm-3)
  1901. ("gtksourceview" ,gtksourceview-3)))
  1902. (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
  1903. (description
  1904. "gtksourceviewmm is a portable C++ library that extends the standard GTK+
  1905. framework for multiline text editing with support for configurable syntax
  1906. highlighting, unlimited undo/redo, search and replace, a completion framework,
  1907. printing and other features typical of a source code editor.")
  1908. (license license:lgpl2.1+)
  1909. (home-page "https://developer.gnome.org/gtksourceview/")))
  1910. ;;;
  1911. ;;; Python bindings.
  1912. ;;;
  1913. (define-public python-pycairo
  1914. (package
  1915. (name "python-pycairo")
  1916. (version "1.20.0")
  1917. (source
  1918. (origin
  1919. (method url-fetch)
  1920. (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
  1921. version "/pycairo-" version ".tar.gz"))
  1922. (sha256
  1923. (base32
  1924. "1326aa2ybhhhrvz3n4p22z5sic25m016ddb5yq0hvbprnw6a35an"))))
  1925. (build-system python-build-system)
  1926. (native-inputs
  1927. `(("pkg-config" ,pkg-config)
  1928. ("python-pytest" ,python-pytest)))
  1929. (propagated-inputs ;pycairo.pc references cairo
  1930. `(("cairo" ,cairo)))
  1931. (home-page "https://cairographics.org/pycairo/")
  1932. (synopsis "Python bindings for cairo")
  1933. (description
  1934. "Pycairo is a set of Python bindings for the Cairo graphics library.")
  1935. (license license:lgpl3+)
  1936. (properties `((python2-variant . ,(delay python2-pycairo))))))
  1937. ;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick
  1938. ;; with this older version here.
  1939. (define-public python2-pycairo
  1940. (let ((pycairo (package-with-python2
  1941. (strip-python2-variant python-pycairo))))
  1942. (package
  1943. (inherit pycairo)
  1944. (version "1.18.2")
  1945. (source (origin
  1946. (method url-fetch)
  1947. (uri (string-append "https://github.com/pygobject/pycairo/releases"
  1948. "/download/v" version "/pycairo-" version ".tar.gz"))
  1949. (sha256
  1950. (base32
  1951. "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w"))))
  1952. ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
  1953. (license (list license:lgpl2.1 license:mpl1.1)))))
  1954. (define-public python2-pygtk
  1955. (package
  1956. (name "python2-pygtk")
  1957. (version "2.24.0")
  1958. (source
  1959. (origin
  1960. (method url-fetch)
  1961. (uri (string-append "mirror://gnome/sources"
  1962. "/pygtk/" (version-major+minor version)
  1963. "/pygtk-" version ".tar.bz2"))
  1964. (sha256
  1965. (base32
  1966. "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
  1967. (build-system gnu-build-system)
  1968. (outputs '("out"
  1969. "doc")) ;13 MiB of gtk-doc HTML
  1970. (native-inputs
  1971. `(("pkg-config" ,pkg-config)))
  1972. (inputs
  1973. `(("python" ,python-2)
  1974. ;; XXX: The package fails to build with the latest Pango (propagated
  1975. ;; from GTK+2), so we provide it with this older version.
  1976. ("pango" ,pango-1.42)
  1977. ("libglade" ,libglade)
  1978. ("glib" ,glib)))
  1979. (propagated-inputs
  1980. `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
  1981. ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
  1982. ("gtk+" ,gtk+-2)))
  1983. (arguments
  1984. `(#:tests? #f
  1985. #:phases (modify-phases %standard-phases
  1986. (add-before 'configure 'set-gtk-doc-directory
  1987. (lambda* (#:key outputs #:allow-other-keys)
  1988. ;; Install documentation to "doc".
  1989. (let ((doc (assoc-ref outputs "doc")))
  1990. (substitute* "docs/Makefile.in"
  1991. (("TARGET_DIR = \\$\\(datadir\\)")
  1992. (string-append "TARGET_DIR = " doc))))))
  1993. (add-after 'configure 'fix-codegen
  1994. (lambda* (#:key inputs #:allow-other-keys)
  1995. (substitute* "pygtk-codegen-2.0"
  1996. (("^prefix=.*$")
  1997. (string-append
  1998. "prefix="
  1999. (assoc-ref inputs "python-pygobject") "\n")))))
  2000. (add-after 'install 'install-pth
  2001. (lambda* (#:key inputs outputs #:allow-other-keys)
  2002. ;; pygtk's modules are stored in a subdirectory of
  2003. ;; python's site-packages directory. Add a .pth file so
  2004. ;; that python will add that subdirectory to its module
  2005. ;; search path.
  2006. (let* ((out (assoc-ref outputs "out"))
  2007. (site (string-append out "/lib/python"
  2008. ,(version-major+minor
  2009. (package-version python-2))
  2010. "/site-packages")))
  2011. (call-with-output-file (string-append site "/pygtk.pth")
  2012. (lambda (port)
  2013. (format port "gtk-2.0~%")))))))))
  2014. (home-page "http://www.pygtk.org/")
  2015. (synopsis "Python bindings for GTK+")
  2016. (description
  2017. "PyGTK allows you to write full featured GTK programs in Python. It is
  2018. targeted at GTK 2.x, and can be used in conjunction with gnome-python to
  2019. write GNOME applications.")
  2020. (license license:lgpl2.1+)))
  2021. (define-public perl-cairo
  2022. (package
  2023. (name "perl-cairo")
  2024. (version "1.109")
  2025. (source (origin
  2026. (method url-fetch)
  2027. (uri (string-append
  2028. "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
  2029. version ".tar.gz"))
  2030. (sha256
  2031. (base32
  2032. "0zq78dv22arg35ma6kah9cwfd1zx8gg7amsibzd128qw81p766c2"))))
  2033. (build-system perl-build-system)
  2034. (native-inputs
  2035. `(("perl-extutils-depends" ,perl-extutils-depends)
  2036. ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
  2037. (propagated-inputs
  2038. `(("cairo" ,cairo)))
  2039. (home-page "https://metacpan.org/release/Cairo")
  2040. (synopsis "Perl interface to the cairo 2d vector graphics library")
  2041. (description "Cairo provides Perl bindings for the vector graphics library
  2042. cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
  2043. produces identical output on all those targets.")
  2044. (license license:lgpl2.1+)))
  2045. (define-public perl-cairo-gobject
  2046. (package
  2047. (name "perl-cairo-gobject")
  2048. (version "1.005")
  2049. (source
  2050. (origin
  2051. (method url-fetch)
  2052. (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/"
  2053. "Cairo-GObject-" version ".tar.gz"))
  2054. (sha256
  2055. (base32 "0l2wcz77ndmbgvxx34gdm919a3dxh9fixqr47p50n78ysx2692cd"))))
  2056. (build-system perl-build-system)
  2057. (native-inputs
  2058. `(("perl-extutils-depends" ,perl-extutils-depends)
  2059. ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
  2060. (propagated-inputs
  2061. `(("perl-cairo" ,perl-cairo)
  2062. ("perl-glib" ,perl-glib)))
  2063. (home-page "https://metacpan.org/dist/Cairo-GObject")
  2064. (synopsis "Integrate Cairo into the Glib type system")
  2065. (description "Cairo::GObject registers Cairo's types with Glib's type systems,
  2066. so that they can be used normally in signals and properties.")
  2067. (license license:lgpl2.1+)))
  2068. (define-public perl-gtk2
  2069. (package
  2070. (name "perl-gtk2")
  2071. (version "1.24993")
  2072. (source (origin
  2073. (method url-fetch)
  2074. (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
  2075. version ".tar.gz"))
  2076. (sha256
  2077. (base32
  2078. "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
  2079. (build-system perl-build-system)
  2080. (native-inputs
  2081. `(("perl-extutils-depends" ,perl-extutils-depends)
  2082. ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
  2083. (inputs
  2084. `(("gtk+" ,gtk+-2)))
  2085. (propagated-inputs
  2086. `(("perl-pango" ,perl-pango)))
  2087. (arguments
  2088. `(#:phases
  2089. (modify-phases %standard-phases
  2090. (add-before 'build 'remove-broken-test
  2091. ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
  2092. (lambda _
  2093. (substitute* "t/GdkPixbuf.t"
  2094. (("tests => 112") "tests => 111")
  2095. (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
  2096. "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
  2097. (home-page "https://metacpan.org/release/Gtk2")
  2098. (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
  2099. (description "Perl bindings to the 2.x series of the Gtk+ widget set.
  2100. This module allows you to write graphical user interfaces in a Perlish and
  2101. object-oriented way, freeing you from the casting and memory management in C,
  2102. yet remaining very close in spirit to original API.")
  2103. (license license:lgpl2.1+)))
  2104. (define-public perl-gtk3
  2105. (package
  2106. (name "perl-gtk3")
  2107. (version "0.038")
  2108. (source
  2109. (origin
  2110. (method url-fetch)
  2111. (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk3-"
  2112. version ".tar.gz"))
  2113. (sha256
  2114. (base32 "1k3sfcvxxx7ir7ail7w1lkmr4np0k3criljzw5wir63lmbr4pp3h"))))
  2115. (build-system perl-build-system)
  2116. (arguments
  2117. `(#:phases
  2118. (modify-phases %standard-phases
  2119. (add-before 'check 'pre-check
  2120. (lambda _
  2121. ;; Tests require a running X server.
  2122. (system "Xvfb :1 +extension GLX &")
  2123. (setenv "DISPLAY" ":1"))))))
  2124. (native-inputs
  2125. `(("adwaita-icon-theme" ,adwaita-icon-theme)
  2126. ("gtk+:bin" ,gtk+ "bin")
  2127. ("gobject-introspection" ,gobject-introspection)
  2128. ("perl-extutils-depends" ,perl-extutils-depends)
  2129. ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)
  2130. ("perl-test-simple" ,perl-test-simple)
  2131. ("xorg-server" ,xorg-server-for-tests)))
  2132. (propagated-inputs
  2133. `(("gtk+" ,gtk+)
  2134. ("perl-cairo-gobject" ,perl-cairo-gobject)
  2135. ("perl-carp" ,perl-carp)
  2136. ("perl-exporter" ,perl-exporter)
  2137. ("perl-glib-object-introspection" ,perl-glib-object-introspection)))
  2138. (home-page "https://metacpan.org/dist/Gtk3")
  2139. (synopsis "Perl interface to the 3.x series of the gtk+ toolkit")
  2140. (description "Perl bindings to the 3.x series of the gtk+ toolkit.
  2141. This module allows you to write graphical user interfaces in a Perlish and
  2142. object-oriented way, freeing you from the casting and memory management in C,
  2143. yet remaining very close in spirit to original API.")
  2144. (license license:lgpl2.1+)))
  2145. (define-public perl-pango
  2146. (package
  2147. (name "perl-pango")
  2148. (version "1.227")
  2149. (source (origin
  2150. (method url-fetch)
  2151. (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
  2152. version ".tar.gz"))
  2153. (sha256
  2154. (base32
  2155. "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
  2156. (build-system perl-build-system)
  2157. (native-inputs
  2158. `(("perl-extutils-depends" ,perl-extutils-depends)
  2159. ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
  2160. (inputs
  2161. `(("pango" ,pango)))
  2162. (propagated-inputs
  2163. `(("perl-cairo" ,perl-cairo)
  2164. ("perl-glib" ,perl-glib)))
  2165. (home-page "https://metacpan.org/release/Pango")
  2166. (synopsis "Layout and render international text")
  2167. (description "Pango is a library for laying out and rendering text, with an
  2168. emphasis on internationalization. Pango can be used anywhere that text layout
  2169. is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
  2170. complete solution with high quality text handling and graphics rendering.
  2171. Dynamically loaded modules handle text layout for particular combinations of
  2172. script and font backend. Pango provides a wide selection of modules, including
  2173. modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
  2174. Virtually all of the world's major scripts are supported.
  2175. In addition to the low level layout rendering routines, Pango includes
  2176. @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
  2177. and routines to assist in editing internationalized text.")
  2178. (license license:lgpl2.1+)))
  2179. (define-public girara
  2180. (package
  2181. (name "girara")
  2182. (version "0.3.6")
  2183. (source
  2184. (origin
  2185. (method git-fetch)
  2186. (uri (git-reference
  2187. (url "https://git.pwmt.org/pwmt/girara")
  2188. (commit version)))
  2189. (file-name (git-file-name name version))
  2190. (sha256
  2191. (base32 "0whwwj31fxfaf4r4qvxb4kl3mj05xj3n9c6nzdn46r30bkg9z4dw"))))
  2192. (native-inputs `(("pkg-config" ,pkg-config)
  2193. ("check" ,check-0.14)
  2194. ("gettext" ,gettext-minimal)
  2195. ("glib:bin" ,glib "bin")
  2196. ("xorg-server" ,xorg-server-for-tests)))
  2197. ;; Listed in 'Requires.private' of 'girara.pc'.
  2198. (propagated-inputs `(("gtk+" ,gtk+)))
  2199. (arguments
  2200. `(#:phases (modify-phases %standard-phases
  2201. (add-before 'check 'start-xserver
  2202. ;; Tests require a running X server.
  2203. (lambda* (#:key inputs #:allow-other-keys)
  2204. (let ((xorg-server (assoc-ref inputs "xorg-server"))
  2205. (display ":1"))
  2206. (setenv "DISPLAY" display)
  2207. ;; On busy machines, tests may take longer than
  2208. ;; the default of four seconds.
  2209. (setenv "CK_DEFAULT_TIMEOUT" "20")
  2210. ;; Don't fail due to missing '/etc/machine-id'.
  2211. (setenv "DBUS_FATAL_WARNINGS" "0")
  2212. (zero? (system (string-append xorg-server "/bin/Xvfb "
  2213. display " &")))))))))
  2214. (build-system meson-build-system)
  2215. (home-page "https://pwmt.org/projects/girara/")
  2216. (synopsis "Library for minimalistic gtk+3 user interfaces")
  2217. (description "Girara is a library that implements a user interface that
  2218. focuses on simplicity and minimalism. Currently based on GTK+, a
  2219. cross-platform widget toolkit, it provides an interface that focuses on three
  2220. main components: a so-called view widget that represents the actual
  2221. application, an input bar that is used to execute commands of the
  2222. application and the status bar which provides the user with current
  2223. information.")
  2224. (license license:zlib)))
  2225. (define-public gtk-doc
  2226. (package
  2227. (name "gtk-doc")
  2228. (version "1.33.2")
  2229. (source (origin
  2230. (method url-fetch)
  2231. (uri (string-append "mirror://gnome/sources/" name "/"
  2232. (version-major+minor version) "/"
  2233. name "-" version ".tar.xz"))
  2234. (sha256
  2235. (base32
  2236. "0hxza8qp52lrq7s1vbilz2vh4170cail560zi8khl0zb42d706yc"))
  2237. (patches
  2238. (search-patches "gtk-doc-respect-xml-catalog.patch"))))
  2239. (build-system meson-build-system)
  2240. (arguments
  2241. `(#:parallel-tests? #f
  2242. #:phases
  2243. (modify-phases %standard-phases
  2244. (add-after 'unpack 'patch-gtk-doc-scan
  2245. (lambda* (#:key inputs #:allow-other-keys)
  2246. (substitute* "gtk-doc.xsl"
  2247. (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
  2248. (string-append (assoc-ref inputs "docbook-xsl")
  2249. "/xml/xsl/docbook-xsl-"
  2250. ,(package-version docbook-xsl)
  2251. "/html/chunk.xsl"))
  2252. (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
  2253. (string-append (assoc-ref inputs "docbook-xsl")
  2254. "/xml/xsl/docbook-xsl-"
  2255. ,(package-version docbook-xsl)
  2256. "/common/en.xml")))
  2257. #t))
  2258. (add-after 'unpack 'disable-failing-tests
  2259. (lambda _
  2260. (substitute* "tests/Makefile.am"
  2261. (("annotations.sh bugs.sh empty.sh fail.sh gobject.sh program.sh")
  2262. ""))
  2263. #t))
  2264. (add-after 'install 'wrap-executables
  2265. (lambda* (#:key outputs #:allow-other-keys)
  2266. (let ((out (assoc-ref outputs "out")))
  2267. (for-each (lambda (prog)
  2268. (wrap-program prog
  2269. `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
  2270. (find-files (string-append out "/bin")))))))))
  2271. (native-inputs
  2272. `(("gettext" ,gettext-minimal)
  2273. ("glib:bin" ,glib "bin")
  2274. ("gobject-introspection" ,gobject-introspection)
  2275. ("itstool" ,itstool)
  2276. ("perl" ,perl)
  2277. ("pkg-config" ,pkg-config)
  2278. ("python-wrapper" ,python-wrapper)))
  2279. (inputs
  2280. `(("bc" ,bc)
  2281. ("dblatex" ,dblatex)
  2282. ("docbook-xml" ,docbook-xml-4.3)
  2283. ("docbook-xsl" ,docbook-xsl)
  2284. ("glib" ,glib)
  2285. ("libxml2" ,libxml2)
  2286. ("libxslt" ,libxslt)
  2287. ("python" ,python)
  2288. ("python-anytree" ,python-anytree)
  2289. ("python-lxml" ,python-lxml)
  2290. ("python-parameterized" ,python-parameterized)
  2291. ("python-pygments" ,python-pygments)
  2292. ("python-unittest2" ,python-unittest2)
  2293. ("source-highlight" ,source-highlight)
  2294. ("yelp-tools" ,yelp-tools)))
  2295. (home-page "https://wiki.gnome.org/DocumentationProject/GtkDoc")
  2296. (synopsis "GTK+ DocBook Documentation Generator")
  2297. (description "GtkDoc is a tool used to extract API documentation from C-code
  2298. like Doxygen, but handles documentation of GObject (including signals and
  2299. properties) that makes it very suitable for GTK+ apps and libraries. It uses
  2300. docbook for intermediate files and can produce html by default and pdf/man-pages
  2301. with some extra work.")
  2302. (license
  2303. (list
  2304. ;; Docs.
  2305. license:fdl1.1+
  2306. ;; Others.
  2307. license:gpl2+))))
  2308. ;; This is a variant of the 'gtk-doc' package that is not updated often. It
  2309. ;; is intended to be used as a native-input at build-time only. This allows
  2310. ;; the main 'gtk-doc', 'dblatex' and 'imagemagick' packages to be freely
  2311. ;; updated on the 'master' branch without triggering an excessive number of
  2312. ;; rebuilds.
  2313. (define-public gtk-doc/stable
  2314. (hidden-package
  2315. (package/inherit gtk-doc
  2316. (inputs (alist-replace "dblatex" `(,dblatex/stable)
  2317. (package-inputs gtk-doc))))))
  2318. (define-public gtk-engines
  2319. (package
  2320. (name "gtk-engines")
  2321. (version "2.20.2")
  2322. (source (origin
  2323. (method url-fetch)
  2324. (uri (string-append "mirror://gnome/sources/" name "/"
  2325. (version-major+minor version) "/"
  2326. name "-" version ".tar.bz2"))
  2327. (sha256
  2328. (base32
  2329. "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
  2330. (build-system gnu-build-system)
  2331. (arguments
  2332. `(#:configure-flags
  2333. `("--enable-animation")))
  2334. (native-inputs
  2335. `(("pkg-config" ,pkg-config)
  2336. ("intltool" ,intltool)))
  2337. (inputs
  2338. ;; Don't propagate GTK+ to reduce "profile pollution".
  2339. `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
  2340. (home-page "https://live.gnome.org/GnomeArt")
  2341. (synopsis "Theming engines for GTK+ 2.x")
  2342. (description
  2343. "This package contains the standard GTK+ 2.x theming engines including
  2344. Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
  2345. Redmond95 and ThinIce.")
  2346. (license (list license:gpl2+ license:lgpl2.1+))))
  2347. (define-public murrine
  2348. (package
  2349. (name "murrine")
  2350. (version "0.98.2")
  2351. (source (origin
  2352. (method url-fetch)
  2353. (uri (string-append "mirror://gnome/sources/" name "/"
  2354. (version-major+minor version) "/"
  2355. name "-" version ".tar.xz"))
  2356. (sha256
  2357. (base32
  2358. "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
  2359. (build-system gnu-build-system)
  2360. (arguments
  2361. `(#:configure-flags
  2362. `("--enable-animation"
  2363. "--enable-animationrtl")))
  2364. (native-inputs
  2365. `(("pkg-config" ,pkg-config)
  2366. ("intltool" ,intltool)))
  2367. (propagated-inputs
  2368. `(("gtk+" ,gtk+-2)))
  2369. (home-page "https://live.gnome.org/GnomeArt")
  2370. (synopsis "Cairo-based theming engine for GTK+ 2.x")
  2371. (description
  2372. "Murrine is a cairo-based GTK+ theming engine. It is named after the
  2373. glass artworks done by Venicians glass blowers.")
  2374. (license license:gpl2+)))
  2375. (define-public gtkspell3
  2376. (package
  2377. (name "gtkspell3")
  2378. (version "3.0.10")
  2379. (source (origin
  2380. (method url-fetch)
  2381. (uri (string-append "mirror://sourceforge/gtkspell/"
  2382. version "/" name "-" version ".tar.xz"))
  2383. (sha256
  2384. (base32
  2385. "0cjp6xdcnzh6kka42w9g0w2ihqjlq8yl8hjm9wsfnixk6qwgch5h"))))
  2386. (build-system gnu-build-system)
  2387. (native-inputs
  2388. `(("intltool" ,intltool)
  2389. ("pkg-config" ,pkg-config)
  2390. ("vala" ,vala)))
  2391. (inputs
  2392. `(("gobject-introspection" ,gobject-introspection)
  2393. ("gtk+" ,gtk+)
  2394. ("pango" ,pango)))
  2395. (propagated-inputs
  2396. `(("enchant" ,enchant))) ; gtkspell3-3.0.pc refers to it
  2397. (home-page "http://gtkspell.sourceforge.net")
  2398. (synopsis "Spell-checking addon for GTK's TextView widget")
  2399. (description
  2400. "GtkSpell provides word-processor-style highlighting and replacement of
  2401. misspelled words in a GtkTextView widget.")
  2402. (license license:gpl2+)))
  2403. (define-public clipit
  2404. (package
  2405. (name "clipit")
  2406. (version "1.4.4")
  2407. (source
  2408. (origin
  2409. (method git-fetch)
  2410. (uri (git-reference
  2411. (url "https://github.com/CristianHenzel/ClipIt")
  2412. (commit (string-append "v" version))))
  2413. (file-name (git-file-name name version))
  2414. (sha256
  2415. (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
  2416. (build-system gnu-build-system)
  2417. (native-inputs
  2418. `(("autoconf" ,autoconf)
  2419. ("automake" ,automake)
  2420. ("intltool" ,intltool)
  2421. ("pkg-config" ,pkg-config)))
  2422. (inputs
  2423. `(("gtk+" ,gtk+-2)))
  2424. (home-page "https://github.com/CristianHenzel/ClipIt")
  2425. (synopsis "Lightweight GTK+ clipboard manager")
  2426. (description
  2427. "ClipIt is a clipboard manager with features such as a history, search
  2428. thereof, global hotkeys and clipboard item actions. It was forked from
  2429. Parcellite and adds bugfixes and features.")
  2430. (license license:gpl2+)))
  2431. (define-public graphene
  2432. (package
  2433. (name "graphene")
  2434. (version "1.10.6")
  2435. (source
  2436. (origin
  2437. (method git-fetch)
  2438. (uri
  2439. (git-reference
  2440. (url "https://github.com/ebassi/graphene.git")
  2441. (commit version)))
  2442. (file-name (git-file-name name version))
  2443. (sha256
  2444. (base32 "0g2jjy6xizzjxlp0dr81h1f5l16dzcnhznhj6jvhpdjqcvgp98xr"))))
  2445. (build-system meson-build-system)
  2446. (arguments
  2447. `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
  2448. #:configure-flags
  2449. (list
  2450. "-Dinstalled_tests=false"
  2451. ,@(if (%current-target-system)
  2452. ;; Introspection requires running binaries for 'host' on 'build'.
  2453. '("-Dintrospection=false")
  2454. '()))))
  2455. (native-inputs
  2456. `(("git" ,git-minimal)
  2457. ("gobject-introspection" ,gobject-introspection)
  2458. ("mutest" ,mutest)
  2459. ("pkg-config" ,pkg-config)))
  2460. (inputs
  2461. `(("glib" ,glib)
  2462. ("python" ,python)))
  2463. (synopsis "Thin layer of graphic data types")
  2464. (description "Graphene provides graphic types and their relative API; it
  2465. does not deal with windowing system surfaces, drawing, scene graphs, or input.")
  2466. (home-page "https://ebassi.github.io/graphene/")
  2467. (license license:expat)))
  2468. (define-public spread-sheet-widget
  2469. (package
  2470. (name "spread-sheet-widget")
  2471. (version "0.7")
  2472. (source
  2473. (origin
  2474. (method url-fetch)
  2475. (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
  2476. "spread-sheet-widget-" version ".tar.gz"))
  2477. (sha256
  2478. (base32 "09rzgp7gabnzab460x874a1ibgyjiibpwzsz5srn9zs6jv2jdxjb"))))
  2479. (build-system gnu-build-system)
  2480. (native-inputs
  2481. `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
  2482. ("pkg-config" ,pkg-config)))
  2483. ;; In 'Requires' of spread-sheet-widget.pc.
  2484. (propagated-inputs
  2485. `(("glib" ,glib)
  2486. ("gtk+" ,gtk+)))
  2487. (home-page "https://www.gnu.org/software/ssw/")
  2488. (synopsis "Gtk+ widget for dealing with 2-D tabular data")
  2489. (description
  2490. "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
  2491. viewing and manipulating 2 dimensional tabular data in a manner similar to many
  2492. popular spread sheet programs.")
  2493. (license license:gpl3+)))
  2494. (define-public volumeicon
  2495. (package
  2496. (name "volumeicon")
  2497. (version "0.5.1")
  2498. (source
  2499. (origin
  2500. (method url-fetch)
  2501. (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
  2502. version ".tar.gz"))
  2503. (sha256
  2504. (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
  2505. (build-system gnu-build-system)
  2506. (arguments
  2507. `(#:configure-flags
  2508. (list "--enable-notify"))) ; optional libnotify support
  2509. (native-inputs
  2510. `(("intltool" ,intltool)
  2511. ("pkg-config" ,pkg-config)))
  2512. (inputs
  2513. `(("alsa-lib" ,alsa-lib)
  2514. ("gtk+" ,gtk+)
  2515. ("libnotify" ,libnotify)))
  2516. (home-page "http://nullwise.com/volumeicon.html")
  2517. (synopsis "System tray volume applet")
  2518. (description
  2519. "Volume Icon is a volume indicator and control applet for @acronym{the
  2520. Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
  2521. independent of your desktop environment, and supports global key bindings.")
  2522. (license (list license:expat ; src/{bind.c,keybinder.h}
  2523. license:isc ; src/alsa_volume_mapping.c
  2524. license:gpl3)))) ; the rest & combined work
  2525. (define-public yad
  2526. (package
  2527. (name "yad")
  2528. (version "5.0")
  2529. (source
  2530. (origin
  2531. (method git-fetch)
  2532. (uri (git-reference
  2533. (url "https://github.com/v1cont/yad")
  2534. (commit (string-append "v" version))))
  2535. (file-name (git-file-name name version))
  2536. (sha256
  2537. (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
  2538. (build-system glib-or-gtk-build-system)
  2539. (arguments
  2540. `(#:configure-flags
  2541. ;; Passing --enable-foo will silently disable foo if prerequisite
  2542. ;; inputs are missing, not abort the build as one might expect.
  2543. ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
  2544. ;; present in the past and nobody complained.
  2545. '("--enable-icon-browser"
  2546. "--enable-spell") ; gspell checking support
  2547. #:phases
  2548. (modify-phases %standard-phases
  2549. (add-after 'bootstrap 'intltoolize
  2550. (lambda _
  2551. (invoke "intltoolize" "--force" "--automake"))))))
  2552. (inputs
  2553. `(("gspell" ,gspell)
  2554. ("gtk+" ,gtk+)))
  2555. (native-inputs
  2556. `(("autoconf" ,autoconf)
  2557. ("automake" ,automake)
  2558. ("intltool" ,intltool)
  2559. ("pkg-config" ,pkg-config)))
  2560. (home-page "https://sourceforge.net/projects/yad-dialog/")
  2561. (synopsis "GTK+ dialog boxes for shell scripts")
  2562. (description
  2563. "This program allows you to display GTK+ dialog boxes from command line or
  2564. shell scripts. Example of how to use @code{yad} can be consulted at
  2565. @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
  2566. (license license:gpl3+)))
  2567. (define-public dragon-drop
  2568. (package
  2569. (name "dragon-drop")
  2570. (version "1.1.1")
  2571. (source (origin
  2572. (method git-fetch)
  2573. (uri
  2574. (git-reference
  2575. (url "https://github.com/mwh/dragon")
  2576. (commit (string-append "v" version))))
  2577. (file-name (git-file-name name version))
  2578. (sha256
  2579. (base32
  2580. "0fgzz39007fdjwq72scp0qygp2v3zc5f1xkm0sxaa8zxm25g1bra"))))
  2581. (build-system gnu-build-system)
  2582. (inputs `(("gtk+" ,gtk+)))
  2583. (native-inputs `(("pkg-config" ,pkg-config)))
  2584. (arguments
  2585. `(#:tests? #f ; no check
  2586. #:make-flags
  2587. (list (string-append "CC=" ,(cc-for-target))
  2588. ;; makefile uses PREFIX for the binary location
  2589. (string-append "PREFIX=" (assoc-ref %outputs "out")
  2590. "/bin"))
  2591. #:phases
  2592. (modify-phases %standard-phases
  2593. (delete 'configure)))) ; no configure script
  2594. (synopsis "Drag and drop source/target for X")
  2595. (description
  2596. "Dragon is a lightweight drag-and-drop source for X where you can run:
  2597. @example
  2598. dragon file.tar.gz
  2599. @end example
  2600. to get a window with just that file in it, ready to be dragged where you need it.
  2601. What if you need to drag into something? Using:
  2602. @example
  2603. dragon --target
  2604. @end example
  2605. you get a window you can drag files and text into. Dropped items are
  2606. printed to standard output.")
  2607. (home-page "https://github.com/mwh/dragon")
  2608. (license license:gpl3+)))
  2609. (define-public libdbusmenu
  2610. (package
  2611. (name "libdbusmenu")
  2612. (version "16.04.0")
  2613. (source
  2614. (origin
  2615. (method url-fetch)
  2616. (uri (string-append "https://launchpad.net/libdbusmenu/"
  2617. (version-major+minor version) "/" version
  2618. "/+download/libdbusmenu-" version ".tar.gz"))
  2619. (sha256
  2620. (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
  2621. (build-system gnu-build-system)
  2622. (arguments
  2623. `(#:configure-flags
  2624. '("--sysconfdir=/etc"
  2625. "--localstatedir=/var"
  2626. ;; The shebang of the generated test files should be patched before
  2627. ;; enabling tests.
  2628. "--disable-tests")
  2629. #:make-flags
  2630. `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
  2631. "/lib/girepository-1.0"))
  2632. #:phases
  2633. (modify-phases %standard-phases
  2634. (add-before 'configure 'do-not-treat-warnings-as-errors
  2635. (lambda _
  2636. ;; Prevent the build from failing due to deprecation warnings
  2637. ;; from newer GLib and GTK versions.
  2638. (substitute* (find-files "." "^Makefile.in$")
  2639. ((" -Werror")
  2640. ""))
  2641. #t))
  2642. (add-before 'configure 'set-environment
  2643. (lambda _
  2644. (setenv "HAVE_VALGRIND_TRUE" "")
  2645. (setenv "HAVE_VALGRIND_FALSE" "#")
  2646. #t)))))
  2647. (inputs
  2648. `(("glib" ,glib)
  2649. ("gtk+" ,gtk+)
  2650. ("gtk+-2" ,gtk+-2)))
  2651. (native-inputs
  2652. `(("glib:bin" ,glib "bin")
  2653. ("gnome-doc-utils" ,gnome-doc-utils)
  2654. ("gobject-introspection" ,gobject-introspection)
  2655. ("intltool" ,intltool)
  2656. ("json-glib" ,json-glib)
  2657. ("pkg-config" ,pkg-config)
  2658. ("python" ,python-2)
  2659. ("vala" ,vala)))
  2660. (home-page "https://launchpad.net/libdbusmenu")
  2661. (synopsis "Library for passing menus over DBus")
  2662. (description "@code{libdbusmenu} passes a menu structure across DBus so
  2663. that a program can create a menu simply without worrying about how it is
  2664. displayed on the other side of the bus.")
  2665. ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
  2666. (license (list license:lgpl2.1 license:lgpl3))))
  2667. (define-public gtk-layer-shell
  2668. (package
  2669. (name "gtk-layer-shell")
  2670. (version "0.6.0")
  2671. (source
  2672. (origin
  2673. (method git-fetch)
  2674. (uri (git-reference
  2675. (url "https://github.com/wmww/gtk-layer-shell")
  2676. (commit (string-append "v" version))))
  2677. (file-name (git-file-name name version))
  2678. (sha256
  2679. (base32 "1kcp4p3s7sdh9lwniybjdarfy8z69j2j23hfrw98amhwhq39gdcc"))))
  2680. (build-system meson-build-system)
  2681. (arguments `(#:configure-flags (list "-Dtests=true")))
  2682. (native-inputs `(("pkg-config" ,pkg-config)
  2683. ("gobject-introspection" ,gobject-introspection)))
  2684. (inputs `(("wayland" ,wayland)
  2685. ("gtk+" ,gtk+)))
  2686. (home-page "https://github.com/wmww/gtk-layer-shell")
  2687. (synopsis "Library to create Wayland desktop components using the Layer
  2688. Shell protocol")
  2689. (description "Layer Shell is a Wayland protocol for desktop shell
  2690. components, such as panels, notifications and wallpapers. It can be used to
  2691. anchor windows to a corner or edge of the output, or stretch them across the
  2692. entire output. It supports all Layer Shell features including popups and
  2693. popovers.")
  2694. (license license:expat)))
  2695. (define-public goocanvas
  2696. (package
  2697. (name "goocanvas")
  2698. (version "2.0.4")
  2699. (source
  2700. (origin
  2701. (method url-fetch)
  2702. (uri (string-append "mirror://gnome/sources/goocanvas/"
  2703. (version-major+minor version)
  2704. "/goocanvas-" version ".tar.xz"))
  2705. (sha256
  2706. (base32 "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67"))))
  2707. (build-system gnu-build-system)
  2708. (native-inputs
  2709. `(("gettext" ,gettext-minimal)
  2710. ("glib-bin" ,glib "bin")
  2711. ("gobject-introspection" ,gobject-introspection)
  2712. ("gtk-doc" ,gtk-doc/stable)
  2713. ("pkg-config" ,pkg-config)
  2714. ("python" ,python)))
  2715. (inputs
  2716. `(("cairo" ,cairo)
  2717. ("glib" ,glib)
  2718. ("gtk+" ,gtk+)
  2719. ("python-pygobject" ,python-pygobject)))
  2720. (arguments
  2721. `(#:configure-flags '("--disable-rebuilds"
  2722. "--disable-static")
  2723. #:phases
  2724. (modify-phases %standard-phases
  2725. (add-after 'unpack 'fix-install-path
  2726. (lambda* (#:key inputs outputs #:allow-other-keys)
  2727. (substitute* "configure"
  2728. (("\\(gi._overridesdir\\)")
  2729. (string-append "((gi._overridesdir).replace(\\\""
  2730. (assoc-ref inputs "python-pygobject")
  2731. "\\\", \\\""
  2732. (assoc-ref outputs "out")
  2733. "\\\"))")))
  2734. #t)))))
  2735. (synopsis "Canvas widget for GTK+")
  2736. (description "GooCanvas is a canvas widget for GTK+ that uses the cairo 2D
  2737. library for drawing.")
  2738. (home-page "https://wiki.gnome.org/GooCanvas")
  2739. (license license:lgpl2.0)))
  2740. (define-public gtksheet
  2741. (package
  2742. (name "gtksheet")
  2743. (version "4.3.5")
  2744. (source
  2745. (origin
  2746. (method git-fetch)
  2747. (uri (git-reference
  2748. (url "https://github.com/fpaquet/gtksheet")
  2749. (commit (string-append "V" version))))
  2750. (file-name (git-file-name name version))
  2751. (sha256
  2752. (base32
  2753. "13jwr1vly4ga3f09dajwky1cdrz5bmggwga3vnnd6j6zzia7dpyr"))))
  2754. (build-system gnu-build-system)
  2755. (arguments
  2756. `(#:configure-flags (list "--enable-glade"
  2757. "--enable-introspection")
  2758. #:phases
  2759. (modify-phases %standard-phases
  2760. ;; The "configure" script is present, but otherwise the project is
  2761. ;; not bootstrapped properly. Delete configure so the bootstrap phase
  2762. ;; will take over.
  2763. (add-after 'unpack 'delete-configure
  2764. (lambda _
  2765. (delete-file "configure")
  2766. #t))
  2767. (add-after 'unpack 'rename-type
  2768. (lambda _
  2769. (substitute* "glade/glade-gtksheet-editor.c"
  2770. (("GladeEditableIface") "GladeEditableInterface"))
  2771. #t))
  2772. ;; Fix glade install directories.
  2773. (add-before 'bootstrap 'configure-glade-directories
  2774. (lambda* (#:key outputs #:allow-other-keys)
  2775. (substitute* "configure.ac"
  2776. (("`\\$PKG_CONFIG --variable=catalogdir gladeui-2.0`")
  2777. (string-append (assoc-ref outputs "out") "/share/glade/catalogs"))
  2778. (("`\\$PKG_CONFIG --variable=moduledir gladeui-2.0`")
  2779. (string-append (assoc-ref outputs "out") "/lib/glade/modules"))
  2780. (("`\\$PKG_CONFIG --variable=pixmapdir gladeui-2.0`")
  2781. (string-append (assoc-ref outputs "out") "/share/pixmaps")))
  2782. #t)))))
  2783. (inputs
  2784. `(("glade" ,glade3)
  2785. ("glib" ,glib)
  2786. ("gtk+" ,gtk+)
  2787. ("libxml2" ,libxml2)))
  2788. (native-inputs
  2789. `(("autoconf" ,autoconf)
  2790. ("automake" ,automake)
  2791. ("gobject-introspection" ,gobject-introspection)
  2792. ("libtool" ,libtool)
  2793. ("pkg-config" ,pkg-config)))
  2794. (home-page "https://fpaquet.github.io/gtksheet/")
  2795. (synopsis "Spreadsheet widget for GTK+")
  2796. (description "GtkSheet is a matrix widget for GTK+. It consists of an
  2797. scrollable grid of cells where you can allocate text. Cell contents can be
  2798. edited interactively through a specially designed entry, GtkItemEntry. It is
  2799. also a container subclass, allowing you to display buttons, images and any
  2800. other widget in it. You can also set many attributes such as border,
  2801. foreground and background colors, text justification and more.")
  2802. (native-search-paths
  2803. (list
  2804. (search-path-specification
  2805. (variable "GLADE_CATALOG_SEARCH_PATH")
  2806. (files '("share/glade/catalogs")))
  2807. (search-path-specification
  2808. (variable "GLADE_MODULE_SEARCH_PATH")
  2809. (files '("lib/glade/modules")))))
  2810. (license license:lgpl2.0+)))
  2811. (define-public gtkdatabox
  2812. (package
  2813. (name "gtkdatabox")
  2814. (version "1.0.0")
  2815. (source
  2816. (origin
  2817. (method url-fetch)
  2818. (uri (string-append "mirror://sourceforge/gtkdatabox/gtkdatabox-1/"
  2819. "gtkdatabox-" version ".tar.gz"))
  2820. (sha256
  2821. (base32 "1qykm551bx8j8pfgxs60l2vhpi8lv4r8va69zvn2594lchh71vlb"))))
  2822. (build-system gnu-build-system)
  2823. (native-inputs
  2824. `(("pkg-config" ,pkg-config)))
  2825. (inputs
  2826. `(("gtk+" ,gtk+)))
  2827. (synopsis "Display widget for dynamic data")
  2828. (description "GtkDatabox is a widget for live display of large amounts of
  2829. fluctuating numerical data. It enables data presentation (for example, on
  2830. linear or logarithmic scales, as dots or lines, with markers/labels) as well as
  2831. user interaction (e.g. measuring distances).")
  2832. (home-page "https://sourceforge.net/projects/gtkdatabox/")
  2833. (license license:lgpl2.1+)))
  2834. (define-public volctl
  2835. (package
  2836. (name "volctl")
  2837. (version "0.8.2")
  2838. (source (origin
  2839. (method git-fetch)
  2840. (uri (git-reference (url "https://github.com/buzz/volctl")
  2841. (commit (string-append "v" version))))
  2842. (file-name (git-file-name name version))
  2843. (sha256
  2844. (base32
  2845. "1cx27j83pz2qffnzb85fbl1x6pp3irv1kbw7g1hri7kaw6ky4xiz"))))
  2846. (build-system python-build-system)
  2847. (arguments
  2848. `(#:phases
  2849. (modify-phases %standard-phases
  2850. (add-after 'unpack 'patch-path
  2851. (lambda* (#:key inputs #:allow-other-keys)
  2852. (let ((pulse (assoc-ref inputs "pulseaudio"))
  2853. (xfixes (assoc-ref inputs "libxfixes")))
  2854. (substitute* "volctl/lib/xwrappers.py"
  2855. (("libXfixes.so")
  2856. (string-append xfixes "/lib/libXfixes.so")))
  2857. (substitute* "volctl/lib/pulseaudio.py"
  2858. (("libpulse.so.0")
  2859. (string-append pulse "/lib/libpulse.so.0")))
  2860. #t))))))
  2861. (inputs
  2862. `(("gtk+" ,gtk+)
  2863. ("libxfixes" ,libxfixes)
  2864. ("pulseaudio" ,pulseaudio)))
  2865. (propagated-inputs
  2866. `(("python-click" ,python-click)
  2867. ("python-pycairo" ,python-pycairo)
  2868. ("python-pygobject" ,python-pygobject)
  2869. ("python-pyyaml" ,python-pyyaml)))
  2870. (home-page "https://buzz.github.io/volctl/")
  2871. (synopsis "Per-application volume control and on-screen display (OSD) for graphical desktops")
  2872. (description "Volctl is a PulseAudio-enabled tray icon volume control and
  2873. OSD applet for graphical desktops. It's not meant to be an replacement for a
  2874. full-featured mixer application. If you're looking for that check out the
  2875. excellent pavucontrol.")
  2876. ;; XXX: 'setup.py' says "GPLv2" but nothing says "version 2 only". Is
  2877. ;; GPLv2+ intended?
  2878. (license license:gpl2)))