qt.scm 127 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
  3. ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
  4. ;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
  5. ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
  7. ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
  8. ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
  9. ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
  10. ;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
  11. ;;; Copyright © 2018, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  12. ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
  13. ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
  14. ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
  15. ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
  16. ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
  17. ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
  18. ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
  19. ;;; Copyright © 2020 TomZ <tomz@freedommail.ch>
  20. ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
  21. ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
  22. ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  23. ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
  24. ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
  25. ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
  26. ;;;
  27. ;;; This file is part of GNU Guix.
  28. ;;;
  29. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  30. ;;; under the terms of the GNU General Public License as published by
  31. ;;; the Free Software Foundation; either version 3 of the License, or (at
  32. ;;; your option) any later version.
  33. ;;;
  34. ;;; GNU Guix is distributed in the hope that it will be useful, but
  35. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  36. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  37. ;;; GNU General Public License for more details.
  38. ;;;
  39. ;;; You should have received a copy of the GNU General Public License
  40. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  41. (define-module (gnu packages qt)
  42. #:use-module ((guix licenses) #:prefix license:)
  43. #:use-module (guix packages)
  44. #:use-module (guix download)
  45. #:use-module (guix git-download)
  46. #:use-module (guix build-system cmake)
  47. #:use-module (guix build-system gnu)
  48. #:use-module (guix build-system trivial)
  49. #:use-module (guix build-system python)
  50. #:use-module (guix build-system qt)
  51. #:use-module (guix gexp)
  52. #:use-module (guix packages)
  53. #:use-module (guix deprecation)
  54. #:use-module (guix utils)
  55. #:use-module (gnu packages)
  56. #:use-module (gnu packages base)
  57. #:use-module (gnu packages bison)
  58. #:use-module (gnu packages cmake)
  59. #:use-module (gnu packages compression)
  60. #:use-module (gnu packages cups)
  61. #:use-module (gnu packages curl)
  62. #:use-module (gnu packages databases)
  63. #:use-module (gnu packages documentation)
  64. #:use-module (gnu packages enchant)
  65. #:use-module (gnu packages fontutils)
  66. #:use-module (gnu packages flex)
  67. #:use-module (gnu packages freedesktop)
  68. #:use-module (gnu packages gcc)
  69. #:use-module (gnu packages ghostscript)
  70. #:use-module (gnu packages gl)
  71. #:use-module (gnu packages glib)
  72. #:use-module (gnu packages gnupg)
  73. #:use-module (gnu packages gperf)
  74. #:use-module (gnu packages graphics)
  75. #:use-module (gnu packages gstreamer)
  76. #:use-module (gnu packages gtk)
  77. #:use-module (gnu packages icu4c)
  78. #:use-module (gnu packages image)
  79. #:use-module (gnu packages kde-frameworks)
  80. #:use-module (gnu packages libevent)
  81. #:use-module (gnu packages linux)
  82. #:use-module (gnu packages llvm)
  83. #:use-module (gnu packages maths)
  84. #:use-module (gnu packages networking)
  85. #:use-module (gnu packages ninja)
  86. #:use-module (gnu packages nss)
  87. #:use-module (gnu packages pciutils)
  88. #:use-module (gnu packages pcre)
  89. #:use-module (gnu packages perl)
  90. #:use-module (gnu packages pkg-config)
  91. #:use-module (gnu packages pulseaudio)
  92. #:use-module (gnu packages protobuf)
  93. #:use-module (gnu packages python)
  94. #:use-module (gnu packages python-build)
  95. #:use-module (gnu packages python-xyz)
  96. #:use-module (gnu packages regex)
  97. #:use-module (gnu packages ruby)
  98. #:use-module (gnu packages sdl)
  99. #:use-module (gnu packages serialization)
  100. #:use-module (gnu packages sqlite)
  101. #:use-module (gnu packages telephony)
  102. #:use-module (gnu packages tls)
  103. #:use-module (gnu packages valgrind)
  104. #:use-module (gnu packages video)
  105. #:use-module (gnu packages vulkan)
  106. #:use-module (gnu packages xdisorg)
  107. #:use-module (gnu packages xiph)
  108. #:use-module (gnu packages xorg)
  109. #:use-module (gnu packages xml)
  110. #:use-module (srfi srfi-1))
  111. (define-public qite
  112. (let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
  113. (revision "74"))
  114. (package
  115. (name "qite")
  116. (version (git-version "0" revision commit))
  117. (source
  118. (origin
  119. (method git-fetch)
  120. (uri
  121. (git-reference
  122. (url "https://github.com/Ri0n/qite")
  123. (commit commit)))
  124. (file-name (git-file-name name version))
  125. (sha256
  126. (base32 "0jmmgy9pvk9hwwph1nwy7hxhczy8drhl4ymhnjjn6yx7bckssvsq"))))
  127. (build-system qt-build-system)
  128. (arguments
  129. `(#:tests? #f ; no target
  130. #:phases
  131. (modify-phases %standard-phases
  132. (add-after 'unpack 'chdir
  133. (lambda _
  134. (chdir "libqite")
  135. #t)))))
  136. (inputs
  137. `(("qtbase" ,qtbase-5)
  138. ("qtmultimedia" ,qtmultimedia)))
  139. (home-page "https://github.com/Ri0n/qite/")
  140. (synopsis "Qt Interactive Text Elements")
  141. (description "Qite manages interactive elements on QTextEdit.")
  142. (license license:asl2.0))))
  143. (define-public qt5ct
  144. (package
  145. (name "qt5ct")
  146. (version "1.2")
  147. (source
  148. (origin
  149. (method url-fetch)
  150. (uri
  151. (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
  152. (sha256
  153. (base32 "0bl7dc03b7vm435khkr932ybslsbq1nfajd936zlc1sxdmpg1qqx"))))
  154. (build-system gnu-build-system)
  155. (arguments
  156. `(#:tests? #f ; No target
  157. #:imported-modules
  158. (,@%qt-build-system-modules)
  159. #:modules
  160. ((guix build gnu-build-system)
  161. ((guix build qt-build-system)
  162. #:prefix qt:)
  163. (guix build utils))
  164. #:phases
  165. (modify-phases %standard-phases
  166. (add-after 'unpack 'patch
  167. (lambda* (#:key inputs #:allow-other-keys)
  168. (substitute* "qt5ct.pro"
  169. (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
  170. (search-input-file inputs "/bin/lrelease")))))
  171. (replace 'configure
  172. (lambda* (#:key outputs #:allow-other-keys)
  173. (let* ((out (assoc-ref outputs "out")))
  174. (invoke "qmake"
  175. (string-append "PREFIX=" out)
  176. (string-append "BINDIR=" out "/bin")
  177. (string-append "DATADIR=" out "/share")
  178. (string-append "PLUGINDIR=" out "/lib/qt5/plugins")))
  179. #t))
  180. (add-after 'install 'qt-wrap
  181. (assoc-ref qt:%standard-phases 'qt-wrap)))))
  182. (native-inputs
  183. `(("qttools" ,qttools)))
  184. (inputs
  185. `(("qtbase" ,qtbase-5)
  186. ("qtsvg" ,qtsvg)))
  187. (synopsis "Qt5 Configuration Tool")
  188. (description "Qt5CT is a program that allows users to configure Qt5
  189. settings (such as icons, themes, and fonts) in desktop environments or
  190. window managers, that don't provide Qt integration by themselves.")
  191. (home-page "https://qt5ct.sourceforge.io/")
  192. (license license:bsd-2)))
  193. (define-public materialdecoration
  194. (let ((commit "6a5de23f2e5162fbee39d16f938473ff970a2ec0")
  195. (revision "9"))
  196. (package
  197. (name "materialdecoration")
  198. (version
  199. (git-version "1.1.0" revision commit))
  200. (source
  201. (origin
  202. (method git-fetch)
  203. (uri
  204. (git-reference
  205. (url "https://github.com/lirios/materialdecoration.git")
  206. (commit commit)))
  207. (file-name
  208. (git-file-name name version))
  209. (sha256
  210. (base32 "1zdrcb39fhhmn76w8anv1dnspz26pdl6izmj1mlm02aza4y8ffp4"))
  211. (modules '((guix build utils)
  212. (ice-9 ftw)
  213. (srfi srfi-1)))
  214. (snippet
  215. `(begin
  216. (delete-file-recursively "cmake/3rdparty")))))
  217. (build-system qt-build-system)
  218. (arguments
  219. `(#:tests? #f ; No target
  220. #:configure-flags
  221. ,#~(list
  222. (string-append "-DCMAKE_CXX_FLAGS=-I"
  223. #$(this-package-input "qtbase")
  224. "/include/qt5/QtXkbCommonSupport/"
  225. #$(package-version qtbase-5)))))
  226. (native-inputs
  227. `(("cmake-shared" ,cmake-shared)
  228. ("extra-cmake-modules" ,extra-cmake-modules)
  229. ("pkg-config" ,pkg-config)))
  230. (inputs
  231. `(("qtbase" ,qtbase-5)
  232. ("qtwayland" ,qtwayland)
  233. ("wayland" ,wayland)
  234. ("xkbcommon" ,libxkbcommon)))
  235. (synopsis "Material Decoration for Qt")
  236. (description "MaterialDecoration is a client-side decoration for Qt
  237. applications on Wayland.")
  238. (home-page "https://github.com/lirios/materialdecoration")
  239. (license license:lgpl3+))))
  240. (define-public grantlee
  241. (package
  242. (name "grantlee")
  243. (version "5.2.0")
  244. (source
  245. (origin
  246. (method git-fetch)
  247. (uri (git-reference
  248. (url "https://github.com/steveire/grantlee")
  249. (commit (string-append "v" version))))
  250. (file-name (git-file-name name version))
  251. (sha256
  252. (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
  253. (native-inputs
  254. ;; Optional: lcov and cccc, both are for code coverage
  255. `(("doxygen" ,doxygen)))
  256. (inputs
  257. `(("qtbase" ,qtbase-5)
  258. ("qtdeclarative" ,qtdeclarative)
  259. ("qtscript" ,qtscript)))
  260. (build-system cmake-build-system)
  261. (arguments
  262. `(#:phases
  263. (modify-phases %standard-phases
  264. (add-before 'check 'check-setup
  265. (lambda _
  266. ;; make Qt render "offscreen", required for tests
  267. (setenv "QT_QPA_PLATFORM" "offscreen")
  268. #t)))))
  269. (home-page "https://github.com/steveire/grantlee")
  270. (synopsis "Libraries for text templating with Qt")
  271. (description "Grantlee Templates can be used for theming and generation of
  272. other text such as code. The syntax uses the syntax of the Django template
  273. system, and the core design of Django is reused in Grantlee.")
  274. (license license:lgpl2.1+)))
  275. (define (qt5-urls component version)
  276. "Return a list of URLs for VERSION of the Qt5 COMPONENT."
  277. ;; We can't use a mirror:// scheme because these URLs are not exact copies:
  278. ;; the layout differs between them.
  279. (list (string-append "https://download.qt.io/official_releases/qt/"
  280. (version-major+minor version) "/" version
  281. "/submodules/" component "-everywhere-src-"
  282. version ".tar.xz")
  283. (string-append "https://download.qt.io/archive/qt/"
  284. (version-major+minor version) "/" version
  285. "/submodules/" component "-everywhere-src-"
  286. version ".tar.xz")
  287. (let ((directory (string-append "qt5" (string-drop component 2))))
  288. (string-append "http://sources.buildroot.net/" directory "/"
  289. component "-everywhere-src-" version ".tar.xz"))
  290. (string-append "https://distfiles.macports.org/qt5/"
  291. component "-everywhere-src-" version ".tar.xz")))
  292. (define-public qtbase-5
  293. (package
  294. (name "qtbase")
  295. (version "5.15.2")
  296. (source (origin
  297. (method url-fetch)
  298. (uri (qt5-urls name version))
  299. (sha256
  300. (base32
  301. "1y70libf2x52lpbqvhz10lpk7nyl1ajjwzjxly9pjdpfj4jsv7wh"))
  302. ;; Use TZDIR to avoid depending on package "tzdata".
  303. (patches (search-patches "qtbase-use-TZDIR.patch"
  304. "qtbase-moc-ignore-gcc-macro.patch"
  305. "qtbase-absolute-runpath.patch"))
  306. (modules '((guix build utils)))
  307. (snippet
  308. ;; corelib uses bundled harfbuzz, md4, md5, sha3
  309. '(begin
  310. (with-directory-excursion "src/3rdparty"
  311. (for-each delete-file-recursively
  312. (list "double-conversion" "freetype" "harfbuzz-ng"
  313. "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
  314. "zlib")))))))
  315. (build-system gnu-build-system)
  316. (outputs '("out" "debug"))
  317. (propagated-inputs
  318. `(("mesa" ,mesa)
  319. ;; Use which the package, not the function
  320. ("which" ,(@ (gnu packages base) which))))
  321. (inputs
  322. `(("alsa-lib" ,alsa-lib)
  323. ("cups" ,cups)
  324. ("dbus" ,dbus)
  325. ("double-conversion" ,double-conversion)
  326. ("eudev" ,eudev)
  327. ("expat" ,expat)
  328. ("fontconfig" ,fontconfig)
  329. ("freetype" ,freetype)
  330. ("glib" ,glib)
  331. ("gtk+" ,gtk+) ;for GTK theme support
  332. ("harfbuzz" ,harfbuzz)
  333. ("icu4c" ,icu4c)
  334. ("libinput" ,libinput-minimal)
  335. ("libjpeg" ,libjpeg-turbo)
  336. ("libmng" ,libmng)
  337. ("libpng" ,libpng)
  338. ("libx11" ,libx11)
  339. ("libxcomposite" ,libxcomposite)
  340. ("libxcursor" ,libxcursor)
  341. ("libxfixes" ,libxfixes)
  342. ("libxi" ,libxi)
  343. ("libxinerama" ,libxinerama)
  344. ("libxkbcommon" ,libxkbcommon)
  345. ("libxml2" ,libxml2)
  346. ("libxrandr" ,libxrandr)
  347. ("libxrender" ,libxrender)
  348. ("libxslt" ,libxslt)
  349. ("libxtst" ,libxtst)
  350. ("mtdev" ,mtdev)
  351. ("mariadb-dev" ,mariadb "dev")
  352. ("nss" ,nss)
  353. ("openssl" ,openssl)
  354. ("pcre2" ,pcre2)
  355. ("postgresql" ,postgresql)
  356. ("pulseaudio" ,pulseaudio)
  357. ("sqlite" ,sqlite)
  358. ("unixodbc" ,unixodbc)
  359. ("xcb-util" ,xcb-util)
  360. ("xcb-util-image" ,xcb-util-image)
  361. ("xcb-util-keysyms" ,xcb-util-keysyms)
  362. ("xcb-util-renderutil" ,xcb-util-renderutil)
  363. ("xcb-util-wm" ,xcb-util-wm)
  364. ("xdg-utils" ,xdg-utils)
  365. ("zlib" ,zlib)))
  366. (native-inputs
  367. `(("bison" ,bison)
  368. ("flex" ,flex)
  369. ("gperf" ,gperf)
  370. ("perl" ,perl)
  371. ("pkg-config" ,pkg-config)
  372. ("python" ,python)
  373. ("vulkan-headers" ,vulkan-headers)
  374. ("ruby" ,ruby)))
  375. (arguments
  376. `(#:configure-flags
  377. (let ((out (assoc-ref %outputs "out")))
  378. (list "-verbose"
  379. "-prefix" out
  380. "-docdir" (string-append out "/share/doc/qt5")
  381. "-headerdir" (string-append out "/include/qt5")
  382. "-archdatadir" (string-append out "/lib/qt5")
  383. "-datadir" (string-append out "/share/qt5")
  384. "-examplesdir" (string-append
  385. out "/share/doc/qt5/examples")
  386. "-opensource"
  387. "-confirm-license"
  388. ;; Later stripped into the :debug output.
  389. "-force-debug-info"
  390. ;; These features require higher versions of Linux than the
  391. ;; minimum version of the glibc. See
  392. ;; src/corelib/global/minimum-linux_p.h. By disabling these
  393. ;; features Qt5 applications can be used on the oldest
  394. ;; kernels that the glibc supports, including the RHEL6
  395. ;; (2.6.32) and RHEL7 (3.10) kernels.
  396. "-no-feature-getentropy" ; requires Linux 3.17
  397. "-no-feature-renameat2" ; requires Linux 3.16
  398. ;; Do not build examples; if desired, these could go
  399. ;; into a separate output, but for the time being, we
  400. ;; prefer to save the space and build time.
  401. "-no-compile-examples"
  402. ;; Most "-system-..." are automatic, but some use
  403. ;; the bundled copy by default.
  404. "-system-sqlite"
  405. "-system-harfbuzz"
  406. "-system-pcre"
  407. ;; explicitly link with openssl instead of dlopening it
  408. "-openssl-linked"
  409. ;; explicitly link with dbus instead of dlopening it
  410. "-dbus-linked"
  411. ;; don't use the precompiled headers
  412. "-no-pch"
  413. ;; drop special machine instructions that do not have
  414. ;; runtime detection
  415. ,@(if (string-prefix? "x86_64"
  416. (or (%current-target-system)
  417. (%current-system)))
  418. '()
  419. '("-no-sse2"))
  420. "-no-mips_dsp"
  421. "-no-mips_dspr2"))
  422. #:phases
  423. (modify-phases %standard-phases
  424. (add-after 'configure 'patch-bin-sh
  425. (lambda _
  426. (substitute* '("config.status"
  427. "configure"
  428. "mkspecs/features/qt_functions.prf"
  429. "qmake/library/qmakebuiltins.cpp")
  430. (("/bin/sh") (which "sh")))))
  431. (add-after 'configure 'patch-xdg-open
  432. (lambda _
  433. (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
  434. (("^.*const char \\*browsers.*$" all)
  435. (string-append "*browser = QStringLiteral(\""
  436. (which "xdg-open")
  437. "\"); return true; \n" all)))))
  438. (replace 'configure
  439. ;; Overridden to not pass "--enable-fast-install", which makes the
  440. ;; configure process fail.
  441. (lambda* (#:key outputs configure-flags #:allow-other-keys)
  442. (let ((out (assoc-ref outputs "out")))
  443. (substitute* "configure"
  444. (("/bin/pwd") (which "pwd")))
  445. (substitute* "src/corelib/global/global.pri"
  446. (("/bin/ls") (which "ls")))
  447. ;; The configuration files for other Qt5 packages are searched
  448. ;; through a call to "find_package" in Qt5Config.cmake, which
  449. ;; disables the use of CMAKE_PREFIX_PATH via the parameter
  450. ;; "NO_DEFAULT_PATH". Re-enable it so that the different
  451. ;; components can be installed in different places.
  452. (substitute* (find-files "." ".*\\.cmake")
  453. (("NO_DEFAULT_PATH") ""))
  454. (format #t "build directory: ~s~%" (getcwd))
  455. (format #t "configure flags: ~s~%" configure-flags)
  456. (apply invoke "./configure" configure-flags))))
  457. (add-after 'install 'patch-mkspecs
  458. (lambda* (#:key outputs #:allow-other-keys)
  459. (let* ((out (assoc-ref outputs "out"))
  460. (archdata (string-append out "/lib/qt5"))
  461. (mkspecs (string-append archdata "/mkspecs"))
  462. (qt_config.prf (string-append
  463. mkspecs "/features/qt_config.prf")))
  464. ;; For each Qt module, let `qmake' uses search paths in the
  465. ;; module directory instead of all in QT_INSTALL_PREFIX.
  466. (substitute* qt_config.prf
  467. (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
  468. "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
  469. (("\\$\\$\\[QT_INSTALL_LIBS\\]")
  470. "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
  471. (("\\$\\$\\[QT_HOST_LIBS\\]")
  472. "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
  473. (("\\$\\$\\[QT_INSTALL_BINS\\]")
  474. "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
  475. ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
  476. (substitute* (string-append mkspecs "/features/qt_functions.prf")
  477. (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
  478. "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
  479. ;; Resolve qmake spec files within qtbase by absolute paths.
  480. (substitute*
  481. (map (lambda (file)
  482. (string-append mkspecs "/features/" file))
  483. '("device_config.prf" "moc.prf" "qt_build_config.prf"
  484. "qt_config.prf" "winrt/package_manifest.prf"))
  485. (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
  486. (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))
  487. (add-after 'patch-mkspecs 'patch-prl-files
  488. (lambda* (#:key outputs #:allow-other-keys)
  489. (let ((out (assoc-ref outputs "out")))
  490. ;; Insert absolute references to the qtbase libraries because
  491. ;; QT_INSTALL_LIBS does not always resolve correctly, depending
  492. ;; on context. See <https://bugs.gnu.org/38405>
  493. (substitute* (find-files (string-append out "/lib") "\\.prl$")
  494. (("\\$\\$\\[QT_INSTALL_LIBS\\]")
  495. (string-append out "/lib"))))))
  496. (add-after 'unpack 'patch-paths
  497. ;; Use the absolute paths for dynamically loaded libs, otherwise
  498. ;; the lib will be searched in LD_LIBRARY_PATH which typically is
  499. ;; not set in guix.
  500. (lambda* (#:key inputs #:allow-other-keys)
  501. ;; libresolve
  502. (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
  503. "cross-libc" "libc"))))
  504. (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
  505. "src/network/kernel/qhostinfo_unix.cpp")
  506. (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
  507. (string-append a glibc "/lib/lib" b))))
  508. ;; libGL
  509. (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
  510. (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
  511. (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
  512. ;; libXcursor
  513. (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
  514. (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
  515. (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
  516. (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
  517. (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))))))))
  518. (native-search-paths
  519. (list (search-path-specification
  520. (variable "QMAKEPATH")
  521. (files '("lib/qt5")))
  522. (search-path-specification
  523. (variable "QML2_IMPORT_PATH")
  524. (files '("lib/qt5/qml")))
  525. (search-path-specification
  526. (variable "QT_PLUGIN_PATH")
  527. (files '("lib/qt5/plugins")))
  528. (search-path-specification
  529. (variable "XDG_DATA_DIRS")
  530. (files '("share")))
  531. (search-path-specification
  532. (variable "XDG_CONFIG_DIRS")
  533. (files '("etc/xdg")))))
  534. (home-page "https://www.qt.io/")
  535. (synopsis "Cross-platform GUI library")
  536. (description "Qt is a cross-platform application and UI framework for
  537. developers using C++ or QML, a CSS & JavaScript like language.")
  538. (license (list license:lgpl2.1 license:lgpl3))))
  539. (define-public qtbase
  540. (package/inherit qtbase-5
  541. (name "qtbase")
  542. (version "6.1.1")
  543. (source (origin
  544. (inherit (package-source qtbase-5))
  545. (uri (qt5-urls name version))
  546. (sha256
  547. (base32
  548. "1wizrfiw6h8bk99brbdpdli40vsk6yqchs66f1r083hp0ygsma11"))
  549. (modules '((guix build utils)))
  550. (snippet
  551. ;; corelib uses bundled harfbuzz, md4, md5, sha3
  552. '(with-directory-excursion "src/3rdparty"
  553. (for-each delete-file-recursively
  554. ;; The bundled pcre2 copy is kept, as its headers
  555. ;; are required by some internal bootstrap target
  556. ;; used for the tools.
  557. (list "double-conversion" "freetype" "harfbuzz-ng"
  558. "libpng" "libjpeg" "sqlite" "xcb" "zlib"))))))
  559. (build-system cmake-build-system)
  560. (arguments
  561. (substitute-keyword-arguments (package-arguments qtbase-5)
  562. ;; XXX: There are many test failures, because the test suite
  563. ;; requires a real X server (a virtual one such as Xvfb is not
  564. ;; enough) or a functional network. It's also quite expensive to
  565. ;; build and run.
  566. ((#:tests? _ #f) #f)
  567. ;; ((#:cmake _)
  568. ;; cmake) ;requires a CMake >= 3.18.4
  569. ((#:configure-flags _ ''())
  570. `(let ((out (assoc-ref %outputs "out")))
  571. (list "-GNinja" ;the build fails otherwise
  572. (string-append "-DINSTALL_ARCHDATADIR=" out "/lib/qt6")
  573. (string-append "-DINSTALL_DATADIR=" out "/share/qt6")
  574. (string-append "-DINSTALL_DOCDIR=" out "/share/doc/qt6")
  575. (string-append "-DINSTALL_MKSPECSDIR=" out "/lib/qt6/mkspecs")
  576. (string-append "-DINSTALL_EXAMPLESDIR=" out
  577. "/share/doc/qt6/examples")
  578. (string-append "-DINSTALL_INCLUDEDIR=" out "/include/qt6")
  579. ;; Link with DBus and OpenSSL so they don't get dlopen'ed.
  580. "-DINPUT_dbus=linked"
  581. "-DINPUT_openssl=linked"
  582. ;; These features require higher versions of Linux than the
  583. ;; minimum version of the glibc. See
  584. ;; src/corelib/global/minimum-linux_p.h. By disabling these
  585. ;; features Qt applications can be used on the oldest kernels
  586. ;; that the glibc supports, including the RHEL6 (2.6.32) and
  587. ;; RHEL7 (3.10) kernels.
  588. "-DFEATURE_getentropy=OFF" ; requires Linux 3.17
  589. "-DFEATURE_renameat2=OFF" ; requires Linux 3.16
  590. ;; Most system libraries are used by default, except in some
  591. ;; cases such as for those below.
  592. "-DFEATURE_system_pcre2=ON"
  593. "-DFEATURE_system_sqlite=ON"
  594. ;; Don't use the precompiled headers.
  595. "-DBUILD_WITH_PCH=OFF"
  596. ;; Drop special machine instructions that do not have runtime
  597. ;; detection.
  598. ,@(if (string-prefix? "x86_64"
  599. (or (%current-target-system)
  600. (%current-system)))
  601. '() ;implicitly enabled
  602. '("-DFEATURE_sse2=OFF"
  603. "-DFEATURE_sse3=OFF"
  604. "-DFEATURE_ssse3=OFF"
  605. "-DFEATURE_sse4_1=OFF"
  606. "-DFEATURE_sse4_2=OFF"))
  607. "-DFEATURE_mips_dsp=OFF"
  608. "-DFEATURE_mips_dspr2=OFF")))
  609. ((#:phases phases)
  610. `(modify-phases ,phases
  611. (delete 'patch-bin-sh)
  612. (delete 'patch-xdg-open)
  613. (add-after 'patch-paths 'patch-more-paths
  614. (lambda _
  615. (substitute* "src/gui/platform/unix/qgenericunixservices.cpp"
  616. (("\"xdg-open\"")
  617. (format #f "~s" (which "xdg-open"))))
  618. (substitute* '("mkspecs/features/qt_functions.prf"
  619. "qmake/library/qmakebuiltins.cpp")
  620. (("/bin/sh")
  621. (which "sh")))))
  622. (replace 'configure
  623. (assoc-ref %standard-phases 'configure))
  624. (replace 'build
  625. (lambda* (#:key parallel-build? #:allow-other-keys)
  626. (apply invoke "cmake" "--build" "."
  627. (if parallel-build?
  628. `("--parallel" ,(number->string (parallel-job-count)))
  629. '()))))
  630. (replace 'install
  631. (lambda _
  632. (invoke "cmake" "--install" ".")))
  633. (replace 'patch-mkspecs
  634. (lambda* (#:key outputs #:allow-other-keys)
  635. (let* ((out (assoc-ref outputs "out"))
  636. (archdata (string-append out "/lib/qt6"))
  637. (mkspecs (string-append archdata "/mkspecs"))
  638. (qt_config.prf (string-append
  639. mkspecs "/features/qt_config.prf")))
  640. ;; For each Qt module, let `qmake' uses search paths in the
  641. ;; module directory instead of all in QT_INSTALL_PREFIX.
  642. (substitute* qt_config.prf
  643. (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
  644. "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt6))")
  645. (("\\$\\$\\[QT_INSTALL_LIBS\\]")
  646. "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
  647. (("\\$\\$\\[QT_HOST_LIBS\\]")
  648. "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
  649. (("\\$\\$\\[QT_INSTALL_BINS\\]")
  650. "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
  651. ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
  652. (substitute* (string-append mkspecs "/features/qt_functions.prf")
  653. (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
  654. "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
  655. ;; Resolve qmake spec files within qtbase by absolute paths.
  656. (substitute*
  657. (map (lambda (file)
  658. (string-append mkspecs "/features/" file))
  659. '("device_config.prf" "moc.prf" "qt_build_config.prf"
  660. "qt_config.prf"))
  661. (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
  662. (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))))))
  663. (native-inputs
  664. `(("gtk+" ,gtk+) ;for GTK theme support
  665. ("ninja" ,ninja)
  666. ("wayland-protocols" ,wayland-protocols)
  667. ("xorg-server" ,xorg-server-for-tests)
  668. ,@(package-native-inputs qtbase-5)))
  669. (native-search-paths
  670. (list (search-path-specification
  671. (variable "QMAKEPATH")
  672. (files '("lib/qt6")))
  673. (search-path-specification
  674. (variable "QML2_IMPORT_PATH")
  675. (files '("lib/qt6/qml")))
  676. (search-path-specification
  677. (variable "QT_PLUGIN_PATH")
  678. (files '("lib/qt6/plugins")))
  679. (search-path-specification
  680. (variable "XDG_DATA_DIRS")
  681. (files '("share")))
  682. (search-path-specification
  683. (variable "XDG_CONFIG_DIRS")
  684. (files '("etc/xdg")))))))
  685. (define-public qtsvg
  686. (package (inherit qtbase-5)
  687. (name "qtsvg")
  688. (version "5.15.2")
  689. (source (origin
  690. (method url-fetch)
  691. (uri (qt5-urls name version))
  692. (sha256
  693. (base32
  694. "0pjqrdmd1991x9h4rl8sf81pkd89hfd5h1a2gp3fjw96pk0w5hwb"))))
  695. (propagated-inputs `())
  696. (native-inputs `(("perl" ,perl)))
  697. (inputs
  698. `(("mesa" ,mesa)
  699. ("qtbase" ,qtbase-5)
  700. ("zlib" ,zlib)))
  701. (arguments
  702. `(#:phases
  703. (modify-phases %standard-phases
  704. (add-before 'configure 'configure-qmake
  705. (lambda* (#:key inputs outputs #:allow-other-keys)
  706. (let* ((out (assoc-ref outputs "out"))
  707. (qtbase (assoc-ref inputs "qtbase"))
  708. (tmpdir (string-append (getenv "TMPDIR")))
  709. (qmake (string-append tmpdir "/qmake"))
  710. (qt.conf (string-append tmpdir "/qt.conf")))
  711. ;; Use qmake with a customized qt.conf to override install
  712. ;; paths to $out.
  713. (symlink (which "qmake") qmake)
  714. (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
  715. (with-output-to-file qt.conf
  716. (lambda ()
  717. (format #t "[Paths]
  718. Prefix=~a
  719. ArchData=lib/qt5
  720. Data=share/qt5
  721. Documentation=share/doc/qt5
  722. Headers=include/qt5
  723. Libraries=lib
  724. LibraryExecutables=lib/qt5/libexec
  725. Binaries=bin
  726. Tests=tests
  727. Plugins=lib/qt5/plugins
  728. Imports=lib/qt5/imports
  729. Qml2Imports=lib/qt5/qml
  730. Translations=share/qt5/translations
  731. Settings=etc/xdg
  732. Examples=share/doc/qt5/examples
  733. HostPrefix=~a
  734. HostData=lib/qt5
  735. HostBinaries=bin
  736. HostLibraries=lib
  737. [EffectiveSourcePaths]
  738. HostPrefix=~a
  739. HostData=lib/qt5
  740. " out out qtbase)))
  741. #t)))
  742. (replace 'configure
  743. (lambda* (#:key inputs outputs #:allow-other-keys)
  744. ;; Valid QT_BUILD_PARTS variables are:
  745. ;; libs tools tests examples demos docs translations
  746. (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
  747. (add-before 'check 'set-display
  748. (lambda _
  749. ;; make Qt render "offscreen", required for tests
  750. (setenv "QT_QPA_PLATFORM" "offscreen")
  751. #t)))))
  752. (synopsis "Qt module for displaying SVGs")
  753. (description "The QtSvg module provides classes for displaying the
  754. contents of SVG files.")))
  755. (define-public qtimageformats
  756. (package (inherit qtsvg)
  757. (name "qtimageformats")
  758. (version "5.15.2")
  759. (source (origin
  760. (method url-fetch)
  761. (uri (qt5-urls name version))
  762. (sha256
  763. (base32
  764. "1msk8a0z8rr16hkp2fnv668vf6wayiydqgc2mcklaa04rv3qb0mz"))
  765. (modules '((guix build utils)))
  766. (snippet
  767. '(begin
  768. (delete-file-recursively "src/3rdparty")
  769. #t))))
  770. (arguments
  771. (substitute-keyword-arguments (package-arguments qtsvg)
  772. ((#:phases phases)
  773. `(modify-phases ,phases
  774. (add-after 'unpack 'fix-build
  775. (lambda _
  776. (substitute* "src/plugins/imageformats/jp2/qjp2handler.cpp"
  777. (("^#include <jasper/jasper.h>")
  778. "#include <jasper/jasper.h>\n#include <QtCore/qmath.h>"))
  779. #t))))))
  780. (native-inputs `())
  781. (inputs
  782. `(("jasper" ,jasper)
  783. ("libmng" ,libmng)
  784. ("libtiff" ,libtiff)
  785. ("libwebp" ,libwebp)
  786. ("mesa" ,mesa)
  787. ("qtbase" ,qtbase-5)
  788. ("zlib" ,zlib)))
  789. (synopsis "Additional Image Format plugins for Qt")
  790. (description "The QtImageFormats module contains plugins for adding
  791. support for MNG, TGA, TIFF and WBMP image formats.")))
  792. (define-public qtx11extras
  793. (package (inherit qtsvg)
  794. (name "qtx11extras")
  795. (version "5.15.2")
  796. (source (origin
  797. (method url-fetch)
  798. (uri (qt5-urls name version))
  799. (sha256
  800. (base32
  801. "0gkfzj195v9flwljnqpdz3a532618yn4h2577nlsai56x4p7053h"))))
  802. (arguments
  803. (substitute-keyword-arguments (package-arguments qtsvg)
  804. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  805. (native-inputs `(("perl" ,perl)))
  806. (inputs
  807. `(("mesa" ,mesa)
  808. ("qtbase" ,qtbase-5)))
  809. (synopsis "Qt Extras for X11")
  810. (description "The QtX11Extras module includes the library to access X11
  811. from within Qt 5.")))
  812. (define-public qtxmlpatterns
  813. (package (inherit qtsvg)
  814. (name "qtxmlpatterns")
  815. (version "5.15.2")
  816. (source (origin
  817. (method url-fetch)
  818. (uri (qt5-urls name version))
  819. (sha256
  820. (base32
  821. "1ypj5jpa31rlx8yfw3y9jia212lfnxvnqkvygs6ihjf3lxi23skn"))))
  822. (arguments
  823. (substitute-keyword-arguments (package-arguments qtsvg)
  824. ((#:tests? _ #f) #f) ; TODO: Enable the tests
  825. ((#:phases phases)
  826. `(modify-phases ,phases
  827. (add-after 'unpack 'disable-network-tests
  828. (lambda _ (substitute* "tests/auto/auto.pro"
  829. (("qxmlquery") "# qxmlquery")
  830. (("xmlpatterns ") "# xmlpatterns"))
  831. #t))))))
  832. (native-inputs `(("perl" ,perl)
  833. ("qtdeclarative" ,qtdeclarative)))
  834. (inputs `(("qtbase" ,qtbase-5)))
  835. (synopsis "Qt XML patterns module")
  836. (description "The QtXmlPatterns module is a XQuery and XPath engine for
  837. XML and custom data models. It contains programs such as xmlpatterns and
  838. xmlpatternsvalidator.")))
  839. (define-public qtdeclarative
  840. (package (inherit qtsvg)
  841. (name "qtdeclarative")
  842. (version "5.15.2")
  843. (source (origin
  844. (method url-fetch)
  845. (uri (qt5-urls name version))
  846. (sha256
  847. (base32
  848. "0lancdn7y0lrlmyn5cbdm0izd5yprvd5n77nhkb7a3wl2sbx0066"))))
  849. (arguments
  850. (substitute-keyword-arguments (package-arguments qtsvg)
  851. ((#:tests? _ #f) #f) ;TODO: Enable the tests
  852. ((#:phases phases)
  853. `(modify-phases ,phases
  854. (add-after 'build 'fix-qt5core-install-prefix
  855. (lambda* (#:key outputs #:allow-other-keys)
  856. (let ((out (assoc-ref outputs "out")))
  857. ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
  858. ;; is provided by qtdeclarative.
  859. (substitute*
  860. "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
  861. (("\\$\\{_qt5Core_install_prefix\\}") out)))
  862. #t))))))
  863. (native-inputs
  864. `(("perl" ,perl)
  865. ("pkg-config" ,pkg-config)
  866. ("python" ,python)
  867. ("python-wrapper" ,python-wrapper)
  868. ("qtsvg" ,qtsvg)
  869. ("vulkan-headers" ,vulkan-headers)))
  870. (inputs
  871. `(("mesa" ,mesa)
  872. ("qtbase" ,qtbase-5)))
  873. (synopsis "Qt QML module (Quick 2)")
  874. (description "The Qt QML module provides a framework for developing
  875. applications and libraries with the QML language. It defines and implements the
  876. language and engine infrastructure, and provides an API to enable application
  877. developers to extend the QML language with custom types and integrate QML code
  878. with JavaScript and C++.")))
  879. (define-public qtconnectivity
  880. (package (inherit qtsvg)
  881. (name "qtconnectivity")
  882. (version "5.15.2")
  883. (source (origin
  884. (method url-fetch)
  885. (uri (qt5-urls name version))
  886. (sha256
  887. (base32
  888. "185zci61ip1wpjrygcw2m6v55lvninc0b8y2p3jh6qgpf5w35003"))))
  889. (native-inputs
  890. `(("perl" ,perl)
  891. ("pkg-config" ,pkg-config)
  892. ("qtdeclarative" ,qtdeclarative)))
  893. (inputs
  894. `(("bluez" ,bluez)
  895. ("qtbase" ,qtbase-5)))
  896. (synopsis "Qt Connectivity module")
  897. (description "The Qt Connectivity modules provides modules for interacting
  898. with Bluetooth and NFC.")))
  899. (define-public qtwebsockets
  900. (package (inherit qtsvg)
  901. (name "qtwebsockets")
  902. (version "5.15.2")
  903. (source (origin
  904. (method url-fetch)
  905. (uri (qt5-urls name version))
  906. (sha256
  907. (base32
  908. "0gr399fn5n8j3m9d3vv01vcbr1cb7pw043j04cnnxzrlvn2jvd50"))))
  909. (arguments
  910. (substitute-keyword-arguments (package-arguments qtsvg)
  911. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  912. (native-inputs
  913. `(("perl" ,perl)
  914. ("qtdeclarative" ,qtdeclarative)))
  915. (inputs `(("qtbase" ,qtbase-5)))
  916. (synopsis "Qt Web Sockets module")
  917. (description "WebSocket is a web-based protocol designed to enable two-way
  918. communication between a client application and a remote host. The Qt
  919. WebSockets module provides C++ and QML interfaces that enable Qt applications
  920. to act as a server that can process WebSocket requests, or a client that can
  921. consume data received from the server, or both.")))
  922. (define-public qtsensors
  923. (package (inherit qtsvg)
  924. (name "qtsensors")
  925. (version "5.15.2")
  926. (source (origin
  927. (method url-fetch)
  928. (uri (qt5-urls name version))
  929. (sha256
  930. (base32
  931. "0fa81r7bn1mf9ynwsx524a55dx1q0jb4vda6j48ssb4lx7wi201z"))))
  932. (arguments
  933. (substitute-keyword-arguments (package-arguments qtsvg)
  934. ((#:parallel-tests? _ #f) #f) ; can lead to race condition
  935. ((#:phases phases)
  936. `(modify-phases ,phases
  937. (add-after 'unpack 'fix-tests
  938. (lambda _
  939. (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
  940. (("2000") "5000") ;lengthen test timeout
  941. (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
  942. #t))))))
  943. (native-inputs
  944. `(("perl" ,perl)
  945. ("qtdeclarative" ,qtdeclarative)))
  946. (inputs `(("qtbase" ,qtbase-5)))
  947. (synopsis "Qt Sensors module")
  948. (description "The Qt Sensors API provides access to sensor hardware via QML
  949. and C++ interfaces. The Qt Sensors API also provides a motion gesture
  950. recognition API for devices.")))
  951. (define-public qtmultimedia
  952. (package (inherit qtsvg)
  953. (name "qtmultimedia")
  954. (version "5.15.2")
  955. (source (origin
  956. (method url-fetch)
  957. (uri (qt5-urls name version))
  958. (sha256
  959. (base32
  960. "1xbd6kc7i0iablqdkvfrajpi32cbq7j6ajbfyyyalcai1s0mhdqc"))
  961. (modules '((guix build utils)))
  962. (snippet
  963. '(begin
  964. (delete-file-recursively
  965. "examples/multimedia/spectrum/3rdparty")
  966. ;; We also prevent the spectrum example from being built.
  967. (substitute* "examples/multimedia/multimedia.pro"
  968. (("spectrum") "#"))
  969. #t))))
  970. (arguments
  971. (substitute-keyword-arguments (package-arguments qtsvg)
  972. ((#:phases phases)
  973. `(modify-phases ,phases
  974. (replace 'configure
  975. (lambda* (#:key outputs #:allow-other-keys)
  976. (let ((out (assoc-ref outputs "out")))
  977. (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
  978. (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
  979. (string-append "PREFIX=" out)))))))
  980. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  981. (native-inputs
  982. `(("perl" ,perl)
  983. ("pkg-config" ,pkg-config)
  984. ("python" ,python)
  985. ("qtdeclarative" ,qtdeclarative)))
  986. (inputs
  987. `(("alsa-lib" ,alsa-lib)
  988. ("mesa" ,mesa)
  989. ("pulseaudio" ,pulseaudio)
  990. ("qtbase" ,qtbase-5)
  991. ;; Gstreamer is needed for the mediaplayer plugin
  992. ("gstreamer" ,gstreamer)
  993. ("gst-plugins-base" ,gst-plugins-base)))
  994. (synopsis "Qt Multimedia module")
  995. (description "The Qt Multimedia module provides set of APIs to play and
  996. record media, and manage a collection of media content. It also contains a
  997. set of plugins for interacting with pulseaudio and GStreamer.")))
  998. (define-public qtwayland
  999. (package (inherit qtsvg)
  1000. (name "qtwayland")
  1001. (version "5.15.2")
  1002. (source (origin
  1003. (method url-fetch)
  1004. (uri (qt5-urls name version))
  1005. (sha256
  1006. (base32
  1007. "1ddfx4nak16xx0zh1kl836zxvpbixmmjyplsmfmg65pqkwi34dqr"))))
  1008. (arguments
  1009. (substitute-keyword-arguments (package-arguments qtsvg)
  1010. ((#:phases phases)
  1011. `(modify-phases ,phases
  1012. (add-after 'unpack 'disable-failing-tests
  1013. (lambda _
  1014. ;; FIXME: tst_seatv4::animatedCursor() fails for no good
  1015. ;; reason and breaks these two tests.
  1016. (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
  1017. (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
  1018. "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
  1019. "")
  1020. (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
  1021. ""))
  1022. #t))
  1023. (add-before 'check 'set-test-environment
  1024. (lambda _
  1025. ;; Do not fail just because /etc/machine-id is missing.
  1026. (setenv "DBUS_FATAL_WARNINGS" "0")
  1027. #t))))))
  1028. (native-inputs
  1029. `(("glib" ,glib)
  1030. ("perl" ,perl)
  1031. ("pkg-config" ,pkg-config)
  1032. ("qtdeclarative" ,qtdeclarative)))
  1033. (inputs
  1034. `(("fontconfig" ,fontconfig)
  1035. ("freetype" ,freetype)
  1036. ("libx11" ,libx11)
  1037. ("libxcomposite" ,libxcomposite)
  1038. ("libxext" ,libxext)
  1039. ("libxkbcommon" ,libxkbcommon)
  1040. ("libxrender" ,libxrender)
  1041. ("mesa" ,mesa)
  1042. ("mtdev" ,mtdev)
  1043. ("qtbase" ,qtbase-5)
  1044. ("vulkan-headers" ,vulkan-headers)
  1045. ("wayland" ,wayland)))
  1046. (synopsis "Qt Wayland module")
  1047. (description "The Qt Wayland module provides the QtWayland client and
  1048. compositor libraries.")))
  1049. (define-public qtserialport
  1050. (package (inherit qtsvg)
  1051. (name "qtserialport")
  1052. (version "5.15.2")
  1053. (source (origin
  1054. (method url-fetch)
  1055. (uri (qt5-urls name version))
  1056. (sha256
  1057. (base32
  1058. "17gp5qzg4wdg8qlxk2p3mh8x1vk33rf33wic3fy0cws193bmkiar"))))
  1059. (native-inputs `(("perl" ,perl)))
  1060. (inputs
  1061. `(("qtbase" ,qtbase-5)
  1062. ("eudev" ,eudev)))
  1063. (arguments
  1064. (substitute-keyword-arguments (package-arguments qtsvg)
  1065. ((#:phases phases)
  1066. `(modify-phases ,phases
  1067. (add-after 'unpack 'patch-dlopen-paths
  1068. (lambda* (#:key inputs #:allow-other-keys)
  1069. (substitute* "src/serialport/qtudev_p.h"
  1070. ;; Use the absolute paths for dynamically loaded libs,
  1071. ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
  1072. ;; typically is not set in guix.
  1073. (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
  1074. (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
  1075. #t))))))
  1076. (synopsis "Qt Serial Port module")
  1077. (description "The Qt Serial Port module provides the library for
  1078. interacting with serial ports from within Qt.")))
  1079. (define-public qtserialbus
  1080. (package (inherit qtsvg)
  1081. (name "qtserialbus")
  1082. (version "5.15.2")
  1083. (source (origin
  1084. (method url-fetch)
  1085. (uri (qt5-urls name version))
  1086. (sha256
  1087. (base32
  1088. "125x6756fjpldqy6wbw6cg7ngjh2016aiq92bchh719z1mf7xsxf"))))
  1089. (arguments
  1090. (substitute-keyword-arguments (package-arguments qtsvg)
  1091. ((#:phases phases '%standard-phases)
  1092. `(modify-phases ,phases
  1093. (add-after 'unpack 'patch-libsocketcan-reference
  1094. (lambda* (#:key inputs #:allow-other-keys)
  1095. (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
  1096. (libcansocket.so (string-append libcansocket
  1097. "/lib/libsocketcan.so")))
  1098. (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
  1099. (("QStringLiteral\\(\"socketcan\"\\)")
  1100. (format #f "QStringLiteral(~s)" libcansocket.so)))
  1101. #t)))))))
  1102. (inputs
  1103. `(("libsocketcan" ,libsocketcan)
  1104. ("qtbase" ,qtbase-5)
  1105. ("qtserialport" ,qtserialport)))
  1106. (synopsis "Qt Serial Bus module")
  1107. (description "The Qt Serial Bus API provides classes and functions to
  1108. access the various industrial serial buses and protocols, such as CAN, ModBus,
  1109. and others.")))
  1110. (define-public qtwebchannel
  1111. (package (inherit qtsvg)
  1112. (name "qtwebchannel")
  1113. (version "5.15.2")
  1114. (source (origin
  1115. (method url-fetch)
  1116. (uri (qt5-urls name version))
  1117. (sha256
  1118. (base32
  1119. "1h9y634phvvk557mhmf9z4lmxr41rl8x9mqy2lzp31mk8ffffzqj"))))
  1120. (native-inputs
  1121. `(("perl" ,perl)
  1122. ("qtdeclarative" ,qtdeclarative)
  1123. ("qtwebsockets" ,qtwebsockets)))
  1124. (inputs `(("qtbase" ,qtbase-5)))
  1125. (synopsis "Web communication library for Qt")
  1126. (description "The Qt WebChannel module enables peer-to-peer communication
  1127. between the host (QML/C++ application) and the client (HTML/JavaScript
  1128. application). The transport mechanism is supported out of the box by the two
  1129. popular web engines, Qt WebKit 2 and Qt WebEngine.")))
  1130. (define-public qtwebglplugin
  1131. (package (inherit qtsvg)
  1132. (name "qtwebglplugin")
  1133. (version "5.15.2")
  1134. (source (origin
  1135. (method url-fetch)
  1136. (uri (qt5-urls name version))
  1137. (sha256
  1138. (base32
  1139. "0ihlnhv8ldkqz82v3j7j22lrhk17b6ghra8sx85y2agd2ysq5rw1"))))
  1140. (arguments
  1141. (substitute-keyword-arguments (package-arguments qtsvg)
  1142. ((#:phases phases)
  1143. `(modify-phases ,phases
  1144. (add-after 'unpack 'disable-network-tests
  1145. (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
  1146. (("webgl") "# webgl"))
  1147. #t))))))
  1148. (native-inputs '())
  1149. (inputs
  1150. `(("mesa" ,mesa)
  1151. ("qtbase" ,qtbase-5)
  1152. ("qtdeclarative" ,qtdeclarative)
  1153. ("qtwebsockets" ,qtwebsockets)
  1154. ("zlib" ,zlib)))
  1155. (synopsis "QPA plugin for running an application via a browser using
  1156. streamed WebGL commands")
  1157. (description "Qt back end that uses WebGL for rendering. It allows Qt
  1158. applications (with some limitations) to run in a web browser that supports
  1159. WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
  1160. compatible web browser without the use of plug-ins. The API is similar to
  1161. OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
  1162. (define-public qtwebview
  1163. (package (inherit qtsvg)
  1164. (name "qtwebview")
  1165. (version "5.15.2")
  1166. (source (origin
  1167. (method url-fetch)
  1168. (uri (qt5-urls name version))
  1169. (sha256
  1170. (base32
  1171. "1rw1wibmbxlj6xc86qs3y8h42al1vczqiksyxzaylxs9gqb4d7xy"))))
  1172. (native-inputs
  1173. `(("perl" ,perl)))
  1174. (inputs
  1175. `(("qtbase" ,qtbase-5)
  1176. ("qtdeclarative" ,qtdeclarative)))
  1177. (synopsis "Display web content in a QML application")
  1178. (description "Qt WebView provides a way to display web content in a QML
  1179. application without necessarily including a full web browser stack by using
  1180. native APIs where it makes sense.")))
  1181. (define-public qtlocation
  1182. (package (inherit qtsvg)
  1183. (name "qtlocation")
  1184. (version "5.15.2")
  1185. (source (origin
  1186. (method url-fetch)
  1187. (uri (string-append "https://download.qt.io/official_releases/qt/"
  1188. (version-major+minor version) "/" version
  1189. "/submodules/" name "-everywhere-src-"
  1190. version ".tar.xz"))
  1191. (sha256
  1192. (base32
  1193. "184jychnlfhplpwc5cdcsapwljgwvzk5qpf3val4kpq8w44wnkwq"))))
  1194. (arguments
  1195. (substitute-keyword-arguments (package-arguments qtsvg)
  1196. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  1197. (native-inputs
  1198. `(("perl" ,perl)
  1199. ("qtdeclarative" ,qtdeclarative)
  1200. ("qtquickcontrols" ,qtquickcontrols)
  1201. ("qtserialport" ,qtserialport)))
  1202. (inputs
  1203. `(("icu4c" ,icu4c)
  1204. ("openssl" ,openssl)
  1205. ("qtbase" ,qtbase-5)
  1206. ("zlib" ,zlib)))
  1207. (synopsis "Qt Location and Positioning modules")
  1208. (description "The Qt Location module provides an interface for location,
  1209. positioning and geolocation plugins.")))
  1210. (define-public qttools
  1211. (package (inherit qtsvg)
  1212. (name "qttools")
  1213. (version "5.15.2")
  1214. (source (origin
  1215. (method url-fetch)
  1216. (uri (qt5-urls name version))
  1217. (sha256
  1218. (base32
  1219. "1k618f7v6jaj0ygy8d7jvgb8zjr47sn55kiskbdkkizp3z7d12f1"))))
  1220. (arguments
  1221. (substitute-keyword-arguments (package-arguments qtsvg)
  1222. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  1223. (native-inputs
  1224. `(("perl" ,perl)
  1225. ("qtdeclarative" ,qtdeclarative)
  1226. ("vulkan-headers" ,vulkan-headers)))
  1227. (inputs
  1228. `(("mesa" ,mesa)
  1229. ("qtbase" ,qtbase-5)))
  1230. (synopsis "Qt Tools and Designer modules")
  1231. (description "The Qt Tools module provides a set of applications to browse
  1232. the documentation, translate applications, generate help files and other stuff
  1233. that helps in Qt development.")))
  1234. (define-public qtscript
  1235. (package (inherit qtsvg)
  1236. (name "qtscript")
  1237. (version "5.15.2")
  1238. (source (origin
  1239. (method url-fetch)
  1240. (uri (qt5-urls name version))
  1241. (sha256
  1242. (base32
  1243. "0gk74hk488k9ldacxbxcranr3arf8ifqg8kz9nm1rgdgd59p36d2"))
  1244. (patches (search-patches "qtscript-disable-tests.patch"))))
  1245. (native-inputs
  1246. `(("perl" ,perl)
  1247. ("qttools" ,qttools)))
  1248. (inputs
  1249. `(("qtbase" ,qtbase-5)))
  1250. (synopsis "Qt Script module")
  1251. (description "Qt provides support for application scripting with ECMAScript.
  1252. The following guides and references cover aspects of programming with
  1253. ECMAScript and Qt.")))
  1254. (define-public qtquickcontrols
  1255. (package (inherit qtsvg)
  1256. (name "qtquickcontrols")
  1257. (version "5.15.2")
  1258. (source (origin
  1259. (method url-fetch)
  1260. (uri (qt5-urls name version))
  1261. (sha256
  1262. (base32
  1263. "1dczakl868mg0lnwpf082jjc5976ycn879li1vqlgw5ihirzp4y3"))))
  1264. (arguments
  1265. (substitute-keyword-arguments (package-arguments qtsvg)
  1266. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  1267. (inputs
  1268. `(("qtbase" ,qtbase-5)
  1269. ("qtdeclarative" ,qtdeclarative)))
  1270. (synopsis "Qt Quick Controls and other Quick modules")
  1271. (description "The QtScript module provides classes for making Qt
  1272. applications scriptable. This module provides a set of extra components that
  1273. can be used to build complete interfaces in Qt Quick.")))
  1274. (define-public qtquickcontrols2
  1275. (package (inherit qtsvg)
  1276. (name "qtquickcontrols2")
  1277. (version "5.15.2")
  1278. (source (origin
  1279. (method url-fetch)
  1280. (uri (qt5-urls name version))
  1281. (sha256
  1282. (base32
  1283. "06c9vrwvbjmzapmfa25y34lgjkzg57xxbm92nr6wkv5qykjnq6v7"))))
  1284. (arguments
  1285. (substitute-keyword-arguments (package-arguments qtsvg)
  1286. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  1287. (inputs
  1288. `(("qtbase" ,qtbase-5)
  1289. ("qtdeclarative" ,qtdeclarative)))
  1290. (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
  1291. (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
  1292. module that provides platform integration: native dialogs, menus and menu bars,
  1293. and tray icons. It falls back to Qt Widgets when a native implementation is
  1294. not available.")))
  1295. (define-public qtgraphicaleffects
  1296. (package (inherit qtsvg)
  1297. (name "qtgraphicaleffects")
  1298. (version "5.15.2")
  1299. (source (origin
  1300. (method url-fetch)
  1301. (uri (qt5-urls name version))
  1302. (sha256
  1303. (base32
  1304. "1r6zfc0qga2ax155js7c8y5rx6vgayf582s921j09mb797v6g3gc"))))
  1305. (arguments
  1306. (substitute-keyword-arguments (package-arguments qtsvg)
  1307. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  1308. (inputs
  1309. `(("qtbase" ,qtbase-5)
  1310. ("qtdeclarative" ,qtdeclarative)))
  1311. (synopsis "Qt Graphical Effects module")
  1312. (description "The Qt Graphical Effects module provides a set of QML types
  1313. for adding visually impressive and configurable effects to user interfaces.
  1314. Effects are visual items that can be added to Qt Quick user interface as UI
  1315. components. The API consists of over 20 effects provided as separate QML
  1316. types. The effects cover functional areas such as blending, masking, blurring,
  1317. coloring, and many more.")))
  1318. (define-public qtgamepad
  1319. (package (inherit qtsvg)
  1320. (name "qtgamepad")
  1321. (version "5.15.2")
  1322. (source (origin
  1323. (method url-fetch)
  1324. (uri (qt5-urls name version))
  1325. (sha256
  1326. (base32
  1327. "0p07bg93fdfn4gr2kv38qgnws5znhswajrxdfs8xc9l3i7vi2xn7"))))
  1328. (native-inputs
  1329. `(("perl" ,perl)
  1330. ("pkg-config" ,pkg-config)))
  1331. (inputs
  1332. `(("fontconfig" ,fontconfig)
  1333. ("freetype" ,freetype)
  1334. ("libxrender" ,libxrender)
  1335. ("sdl2" ,sdl2)
  1336. ("qtbase" ,qtbase-5)
  1337. ("qtdeclarative" ,qtdeclarative)))
  1338. (synopsis "Qt Gamepad module")
  1339. (description "The Qt Gamepad module is an add-on library that enables Qt
  1340. applications to support the use of gamepad hardware and in some cases remote
  1341. control equipment. The module provides both QML and C++ interfaces. The
  1342. primary target audience are embedded devices with fullscreen user interfaces,
  1343. and mobile applications targeting TV-like form factors.")))
  1344. (define-public qtscxml
  1345. (package (inherit qtsvg)
  1346. (name "qtscxml")
  1347. (version "5.15.2")
  1348. (source (origin
  1349. (method url-fetch)
  1350. (uri (qt5-urls name version))
  1351. (sha256
  1352. (base32
  1353. "1p5771b9hnpchfcdgy0zkhwg09a6xq88934aggp0rij1k85mkfb0"))
  1354. (modules '((guix build utils)))
  1355. (snippet
  1356. '(begin
  1357. (delete-file-recursively "tests/3rdparty")
  1358. ;; the scion test refers to the bundled 3rd party test code.
  1359. (substitute* "tests/auto/auto.pro"
  1360. (("scion") "#"))
  1361. #t))))
  1362. (inputs
  1363. `(("qtbase" ,qtbase-5)
  1364. ("qtdeclarative" ,qtdeclarative)))
  1365. (synopsis "Qt SCXML module")
  1366. (description "The Qt SCXML module provides functionality to create state
  1367. machines from SCXML files. This includes both dynamically creating state
  1368. machines (loading the SCXML file and instantiating states and transitions) and
  1369. generating a C++ file that has a class implementing the state machine. It
  1370. also contains functionality to support data models and executable content.")))
  1371. (define-public qtpurchasing
  1372. (package (inherit qtsvg)
  1373. (name "qtpurchasing")
  1374. (version "5.15.2")
  1375. (source (origin
  1376. (method url-fetch)
  1377. (uri (qt5-urls name version))
  1378. (sha256
  1379. (base32
  1380. "09rjx53519dfk4qj2gbn3vlxyriasyb747wpg1p11y7jkwqhs4l7"))))
  1381. (inputs
  1382. `(("qtbase" ,qtbase-5)
  1383. ("qtdeclarative" ,qtdeclarative)))
  1384. (synopsis "Qt Purchasing module")
  1385. (description "The Qt Purchasing module provides and in-app API for
  1386. purchasing goods and services.")))
  1387. (define-public qtcharts
  1388. (package (inherit qtsvg)
  1389. (name "qtcharts")
  1390. (version "5.15.2")
  1391. (source (origin
  1392. (method url-fetch)
  1393. (uri (qt5-urls name version))
  1394. (sha256
  1395. (base32
  1396. "049x7z8zcp9jixmdv2fjscy2ggpd6za9hkdbb2bqp2mxjm0hwxg0"))))
  1397. (arguments
  1398. (substitute-keyword-arguments (package-arguments qtsvg)
  1399. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  1400. (inputs
  1401. `(("qtbase" ,qtbase-5)
  1402. ("qtdeclarative" ,qtdeclarative)))
  1403. (synopsis "Qt Charts module")
  1404. (description "The Qt Charts module provides a set of easy to use chart
  1405. components. It uses the Qt Graphics View Framework, therefore charts can be
  1406. easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
  1407. QGraphicsWidget, or QML types. Users can easily create impressive graphs by
  1408. selecting one of the charts themes.")
  1409. (license license:gpl3)))
  1410. (define-public qtdatavis3d
  1411. (package (inherit qtsvg)
  1412. (name "qtdatavis3d")
  1413. (version "5.15.2")
  1414. (source (origin
  1415. (method url-fetch)
  1416. (uri (qt5-urls name version))
  1417. (sha256
  1418. (base32
  1419. "1zdn3vm0nfy9ny7c783aabp3mhlnqhi9fw2rljn7ibbksmsnasi2"))))
  1420. (arguments
  1421. (substitute-keyword-arguments (package-arguments qtsvg)
  1422. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  1423. (inputs
  1424. `(("qtbase" ,qtbase-5)
  1425. ("qtdeclarative" ,qtdeclarative)))
  1426. (synopsis "Qt Data Visualization module")
  1427. (description "The Qt Data Visualization module provides a way to visualize
  1428. data in 3D as bar, scatter, and surface graphs. It is especially useful for
  1429. visualizing depth maps and large quantities of rapidly changing data, such as
  1430. data received from multiple sensors. The look and feel of graphs can be
  1431. customized by using themes or by adding custom items and labels to them.")
  1432. (license license:gpl3)))
  1433. (define-public qtnetworkauth
  1434. (package (inherit qtsvg)
  1435. (name "qtnetworkauth")
  1436. (version "5.15.2")
  1437. (source (origin
  1438. (method url-fetch)
  1439. (uri (qt5-urls name version))
  1440. (sha256
  1441. (base32
  1442. "11fdgacv4syr8bff2vdw7rb0dg1gcqpdf37hm3pn31d6z91frhpw"))))
  1443. (arguments
  1444. (substitute-keyword-arguments (package-arguments qtsvg)
  1445. ((#:phases phases)
  1446. `(modify-phases ,phases
  1447. (add-after 'unpack 'remove-failing-test
  1448. (lambda _
  1449. ;; These tests can't find their test data.
  1450. (substitute* "tests/auto/auto.pro"
  1451. (("oauth1 ") "# oauth1 "))
  1452. #t))))))
  1453. (inputs
  1454. `(("qtbase" ,qtbase-5)))
  1455. (synopsis "Qt Network Authorization module")
  1456. (description "The Qt Network Authorization module provides an
  1457. implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
  1458. (define-public qtremoteobjects
  1459. (package (inherit qtsvg)
  1460. (name "qtremoteobjects")
  1461. (version "5.15.2")
  1462. (source (origin
  1463. (method url-fetch)
  1464. (uri (qt5-urls name version))
  1465. (sha256
  1466. (base32
  1467. "1hngbp0vkr35rpsrac7b9vx6f360v8v2g0fffzm590l8j2ybd0b7"))))
  1468. (arguments
  1469. (substitute-keyword-arguments (package-arguments qtsvg)
  1470. ((#:phases phases)
  1471. `(modify-phases ,phases
  1472. (add-after 'unpack 'remove-failing-test
  1473. (lambda _
  1474. ;; This test can't find its imports.
  1475. (substitute* "tests/auto/qml/qml.pro"
  1476. (("integration") "# integration")
  1477. (("usertypes") "# usertypes"))
  1478. ;; disable failing tests: they need network
  1479. (substitute* "tests/auto/auto.pro"
  1480. (("integration_multiprocess proxy_multiprocess integration_external restart")
  1481. "integration_multiprocess"))
  1482. #t))))))
  1483. (inputs
  1484. `(("qtbase" ,qtbase-5)
  1485. ("qtdeclarative" ,qtdeclarative)))
  1486. (synopsis "Qt Remote Objects module")
  1487. (description "The Qt Remote Objects module is an @dfn{inter-process
  1488. communication} (IPC) module developed for Qt. The idea is to extend existing
  1489. Qt's functionalities to enable an easy exchange of information between
  1490. processes or computers.")))
  1491. (define-public qtspeech
  1492. (package (inherit qtsvg)
  1493. (name "qtspeech")
  1494. (version "5.15.2")
  1495. (source (origin
  1496. (method url-fetch)
  1497. (uri (qt5-urls name version))
  1498. (sha256
  1499. (base32
  1500. "1xc3x3ghnhgchsg1kgj156yg69wn4rwjx8r28i1jd05hxjggn468"))))
  1501. (arguments
  1502. (substitute-keyword-arguments (package-arguments qtsvg)
  1503. ((#:tests? _ #f) #f))) ; TODO: Enable the tests
  1504. (inputs
  1505. `(("qtbase" ,qtbase-5)))
  1506. (native-inputs
  1507. `(("perl" ,perl)
  1508. ("qtdeclarative" ,qtdeclarative)
  1509. ("qtmultimedia" ,qtmultimedia)
  1510. ("qtxmlpatterns" ,qtxmlpatterns)))
  1511. (synopsis "Qt Speech module")
  1512. (description "The Qt Speech module enables a Qt application to support
  1513. accessibility features such as text-to-speech, which is useful for end-users
  1514. who are visually challenged or cannot access the application for whatever
  1515. reason. The most common use case where text-to-speech comes in handy is when
  1516. the end-user is driving and cannot attend the incoming messages on the phone.
  1517. In such a scenario, the messaging application can read out the incoming
  1518. message.")))
  1519. (define-public qtspell
  1520. (package
  1521. (name "qtspell")
  1522. (version "0.9.0")
  1523. (source
  1524. (origin
  1525. (method git-fetch)
  1526. (uri (git-reference
  1527. (url "https://github.com/manisandro/qtspell")
  1528. (commit version)))
  1529. (file-name (git-file-name name version))
  1530. (sha256
  1531. (base32 "1081makirjxixz44ghwz362vgnk5wcks6ni6w01pl667x8wggsd2"))))
  1532. (build-system cmake-build-system)
  1533. (arguments
  1534. `(#:tests? #f)) ;no test
  1535. (native-inputs
  1536. `(("pkg-config" ,pkg-config)
  1537. ("qttools" ,qttools)))
  1538. (inputs
  1539. `(("enchant" ,enchant)
  1540. ("qtbase" ,qtbase-5)))
  1541. (home-page "https://github.com/manisandro/qtspell")
  1542. (synopsis "Spell checking for Qt text widgets")
  1543. (description
  1544. "QtSpell adds spell-checking functionality to Qt's text widgets,
  1545. using the Enchant spell-checking library.")
  1546. ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
  1547. (license license:gpl2+)))
  1548. (define-public qtwebengine
  1549. (package
  1550. (inherit qtsvg)
  1551. (name "qtwebengine")
  1552. (version (package-version qtbase-5))
  1553. (source
  1554. (origin
  1555. (method url-fetch)
  1556. (uri (qt5-urls name version))
  1557. (sha256
  1558. (base32
  1559. "1q4idxdm81sx102xc12ixj0xpfx52d6vwvs3jpapnkyq8c7cmby8"))
  1560. (modules '((ice-9 ftw)
  1561. (ice-9 match)
  1562. (srfi srfi-1)
  1563. (srfi srfi-26)
  1564. (guix build utils)))
  1565. (snippet
  1566. '(begin
  1567. (let ((preserved-third-party-files
  1568. '("base/third_party/double_conversion"
  1569. "base/third_party/cityhash"
  1570. "base/third_party/cityhash_v103"
  1571. "base/third_party/dynamic_annotations"
  1572. "base/third_party/icu"
  1573. "base/third_party/libevent"
  1574. "base/third_party/nspr"
  1575. "base/third_party/superfasthash"
  1576. "base/third_party/symbolize"
  1577. "base/third_party/xdg_mime"
  1578. "base/third_party/xdg_user_dirs"
  1579. "net/third_party/mozilla_security_manager"
  1580. "net/third_party/nss"
  1581. "net/third_party/quiche"
  1582. "net/third_party/uri_template"
  1583. "third_party/abseil-cpp"
  1584. "third_party/angle"
  1585. "third_party/angle/src/common/third_party/base"
  1586. "third_party/angle/src/common/third_party/smhasher"
  1587. "third_party/angle/src/common/third_party/xxhash"
  1588. "third_party/angle/src/third_party/compiler"
  1589. "third_party/axe-core"
  1590. "third_party/blink"
  1591. "third_party/boringssl"
  1592. "third_party/boringssl/src/third_party/fiat"
  1593. "third_party/breakpad"
  1594. "third_party/brotli"
  1595. "third_party/ced"
  1596. "third_party/cld_3"
  1597. "third_party/closure_compiler"
  1598. "third_party/crashpad"
  1599. "third_party/crashpad/crashpad/third_party/lss"
  1600. "third_party/crashpad/crashpad/third_party/zlib"
  1601. "third_party/crc32c"
  1602. "third_party/dav1d"
  1603. "third_party/dawn"
  1604. "third_party/devtools-frontend"
  1605. "third_party/devtools-frontend/src/front_end/third_party/fabricjs"
  1606. "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
  1607. "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
  1608. "third_party/devtools-frontend/src/third_party/axe-core"
  1609. "third_party/emoji-segmenter"
  1610. "third_party/ffmpeg"
  1611. "third_party/googletest"
  1612. "third_party/harfbuzz-ng/utils"
  1613. "third_party/hunspell"
  1614. "third_party/iccjpeg"
  1615. "third_party/icu"
  1616. "third_party/inspector_protocol"
  1617. "third_party/jinja2"
  1618. "third_party/jsoncpp"
  1619. "third_party/jstemplate"
  1620. "third_party/khronos"
  1621. "third_party/leveldatabase"
  1622. "third_party/libaddressinput"
  1623. "third_party/libgifcodec"
  1624. "third_party/libjingle_xmpp"
  1625. "third_party/libjpeg_turbo"
  1626. "third_party/libpng"
  1627. "third_party/libsrtp"
  1628. "third_party/libsync"
  1629. "third_party/libudev"
  1630. "third_party/libvpx"
  1631. "third_party/libwebm"
  1632. "third_party/libwebp"
  1633. "third_party/libxml"
  1634. "third_party/libxslt"
  1635. "third_party/libyuv"
  1636. "third_party/lss"
  1637. "third_party/mako"
  1638. "third_party/markupsafe"
  1639. "third_party/mesa_headers"
  1640. "third_party/metrics_proto"
  1641. "third_party/modp_b64"
  1642. "third_party/nasm"
  1643. "third_party/one_euro_filter"
  1644. "third_party/openh264/src/codec/api/svc"
  1645. "third_party/opus"
  1646. "third_party/ots"
  1647. "third_party/pdfium"
  1648. "third_party/pdfium/third_party/agg23"
  1649. "third_party/pdfium/third_party/base"
  1650. "third_party/pdfium/third_party/freetype"
  1651. "third_party/pdfium/third_party/lcms"
  1652. "third_party/pdfium/third_party/libopenjpeg20"
  1653. "third_party/pdfium/third_party/skia_shared"
  1654. "third_party/perfetto"
  1655. "third_party/pffft"
  1656. "third_party/ply"
  1657. "third_party/polymer"
  1658. "third_party/protobuf"
  1659. "third_party/protobuf/third_party/six"
  1660. "third_party/pyjson5"
  1661. "third_party/re2"
  1662. "third_party/rnnoise"
  1663. "third_party/skia"
  1664. "third_party/skia/include/third_party/skcms/skcms.h"
  1665. "third_party/skia/include/third_party/vulkan"
  1666. "third_party/skia/third_party/skcms"
  1667. "third_party/skia/third_party/vulkanmemoryallocator"
  1668. "third_party/smhasher"
  1669. "third_party/snappy"
  1670. "third_party/sqlite"
  1671. "third_party/usb_ids"
  1672. "third_party/usrsctp"
  1673. "third_party/web-animations-js"
  1674. "third_party/webrtc"
  1675. "third_party/webrtc/common_audio/third_party/fft4g"
  1676. "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
  1677. "third_party/webrtc/modules/third_party/fft"
  1678. "third_party/webrtc/modules/third_party/g711"
  1679. "third_party/webrtc/modules/third_party/g722"
  1680. "third_party/webrtc/rtc_base/third_party/base64"
  1681. "third_party/webrtc/rtc_base/third_party/sigslot"
  1682. "third_party/webrtc_overrides"
  1683. "third_party/widevine/cdm/widevine_cdm_common.h"
  1684. "third_party/widevine/cdm/widevine_cdm_version.h"
  1685. "third_party/woff2"
  1686. "third_party/yasm"
  1687. "third_party/zlib"
  1688. "url/third_party/mozilla"
  1689. "v8/src/third_party/utf8-decoder"
  1690. "v8/src/third_party/valgrind"
  1691. "v8/src/third_party/siphash"
  1692. "v8/third_party/v8/builtins"
  1693. "v8/third_party/inspector_protocol"))
  1694. (protected (make-regexp "\\.(gn|gyp)i?$")))
  1695. (define preserved-club
  1696. (map (lambda (member)
  1697. (string-append "./" member))
  1698. preserved-third-party-files))
  1699. (define (empty? dir)
  1700. (equal? (scandir dir) '("." "..")))
  1701. (define (third-party? file)
  1702. (string-contains file "third_party/"))
  1703. (define (useless? file)
  1704. (any (cute string-suffix? <> file)
  1705. '(".zip" ".so" ".dll" ".exe" ".jar")))
  1706. (define (parents child)
  1707. ;; Return all parent directories of CHILD up to and including
  1708. ;; the closest "third_party".
  1709. (let* ((dirs (match (string-split child #\/)
  1710. ((dirs ... last) dirs)))
  1711. (closest (list-index (lambda (dir)
  1712. (string=? "third_party" dir))
  1713. (reverse dirs)))
  1714. (delim (- (length dirs) closest)))
  1715. (fold (lambda (dir prev)
  1716. (cons (string-append (car prev) "/" dir)
  1717. prev))
  1718. (list (string-join (list-head dirs delim) "/"))
  1719. (list-tail dirs delim))))
  1720. (define (remove-loudly file)
  1721. (format #t "deleting ~a...~%" file)
  1722. (force-output)
  1723. (delete-file file))
  1724. (define (delete-unwanted-files child stat flag base level)
  1725. (match flag
  1726. ((or 'regular 'symlink 'stale-symlink)
  1727. (when (third-party? child)
  1728. (unless (or (member child preserved-club)
  1729. (any (cute member <> preserved-club)
  1730. (parents child))
  1731. (regexp-exec protected child))
  1732. (remove-loudly child)))
  1733. (when (and (useless? child) (file-exists? child))
  1734. (remove-loudly child))
  1735. #t)
  1736. ('directory-processed
  1737. (when (empty? child)
  1738. (rmdir child))
  1739. #t)
  1740. (_ #t)))
  1741. (with-directory-excursion "src/3rdparty"
  1742. ;; TODO: Try removing "gn" too for future versions of qtwebengine.
  1743. (delete-file-recursively "ninja")
  1744. (with-directory-excursion "chromium"
  1745. ;; Delete bundled software and binaries that were not explicitly
  1746. ;; preserved above.
  1747. (nftw "." delete-unwanted-files 'depth 'physical)
  1748. ;; Assert that each preserved item is present to catch removals.
  1749. (for-each (lambda (third-party)
  1750. (unless (file-exists? third-party)
  1751. (error (format #f "~s does not exist!~%" third-party))))
  1752. preserved-club)
  1753. ;; Use relative header locations instead of hard coded ones.
  1754. (substitute*
  1755. "base/third_party/dynamic_annotations/dynamic_annotations.c"
  1756. (("base/third_party/valgrind") "valgrind"))
  1757. (substitute*
  1758. "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
  1759. (("third_party/curl") "curl"))
  1760. (substitute*
  1761. '("components/viz/common/gpu/vulkan_context_provider.h"
  1762. "components/viz/common/resources/resource_format_utils_vulkan.h"
  1763. "gpu/config/gpu_util.cc")
  1764. (("third_party/vulkan/include/")
  1765. ""))
  1766. ;; Replace Google Analytics bundle with an empty file and hope
  1767. ;; no one notices.
  1768. (mkdir-p "third_party/analytics")
  1769. (call-with-output-file
  1770. "third_party/analytics/google-analytics-bundle.js"
  1771. (lambda (port)
  1772. (const #t)))))
  1773. ;; Do not enable support for loading the Widevine DRM plugin.
  1774. (substitute* "src/buildtools/config/common.pri"
  1775. (("enable_widevine=true")
  1776. "enable_widevine=false"))
  1777. #t)))))
  1778. (build-system gnu-build-system)
  1779. (native-inputs
  1780. `(("bison" ,bison)
  1781. ("flex" ,flex)
  1782. ("gperf" ,gperf)
  1783. ("ninja" ,ninja)
  1784. ("perl" ,perl)
  1785. ("pkg-config" ,pkg-config)
  1786. ("python-2" ,python-2)
  1787. ("python-six" ,python2-six)
  1788. ("ruby" ,ruby)))
  1789. (inputs
  1790. `(("alsa-lib" ,alsa-lib)
  1791. ("atk" ,atk)
  1792. ("cups-minimal" ,cups-minimal)
  1793. ("curl" ,curl)
  1794. ("dbus" ,dbus)
  1795. ("ffmpeg" ,ffmpeg)
  1796. ("fontconfig" ,fontconfig)
  1797. ("harbuzz" ,harfbuzz)
  1798. ("icu4c" ,icu4c)
  1799. ("jsoncpp" ,jsoncpp)
  1800. ("lcms" ,lcms)
  1801. ("libcap" ,libcap)
  1802. ("libevent" ,libevent)
  1803. ("libgcrypt" ,libgcrypt)
  1804. ("libjpeg" ,libjpeg-turbo)
  1805. ("libvpx" ,libvpx)
  1806. ("libwebp" ,libwebp)
  1807. ("libx11" ,libx11)
  1808. ("libxcb" ,libxcb)
  1809. ("libxcomposite" ,libxcomposite)
  1810. ("libxcursor" ,libxcursor)
  1811. ("libxi" ,libxi)
  1812. ("libxkbcommon" ,libxkbcommon)
  1813. ;; FIXME: libxml2 needs to built with icu support though it links to
  1814. ;; libxml2 configure summary still states "Checking for compatible
  1815. ;; system libxml2... no"
  1816. ("libxml2" ,libxml2)
  1817. ("openh264" ,openh264)
  1818. ("libxrandr" ,libxrandr)
  1819. ("libxrender" ,libxrender)
  1820. ("libxslt" ,libxslt)
  1821. ("libxtst" ,libxtst)
  1822. ("mesa" ,mesa)
  1823. ("minizip" ,minizip)
  1824. ("nss" ,nss)
  1825. ("opus" ,opus)
  1826. ("pciutils" ,pciutils)
  1827. ("protobuf" ,protobuf)
  1828. ("pulseaudio" ,pulseaudio)
  1829. ("qtbase" ,qtbase-5)
  1830. ("qtdeclarative" ,qtdeclarative)
  1831. ("qtmultimedia" ,qtmultimedia)
  1832. ("qtwebchannel" ,qtwebchannel)
  1833. ("re2" ,re2)
  1834. ("snappy" ,snappy)
  1835. ("udev" ,eudev)
  1836. ("valgrind" ,valgrind)
  1837. ("vulkan-headers" ,vulkan-headers)
  1838. ("xcb-util" ,xcb-util)))
  1839. (arguments
  1840. (substitute-keyword-arguments (package-arguments qtsvg)
  1841. ((#:modules modules '())
  1842. `((guix build gnu-build-system)
  1843. (guix build utils)
  1844. (ice-9 textual-ports)))
  1845. ((#:phases phases)
  1846. `(modify-phases ,phases
  1847. (add-before 'configure 'substitute-source
  1848. (lambda* (#:key inputs outputs #:allow-other-keys)
  1849. (let ((out (assoc-ref outputs "out"))
  1850. (nss (assoc-ref inputs "nss"))
  1851. (udev (assoc-ref inputs "udev")))
  1852. (with-atomic-file-replacement "src/buildtools/config/linux.pri"
  1853. (lambda (in out)
  1854. (display (get-string-all in) out)
  1855. (display "\ngn_args += use_system_openh264=true\n" out)))
  1856. ;; Qtwebengine is not installed into the same prefix as
  1857. ;; qtbase. Some qtbase QTLibraryInfo constants will not
  1858. ;; work. Replace with the full path to the qtwebengine
  1859. ;; translations and locales in the store.
  1860. (substitute* "src/core/web_engine_library_info.cpp"
  1861. (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
  1862. (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
  1863. (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
  1864. (string-append "QLatin1String(\"" out "/share/qt5\")")))
  1865. ;; Substitute full dynamic library path for nss.
  1866. (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
  1867. (("libnssckbi.so")
  1868. (string-append nss "/lib/nss/libnssckbi.so")))
  1869. ;; Substitute full dynamic library path for udev.
  1870. (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
  1871. (("libudev.so.1")
  1872. (string-append udev "/lib/libudev.so.1")))
  1873. #t)))
  1874. (add-before 'configure 'set-env
  1875. (lambda _
  1876. ;; Avoids potential race conditions.
  1877. (setenv "PYTHONDONTWRITEBYTECODE" "1")
  1878. (setenv "NINJAFLAGS"
  1879. (string-append "-k1" ;less verbose build output
  1880. ;; Respect the '--cores' option of 'guix build'.
  1881. " -j" (number->string (parallel-job-count))))
  1882. #t))
  1883. (replace 'configure
  1884. (lambda _
  1885. ;; Valid QT_BUILD_PARTS variables are:
  1886. ;; libs tools tests examples demos docs translations
  1887. (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
  1888. "--webengine-printing-and-pdf=no"
  1889. "--webengine-ffmpeg=system"
  1890. ;; FIXME: Building qtwebengine 5.12.2 with
  1891. ;; icu4c >= 68 fails.
  1892. ;;"--webengine-icu=system"
  1893. "--webengine-pepper-plugins=no"
  1894. "-webengine-proprietary-codecs")))))
  1895. ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
  1896. ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
  1897. ;; before running tests.
  1898. ((#:tests? _ #f) #f)))
  1899. (native-search-paths
  1900. (list (search-path-specification
  1901. (file-type 'regular)
  1902. (separator #f)
  1903. (variable "QTWEBENGINEPROCESS_PATH")
  1904. (files '("lib/qt5/libexec/QtWebEngineProcess")))))
  1905. (home-page "https://wiki.qt.io/QtWebEngine")
  1906. (synopsis "Qt WebEngine module")
  1907. (description "The Qt5WebEngine module provides support for web applications
  1908. using the Chromium browser project. The Chromium source code has Google services
  1909. and binaries removed, and adds modular support for using system libraries.")
  1910. (license license:lgpl2.1+)))
  1911. (define-public single-application-qt5
  1912. ;; Change in function signature, nheko requires at least this commit
  1913. (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053"))
  1914. (package
  1915. (name "single-application-qt5")
  1916. (version (string-append "3.2.0-" (string-take commit 7)))
  1917. (source
  1918. (origin
  1919. (method git-fetch)
  1920. (uri
  1921. (git-reference
  1922. (url "https://github.com/itay-grudev/SingleApplication")
  1923. (commit commit)))
  1924. (file-name (git-file-name name version))
  1925. (sha256
  1926. (base32
  1927. "163aa2x2qb0h8w26si5ql833ilj427jjbdwlz1p2p8iaq6dh0vq1"))))
  1928. (build-system cmake-build-system)
  1929. (arguments
  1930. `(#:tests? #f ; no check target
  1931. ;; Projects can decide how to build this library. You might need to
  1932. ;; override this flag (QApplication, QGuiApplication or
  1933. ;; QCoreApplication).
  1934. #:configure-flags '("-DQAPPLICATION_CLASS=QApplication")
  1935. #:phases
  1936. (modify-phases %standard-phases
  1937. ;; No install target, install things manually
  1938. (replace 'install
  1939. (lambda* (#:key inputs outputs source #:allow-other-keys)
  1940. (let* ((qt (assoc-ref inputs "qtbase"))
  1941. (qt-version ,(version-major (package-version qtbase-5)))
  1942. (out (assoc-ref outputs "out")))
  1943. (install-file
  1944. "libSingleApplication.a" (string-append out "/lib"))
  1945. (for-each
  1946. (lambda (file)
  1947. (install-file
  1948. (string-append source "/" file)
  1949. (string-append out "/include")))
  1950. '("SingleApplication"
  1951. "singleapplication.h" "singleapplication_p.h"))
  1952. #t))))))
  1953. (inputs
  1954. `(("qtbase" ,qtbase-5)))
  1955. (home-page "https://github.com/itay-grudev/SingleApplication")
  1956. (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6")
  1957. (description
  1958. "SingleApplication is a replacement of the QtSingleApplication for Qt5 and Qt6.
  1959. It keeps the Primary Instance of your Application and kills each subsequent
  1960. instances. It can (if enabled) spawn secondary (non-related to the primary)
  1961. instances and can send data to the primary instance from secondary
  1962. instances.")
  1963. (license license:expat))))
  1964. (define-public python-sip
  1965. (package
  1966. (name "python-sip")
  1967. (version "5.5.0")
  1968. (source
  1969. (origin
  1970. (method url-fetch)
  1971. (uri (list (pypi-uri "sip" version)
  1972. (string-append "https://www.riverbankcomputing.com/static/"
  1973. "Downloads/sip/" version
  1974. "/sip-" version ".tar.gz")))
  1975. (sha256
  1976. (base32
  1977. "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"))))
  1978. (build-system python-build-system)
  1979. (native-inputs
  1980. `(("python" ,python-wrapper)))
  1981. (propagated-inputs
  1982. `(("python-toml" ,python-toml)
  1983. ("python-packaging" ,python-packaging)))
  1984. (home-page "https://www.riverbankcomputing.com/software/sip/intro")
  1985. (synopsis "Python binding creator for C and C++ libraries")
  1986. (description
  1987. "SIP is a tool to create Python bindings for C and C++ libraries. It
  1988. was originally developed to create PyQt, the Python bindings for the Qt
  1989. toolkit, but can be used to create bindings for any C or C++ library.
  1990. SIP comprises a code generator and a Python module. The code generator
  1991. processes a set of specification files and generates C or C++ code, which
  1992. is then compiled to create the bindings extension module. The SIP Python
  1993. module provides support functions to the automatically generated code.")
  1994. ;; There is a choice between a python like license, gpl2 and gpl3.
  1995. ;; For compatibility with pyqt, we need gpl3.
  1996. (license license:gpl3)))
  1997. (define-public python-sip-4
  1998. (package
  1999. (inherit python-sip)
  2000. (name "python-sip")
  2001. (version "4.19.24")
  2002. (source
  2003. (origin
  2004. (method url-fetch)
  2005. (uri (list (pypi-uri "sip" version)
  2006. (string-append "https://www.riverbankcomputing.com/static/"
  2007. "Downloads/sip/" version
  2008. "/sip-" version ".tar.gz")))
  2009. (sha256
  2010. (base32
  2011. "1ra15vb5i9gkg2vdvh16cq9x2mmzw1yi3xphxs8q34q1pf83gkgd"))))
  2012. (build-system gnu-build-system)
  2013. (native-inputs
  2014. `(("python" ,python-wrapper)))
  2015. (propagated-inputs `())
  2016. (arguments
  2017. `(#:tests? #f ; no check target
  2018. #:imported-modules ((guix build python-build-system)
  2019. ,@%gnu-build-system-modules)
  2020. #:modules ((srfi srfi-1)
  2021. ((guix build python-build-system) #:select (python-version))
  2022. ,@%gnu-build-system-modules)
  2023. #:phases
  2024. (modify-phases %standard-phases
  2025. (replace 'configure
  2026. (lambda* (#:key inputs outputs #:allow-other-keys)
  2027. (let* ((out (assoc-ref outputs "out"))
  2028. (bin (string-append out "/bin"))
  2029. (include (string-append out "/include"))
  2030. (python (assoc-ref inputs "python"))
  2031. (lib (string-append out "/lib/python"
  2032. (python-version python)
  2033. "/site-packages")))
  2034. (invoke "python" "configure.py"
  2035. "--bindir" bin
  2036. "--destdir" lib
  2037. "--incdir" include)))))))
  2038. (license license:gpl3)))
  2039. (define-public python-pyqt
  2040. (package
  2041. (name "python-pyqt")
  2042. (version "5.15.2")
  2043. (source
  2044. (origin
  2045. (method url-fetch)
  2046. ;; PyPI is the canonical distribution point of PyQt. Older
  2047. ;; releases are available from the web site.
  2048. (uri (list (pypi-uri "PyQt5" version)
  2049. (string-append "https://www.riverbankcomputing.com/static/"
  2050. "Downloads/PyQt5/" version "/PyQt5-"
  2051. version ".tar.gz")))
  2052. (file-name (string-append "PyQt5-" version ".tar.gz"))
  2053. (sha256
  2054. (base32
  2055. "1z74295i69cha52llsqffzhb5zz7qnbjc64h8qg21l91jgf0harp"))
  2056. (patches (search-patches "pyqt-configure.patch"))))
  2057. (build-system gnu-build-system)
  2058. (native-inputs
  2059. `(("qtbase" ,qtbase-5))) ; for qmake
  2060. (propagated-inputs
  2061. `(("python-sip" ,python-sip)
  2062. ("python-pyqt5-sip" ,python-pyqt5-sip)))
  2063. (inputs
  2064. `(("python" ,python-wrapper)
  2065. ("qtbase" ,qtbase-5)
  2066. ("qtconnectivity" ,qtconnectivity)
  2067. ("qtdeclarative" ,qtdeclarative)
  2068. ("qtlocation" ,qtlocation)
  2069. ("qtmultimedia" ,qtmultimedia)
  2070. ("qtsensors" ,qtsensors)
  2071. ("qtserialport" ,qtserialport)
  2072. ("qtsvg" ,qtsvg)
  2073. ("qttools" ,qttools)
  2074. ("qtwebchannel" ,qtwebchannel)
  2075. ("qtwebkit" ,qtwebkit)
  2076. ("qtwebsockets" ,qtwebsockets)
  2077. ("qtx11extras" ,qtx11extras)
  2078. ("qtxmlpatterns" ,qtxmlpatterns)))
  2079. (arguments
  2080. `(#:modules ((srfi srfi-1)
  2081. ((guix build python-build-system) #:select (python-version))
  2082. ,@%gnu-build-system-modules)
  2083. #:imported-modules ((guix build python-build-system)
  2084. ,@%gnu-build-system-modules)
  2085. #:phases
  2086. (modify-phases %standard-phases
  2087. ;; When building python-pyqtwebengine, <qprinter.h> can not be
  2088. ;; included. Here we substitute the full path to the header in the
  2089. ;; store.
  2090. (add-before 'configure 'substitute-source
  2091. (lambda* (#:key inputs #:allow-other-keys)
  2092. (let* ((qtbase (assoc-ref inputs "qtbase"))
  2093. (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
  2094. (substitute* "sip/QtPrintSupport/qprinter.sip"
  2095. (("<qprinter.h>")
  2096. qtprinter.h))
  2097. #t)))
  2098. (replace 'configure
  2099. (lambda* (#:key inputs outputs #:allow-other-keys)
  2100. (let* ((out (assoc-ref outputs "out"))
  2101. (bin (string-append out "/bin"))
  2102. (sip (string-append out "/share/sip"))
  2103. (plugins (string-append out "/lib/qt5/plugins"))
  2104. (designer (string-append plugins "/designer"))
  2105. (qml (string-append plugins "/PyQt5"))
  2106. (python (assoc-ref inputs "python"))
  2107. (lib (string-append out "/lib/python"
  2108. (python-version python)
  2109. "/site-packages"))
  2110. (stubs (string-append lib "/PyQt5")))
  2111. (invoke "python" "configure.py"
  2112. "--confirm-license"
  2113. "--bindir" bin
  2114. "--destdir" lib
  2115. "--designer-plugindir" designer
  2116. "--qml-plugindir" qml
  2117. ; Where to install the PEP 484 Type Hints stub
  2118. ; files. Without this the stubs are tried to be
  2119. ; installed into the python package's
  2120. ; site-package directory, which is read-only.
  2121. "--stubsdir" stubs
  2122. "--sipdir" sip)))))))
  2123. (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
  2124. (synopsis "Python bindings for Qt")
  2125. (description
  2126. "PyQt is a set of Python v2 and v3 bindings for the Qt application
  2127. framework. The bindings are implemented as a set of Python modules and
  2128. contain over 620 classes.")
  2129. (license license:gpl3)))
  2130. (define-public python-pyqt5-sip
  2131. (package
  2132. (name "python-pyqt5-sip")
  2133. (version "12.8.1")
  2134. (source
  2135. (origin
  2136. (method url-fetch)
  2137. (uri (pypi-uri "PyQt5_sip" version))
  2138. (sha256
  2139. (base32
  2140. "1gg032ys4pccwkdzmdryadc9a4lq85nr05pag9swrsdykbdl9s9h"))))
  2141. (build-system python-build-system)
  2142. (arguments
  2143. `(#:tests? #f)) ;; No test code.
  2144. (home-page "https://www.riverbankcomputing.com/software/sip/")
  2145. (synopsis "Sip module support for PyQt5")
  2146. (description "Sip module support for PyQt5")
  2147. (license license:lgpl2.1+)))
  2148. (define-public python-pyqtwebengine
  2149. (package
  2150. (name "python-pyqtwebengine")
  2151. (version "5.15.2")
  2152. (source
  2153. (origin
  2154. (method url-fetch)
  2155. ;; The newest releases are only available on PyPI. Older ones
  2156. ;; are mirrored at the upstream home page.
  2157. (uri (list (pypi-uri "PyQtWebEngine" version)
  2158. (string-append "https://www.riverbankcomputing.com/static"
  2159. "/Downloads/PyQtWebEngine/" version
  2160. "/PyQtWebEngine-" version ".tar.gz")))
  2161. (sha256
  2162. (base32
  2163. "0d56ak71r14w4f9r96vaj34qcn2rbln3s6ildvvyc707fjkzwwjd"))))
  2164. (build-system gnu-build-system)
  2165. (native-inputs
  2166. `(("python" ,python)
  2167. ("python-sip" ,python-sip)
  2168. ;; qtbase is required for qmake
  2169. ("qtbase" ,qtbase-5)))
  2170. (inputs
  2171. `(("python" ,python-wrapper)
  2172. ("python-sip" ,python-sip)
  2173. ("python-pyqt" ,python-pyqt)
  2174. ("qtbase" ,qtbase-5)
  2175. ("qtsvg" ,qtsvg)
  2176. ("qtdeclarative" ,qtdeclarative)
  2177. ("qtwebchannel" ,qtwebchannel)
  2178. ("qtwebengine" ,qtwebengine)))
  2179. (arguments
  2180. `(#:modules ((srfi srfi-1)
  2181. ((guix build python-build-system) #:select (python-version))
  2182. ,@%gnu-build-system-modules)
  2183. #:imported-modules ((guix build python-build-system)
  2184. ,@%gnu-build-system-modules)
  2185. #:phases
  2186. (modify-phases %standard-phases
  2187. (replace 'configure
  2188. (lambda* (#:key inputs outputs #:allow-other-keys)
  2189. (let* ((out (assoc-ref outputs "out"))
  2190. (sipdir (string-append out "/share/sip"))
  2191. (pyqt-sipdir (string-append
  2192. (assoc-ref inputs "python-pyqt") "/share/sip"))
  2193. (python (assoc-ref inputs "python"))
  2194. (lib (string-append out "/lib/python"
  2195. (python-version python)
  2196. "/site-packages/PyQt5"))
  2197. (stubs (string-append lib "/PyQt5")))
  2198. (mkdir-p sipdir)
  2199. (invoke "python" "configure.py"
  2200. "-w"
  2201. "--no-dist-info"
  2202. "--destdir" lib
  2203. "--no-qsci-api"
  2204. "--stubsdir" stubs
  2205. "--sipdir" sipdir
  2206. "--pyqt-sipdir" pyqt-sipdir))))
  2207. ;; Because this has a different prefix than python-pyqt then we need
  2208. ;; to make this a namespace of its own.
  2209. (add-after 'install 'make-namespace
  2210. (lambda* (#:key inputs outputs #:allow-other-keys)
  2211. (let* ((__init__.py (string-append
  2212. (assoc-ref outputs "out")
  2213. "/lib/python"
  2214. (python-version (assoc-ref inputs "python"))
  2215. "/site-packages/PyQt5/__init__.py")))
  2216. (with-output-to-file __init__.py
  2217. (lambda _ (display "
  2218. from pkgutil import extend_path
  2219. __path__ = extend_path(__path__, __name__)
  2220. ")))
  2221. #t))))))
  2222. (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
  2223. (synopsis "Python bindings for QtWebEngine")
  2224. (description
  2225. "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
  2226. WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
  2227. set of three modules. Prior to v5.12 these bindings were part of PyQt
  2228. itself.")
  2229. (license license:gpl3)))
  2230. ;; XXX: This is useful because qtwebkit does not build reliably at this time.
  2231. ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
  2232. ;; packages that could be used together.
  2233. (define-public python-pyqt-without-qtwebkit
  2234. (package/inherit python-pyqt
  2235. (name "python-pyqt-without-qtwebkit")
  2236. (inputs
  2237. (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
  2238. (define-public python-pyqt-builder
  2239. (package
  2240. (name "python-pyqt-builder")
  2241. (version "1.9.0")
  2242. (source
  2243. (origin
  2244. (method url-fetch)
  2245. (uri (pypi-uri "PyQt-builder" version))
  2246. (sha256
  2247. (base32
  2248. "0nh0054c54ji3sm6d268fccf0y5f613spswwgwqd3rnn816hnljl"))))
  2249. (build-system python-build-system)
  2250. (inputs
  2251. `(("python-sip" ,python-sip)))
  2252. (home-page "https://www.riverbankcomputing.com/static/Docs/PyQt-builder/")
  2253. (synopsis "PEP 517 compliant PyQt build system")
  2254. (description "PyQt-builder is a tool for generating Python bindings for C++
  2255. libraries that use the Qt application framework. The bindings are built on
  2256. top of the PyQt bindings for Qt. PyQt-builder is used to build PyQt itself.")
  2257. ;; Either version 2 or 3, but no other version. See the file
  2258. ;; 'pyqtbuild/builder.py' in the source distribution for more information.
  2259. (license (list license:gpl2 license:gpl3))))
  2260. (define-public python-qtpy
  2261. (package
  2262. (name "python-qtpy")
  2263. (version "1.9.0")
  2264. (source
  2265. (origin
  2266. (method url-fetch)
  2267. (uri (pypi-uri "QtPy" version))
  2268. (sha256
  2269. (base32
  2270. "13cw8l7zrhbdi03k1wl1pg9xdl4ahdfa7yz8gd0f23sxnm22rdrd"))))
  2271. (build-system python-build-system)
  2272. (propagated-inputs
  2273. `(("python-pyside2" ,python-pyside-2)))
  2274. (arguments
  2275. `(;; Not all supported bindings are packaged. Especially PyQt4.
  2276. #:tests? #f))
  2277. (home-page "https://github.com/spyder-ide/qtpy")
  2278. (synopsis
  2279. "Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets")
  2280. (description
  2281. "Provides an abstraction layer on top of the various Qt bindings
  2282. (PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
  2283. (license license:expat)))
  2284. (define-public qscintilla
  2285. (package
  2286. (name "qscintilla")
  2287. (version "2.11.6")
  2288. (source (origin
  2289. (method url-fetch)
  2290. (uri (string-append "https://www.riverbankcomputing.com/static"
  2291. "/Downloads/QScintilla/" version
  2292. "/QScintilla-" version ".tar.gz"))
  2293. (sha256
  2294. (base32
  2295. "19r0vpqb4m9bqwxmjp9w6x0hgahkrg7zryk78hwgplj7vdbn0d77"))))
  2296. (build-system gnu-build-system)
  2297. (arguments
  2298. `(#:phases
  2299. (modify-phases %standard-phases
  2300. (replace 'configure
  2301. (lambda* (#:key outputs #:allow-other-keys)
  2302. (let ((out (assoc-ref outputs "out")))
  2303. (chdir "Qt4Qt5")
  2304. (substitute* "qscintilla.pro"
  2305. (("\\$\\$\\[QT_INSTALL_LIBS\\]")
  2306. (string-append out "/lib"))
  2307. (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
  2308. (string-append out "/include"))
  2309. (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
  2310. (string-append out "/translations"))
  2311. (("\\$\\$\\[QT_INSTALL_DATA\\]")
  2312. (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
  2313. (("\\$\\$\\[QT_HOST_DATA\\]")
  2314. (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
  2315. (invoke "qmake")))))))
  2316. (native-inputs `(("qtbase" ,qtbase-5)))
  2317. (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
  2318. (synopsis "Qt port of the Scintilla C++ editor control")
  2319. (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
  2320. editor control. QScintilla includes features especially useful when editing
  2321. and debugging source code. These include support for syntax styling, error
  2322. indicators, code completion and call tips.")
  2323. (license license:gpl3+)))
  2324. (define-public python-qscintilla
  2325. (package/inherit qscintilla
  2326. (name "python-qscintilla")
  2327. (arguments
  2328. `(#:configure-flags
  2329. (list "--pyqt=PyQt5"
  2330. (string-append "--pyqt-sipdir="
  2331. (assoc-ref %build-inputs "python-pyqt")
  2332. "/share/sip")
  2333. (string-append "--qsci-incdir="
  2334. (assoc-ref %build-inputs "qscintilla")
  2335. "/include")
  2336. (string-append "--qsci-libdir="
  2337. (assoc-ref %build-inputs "qscintilla")
  2338. "/lib"))
  2339. #:phases
  2340. (modify-phases %standard-phases
  2341. (replace 'configure
  2342. (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
  2343. (let ((out (assoc-ref outputs "out"))
  2344. (python (assoc-ref inputs "python")))
  2345. (chdir "Python")
  2346. (apply invoke "python3" "configure.py"
  2347. configure-flags)
  2348. ;; Install to the right directory
  2349. (substitute* '("Makefile"
  2350. "Qsci/Makefile")
  2351. (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
  2352. (((string-append python "/lib"))
  2353. (string-append out "/lib")))
  2354. ;; And fix the installed.txt file
  2355. (substitute* "installed.txt"
  2356. (("/gnu/store/[^/]+") out)))
  2357. #t)))))
  2358. (inputs
  2359. `(("qscintilla" ,qscintilla)
  2360. ("python" ,python)
  2361. ("python-pyqt" ,python-pyqt)))
  2362. (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
  2363. editor control. QScintilla includes features especially useful when editing
  2364. and debugging source code. These include support for syntax styling, error
  2365. indicators, code completion and call tips.
  2366. This package provides the Python bindings.")))
  2367. ;; PyQt only looks for modules in its own directory. It ignores environment
  2368. ;; variables such as PYTHONPATH, so we need to build a union package to make
  2369. ;; it work.
  2370. (define-public python-pyqt+qscintilla
  2371. (package/inherit python-pyqt
  2372. (name "python-pyqt+qscintilla")
  2373. (source #f)
  2374. (build-system trivial-build-system)
  2375. (arguments
  2376. '(#:modules ((guix build union))
  2377. #:builder (begin
  2378. (use-modules (ice-9 match)
  2379. (guix build union))
  2380. (match %build-inputs
  2381. (((names . directories) ...)
  2382. (union-build (assoc-ref %outputs "out")
  2383. directories)
  2384. #t)))))
  2385. (inputs
  2386. `(("python-pyqt" ,python-pyqt)
  2387. ("python-qscintilla" ,python-qscintilla)))
  2388. (synopsis "Union of PyQt and the Qscintilla extension")
  2389. (description
  2390. "This package contains the union of PyQt and the Qscintilla extension.")))
  2391. (define-public qtkeychain
  2392. (package
  2393. (name "qtkeychain")
  2394. (version "0.9.1")
  2395. (source
  2396. (origin
  2397. (method git-fetch)
  2398. (uri (git-reference
  2399. (url "https://github.com/frankosterfeld/qtkeychain/")
  2400. (commit (string-append "v" version))))
  2401. (file-name (git-file-name name version))
  2402. (sha256
  2403. (base32
  2404. "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
  2405. (build-system cmake-build-system)
  2406. (native-inputs
  2407. `(("pkg-config" ,pkg-config)
  2408. ("qttools" ,qttools)))
  2409. (inputs
  2410. `(("qtbase" ,qtbase-5)))
  2411. (arguments
  2412. `(#:tests? #f ; No tests included
  2413. #:phases
  2414. (modify-phases %standard-phases
  2415. (add-before 'configure 'set-qt-trans-dir
  2416. (lambda _
  2417. (substitute* "CMakeLists.txt"
  2418. (("\\$\\{qt_translations_dir\\}")
  2419. "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
  2420. #t)))))
  2421. (home-page "https://github.com/frankosterfeld/qtkeychain")
  2422. (synopsis "Qt API to store passwords")
  2423. (description
  2424. "QtKeychain is a Qt library to store passwords and other secret data
  2425. securely. It will not store any data unencrypted unless explicitly requested.")
  2426. (license license:bsd-3)))
  2427. (define-public qtsolutions
  2428. (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
  2429. (revision "53"))
  2430. (package
  2431. (name "qtsolutions")
  2432. (version (git-version "0" revision commit))
  2433. (source
  2434. (origin
  2435. (method git-fetch)
  2436. (uri (git-reference
  2437. (url "https://github.com/qtproject/qt-solutions")
  2438. (commit commit)))
  2439. (file-name (git-file-name name version))
  2440. (sha256
  2441. (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
  2442. (modules '((guix build utils)
  2443. (ice-9 ftw)
  2444. (srfi srfi-1)))
  2445. (snippet
  2446. ;; Unvendor QtLockFile from QtSingleApplication.
  2447. '(begin
  2448. (with-directory-excursion "qtsingleapplication/src"
  2449. (for-each delete-file
  2450. (find-files "." "qtlockedfile.*\\.(h|cpp)"))
  2451. (substitute* "qtsingleapplication.pri"
  2452. ;; Add include path of LockedFile.
  2453. (("INCLUDEPATH \\+=")
  2454. "INCLUDEPATH += ../../qtlockedfile/src")
  2455. ;; Link library of LockedFile.
  2456. (("LIBS \\+=")
  2457. "LIBS += -lQtSolutions_LockedFile"))
  2458. (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
  2459. (("#include \"qtlockedfile.*\\.cpp\"") "")
  2460. ;; Unwrap namespace added in the vendoring process.
  2461. (("QtLP_Private::QtLockedFile")
  2462. "QtLockedFile")))
  2463. #t))))
  2464. (build-system gnu-build-system)
  2465. (arguments
  2466. `(#:tests? #f ; No target
  2467. #:imported-modules
  2468. ((guix build copy-build-system)
  2469. ,@%gnu-build-system-modules)
  2470. #:modules
  2471. (((guix build copy-build-system) #:prefix copy:)
  2472. (guix build gnu-build-system)
  2473. (guix build utils))
  2474. #:phases
  2475. (modify-phases %standard-phases
  2476. (add-after 'unpack 'patch-source
  2477. (lambda* (#:key outputs #:allow-other-keys)
  2478. (substitute* (find-files "." "common.pri")
  2479. ;; Remove unnecessary prefixes/suffixes in library names.
  2480. (("qt5") "qt")
  2481. (("-head") ""))
  2482. ;; Disable building of examples.
  2483. (substitute* (find-files "." "\\.pro$")
  2484. (("SUBDIRS\\+=examples") ""))
  2485. ;; Fix deprecated functions.
  2486. (substitute* "qtsoap/src/qtsoap.cpp"
  2487. (("toAscii") "toUtf8"))
  2488. #t))
  2489. (replace 'configure
  2490. (lambda _
  2491. (for-each (lambda (solution)
  2492. (with-directory-excursion solution
  2493. (invoke "./configure" "-library")
  2494. (invoke "qmake")))
  2495. '("qtlockedfile" "qtpropertybrowser" "qtservice"
  2496. "qtsingleapplication" "qtsoap"))
  2497. #t))
  2498. (replace 'build
  2499. (lambda _
  2500. (for-each (lambda (solution)
  2501. (with-directory-excursion solution
  2502. (invoke "make")))
  2503. '("qtlockedfile" "qtpropertybrowser" "qtservice"
  2504. "qtsingleapplication" "qtsoap"))
  2505. #t))
  2506. (replace 'install
  2507. (lambda args
  2508. (for-each (lambda (solution)
  2509. (with-directory-excursion solution
  2510. (apply
  2511. (assoc-ref copy:%standard-phases 'install)
  2512. #:install-plan
  2513. '(("src" "include" #:include-regexp ("\\.h$"))
  2514. ("lib" "lib"))
  2515. args)))
  2516. '("qtlockedfile" "qtpropertybrowser" "qtservice"
  2517. "qtsingleapplication" "qtsoap")))))))
  2518. (inputs
  2519. `(("qtbase" ,qtbase-5)))
  2520. (synopsis "Collection of Qt extensions")
  2521. (description "QtSolutions is a set of components extending Qt.
  2522. @itemize
  2523. @item QtLockedFile: A class that extends QFile with advisory locking functions.
  2524. @item QtPropertyBrowser: A framework that enables the user to edit a set of
  2525. properties.
  2526. @item QtService: A helper for writing services such as Unix daemons.
  2527. @item QtSingleApplication: A component that provides support for applications
  2528. that can be only started once per user.
  2529. @item QtSoap: A component that provides basic web service support with version
  2530. 1.1 of the SOAP protocol.
  2531. @end itemize\n")
  2532. (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
  2533. (license (list license:bsd-3
  2534. ;; QScriptParser and QScriptGrammar specifically allow
  2535. ;; redistribution under GPL3 or LGPL2.1
  2536. license:gpl3 license:lgpl2.1)))))
  2537. (define-public qwt
  2538. (package
  2539. (name "qwt")
  2540. (version "6.1.5")
  2541. (source
  2542. (origin
  2543. (method url-fetch)
  2544. (uri
  2545. (string-append "mirror://sourceforge/qwt/qwt/"
  2546. version "/qwt-" version ".tar.bz2"))
  2547. (sha256
  2548. (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
  2549. (build-system gnu-build-system)
  2550. (inputs
  2551. `(("qtbase" ,qtbase-5)
  2552. ("qtsvg" ,qtsvg)
  2553. ("qttools" ,qttools)))
  2554. (arguments
  2555. `(#:phases
  2556. (modify-phases %standard-phases
  2557. (replace 'configure
  2558. (lambda* (#:key outputs #:allow-other-keys)
  2559. (let* ((out (assoc-ref outputs "out"))
  2560. (docdir (string-append out "/share/doc/qwt"))
  2561. (incdir (string-append out "/include/qwt"))
  2562. (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
  2563. (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
  2564. (substitute* '("qwtconfig.pri")
  2565. (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
  2566. (format #f "~a = ~a\n" x out))
  2567. (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
  2568. (format #f "~a = ~a\n" x docdir))
  2569. (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
  2570. (format #f "~a = ~a\n" x incdir))
  2571. (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
  2572. (format #f "~a = ~a\n" x pluginsdir))
  2573. (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
  2574. (format #f "~a = ~a\n" x featuresdir)))
  2575. (substitute* '("doc/doc.pro")
  2576. ;; We'll install them in the 'install-man-pages' phase.
  2577. (("^unix:doc\\.files.*") ""))
  2578. (invoke "qmake"))))
  2579. (add-after 'install 'install-man-pages
  2580. (lambda* (#:key outputs #:allow-other-keys)
  2581. (let* ((out (assoc-ref outputs "out"))
  2582. (man (string-append out "/share/man")))
  2583. ;; Remove some incomplete manual pages.
  2584. (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
  2585. (mkdir-p man)
  2586. (copy-recursively "doc/man" man)
  2587. #t))))))
  2588. (home-page "http://qwt.sourceforge.net")
  2589. (synopsis "Qt widgets for plots, scales, dials and other technical software
  2590. GUI components")
  2591. (description
  2592. "The Qwt library contains widgets and components which are primarily useful
  2593. for technical and scientific purposes. It includes a 2-D plotting widget,
  2594. different kinds of sliders, and much more.")
  2595. (license
  2596. (list
  2597. ;; The Qwt license is LGPL2.1 with some exceptions.
  2598. (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
  2599. ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
  2600. license:lgpl2.1 license:gpl3))))
  2601. (define-public qtwebkit
  2602. (package
  2603. (name "qtwebkit")
  2604. (version "5.212.0-alpha4")
  2605. (source
  2606. (origin
  2607. (method url-fetch)
  2608. (uri (string-append "https://github.com/annulen/webkit/releases/download/"
  2609. "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
  2610. (sha256
  2611. (base32
  2612. "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
  2613. (patches (search-patches "qtwebkit-pbutils-include.patch"
  2614. "qtwebkit-fix-building-with-bison-3.7.patch"
  2615. "qtwebkit-fix-building-with-glib-2.68.patch"
  2616. "qtwebkit-fix-building-with-icu-68.patch"
  2617. "qtwebkit-fix-building-with-python-3.9.patch"))))
  2618. (build-system cmake-build-system)
  2619. (native-inputs
  2620. `(("perl" ,perl)
  2621. ("python" ,python)
  2622. ("ruby" ,ruby)
  2623. ("bison" ,bison)
  2624. ("flex" ,flex)
  2625. ("gperf" ,gperf)
  2626. ("pkg-config" ,pkg-config)))
  2627. (inputs
  2628. `(("icu" ,icu4c)
  2629. ("glib" ,glib)
  2630. ("gst-plugins-base" ,gst-plugins-base)
  2631. ("libjpeg" ,libjpeg-turbo)
  2632. ("libpng" ,libpng)
  2633. ("libwebp" ,libwebp)
  2634. ("sqlite" ,sqlite)
  2635. ("fontconfig" ,fontconfig)
  2636. ("libxrender" ,libxrender)
  2637. ("qtbase" ,qtbase-5)
  2638. ("qtdeclarative" ,qtdeclarative)
  2639. ("qtlocation" ,qtlocation)
  2640. ("qtmultimedia" ,qtmultimedia)
  2641. ("qtsensors" ,qtsensors)
  2642. ("qtwebchannel" ,qtwebchannel)
  2643. ("libxml2" ,libxml2)
  2644. ("libxslt" ,libxslt)
  2645. ("libx11" ,libx11)
  2646. ("libxcomposite" ,libxcomposite)))
  2647. (arguments
  2648. `(#:tests? #f ; no apparent tests; it might be necessary to set
  2649. ; ENABLE_API_TESTS, see CMakeLists.txt
  2650. ;; Parallel builds fail due to a race condition:
  2651. ;; <https://bugs.gnu.org/34062>.
  2652. #:parallel-build? #f
  2653. #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
  2654. "-DPORT=Qt"
  2655. "-DUSE_LIBHYPHEN=OFF"
  2656. "-DUSE_SYSTEM_MALLOC=ON"
  2657. ;; XXX: relative dir installs to build dir?
  2658. (string-append "-DECM_MKSPECS_INSTALL_DIR="
  2659. %output "/lib/qt5/mkspecs/modules")
  2660. ;; Sacrifice a little speed in order to link
  2661. ;; libraries and test executables in a
  2662. ;; reasonable amount of memory.
  2663. "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
  2664. "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
  2665. (home-page "https://www.webkit.org")
  2666. (synopsis "Web browser engine and classes to render and interact with web
  2667. content")
  2668. (description "QtWebKit provides a Web browser engine that makes it easy to
  2669. embed content from the World Wide Web into your Qt application. At the same
  2670. time Web content can be enhanced with native controls.")
  2671. ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
  2672. ;; room for slower or busy hardware.
  2673. (properties '((timeout . 64800))) ;18 hours
  2674. ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
  2675. ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
  2676. ;; disable it on non-Intel platforms.
  2677. (supported-systems '("x86_64-linux" "i686-linux"))
  2678. (license license:lgpl2.1+)))
  2679. (define-public dotherside
  2680. (package
  2681. (name "dotherside")
  2682. (version "0.6.4")
  2683. (source
  2684. (origin
  2685. (method git-fetch)
  2686. (uri (git-reference
  2687. (url "https://github.com/filcuc/DOtherSide")
  2688. (commit (string-append "v" version))))
  2689. (file-name (git-file-name name version))
  2690. (sha256
  2691. (base32
  2692. "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
  2693. (build-system cmake-build-system)
  2694. (native-inputs
  2695. `(("qttools" ,qttools)))
  2696. (inputs
  2697. `(("qtbase" ,qtbase-5)
  2698. ("qtdeclarative" ,qtdeclarative)))
  2699. (home-page "https://filcuc.github.io/DOtherSide/index.html")
  2700. (synopsis "C language library for creating bindings for the Qt QML language")
  2701. (description
  2702. "DOtherSide is a C language library for creating bindings for the
  2703. QT QML language. The following features are implementable from
  2704. a binding language:
  2705. @itemize
  2706. @item Creating custom QObject
  2707. @item Creating custom QAbstractListModels
  2708. @item Creating custom properties, signals and slots
  2709. @item Creating from QML QObject defined in the binded language
  2710. @item Creating from Singleton QML QObject defined in the binded language
  2711. @end itemize\n")
  2712. (license license:lgpl3))) ;version 3 only (+ exception)
  2713. ;; There have been no public releases yet.
  2714. (define-public qtcolorwidgets
  2715. (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
  2716. (revision "1"))
  2717. (package
  2718. (name "qtcolorwidgets")
  2719. (version (git-version "0" revision commit))
  2720. (source (origin
  2721. (method git-fetch)
  2722. (uri (git-reference
  2723. (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
  2724. (commit commit)))
  2725. (file-name (git-file-name name version))
  2726. (sha256
  2727. (base32
  2728. "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
  2729. (build-system cmake-build-system)
  2730. (arguments `(#:tests? #f)) ; There are no tests
  2731. (native-inputs
  2732. `(("qttools" ,qttools)))
  2733. (inputs
  2734. `(("qtbase" ,qtbase-5)))
  2735. (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
  2736. (synopsis "Color management widgets")
  2737. (description "QtColorWidgets provides a Qt color dialog that is more
  2738. user-friendly than the default @code{QColorDialog} and several other
  2739. color-related widgets.")
  2740. ;; Includes a license exception for combining with GPL2 code.
  2741. (license license:lgpl3+))))
  2742. (define-public qcustomplot
  2743. (package
  2744. (name "qcustomplot")
  2745. (version "2.1.0")
  2746. (source
  2747. (origin
  2748. (method url-fetch)
  2749. (uri (string-append "https://www.qcustomplot.com/release/"
  2750. version "fixed" "/QCustomPlot.tar.gz"))
  2751. (sha256
  2752. (base32 "1324kqyj1v1f8k8d7b15gc3apwz9qxx52p86hvchg33hjdlqhskx"))))
  2753. (native-inputs
  2754. `(("qcustomplot-sharedlib"
  2755. ,(origin
  2756. (method url-fetch)
  2757. (uri (string-append "https://www.qcustomplot.com/release/"
  2758. version "fixed" "/QCustomPlot-sharedlib.tar.gz"))
  2759. (sha256
  2760. (base32 "0vp8lpxvd1nlp4liqrlvslpqrgfn0wpiwizzdsjbj22zzb8vxikc"))))))
  2761. (inputs
  2762. `(("qtbase" ,qtbase-5)))
  2763. (build-system gnu-build-system)
  2764. (arguments
  2765. `(#:phases
  2766. (modify-phases %standard-phases
  2767. (add-after 'unpack 'unpack-extra-files
  2768. (lambda* (#:key inputs #:allow-other-keys)
  2769. (invoke "tar" "-xvf" (assoc-ref inputs "qcustomplot-sharedlib"))))
  2770. (replace 'configure
  2771. (lambda* (#:key outputs #:allow-other-keys)
  2772. (chdir "qcustomplot-sharedlib/sharedlib-compilation")
  2773. (substitute* "sharedlib-compilation.pro"
  2774. ;; Don't build debug library.
  2775. (("debug_and_release")
  2776. "release"))
  2777. (invoke "qmake"
  2778. (string-append "DESTDIR="
  2779. (assoc-ref outputs "out")
  2780. "/lib"))))
  2781. (add-after 'install 'install-header
  2782. (lambda* (#:key outputs #:allow-other-keys)
  2783. (install-file "../../qcustomplot.h"
  2784. (string-append (assoc-ref outputs "out")
  2785. "/include")))))))
  2786. (home-page "https://www.qcustomplot.com/")
  2787. (synopsis "Qt widget for plotting and data visualization")
  2788. (description
  2789. "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts.")
  2790. (license license:gpl3+)))
  2791. (define-public python-shiboken-2
  2792. (package
  2793. (name "python-shiboken-2")
  2794. (version "5.15.2")
  2795. (source (origin
  2796. (method url-fetch)
  2797. (uri (string-append "https://download.qt.io/official_releases"
  2798. "/QtForPython/pyside2/PySide2-" version
  2799. "-src/pyside-setup-opensource-src-"
  2800. version ".tar.xz"))
  2801. (sha256
  2802. (base32
  2803. "060ljj1nzyp4zfz2vasbv2i7gs5rfkkjwxxbisd0fdw01d5m01mk"))))
  2804. (build-system cmake-build-system)
  2805. (inputs
  2806. `(("clang-toolchain" ,clang-toolchain)
  2807. ("libxml2" ,libxml2)
  2808. ("libxslt" ,libxslt)
  2809. ("python-wrapper" ,python-wrapper)
  2810. ("qtbase" ,qtbase-5)
  2811. ("qtxmlpatterns" ,qtxmlpatterns)))
  2812. (arguments
  2813. `(#:tests? #f
  2814. ;; FIXME: Building tests fails
  2815. #:configure-flags '("-DBUILD_TESTS=off")
  2816. #:phases
  2817. (modify-phases %standard-phases
  2818. (add-after 'unpack 'use-shiboken-dir-only
  2819. (lambda _ (chdir "sources/shiboken2") #t))
  2820. (add-before 'configure 'make-files-writable-and-update-timestamps
  2821. (lambda _
  2822. ;; The build scripts need to modify some files in
  2823. ;; the read-only source directory, and also attempts
  2824. ;; to create Zip files which fails because the Zip
  2825. ;; format does not support timestamps before 1980.
  2826. (let ((circa-1980 (* 10 366 24 60 60)))
  2827. (for-each (lambda (file)
  2828. (make-file-writable file)
  2829. (utime file circa-1980 circa-1980))
  2830. (find-files ".")))
  2831. #t))
  2832. (add-before 'configure 'set-build-env
  2833. (lambda* (#:key inputs #:allow-other-keys)
  2834. (let ((llvm (assoc-ref inputs "clang-toolchain")))
  2835. (setenv "CLANG_INSTALL_DIR" llvm)
  2836. #t))))))
  2837. (home-page "https://wiki.qt.io/Qt_for_Python")
  2838. (synopsis
  2839. "Shiboken generates bindings for C++ libraries using CPython source code")
  2840. (description
  2841. "Shiboken generates bindings for C++ libraries using CPython source code")
  2842. (license
  2843. (list
  2844. ;; The main code is GPL3 or LGPL3.
  2845. ;; Examples are BSD-3.
  2846. license:gpl3
  2847. license:lgpl3
  2848. license:bsd-3))))
  2849. (define-public python-pyside-2
  2850. (package
  2851. (name "python-pyside-2")
  2852. (version (package-version python-shiboken-2))
  2853. (source (package-source python-shiboken-2))
  2854. (build-system cmake-build-system)
  2855. (inputs
  2856. `(("libxml2" ,libxml2)
  2857. ("libxslt" ,libxslt)
  2858. ("clang-toolchain" ,clang-toolchain)
  2859. ("qtbase" ,qtbase-5)
  2860. ("qtdatavis3d" ,qtdatavis3d)
  2861. ("qtlocation" ,qtlocation)
  2862. ("qtmultimedia" ,qtmultimedia)
  2863. ("qtquickcontrols" ,qtquickcontrols)
  2864. ("qtscript" ,qtscript)
  2865. ("qtscxml" ,qtscxml)
  2866. ("qtsensors" ,qtsensors)
  2867. ("qtspeech" ,qtspeech)
  2868. ("qtsvg" ,qtsvg)
  2869. ("qtwebchannel" ,qtwebchannel)
  2870. ("qtwebsockets" ,qtwebsockets)
  2871. ("qtx11extras" ,qtx11extras)
  2872. ("qtxmlpatterns" ,qtxmlpatterns)))
  2873. (propagated-inputs
  2874. `(("python-shiboken-2" ,python-shiboken-2)))
  2875. (native-inputs
  2876. `(("cmake" ,cmake-minimal)
  2877. ("python" ,python-wrapper)
  2878. ("qttools" ,qttools)
  2879. ("which" ,which)))
  2880. (arguments
  2881. `(#:tests? #f
  2882. ;; FIXME: Building tests fail.
  2883. #:configure-flags
  2884. (list "-DBUILD_TESTS=FALSE"
  2885. (string-append "-DPYTHON_EXECUTABLE="
  2886. (assoc-ref %build-inputs "python")
  2887. "/bin/python"))
  2888. #:phases
  2889. (modify-phases %standard-phases
  2890. (add-after 'unpack 'go-to-source-dir
  2891. (lambda _ (chdir "sources/pyside2") #t))
  2892. (add-before 'configure 'set-clang-dir
  2893. (lambda* (#:key inputs #:allow-other-keys)
  2894. (let ((clang (assoc-ref inputs "clang-toolchain")))
  2895. (setenv "CLANG_INSTALL_DIR" clang)
  2896. #t))))))
  2897. (home-page "https://wiki.qt.io/Qt_for_Python")
  2898. (synopsis
  2899. "The Qt for Python product enables the use of Qt5 APIs in Python applications")
  2900. (description
  2901. "The Qt for Python product enables the use of Qt5 APIs in Python
  2902. applications. It lets Python developers utilize the full potential of Qt,
  2903. using the PySide2 module. The PySide2 module provides access to the
  2904. individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
  2905. comes with the Shiboken2 CPython binding code generator, which can be used to
  2906. generate Python bindings for your C or C++ code.")
  2907. (license (list
  2908. license:lgpl3
  2909. ;;They state that:
  2910. ;; this file may be used under the terms of the GNU General
  2911. ;; Public License version 2.0 or (at your option) the GNU
  2912. ;; General Public license version 3 or any later version
  2913. ;; approved by the KDE Free Qt Foundation.
  2914. ;; Thus, it is currently v2 or v3, but no "+".
  2915. license:gpl3
  2916. license:gpl2))))
  2917. (define-public python-pyside-2-tools
  2918. (package
  2919. (name "python-pyside-2-tools")
  2920. (version (package-version python-shiboken-2))
  2921. (source (package-source python-shiboken-2))
  2922. (build-system cmake-build-system)
  2923. (inputs
  2924. `(("python-pyside-2" ,python-pyside-2)
  2925. ("python-shiboken-2" ,python-shiboken-2)
  2926. ("qtbase" ,qtbase-5)))
  2927. (native-inputs
  2928. `(("python" ,python-wrapper)))
  2929. (arguments
  2930. `(#:tests? #f
  2931. #:configure-flags
  2932. (list "-DBUILD_TESTS=off"
  2933. (string-append "-DPYTHON_EXECUTABLE="
  2934. (assoc-ref %build-inputs "python")
  2935. "/bin/python"))
  2936. #:phases (modify-phases %standard-phases
  2937. (add-after 'unpack 'go-to-source-dir
  2938. (lambda _ (chdir "sources/pyside2-tools") #t)))))
  2939. (home-page "https://wiki.qt.io/Qt_for_Python")
  2940. (synopsis
  2941. "Contains command line tools for PySide2")
  2942. (description
  2943. "Contains lupdate, rcc and uic tools for PySide2")
  2944. (license license:gpl2)))
  2945. (define-public libqglviewer
  2946. (package
  2947. (name "libqglviewer")
  2948. (version "2.7.2")
  2949. (source (origin
  2950. (method url-fetch)
  2951. (uri
  2952. (string-append "http://libqglviewer.com/src/libQGLViewer-"
  2953. version ".tar.gz"))
  2954. (sha256
  2955. (base32
  2956. "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
  2957. (build-system gnu-build-system)
  2958. (arguments
  2959. '(#:tests? #f ; no check target
  2960. #:make-flags
  2961. (list (string-append "PREFIX="
  2962. (assoc-ref %outputs "out")))
  2963. #:phases
  2964. (modify-phases %standard-phases
  2965. (replace 'configure
  2966. (lambda* (#:key make-flags #:allow-other-keys)
  2967. (apply invoke (cons "qmake" make-flags)))))))
  2968. (native-inputs
  2969. `(("qtbase" ,qtbase-5)
  2970. ("qttools" ,qttools)))
  2971. (inputs
  2972. `(("glu" ,glu)))
  2973. (home-page "http://libqglviewer.com")
  2974. (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
  2975. (description
  2976. "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
  2977. of OpenGL 3D viewers.
  2978. It provides some of the typical 3D viewer functionalities, such as the
  2979. possibility to move the camera using the mouse, which lacks in most of the
  2980. other APIs. Other features include mouse manipulated frames, interpolated
  2981. keyFrames, object selection, stereo display, screenshot saving and much more.
  2982. It can be used by OpenGL beginners as well as to create complex applications,
  2983. being fully customizable and easy to extend.")
  2984. ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
  2985. ;; be used.
  2986. (license (list license:gpl2 license:gpl3))))
  2987. (define-public soqt
  2988. (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
  2989. (revision "1"))
  2990. (package
  2991. (name "soqt")
  2992. (version (git-version "1.6.0" revision commit-ref))
  2993. (source
  2994. (origin
  2995. (method git-fetch)
  2996. (uri (git-reference
  2997. (url "https://github.com/coin3d/soqt")
  2998. (commit commit-ref)
  2999. (recursive? #t)))
  3000. (file-name (git-file-name name version))
  3001. (sha256
  3002. (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
  3003. (build-system cmake-build-system)
  3004. (arguments '(#:tests? #f)) ; There are no tests
  3005. (native-inputs
  3006. `(("pkg-config" ,pkg-config)
  3007. ("cmake" ,cmake)))
  3008. (inputs
  3009. `(("qtbase" ,qtbase-5)
  3010. ("coin3D" ,coin3D-4)))
  3011. (home-page "https://github.com/coin3d/soqt")
  3012. (synopsis "Qt GUI component toolkit library for Coin")
  3013. (description "SoQt is a Qt GUI component toolkit library for Coin. It is
  3014. also compatible with SGI and TGS Open Inventor, and the API is based on the API
  3015. of the InventorXt GUI component toolkit.")
  3016. (license license:bsd-3))))
  3017. (define-public libdbusmenu-qt
  3018. (package
  3019. (name "libdbusmenu-qt")
  3020. (version "0.9.3+16.04.20160218-0ubuntu1")
  3021. (source
  3022. (origin
  3023. (method git-fetch)
  3024. ;; Download from github rather than launchpad because launchpad trunk
  3025. ;; tarball hash is not deterministic.
  3026. (uri (git-reference
  3027. (url "https://github.com/unity8-team/libdbusmenu-qt")
  3028. (commit version)))
  3029. (file-name (git-file-name name version))
  3030. (sha256
  3031. (base32 "0b7ii1cvmpcyl79gqal9c3va9m55h055s4hx7fpxkhhqs9463ggg"))))
  3032. (build-system cmake-build-system)
  3033. (arguments
  3034. ;; XXX: Tests require a dbus session and some icons.
  3035. '(#:tests? #f))
  3036. (native-inputs
  3037. `(("doxygen" ,doxygen)))
  3038. (inputs
  3039. `(("qtbase" ,qtbase-5)))
  3040. (home-page "https://launchpad.net/libdbusmenu-qt")
  3041. (synopsis "Qt implementation of the DBusMenu spec")
  3042. (description "This library provides a Qt implementation of the DBusMenu
  3043. protocol. The DBusMenu protocol makes it possible for applications to export
  3044. and import their menus over DBus.")
  3045. (license license:lgpl2.1+)))