freedesktop.scm 100 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
  3. ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
  4. ;;; Copyright © 2015, 2017 Andy Wingo <wingo@pobox.com>
  5. ;;; Copyright © 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
  6. ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
  7. ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
  8. ;;; Copyright © 2016, 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
  9. ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
  10. ;;; Copyright © 2017 Nikita <nikita@n0.is>
  11. ;;; Copyright © 2017, 2018 Mark H Weaver <mhw@netris.org>
  12. ;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
  13. ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
  14. ;;; Copyright © 2017, 2020 Brendan Tildesley <mail@brendan.scot>
  15. ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
  16. ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
  17. ;;; Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
  18. ;;; Copyright © 2019 Reza Alizadeh Majd <r.majd@pantherx.org>
  19. ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
  20. ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
  21. ;;; Copyright © 2020 Rene Saavedra <pacoon@protonmail.com>
  22. ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
  23. ;;; Copyright © 2020 Anders Thuné <asse.97@gmail.com>
  24. ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
  25. ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
  26. ;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
  27. ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
  28. ;;; Copyright © 2021 Robby Zambito <contact@robbyzambito.me>
  29. ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
  30. ;;;
  31. ;;; This file is part of GNU Guix.
  32. ;;;
  33. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  34. ;;; under the terms of the GNU General Public License as published by
  35. ;;; the Free Software Foundation; either version 3 of the License, or (at
  36. ;;; your option) any later version.
  37. ;;;
  38. ;;; GNU Guix is distributed in the hope that it will be useful, but
  39. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  40. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  41. ;;; GNU General Public License for more details.
  42. ;;;
  43. ;;; You should have received a copy of the GNU General Public License
  44. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  45. (define-module (gnu packages freedesktop)
  46. #:use-module ((guix licenses) #:prefix license:)
  47. #:use-module (guix utils)
  48. #:use-module (guix packages)
  49. #:use-module (guix download)
  50. #:use-module (guix gexp)
  51. #:use-module (guix git-download)
  52. #:use-module (guix build-system cmake)
  53. #:use-module (guix build-system gnu)
  54. #:use-module (guix build-system meson)
  55. #:use-module (guix build-system perl)
  56. #:use-module (guix build-system python)
  57. #:use-module (guix build-system glib-or-gtk)
  58. #:use-module (gnu packages)
  59. #:use-module (gnu packages acl)
  60. #:use-module (gnu packages admin)
  61. #:use-module (gnu packages autotools)
  62. #:use-module (gnu packages base)
  63. #:use-module (gnu packages bash)
  64. #:use-module (gnu packages boost)
  65. #:use-module (gnu packages check)
  66. #:use-module (gnu packages cmake)
  67. #:use-module (gnu packages compression)
  68. #:use-module (gnu packages cryptsetup)
  69. #:use-module (gnu packages databases)
  70. #:use-module (gnu packages disk)
  71. #:use-module (gnu packages docbook)
  72. #:use-module (gnu packages documentation)
  73. #:use-module (gnu packages fontutils)
  74. #:use-module (gnu packages gawk)
  75. #:use-module (gnu packages gettext)
  76. #:use-module (gnu packages ghostscript)
  77. #:use-module (gnu packages gl)
  78. #:use-module (gnu packages glib) ;intltool
  79. #:use-module (gnu packages gnome)
  80. #:use-module (gnu packages gperf)
  81. #:use-module (gnu packages graph)
  82. #:use-module (gnu packages graphviz)
  83. #:use-module (gnu packages gstreamer)
  84. #:use-module (gnu packages gtk)
  85. #:use-module (gnu packages image)
  86. #:use-module (gnu packages language)
  87. #:use-module (gnu packages libffi)
  88. #:use-module (gnu packages libunwind)
  89. #:use-module (gnu packages libusb)
  90. #:use-module (gnu packages linux)
  91. #:use-module (gnu packages man)
  92. #:use-module (gnu packages m4)
  93. #:use-module (gnu packages networking)
  94. #:use-module (gnu packages nss)
  95. #:use-module (gnu packages package-management)
  96. #:use-module (gnu packages perl)
  97. #:use-module (gnu packages perl-check)
  98. #:use-module (gnu packages pkg-config)
  99. #:use-module (gnu packages polkit)
  100. #:use-module (gnu packages python)
  101. #:use-module (gnu packages python-crypto)
  102. #:use-module (gnu packages python-xyz)
  103. #:use-module (gnu packages rdesktop)
  104. #:use-module (gnu packages rsync)
  105. #:use-module (gnu packages samba)
  106. #:use-module (gnu packages serialization)
  107. #:use-module (gnu packages sqlite)
  108. #:use-module (gnu packages valgrind)
  109. #:use-module (gnu packages video)
  110. #:use-module (gnu packages w3m)
  111. #:use-module (gnu packages web)
  112. #:use-module (gnu packages xdisorg)
  113. #:use-module (gnu packages xml)
  114. #:use-module (gnu packages xorg)
  115. #:use-module (srfi srfi-1))
  116. (define-public appstream
  117. (package
  118. (name "appstream")
  119. (version "0.13.1")
  120. (source
  121. (origin
  122. (method url-fetch)
  123. (uri
  124. (string-append "https://www.freedesktop.org/software/"
  125. "appstream/releases/"
  126. "AppStream-" version ".tar.xz"))
  127. (sha256
  128. (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
  129. (build-system meson-build-system)
  130. (arguments
  131. `(#:glib-or-gtk? #t
  132. #:phases
  133. (modify-phases %standard-phases
  134. (add-after 'unpack 'patch-libstemmer
  135. (lambda* (#:key inputs #:allow-other-keys)
  136. (substitute* "meson.build"
  137. (("/usr/include")
  138. (string-append (assoc-ref inputs "libstemmer")
  139. "/include")))
  140. #t))
  141. (add-after 'patch-libstemmer 'patch-docbook-xml
  142. (lambda* (#:key inputs #:allow-other-keys)
  143. (with-directory-excursion "docs/api"
  144. (substitute* "appstream-docs.xml"
  145. (("http://www.oasis-open.org/docbook/xml/4.3/")
  146. (string-append (assoc-ref inputs "docbook-xml-4.3")
  147. "/xml/dtd/docbook/"))))
  148. (for-each (lambda (file)
  149. (substitute* file
  150. (("http://www.oasis-open.org/docbook/xml/4.5/")
  151. (string-append (assoc-ref inputs "docbook-xml")
  152. "/xml/dtd/docbook/"))))
  153. (find-files "scripts/desc" "\\.xml$"))
  154. #t))
  155. (add-after 'patch-docbook-xml 'disable-failing-tests
  156. (lambda _
  157. (substitute* "tests/test-pool.c"
  158. (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;")
  159. "")
  160. (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;")
  161. "")
  162. (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;")
  163. "")
  164. (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;")
  165. "")
  166. (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;")
  167. ""))
  168. #t))
  169. (add-after 'disable-failing-tests 'patch-install-dir
  170. (lambda* (#:key outputs #:allow-other-keys)
  171. (substitute* "data/meson.build"
  172. (("/etc")
  173. (string-append (assoc-ref outputs "out")
  174. "/etc")))
  175. #t)))))
  176. (native-inputs
  177. `(("cmake" ,cmake)
  178. ("docbook-xml-4.3" ,docbook-xml-4.3)
  179. ("docbook-xml" ,docbook-xml)
  180. ("docbook-xsl" ,docbook-xsl)
  181. ("gettext" ,gettext-minimal)
  182. ("glib:bin" ,glib "bin")
  183. ("gobject-introspection" ,gobject-introspection)
  184. ("gperf" ,gperf)
  185. ("gtk-doc" ,gtk-doc/stable)
  186. ("pkg-config" ,pkg-config)
  187. ("python" ,python-wrapper)
  188. ("xsltproc" ,libxslt)))
  189. (inputs
  190. `(("libsoup" ,libsoup)
  191. ("libstemmer" ,libstemmer)
  192. ("libxml2" ,libxml2)
  193. ("libyaml" ,libyaml)
  194. ("lmdb" ,lmdb)))
  195. (propagated-inputs
  196. `(("glib" ,glib)))
  197. (synopsis "Tools and libraries to work with AppStream metadata")
  198. (description "AppStream is a cross-distribution effort for enhancing the way
  199. we interact with the software repositories provided by distributions by
  200. standardizing software component metadata. It provides the foundation to build
  201. software-center applications, by providing metadata necessary for an
  202. application-centric view on package repositories. It additionally provides
  203. specifications for things like an unified software metadata database, screenshot
  204. services and various other things needed to create user-friendly
  205. application-centers for distributions.")
  206. (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
  207. ;; XXX: meson.build claims both, headers just indicate lgpl2.1+
  208. ;; there are also some (irrelevant) wtfpl2 examples
  209. (license (list license:gpl2+ license:lgpl2.1+))))
  210. (define-public farstream
  211. (package
  212. (name "farstream")
  213. (version "0.2.9")
  214. (source
  215. (origin
  216. (method git-fetch)
  217. (uri
  218. (git-reference
  219. (url "https://gitlab.freedesktop.org/farstream/farstream.git")
  220. (commit version)))
  221. (file-name (git-file-name name version))
  222. (sha256
  223. (base32 "1sd8syldyq6bphfdm129s3gq554vfv7vh1vcwzk48gjryf101awk"))
  224. (patches
  225. (search-patches "farstream-make.patch"))))
  226. (build-system glib-or-gtk-build-system)
  227. (outputs '("out" "doc"))
  228. (arguments
  229. `(#:tests? #f ; https://gitlab.freedesktop.org/farstream/farstream/-/issues/18
  230. #:configure-flags
  231. (list
  232. "--enable-gtk-doc"
  233. "--enable-glib-asserts"
  234. (string-append "--with-html-dir="
  235. (assoc-ref %outputs "doc")
  236. "/share/gtk-doc/html"))
  237. #:phases
  238. (modify-phases %standard-phases
  239. (add-after 'unpack 'copy-common
  240. (lambda _
  241. (delete-file "autogen.sh")
  242. (copy-recursively
  243. (assoc-ref %build-inputs "common")
  244. "common")
  245. #t))
  246. (add-after 'unpack 'patch-docbook-xml
  247. (lambda* (#:key inputs #:allow-other-keys)
  248. (with-directory-excursion "docs"
  249. (substitute* '("libs/farstream-libs-docs.sgml"
  250. "plugins/farstream-plugins-docs.sgml")
  251. (("http://www.oasis-open.org/docbook/xml/4.1.2/")
  252. (string-append (assoc-ref inputs "docbook-xml")
  253. "/xml/dtd/docbook/"))))
  254. #t)))))
  255. (native-inputs
  256. `(("autoconf" ,autoconf)
  257. ("automake" ,automake)
  258. ("common"
  259. ,(origin
  260. (method git-fetch)
  261. (uri
  262. (git-reference
  263. (url "https://gitlab.freedesktop.org/gstreamer/common.git")
  264. (commit "88e512ca7197a45c4114f7fa993108f23245bf50")))
  265. (file-name
  266. (git-file-name "common" "latest.88e512c"))
  267. (sha256
  268. (base32 "1nk94pnskjyngqcfb9p32g4yvf4nzpjszisw24r9azl0pawqpsn6"))))
  269. ("docbook-xml" ,docbook-xml-4.1.2)
  270. ("docbook-xsl" ,docbook-xsl)
  271. ("gobject-introspection" ,gobject-introspection)
  272. ("gtk-doc" ,gtk-doc/stable)
  273. ("libtool" ,libtool)
  274. ("perl" ,perl)
  275. ("pkg-config" ,pkg-config)
  276. ("python" ,python-wrapper)
  277. ("xsltproc" ,libxslt)))
  278. (inputs
  279. `(("glib" ,glib)
  280. ("gtk+" ,gtk+)
  281. ("gupnp-igd" ,gupnp-igd)
  282. ("libnice" ,libnice)))
  283. (propagated-inputs
  284. `(("gstreamer" ,gstreamer)
  285. ("gst-plugins-bad" ,gst-plugins-bad)
  286. ("gst-plugins-base" ,gst-plugins-base)
  287. ("gst-plugins-good" ,gst-plugins-good)))
  288. (synopsis "The Farstream VVoIP framework")
  289. (description "Farstream is a collection of GStreamer modules and libraries
  290. for videoconferencing.")
  291. (home-page "https://www.freedesktop.org/wiki/Software/Farstream/")
  292. (license license:lgpl2.1+)))
  293. (define-public libglib-testing
  294. (package
  295. (name "libglib-testing")
  296. (version "0.1.0")
  297. (source
  298. (origin
  299. (method git-fetch)
  300. (uri (git-reference
  301. (url "https://gitlab.gnome.org/pwithnall/libglib-testing.git")
  302. (commit version)))
  303. (file-name (git-file-name name version))
  304. (sha256
  305. (base32 "0xmycsrlqyji6sc2i4wvp2gxf3897z65a57ygihfnpjpyl7zlwkr"))))
  306. (build-system meson-build-system)
  307. (arguments
  308. `(#:glib-or-gtk? #t
  309. #:phases
  310. (modify-phases %standard-phases
  311. (add-before
  312. 'check 'pre-check
  313. (lambda _
  314. ;; The test suite requires a running dbus-daemon.
  315. (system "dbus-daemon &")
  316. ;; Don't fail on missing '/etc/machine-id'.
  317. (setenv "DBUS_FATAL_WARNINGS" "0")
  318. #t)))))
  319. (native-inputs
  320. `(("glib:bin" ,glib "bin")
  321. ("gobject-introspection" ,gobject-introspection)
  322. ("pkg-config" ,pkg-config)
  323. ("gtk-doc" ,gtk-doc/stable)))
  324. (inputs
  325. `(("dbus" ,dbus)
  326. ("glib" ,glib)))
  327. (synopsis "Glib testing library")
  328. (description "Libglib-testing is a test library providing test harnesses and
  329. mock classes which complement the classes provided by GLib. It is intended to
  330. be used by any project which uses GLib and which wants to write internal unit
  331. tests.")
  332. (home-page "https://gitlab.gnome.org/pwithnall/libglib-testing")
  333. (license license:lgpl2.1+)))
  334. (define-public malcontent
  335. (package
  336. (name "malcontent")
  337. (version "0.8.0")
  338. (source
  339. (origin
  340. (method git-fetch)
  341. (uri (git-reference
  342. (url "https://gitlab.freedesktop.org/pwithnall/malcontent.git")
  343. (commit version)))
  344. (file-name (git-file-name name version))
  345. (sha256
  346. (base32 "0vnf0pk516fwwh41v96c29l2i7h1pnwhivlkbf53kkx1q35g7lb3"))))
  347. (build-system meson-build-system)
  348. (arguments
  349. `(#:glib-or-gtk? #t
  350. #:phases
  351. (modify-phases %standard-phases
  352. ;; AppInfo not available inside build environment.
  353. (add-after 'unpack 'fix-tests
  354. (lambda _
  355. (substitute* "libmalcontent/tests/app-filter.c"
  356. (("g_test_add_func \\(\"/app-filter/appinfo\", test_app_filter_appinfo\\);")
  357. ""))
  358. #t)))))
  359. (native-inputs
  360. `(("desktop-file-utils" ,desktop-file-utils)
  361. ("gettext" ,gettext-minimal)
  362. ("glib:bin" ,glib "bin")
  363. ("gobject-introspection" ,gobject-introspection)
  364. ("gtk+:bin" ,gtk+ "bin")
  365. ("itstool" ,itstool)
  366. ("libglib-testing" ,libglib-testing)
  367. ("libxml2" ,libxml2)
  368. ("pkg-config" ,pkg-config)))
  369. (inputs
  370. `(("accountsservice" ,accountsservice)
  371. ("appstream-glib" ,appstream-glib)
  372. ("dbus" ,dbus)
  373. ("flatpak" ,flatpak)
  374. ("glib" ,glib)
  375. ("gtk+" ,gtk+)
  376. ("libostree" ,libostree)
  377. ("linux-pam" ,linux-pam)
  378. ("polkit" ,polkit)))
  379. (synopsis "Parental controls support")
  380. (description "MalContent implements parental controls support which can
  381. be used by applications to filter or limit the access of child accounts to
  382. inappropriate content.")
  383. (home-page "https://gitlab.freedesktop.org/pwithnall/malcontent")
  384. (license
  385. (list
  386. license:gpl2+
  387. license:lgpl2.1+))))
  388. (define-public xdg-utils
  389. (package
  390. (name "xdg-utils")
  391. (version "1.1.3")
  392. (source
  393. (origin
  394. (method url-fetch)
  395. (uri (string-append
  396. "https://portland.freedesktop.org/download/xdg-utils-"
  397. version ".tar.gz"))
  398. (sha256
  399. (base32
  400. "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
  401. (build-system gnu-build-system)
  402. (native-inputs
  403. `(("docbook-xsl" ,docbook-xsl)
  404. ("docbook-xml" ,docbook-xml-4.1.2)
  405. ("libxslt" ,libxslt)
  406. ("w3m" ,w3m)
  407. ("xmlto" ,xmlto)))
  408. (inputs
  409. `(("awk" ,gawk)
  410. ("coreutils" ,coreutils)
  411. ("grep" ,grep)
  412. ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
  413. ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
  414. ("sed" ,sed)
  415. ("xprop" ,xprop) ; for Xfce detecting
  416. ("xset" ,xset))) ; for xdg-screensaver
  417. (arguments
  418. `(#:tests? #f ; no check target
  419. #:modules ((srfi srfi-26)
  420. ,@%gnu-build-system-modules)
  421. #:phases
  422. (modify-phases %standard-phases
  423. (add-after 'unpack 'patch-hardcoded-paths
  424. (lambda _
  425. (substitute* "scripts/xdg-mime.in"
  426. (("/usr/bin/file") (which "file")))
  427. (substitute* "scripts/xdg-open.in"
  428. (("/usr/bin/printf") (which "printf")))
  429. #t))
  430. (add-before 'build 'locate-catalog-files
  431. (lambda* (#:key inputs #:allow-other-keys)
  432. (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
  433. "/xml/dtd/docbook"))
  434. (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
  435. "/xml/xsl/docbook-xsl-"
  436. ,(package-version docbook-xsl))))
  437. (for-each (lambda (file)
  438. (substitute* file
  439. (("http://.*/docbookx\\.dtd")
  440. (string-append xmldoc "/docbookx.dtd"))))
  441. (find-files "scripts/desc" "\\.xml$"))
  442. (substitute* "scripts/Makefile"
  443. ;; Apparently `xmlto' does not bother to looks up the stylesheets
  444. ;; specified in the XML, unlike the above substitition. Instead it
  445. ;; uses a hard-coded URL. Work around it here, but if this is
  446. ;; common perhaps we should hardcode this path in xmlto itself.
  447. (("\\$\\(XMLTO\\) man")
  448. (string-append "$(XMLTO) -x " xsldoc
  449. "/manpages/docbook.xsl man")))
  450. (setenv "STYLESHEET"
  451. (string-append xsldoc "/html/docbook.xsl"))
  452. #t)))
  453. (add-after 'install 'wrap-executables
  454. (lambda* (#:key inputs outputs #:allow-other-keys)
  455. (let ((out (assoc-ref outputs "out")))
  456. (with-directory-excursion (string-append out "/bin")
  457. (let ((path-ext
  458. (map (cute string-append <> "/bin")
  459. (cons out
  460. (map (cute assoc-ref inputs <>)
  461. '("awk" "coreutils" "grep" "inetutils"
  462. "perl-file-mimeinfo" "sed" "xprop"
  463. "xset"))))))
  464. (for-each (cute wrap-program <>
  465. `("PATH" ":" prefix ,path-ext))
  466. (find-files "."))))
  467. #t))))))
  468. (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
  469. (synopsis "Freedesktop.org scripts for desktop integration")
  470. (description "The xdg-utils package is a set of simple scripts that
  471. provide basic desktop integration functions in the framework of the
  472. freedesktop.org project.")
  473. (license license:expat)))
  474. (define-public libinput
  475. ;; Updating this will rebuild over 700 packages through libinput-minimal.
  476. (package
  477. (name "libinput")
  478. (version "1.16.4")
  479. (source (origin
  480. (method url-fetch)
  481. (uri (string-append "https://freedesktop.org/software/libinput/"
  482. "libinput-" version ".tar.xz"))
  483. (sha256
  484. (base32
  485. "0acywdjppj5i591l879bnqa9cs4vgdwnhilwk550x5x8sl33m4k5"))))
  486. (build-system meson-build-system)
  487. (arguments
  488. `(#:configure-flags '("-Ddocumentation=false")
  489. ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
  490. ;; hangs, and the comments around it suggests that we should be using this
  491. ;; Meson target anyway.
  492. #:build-type "release"))
  493. (native-inputs
  494. `(("check" ,check)
  495. ("pkg-config" ,pkg-config)))
  496. (inputs
  497. `(("cairo" ,cairo)
  498. ("glib" ,glib)
  499. ("gtk+" ,gtk+)
  500. ("libevdev" ,libevdev)
  501. ("libwacom" ,libwacom)
  502. ("mtdev" ,mtdev)))
  503. (propagated-inputs
  504. `(;; libinput.h requires <libudev.h>, so propagate it.
  505. ("udev" ,eudev)))
  506. (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
  507. (synopsis "Input devices handling library")
  508. (description
  509. "Libinput is a library to handle input devices for display servers and
  510. other applications that need to directly deal with input devices.")
  511. (license license:x11)))
  512. (define-public libinput-minimal
  513. (package/inherit libinput
  514. (name "libinput-minimal")
  515. (inputs
  516. (fold alist-delete (package-inputs libinput)
  517. '("cairo" "glib" "gtk+" "libwacom")))
  518. (arguments
  519. (substitute-keyword-arguments (package-arguments libinput)
  520. ((#:configure-flags flags ''())
  521. `(cons* "-Dlibwacom=false"
  522. "-Ddebug-gui=false" ;requires gtk+@3
  523. ,flags))))))
  524. (define-public libxdg-basedir
  525. (package
  526. (name "libxdg-basedir")
  527. (version "1.2.3")
  528. (source (origin
  529. (method git-fetch)
  530. (uri (git-reference
  531. (url "https://github.com/devnev/libxdg-basedir")
  532. (commit (string-append name "-" version))))
  533. (file-name (git-file-name name version))
  534. (sha256
  535. (base32
  536. "0j8fgp41kxipzdnqsdy83d7w6kadbc45n98qyr84zsj46wl582vv"))))
  537. (build-system gnu-build-system)
  538. (arguments
  539. '(#:configure-flags
  540. (list "--disable-static")
  541. #:phases
  542. (modify-phases %standard-phases
  543. (add-after 'unpack 'patch-autogen
  544. (lambda _
  545. ;; Run 'configure' in its own phase, not now.
  546. (substitute* "autogen.sh"
  547. (("^.*\\./configure.*") ""))
  548. #t)))))
  549. (native-inputs
  550. `(("autoconf" ,autoconf)
  551. ("automake" ,automake)
  552. ("libtool" ,libtool)))
  553. (home-page "https://github.com/devnev/libxdg-basedir")
  554. (synopsis "Implementation of the XDG Base Directory specification")
  555. (description
  556. "libxdg-basedir is a C library providing some functions to use with
  557. the freedesktop.org XDG Base Directory specification.")
  558. (license license:expat)))
  559. (define-public elogind
  560. (package
  561. (name "elogind")
  562. (version "243.7")
  563. (source (origin
  564. (method git-fetch)
  565. (uri (git-reference
  566. (url "https://github.com/elogind/elogind")
  567. (commit (string-append "v" version))))
  568. (file-name (git-file-name name version))
  569. (sha256
  570. (base32
  571. "1ccj3cbs9nsfg497wg195in1a7b9csm1jdm7z6q7vvx1ynpjxlxz"))))
  572. (build-system meson-build-system)
  573. (arguments
  574. `(#:configure-flags
  575. ;; TODO(core-updates): Use #$output unconditionally.
  576. ,#~(let* ((out #$(if (%current-target-system)
  577. #~#$output
  578. #~(assoc-ref %outputs "out")))
  579. (sysconf (string-append out "/etc"))
  580. (libexec (string-append out "/libexec/elogind"))
  581. (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
  582. ;; TODO(core-updates): use this-package-input unconditionally.
  583. (shadow #$(if (%current-target-system)
  584. (this-package-input "shadow")
  585. #~(assoc-ref %build-inputs "shadow")))
  586. (shepherd #$(if (%current-target-system)
  587. (this-package-input "shepherd")
  588. #~(assoc-ref %build-inputs "shepherd")))
  589. (halt-path (string-append shepherd "/sbin/halt"))
  590. (kexec-path "") ;not available in Guix yet
  591. (nologin-path (string-append shadow "/sbin/nologin"))
  592. (poweroff-path (string-append shepherd "/sbin/shutdown"))
  593. (reboot-path (string-append shepherd "/sbin/reboot")))
  594. (list
  595. (string-append "-Drootprefix=" out)
  596. (string-append "-Dsysconfdir=" sysconf)
  597. (string-append "-Drootlibexecdir=" libexec)
  598. (string-append "-Ddbuspolicydir=" dbuspolicy)
  599. (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
  600. (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
  601. (string-append "-Dhalt-path=" halt-path)
  602. (string-append "-Dkexec-path=" kexec-path)
  603. (string-append "-Dpoweroff-path=" poweroff-path)
  604. (string-append "-Dreboot-path=" reboot-path)
  605. (string-append "-Dnologin-path=" nologin-path)
  606. "-Dcgroup-controller=elogind"
  607. "-Dman=true"
  608. ;; Disable some tests.
  609. "-Dslow-tests=false"))
  610. #:phases
  611. (modify-phases %standard-phases
  612. (add-after 'unpack 'fix-pkttyagent-path
  613. (lambda _
  614. (substitute* "meson.build"
  615. (("join_paths\\(bindir, 'pkttyagent'\\)")
  616. "'\"/run/current-system/profile/bin/pkttyagent\"'"))
  617. #t))
  618. (add-after 'unpack 'adjust-tests
  619. (lambda _
  620. ;; This test tries to copy some bytes from /usr/lib/os-release,
  621. ;; which does not exist in the build container. Choose something
  622. ;; more likely to be available.
  623. (substitute* "src/test/test-copy.c"
  624. (("/usr/lib/os-release")
  625. "/etc/passwd"))
  626. ;; Use a shebang that works in the build container.
  627. (substitute* "src/test/test-exec-util.c"
  628. (("#!/bin/sh")
  629. (string-append "#!" (which "sh"))))
  630. ;; Do not look for files or directories that do not exist.
  631. (substitute* "src/test/test-fs-util.c"
  632. (("usr") "etc")
  633. (("/etc/machine-id") "/etc/passwd"))
  634. ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
  635. ;; Disable for now by hooking into the kernel support check.
  636. (substitute* "src/test/test-id128.c"
  637. (("if \\(r == -EOPNOTSUPP\\)")
  638. "if (1)"))
  639. ;; This test expects that /sys is available.
  640. (substitute* "src/test/test-mountpoint-util.c"
  641. (("assert_se\\(path_is_mount_point\\(\"/sys.*")
  642. ""))
  643. ;; /bin/sh does not exist in the build container.
  644. (substitute* "src/test/test-path-util.c"
  645. (("/bin/sh") (which "sh")))
  646. ;; This test uses sd_device_new_from_syspath to allocate a
  647. ;; loopback device, but that fails because /sys is unavailable.
  648. (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
  649. ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
  650. "return 77;"))
  651. ;; Most of these tests require cgroups or an actual live
  652. ;; logind system so that it can flicker the monitor, etc.
  653. ;; Just skip it until a more narrow selection can be made.
  654. (substitute* "src/libelogind/sd-login/test-login.c"
  655. (("test_login\\(\\);")
  656. "return 77;"))
  657. #t))
  658. (add-after 'unpack 'change-pid-file-path
  659. (lambda _
  660. (substitute* "src/login/elogind.c"
  661. (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
  662. #t)))))
  663. (native-inputs
  664. `(("docbook-xml" ,docbook-xml)
  665. ("docbook-xml-4.2" ,docbook-xml-4.2)
  666. ("docbook-xsl" ,docbook-xsl)
  667. ("gettext" ,gettext-minimal)
  668. ("gperf" ,gperf)
  669. ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
  670. ("m4" ,m4)
  671. ("pkg-config" ,pkg-config)
  672. ("python" ,python)
  673. ("xsltproc" ,libxslt)))
  674. (inputs
  675. `(("linux-pam" ,linux-pam)
  676. ("libcap" ,libcap)
  677. ("shadow" ,shadow) ;for 'nologin'
  678. ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
  679. ;when pressing the power button
  680. ("dbus" ,dbus)
  681. ("eudev" ,eudev)
  682. ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
  683. (home-page "https://github.com/elogind/elogind")
  684. (synopsis "User, seat, and session management service")
  685. (description "Elogind is the systemd project's \"logind\" service,
  686. extracted out as a separate project. Elogind integrates with PAM to provide
  687. the org.freedesktop.login1 interface over the system bus, allowing other parts
  688. of a the system to know what users are logged in, and where.")
  689. (license license:lgpl2.1+)))
  690. (define-public localed
  691. ;; XXX: This package is extracted from systemd but we retain so little of it
  692. ;; that it would make more sense to maintain a fork of the bits we need.
  693. (package
  694. (name "localed")
  695. (version "241")
  696. (source (origin
  697. (method git-fetch)
  698. (uri (git-reference
  699. (url "https://github.com/systemd/systemd")
  700. (commit (string-append "v" version))))
  701. (sha256
  702. (base32
  703. "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
  704. (file-name (git-file-name name version))
  705. (modules '((guix build utils)))
  706. (snippet
  707. '(begin
  708. ;; Connect to the right location for our D-Bus daemon.
  709. (substitute* '("src/basic/def.h"
  710. "src/libsystemd/sd-bus/sd-bus.c"
  711. "src/stdio-bridge/stdio-bridge.c")
  712. (("/run/dbus/system_bus_socket")
  713. "/var/run/dbus/system_bus_socket"))
  714. ;; Don't insist on having systemd as PID 1 (otherwise
  715. ;; 'localectl' would exit without doing anything.)
  716. (substitute* "src/shared/bus-util.c"
  717. (("sd_booted\\(\\)")
  718. "(1)"))
  719. #t))
  720. (patches (search-patches "localed-xorg-keyboard.patch"))))
  721. (build-system meson-build-system)
  722. (arguments
  723. ;; Try to build as little as possible (list of components taken from the
  724. ;; top-level 'meson.build' file.)
  725. (let ((components '("utmp"
  726. "hibernate"
  727. "environment-d"
  728. "binfmt"
  729. "coredump"
  730. "resolve"
  731. "logind"
  732. "hostnamed"
  733. "localed"
  734. "machined"
  735. "portabled"
  736. "networkd"
  737. "timedated"
  738. "timesyncd"
  739. "firstboot"
  740. "randomseed"
  741. "backlight"
  742. "vconsole"
  743. "quotacheck"
  744. "sysusers"
  745. "tmpfiles"
  746. "hwdb"
  747. "rfkill"
  748. "ldconfig"
  749. "efi"
  750. "tpm"
  751. "ima"
  752. "smack"
  753. "gshadow"
  754. "idn"
  755. "nss-myhostname"
  756. "nss-systemd")))
  757. `(#:configure-flags ',(map (lambda (component)
  758. (string-append "-D" component "=false"))
  759. (delete "localed" components))
  760. ;; It doesn't make sense to test all of systemd.
  761. #:tests? #f
  762. #:phases (modify-phases %standard-phases
  763. (add-after 'unpack 'set-xkeyboard-config-file-name
  764. (lambda* (#:key inputs #:allow-other-keys)
  765. ;; Set the file name to xkeyboard-config and kbd.
  766. ;; This is used by 'localectl list-x11-keymap-layouts'
  767. ;; and similar functions.
  768. (let ((xkb (assoc-ref inputs "xkeyboard-config"))
  769. (kbd (assoc-ref inputs "kbd")))
  770. (substitute* "src/locale/localectl.c"
  771. (("/usr/share/X11/xkb/rules")
  772. (string-append xkb "/share/X11/xkb/rules")))
  773. (substitute* "src/basic/def.h"
  774. (("/usr/share/keymaps")
  775. (string-append kbd "/share/keymaps")))
  776. #t)))
  777. (replace 'install
  778. (lambda* (#:key outputs #:allow-other-keys)
  779. ;; Install 'localed', the D-Bus and polkit files, and
  780. ;; 'localectl'.
  781. (let* ((out (assoc-ref outputs "out"))
  782. (libexec (string-append out "/libexec/localed"))
  783. (bin (string-append out "/bin"))
  784. (lib (string-append out "/lib"))
  785. (dbus (string-append out
  786. "/share/dbus-1/system-services"))
  787. (conf (string-append out
  788. "/etc/dbus-1/system.d/"))
  789. (polkit (string-append out
  790. "/share/polkit-1/actions"))
  791. (data (string-append out "/share/systemd")))
  792. (define (source-file regexp)
  793. (car (find-files ".." regexp)))
  794. (mkdir-p libexec)
  795. (copy-file "systemd-localed"
  796. (string-append libexec "/localed"))
  797. (install-file "localectl" bin)
  798. (let ((service-file (source-file
  799. "\\.locale1\\.service$")))
  800. (substitute* service-file
  801. (("^Exec=.*$")
  802. (string-append "Exec=" libexec "/localed\n")))
  803. (install-file service-file dbus))
  804. (install-file (source-file "\\.locale1\\.policy$")
  805. polkit)
  806. (install-file (source-file "\\.locale1\\.conf$")
  807. conf)
  808. (for-each (lambda (file)
  809. (install-file file lib))
  810. (find-files "src/shared"
  811. "libsystemd-shared.*\\.so"))
  812. (for-each (lambda (map)
  813. (install-file map data))
  814. (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
  815. #t)))))))
  816. (native-inputs `(,@(package-native-inputs elogind)
  817. ("rsync" ,rsync)))
  818. (inputs `(("libmount" ,util-linux "lib")
  819. ("xkeyboard-config" ,xkeyboard-config)
  820. ("kbd" ,kbd)
  821. ,@(package-inputs elogind)))
  822. (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
  823. (synopsis "Control the system locale and keyboard layout")
  824. (description
  825. "Localed is a tiny daemon that can be used to control the system locale
  826. and keyboard mapping from user programs. It is used among other things by the
  827. GNOME Shell. The @command{localectl} command-line tool allows you to interact
  828. with localed. This package is extracted from the broader systemd package.")
  829. (license license:lgpl2.1+)))
  830. (define-public seatd
  831. (package
  832. (name "seatd")
  833. (version "0.5.0")
  834. (source (origin
  835. (method git-fetch)
  836. (uri (git-reference
  837. (url "https://git.sr.ht/~kennylevinsen/seatd")
  838. (commit version)))
  839. (file-name (git-file-name name version))
  840. (sha256
  841. (base32
  842. "1kglq8v4rnr3415mfaghyv2s2f8mxsy5s881gmm2908ig4n4j297"))))
  843. (build-system meson-build-system)
  844. (arguments
  845. `(#:configure-flags '("-Dlogind=enabled")))
  846. (native-inputs
  847. `(("pkg-config" ,pkg-config)
  848. ("scdoc" ,scdoc)))
  849. (inputs
  850. `(("elogind" ,elogind)))
  851. (home-page "https://sr.ht/~kennylevinsen/seatd")
  852. (synopsis "Seat management daemon and library")
  853. (description
  854. "This package provides a minimal seat management daemon whose task is to
  855. mediate access to shared devices, such as graphics and input, for applications
  856. that require it. It also provides a universal seat management library that
  857. allows applications to use whatever seat management is available.")
  858. (license license:expat)))
  859. (define-public packagekit
  860. (package
  861. (name "packagekit")
  862. (version "1.1.13")
  863. (source (origin
  864. (method url-fetch)
  865. (uri (string-append
  866. "https://www.freedesktop.org/software/"
  867. "PackageKit/releases/"
  868. "PackageKit-" version ".tar.xz"))
  869. (sha256
  870. (base32
  871. "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
  872. (build-system gnu-build-system)
  873. (arguments
  874. `(#:tests? #f
  875. #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
  876. %output "/etc/bash_completion.d"))
  877. #:configure-flags
  878. '("--disable-systemd")))
  879. (native-inputs
  880. `(("intltool" ,intltool)
  881. ("pkg-config" ,pkg-config)
  882. ("python" ,python-wrapper)
  883. ("glib:bin" ,glib "bin")))
  884. (inputs
  885. `(("glib" ,glib)
  886. ("bash-completion" ,bash-completion)
  887. ("polkit" ,polkit)))
  888. (propagated-inputs
  889. `(("sqlite" ,sqlite)))
  890. (home-page "https://www.freedesktop.org/software/PackageKit/")
  891. (synopsis "API for package management, through D-Bus")
  892. (description
  893. "PackageKit provides a way of performing package management tasks,
  894. e.g. updating, removing and installing software. Through supporting many
  895. backends, PackageKit can perform these tasks using the appropriate package
  896. manager for the current system.")
  897. (license license:gpl2+)))
  898. (define-public python-pyxdg
  899. (package
  900. (name "python-pyxdg")
  901. (version "0.27")
  902. (source
  903. (origin
  904. (method url-fetch)
  905. (uri (pypi-uri "pyxdg" version))
  906. (sha256
  907. (base32
  908. "19f5j5mxp7ff0vp33s32qbpdi65iiwha0bj641gl70pdwnm97gc0"))))
  909. (build-system python-build-system)
  910. (arguments
  911. '(#:phases
  912. (modify-phases %standard-phases
  913. (replace 'check
  914. (lambda* (#:key inputs #:allow-other-keys)
  915. (setenv "XDG_DATA_DIRS"
  916. (string-append (assoc-ref inputs "shared-mime-info")
  917. "/share/"))
  918. (substitute* "test/test-icon.py"
  919. (("/usr/share/icons/hicolor/index.theme")
  920. (string-append (assoc-ref inputs "hicolor-icon-theme")
  921. "/share/icons/hicolor/index.theme")))
  922. ;; These two tests are known to fail in strange ways.
  923. (substitute* "test/test-mime.py"
  924. (("def test_get_type\\(self") "def _test_get_type(self")
  925. (("def test_get_type2\\(self") "def _test_get_type2(self"))
  926. ;; There are test files not shipped in the release tarball
  927. (substitute* "test/test-icon.py"
  928. (("def test_validate_icon_theme") "def _test_validate_icon_theme"))
  929. (invoke "nosetests" "-v"))))))
  930. (native-inputs
  931. ;; For tests.
  932. `(("shared-mime-info" ,shared-mime-info)
  933. ("hicolor-icon-theme" ,hicolor-icon-theme)
  934. ("python-nose" ,python-nose)))
  935. (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
  936. (synopsis "Implementations of freedesktop.org standards in Python")
  937. (description
  938. "PyXDG is a collection of implementations of freedesktop.org standards in
  939. Python.")
  940. (license license:lgpl2.0)))
  941. (define-public python2-pyxdg
  942. (package-with-python2 python-pyxdg))
  943. (define-public wayland
  944. (package
  945. (name "wayland")
  946. (version "1.19.0")
  947. (source (origin
  948. (method url-fetch)
  949. (uri (string-append "https://wayland.freedesktop.org/releases/"
  950. name "-" version ".tar.xz"))
  951. (sha256
  952. (base32
  953. "05bd2vphyx8qwa1mhsj1zdaiv4m4v94wrlssrn0lad8d601dkk5s"))))
  954. (build-system meson-build-system)
  955. (outputs '("out" "doc"))
  956. (arguments
  957. `(#:parallel-tests? #f
  958. #:phases
  959. (modify-phases %standard-phases
  960. (add-after 'unpack 'patch-docbook-xml
  961. ;; TODO(core-updates): Use 'native-inputs' unconditionally
  962. (lambda* (#:key ,@(if (%current-target-system)
  963. '(native-inputs)
  964. '())
  965. inputs #:allow-other-keys)
  966. (with-directory-excursion "doc"
  967. (substitute* (find-files "." "\\.xml$")
  968. (("http://www.oasis-open.org/docbook/xml/4\\.5/")
  969. (string-append (assoc-ref ,(if (%current-target-system)
  970. '(or native-inputs inputs)
  971. 'inputs) "docbook-xml")
  972. "/xml/dtd/docbook/"))
  973. (("http://www.oasis-open.org/docbook/xml/4\\.2/")
  974. (string-append (assoc-ref ,(if (%current-target-system)
  975. '(or native-inputs inputs)
  976. 'inputs) "docbook-xml-4.2")
  977. "/xml/dtd/docbook/"))))
  978. #t))
  979. (add-after 'install 'move-doc
  980. (lambda* (#:key outputs #:allow-other-keys)
  981. (let* ((out (assoc-ref outputs "out"))
  982. (doc (assoc-ref outputs "doc")))
  983. (mkdir-p (string-append doc "/share"))
  984. (rename-file
  985. (string-append out "/share/doc")
  986. (string-append doc "/share/doc"))
  987. #t))))))
  988. (native-inputs
  989. `(("docbook-xml-4.2" ,docbook-xml-4.2)
  990. ("docbook-xml" ,docbook-xml)
  991. ("docbook-xsl" ,docbook-xsl)
  992. ("dot" ,graphviz)
  993. ("doxygen" ,doxygen)
  994. ("pkg-config" ,pkg-config)
  995. ("xmlto" ,xmlto)
  996. ("xsltproc" ,libxslt)
  997. ,@(if (%current-target-system)
  998. `(("pkg-config-for-build" ,pkg-config-for-build)
  999. ("wayland" ,this-package)) ; for wayland-scanner
  1000. '())))
  1001. (inputs
  1002. `(("expat" ,expat)
  1003. ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
  1004. (propagated-inputs
  1005. `(("libffi" ,libffi)))
  1006. (home-page "https://wayland.freedesktop.org/")
  1007. (synopsis "Core Wayland window system code and protocol")
  1008. (description "Wayland is a project to define a protocol for a compositor to
  1009. talk to its clients as well as a library implementation of the protocol. The
  1010. compositor can be a standalone display server running on Linux kernel
  1011. modesetting and evdev input devices, an X application, or a wayland client
  1012. itself. The clients can be traditional applications, X servers (rootless or
  1013. fullscreen) or other display servers.")
  1014. (license license:expat)))
  1015. (define-public wayland-protocols
  1016. (package
  1017. (name "wayland-protocols")
  1018. (version "1.20")
  1019. (source (origin
  1020. (method url-fetch)
  1021. (uri (string-append
  1022. "https://wayland.freedesktop.org/releases/"
  1023. "wayland-protocols-" version ".tar.xz"))
  1024. (sha256
  1025. (base32
  1026. "1rsdgvkkvxs3cjhpl6agvbkm53vm7k8rg127j9y2vn33m2hvg0lp"))))
  1027. (build-system gnu-build-system)
  1028. (inputs
  1029. `(("wayland" ,wayland)))
  1030. (native-inputs
  1031. `(("pkg-config" ,pkg-config)))
  1032. (synopsis "Wayland protocols")
  1033. (description "Wayland-Protocols contains Wayland protocols that add
  1034. functionality not available in the Wayland core protocol. Such protocols either
  1035. add completely new functionality, or extend the functionality of some other
  1036. protocol either in Wayland core, or some other protocol in wayland-protocols.")
  1037. (home-page "https://wayland.freedesktop.org")
  1038. (license license:expat)))
  1039. (define-public waylandpp
  1040. (package
  1041. (name "waylandpp")
  1042. (version "0.2.8")
  1043. (home-page "https://github.com/NilsBrause/waylandpp")
  1044. (source (origin
  1045. (method git-fetch)
  1046. (uri (git-reference (url home-page) (commit version)))
  1047. (file-name (git-file-name name version))
  1048. (sha256
  1049. (base32
  1050. "1kxiqab48p0n97pwg8c2zx56wqq32m3rcq7qd2pjj33ipcanb3qq"))))
  1051. (build-system cmake-build-system)
  1052. (arguments
  1053. `(#:tests? #f)) ; no tests
  1054. (native-inputs
  1055. `(("pkg-config" ,pkg-config)))
  1056. (inputs
  1057. `(("mesa" ,mesa)
  1058. ("pugixml" ,pugixml)))
  1059. (propagated-inputs
  1060. `(;; In Requires of the .pc files.
  1061. ("wayland" ,wayland)))
  1062. (synopsis "Wayland C++ bindings")
  1063. (description
  1064. "This package provides C++ bindings for the Wayland display protocol.")
  1065. (license license:bsd-2)))
  1066. (define-public weston
  1067. (package
  1068. (name "weston")
  1069. (version "9.0.0")
  1070. (source (origin
  1071. (method url-fetch)
  1072. (uri (string-append
  1073. "https://wayland.freedesktop.org/releases/"
  1074. "weston-" version ".tar.xz"))
  1075. (sha256
  1076. (base32
  1077. "1zlql0xgiqc3pvgbpnnvj4xvpd91pwva8qf83xfb23if377ddxaw"))))
  1078. (build-system meson-build-system)
  1079. (native-inputs
  1080. `(("mscgen" ,mscgen)
  1081. ("pkg-config" ,pkg-config)
  1082. ("xorg-server" ,xorg-server)))
  1083. (inputs
  1084. `(("cairo" ,cairo-xcb)
  1085. ("colord" ,colord)
  1086. ("dbus" ,dbus)
  1087. ("elogind" ,elogind)
  1088. ("freerdp" ,freerdp)
  1089. ("glib" ,glib)
  1090. ("gstreamer" ,gstreamer)
  1091. ("gst-plugins-base" ,gst-plugins-base)
  1092. ("lcms" ,lcms)
  1093. ("libdrm" ,libdrm)
  1094. ("libevdev" ,libevdev)
  1095. ("libinput" ,libinput-minimal)
  1096. ("libjpeg" ,libjpeg-turbo)
  1097. ("libpng" ,libpng)
  1098. ("libunwind" ,libunwind)
  1099. ("libva" ,libva)
  1100. ("libwebp" ,libwebp)
  1101. ("libx11" ,libx11)
  1102. ("libxcb" ,libxcb)
  1103. ("libxcursor" ,libxcursor)
  1104. ("libxml2" ,libxml2)
  1105. ("mesa" ,mesa)
  1106. ("mtdev" ,mtdev)
  1107. ("linux-pam" ,linux-pam)
  1108. ("pango" ,pango)
  1109. ("pipewire" ,pipewire)
  1110. ("wayland-protocols" ,wayland-protocols)
  1111. ("xorg-server-xwayland" ,xorg-server-xwayland)))
  1112. (propagated-inputs
  1113. `(("libxkbcommon" ,libxkbcommon)
  1114. ("pixman" ,pixman)
  1115. ("wayland" ,wayland)))
  1116. (arguments
  1117. `(#:configure-flags
  1118. (list
  1119. ;; Otherwise, the RUNPATH will lack the final path component.
  1120. (string-append "-Dc_link_args=-Wl,-rpath="
  1121. (assoc-ref %outputs "out") "/lib:"
  1122. (assoc-ref %outputs "out") "/lib/weston:"
  1123. (assoc-ref %outputs "out") "/lib/libweston-"
  1124. ,(version-major (package-version this-package)))
  1125. "-Dbackend-default=auto"
  1126. "-Dsystemd=false"
  1127. (string-append "-Dxwayland-path="
  1128. (assoc-ref %build-inputs "xorg-server-xwayland")
  1129. "/bin/Xwayland"))
  1130. #:parallel-tests? #f ; Parallel tests cause failures.
  1131. #:phases
  1132. (modify-phases %standard-phases
  1133. (add-before 'configure 'use-elogind
  1134. (lambda _
  1135. ;; Use elogind instead of systemd
  1136. (substitute* "libweston/meson.build"
  1137. (("libsystemd-login") "libelogind"))
  1138. (substitute* '("libweston/launcher-logind.c"
  1139. "libweston/weston-launch.c")
  1140. (("#include <systemd/sd-login.h>")
  1141. "#include <elogind/sd-login.h>"))
  1142. #t))
  1143. (add-after 'configure 'patch-confdefs.h
  1144. (lambda _
  1145. (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
  1146. #t))
  1147. (add-before 'check 'setup
  1148. (lambda _
  1149. (setenv "HOME" (getcwd))
  1150. (setenv "XDG_RUNTIME_DIR" (getcwd))
  1151. #t))
  1152. (add-before 'check 'start-xorg-server
  1153. (lambda* (#:key inputs #:allow-other-keys)
  1154. ;; The test suite requires a running X server.
  1155. (system "Xvfb :1 &")
  1156. (setenv "DISPLAY" ":1")
  1157. #t)))))
  1158. (home-page "https://wayland.freedesktop.org")
  1159. (synopsis "Reference implementation of a Wayland compositor")
  1160. (description "Weston is the reference implementation of a Wayland
  1161. compositor, and a useful compositor in its own right.
  1162. A Wayland compositor allows applications to render to a shared offscreen
  1163. buffer using OpenGL ES. The compositor then culls the hidden parts and
  1164. composes the final output. A Wayland compositor is essentially a
  1165. multiplexer to the KMS/DRM Linux kernel devices.")
  1166. (license license:expat)))
  1167. (define-public wev
  1168. (package
  1169. (name "wev")
  1170. (version "1.0.0")
  1171. (source (origin
  1172. (method git-fetch)
  1173. (uri (git-reference
  1174. (url "https://git.sr.ht/~sircmpwn/wev")
  1175. (commit version)))
  1176. (file-name (git-file-name name version))
  1177. (sha256
  1178. (base32
  1179. "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
  1180. (build-system gnu-build-system)
  1181. (arguments
  1182. `(#:tests? #f ; no tests
  1183. #:make-flags
  1184. (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
  1185. #:phases
  1186. (modify-phases %standard-phases
  1187. (delete 'configure))))
  1188. (native-inputs
  1189. `(("pkg-config" ,pkg-config)
  1190. ("scdoc" ,scdoc)))
  1191. (inputs
  1192. `(("libxkbcommon" ,libxkbcommon)
  1193. ("wayland" ,wayland)
  1194. ("wayland-protocols" ,wayland-protocols)))
  1195. (home-page "https://git.sr.ht/~sircmpwn/wev")
  1196. (synopsis "Wayland event viewer")
  1197. (description "Wev is a tool that opens a window, printing all events
  1198. sent to a Wayland window, such as key presses. It is analogous to the X11 tool
  1199. XEv.")
  1200. (license license:expat)))
  1201. (define-public exempi
  1202. (package
  1203. (name "exempi")
  1204. (version "2.5.2")
  1205. (source (origin
  1206. (method url-fetch)
  1207. (uri (string-append
  1208. "https://libopenraw.freedesktop.org/download/"
  1209. name "-" version ".tar.bz2"))
  1210. (sha256
  1211. (base32
  1212. "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
  1213. (build-system gnu-build-system)
  1214. (arguments
  1215. `(#:configure-flags (list (string-append "--with-boost="
  1216. (assoc-ref %build-inputs "boost")))
  1217. #:phases
  1218. (modify-phases %standard-phases
  1219. (add-after 'install 'remove-static-library
  1220. (lambda* (#:key outputs #:allow-other-keys)
  1221. ;; XXX: Some tests fail to build with --disable-static due to
  1222. ;; symbols not being visible in the shared library:
  1223. ;; <https://gitlab.freedesktop.org/libopenraw/exempi/-/issues/17>.
  1224. ;; Simply delete the static library instead to save ~4.3 MiB.
  1225. (delete-file (string-append (assoc-ref outputs "out")
  1226. "/lib/libexempi.a"))
  1227. #t)))))
  1228. (native-inputs
  1229. `(("boost" ,boost))) ; tests
  1230. (inputs
  1231. `(("expat" ,expat)
  1232. ("zlib" ,zlib)))
  1233. (home-page "https://libopenraw.freedesktop.org/exempi/")
  1234. (synopsis "XMP metadata handling library")
  1235. (description "Exempi is an implementation of the Extensible Metadata
  1236. Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
  1237. formats.")
  1238. (license license:bsd-3)))
  1239. (define-public libatasmart
  1240. (package
  1241. (name "libatasmart")
  1242. (version "0.19")
  1243. (source (origin
  1244. (method url-fetch)
  1245. (uri (string-append "http://0pointer.de/public/"
  1246. name "-" version ".tar.xz"))
  1247. (sha256
  1248. (base32
  1249. "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
  1250. (build-system gnu-build-system)
  1251. (native-inputs
  1252. `(("pkg-config" ,pkg-config)))
  1253. (inputs
  1254. `(("udev" ,eudev)))
  1255. (home-page "http://0pointer.de/blog/projects/being-smart.html")
  1256. (synopsis "ATA S.M.A.R.T. reading and parsing library")
  1257. (description
  1258. "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
  1259. Analysis and Reporting Technology) functionality.")
  1260. (license license:lgpl2.1+)))
  1261. (define-public udisks
  1262. (package
  1263. (name "udisks")
  1264. (version "2.8.4")
  1265. (source (origin
  1266. (method url-fetch)
  1267. (uri (string-append
  1268. "https://github.com/storaged-project/udisks/releases/download/udisks-"
  1269. version "/udisks-" version ".tar.bz2"))
  1270. (sha256
  1271. (base32
  1272. "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
  1273. (build-system gnu-build-system)
  1274. (native-inputs
  1275. `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
  1276. ("docbook-xsl" ,docbook-xsl)
  1277. ("glib:bin" ,glib "bin") ; for glib-mkenums
  1278. ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
  1279. ("gobject-introspection" ,gobject-introspection)
  1280. ("gtk-doc" ,gtk-doc/stable)
  1281. ("intltool" ,intltool)
  1282. ("pkg-config" ,pkg-config)
  1283. ("xsltproc" ,libxslt)))
  1284. (propagated-inputs
  1285. `(("glib" ,glib))) ; required by udisks2.pc
  1286. (inputs
  1287. `(("acl" ,acl)
  1288. ("cryptsetup" ,cryptsetup)
  1289. ("libatasmart" ,libatasmart)
  1290. ("libblockdev" ,libblockdev)
  1291. ("libgudev" ,libgudev)
  1292. ("polkit" ,polkit)
  1293. ("util-linux" ,util-linux)))
  1294. (outputs '("out"
  1295. "doc")) ;5 MiB of gtk-doc HTML
  1296. (arguments
  1297. `(#:tests? #f ; requiring system message dbus
  1298. #:disallowed-references ("doc") ;enforce separation of "doc"
  1299. #:configure-flags
  1300. (list "--enable-man"
  1301. "--enable-available-modules" ; Such as lvm2, btrfs, etc.
  1302. "--localstatedir=/var"
  1303. "--enable-fhs-media" ;mount devices in /media, not /run/media
  1304. (string-append "--with-html-dir="
  1305. (assoc-ref %outputs "doc")
  1306. "/share/doc/udisks/html")
  1307. (string-append "--with-udevdir=" %output "/lib/udev"))
  1308. #:make-flags
  1309. (let* ((docbook-xsl-name-version ,(string-append
  1310. (package-name docbook-xsl) "-"
  1311. (package-version docbook-xsl)))
  1312. (docbook-xsl-catalog-file (string-append
  1313. (assoc-ref %build-inputs "docbook-xsl")
  1314. "/xml/xsl/"
  1315. docbook-xsl-name-version
  1316. "/catalog.xml"))
  1317. (docbook-xml-catalog-file (string-append
  1318. (assoc-ref %build-inputs "docbook-xml")
  1319. "/xml/dtd/docbook/catalog.xml")))
  1320. ;; Reference the catalog files required to build the manpages.
  1321. (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
  1322. docbook-xml-catalog-file)))
  1323. #:phases
  1324. (modify-phases %standard-phases
  1325. (add-before
  1326. 'configure 'fix-girdir
  1327. (lambda _
  1328. ;; Install introspection data to its own output.
  1329. (substitute* "udisks/Makefile.in"
  1330. (("girdir = .*")
  1331. "girdir = $(datadir)/gir-1.0\n")
  1332. (("typelibsdir = .*")
  1333. "typelibsdir = $(libdir)/girepository-1.0\n"))))
  1334. (add-after 'install 'wrap-udisksd
  1335. (lambda* (#:key outputs inputs #:allow-other-keys)
  1336. ;; Tell 'udisksd' where to find the 'mount' command.
  1337. (let ((out (assoc-ref outputs "out"))
  1338. (utils (assoc-ref inputs "util-linux"))
  1339. (cryptsetup (assoc-ref inputs "cryptsetup"))
  1340. (parted (assoc-ref inputs "parted")))
  1341. (wrap-program (string-append out "/libexec/udisks2/udisksd")
  1342. `("PATH" ":" prefix
  1343. (,(string-append utils "/bin") ;for 'mount'
  1344. ;; cryptsetup is required for setting encrypted
  1345. ;; partitions, e.g. in gnome-disks
  1346. ,(string-append cryptsetup "/sbin")
  1347. "/run/current-system/profile/bin"
  1348. "/run/current-system/profile/sbin")))
  1349. #t))))))
  1350. (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
  1351. (synopsis "Disk manager service")
  1352. (description
  1353. "UDisks provides interfaces to enumerate and perform operations on disks
  1354. and storage devices. Any application (including unprivileged ones) can access
  1355. the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
  1356. message bus.")
  1357. ;; The dynamic library are under LGPLv2+, others are GPLv2+.
  1358. (license (list license:gpl2+ license:lgpl2.0+))))
  1359. (define-public accountsservice
  1360. (package
  1361. (name "accountsservice")
  1362. (version "0.6.55")
  1363. (source
  1364. (origin
  1365. (method url-fetch)
  1366. (uri (string-append "https://www.freedesktop.org/software/"
  1367. "accountsservice/accountsservice-"
  1368. version ".tar.xz"))
  1369. (sha256
  1370. (base32 "16wwd633jak9ajyr1f1h047rmd09fhf3kzjz6g5xjsz0lwcj8azz"))))
  1371. (build-system meson-build-system)
  1372. (arguments
  1373. '(#:tests? #f ; XXX: tests require DocBook 4.1.2
  1374. #:configure-flags
  1375. '("--localstatedir=/var"
  1376. "-Dsystemdsystemunitdir=/tmp/empty"
  1377. "-Dsystemd=false"
  1378. "-Delogind=true")
  1379. #:phases
  1380. (modify-phases %standard-phases
  1381. (add-after 'unpack 'patch-/bin/cat
  1382. (lambda _
  1383. (substitute* "src/user.c"
  1384. (("/bin/cat") (which "cat")))))
  1385. (add-before
  1386. 'configure 'pre-configure
  1387. (lambda* (#:key inputs #:allow-other-keys)
  1388. (substitute* "meson_post_install.py"
  1389. (("in dst_dirs") "in []"))
  1390. (let ((shadow (assoc-ref inputs "shadow")))
  1391. (substitute* '("src/user.c" "src/daemon.c")
  1392. (("/usr/sbin/usermod")
  1393. (string-append shadow "/sbin/usermod"))
  1394. (("/usr/sbin/useradd")
  1395. (string-append shadow "/sbin/useradd"))
  1396. (("/usr/sbin/userdel")
  1397. (string-append shadow "/sbin/userdel"))
  1398. (("/usr/bin/passwd")
  1399. (string-append shadow "/bin/passwd"))
  1400. (("/usr/bin/chage")
  1401. (string-append shadow "/bin/chage")))))))))
  1402. (native-inputs
  1403. `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
  1404. ("gobject-introspection" ,gobject-introspection)
  1405. ("intltool" ,intltool)
  1406. ("pkg-config" ,pkg-config)))
  1407. (inputs
  1408. `(("dbus" ,dbus)
  1409. ("elogind" ,elogind)
  1410. ("polkit" ,polkit)
  1411. ("shadow" ,shadow)))
  1412. (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
  1413. (synopsis "D-Bus interface for user account query and manipulation")
  1414. (description
  1415. "The AccountService project provides a set of D-Bus interfaces for
  1416. querying and manipulating user account information and an implementation of
  1417. these interfaces, based on the useradd, usermod and userdel commands.")
  1418. (license license:gpl3+)))
  1419. (define-public libmbim
  1420. (package
  1421. (name "libmbim")
  1422. (version "1.20.2")
  1423. (source (origin
  1424. (method url-fetch)
  1425. (uri (string-append
  1426. "https://www.freedesktop.org/software/libmbim/"
  1427. "libmbim-" version ".tar.xz"))
  1428. (sha256
  1429. (base32
  1430. "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
  1431. (build-system gnu-build-system)
  1432. (native-inputs
  1433. `(("glib:bin" ,glib "bin") ; for glib-mkenums
  1434. ("pkg-config" ,pkg-config)
  1435. ("python" ,python-wrapper)))
  1436. (propagated-inputs
  1437. `(("glib" ,glib))) ; required by mbim-glib.pc
  1438. (inputs
  1439. `(("libgudev" ,libgudev)))
  1440. (synopsis "Library to communicate with MBIM-powered modems")
  1441. (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
  1442. (description
  1443. "Libmbim is a GLib-based library for talking to WWAN modems and devices
  1444. which speak the Mobile Interface Broadband Model (MBIM) protocol.")
  1445. (license
  1446. ;; The libmbim-glib library is released under the LGPLv2+ license.
  1447. ;; The mbimcli tool is released under the GPLv2+ license.
  1448. (list license:lgpl2.0+ license:gpl2+))))
  1449. (define-public libqmi
  1450. (package
  1451. (name "libqmi")
  1452. (version "1.24.14")
  1453. (source (origin
  1454. (method url-fetch)
  1455. (uri (string-append
  1456. "https://www.freedesktop.org/software/libqmi/"
  1457. "libqmi-" version ".tar.xz"))
  1458. (sha256
  1459. (base32
  1460. "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
  1461. (build-system gnu-build-system)
  1462. (inputs
  1463. `(("libgudev" ,libgudev)))
  1464. (native-inputs
  1465. `(("glib:bin" ,glib "bin") ; for glib-mkenums
  1466. ("pkg-config" ,pkg-config)
  1467. ("python" ,python-wrapper)))
  1468. (propagated-inputs
  1469. `(("glib" ,glib))) ; required by qmi-glib.pc
  1470. (synopsis "Library to communicate with QMI-powered modems")
  1471. (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
  1472. (description
  1473. "Libqmi is a GLib-based library for talking to WWAN modems and devices
  1474. which speak the Qualcomm MSM Interface (QMI) protocol.")
  1475. (license
  1476. ;; The libqmi-glib library is released under the LGPLv2+ license.
  1477. ;; The qmicli tool is released under the GPLv2+ license.
  1478. (list license:lgpl2.0+ license:gpl2+))))
  1479. (define-public modem-manager
  1480. (package
  1481. (name "modem-manager")
  1482. (version "1.12.10")
  1483. (source (origin
  1484. (method url-fetch)
  1485. (uri (string-append
  1486. "https://www.freedesktop.org/software/ModemManager/"
  1487. "ModemManager-" version ".tar.xz"))
  1488. (sha256
  1489. (base32
  1490. "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
  1491. (build-system gnu-build-system)
  1492. (arguments
  1493. '(#:configure-flags
  1494. `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
  1495. (native-inputs
  1496. `(("glib:bin" ,glib "bin") ; for glib-mkenums
  1497. ("gobject-introspection" ,gobject-introspection)
  1498. ("intltool" ,intltool)
  1499. ("pkg-config" ,pkg-config)
  1500. ("vala" ,vala)
  1501. ;; For testing.
  1502. ("dbus" ,dbus)))
  1503. (propagated-inputs
  1504. `(("glib" ,glib))) ; required by mm-glib.pc
  1505. (inputs
  1506. `(("libgudev" ,libgudev)
  1507. ("libmbim" ,libmbim)
  1508. ("libqmi" ,libqmi)
  1509. ("polkit" ,polkit)))
  1510. (synopsis "Mobile broadband modems manager")
  1511. (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
  1512. (description
  1513. "ModemManager is a DBus-activated daemon which controls mobile
  1514. broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
  1515. dongles, bluetooth-paired telephones, or professional RS232/USB devices with
  1516. external power supplies, ModemManager is able to prepare and configure the
  1517. modems and setup connections with them.")
  1518. (license license:gpl2+)))
  1519. (define-public telepathy-logger
  1520. (package
  1521. (name "telepathy-logger")
  1522. (version "0.8.2")
  1523. (source (origin
  1524. (method url-fetch)
  1525. (uri (string-append "https://telepathy.freedesktop.org/releases/"
  1526. name "/" name "-" version ".tar.bz2"))
  1527. (sha256
  1528. (base32
  1529. "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
  1530. (build-system gnu-build-system)
  1531. (arguments
  1532. '(#:parallel-tests? #f
  1533. #:phases
  1534. (modify-phases %standard-phases
  1535. (add-before 'check 'pre-check
  1536. (lambda _
  1537. (setenv "HOME" (getenv "TMPDIR"))
  1538. #t)))))
  1539. (native-inputs
  1540. `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
  1541. ("gobject-introspection" ,gobject-introspection)
  1542. ("intltool" ,intltool)
  1543. ("pkg-config" ,pkg-config)
  1544. ("python" ,python-2)
  1545. ("xsltproc" ,libxslt)))
  1546. (propagated-inputs
  1547. ;; telepathy-logger-0.2.pc refers to all these.
  1548. `(("libxml2" ,libxml2)
  1549. ("sqlite" ,sqlite)
  1550. ("telepathy-glib" ,telepathy-glib)))
  1551. (synopsis "Telepathy logger library")
  1552. (home-page "https://telepathy.freedesktop.org/")
  1553. (description
  1554. "Telepathy logger is a headless observer client that logs information
  1555. received by the Telepathy framework. It features pluggable backends to log
  1556. different sorts of messages in different formats.")
  1557. (license license:lgpl2.1+)))
  1558. (define-public telepathy-idle
  1559. (package
  1560. (name "telepathy-idle")
  1561. (version "0.2.2")
  1562. (source
  1563. (origin
  1564. (method git-fetch)
  1565. (uri (git-reference
  1566. (url "https://github.com/TelepathyIM/telepathy-idle")
  1567. (commit (string-append "telepathy-idle-" version))))
  1568. (file-name (git-file-name name version))
  1569. (sha256
  1570. (base32 "1pfw4g2cicw3ykxhsy743r0fc1yqbdrqxh2c5ha6am19dajcr95l"))))
  1571. (build-system gnu-build-system)
  1572. (native-inputs
  1573. `(("autoconf" ,autoconf)
  1574. ("automake" ,automake)
  1575. ("libtool" ,libtool)
  1576. ("pkg-config" ,pkg-config)))
  1577. (inputs
  1578. `(("xsltproc" ,libxslt)
  1579. ("python" ,python-2)
  1580. ("python-dbus" ,python2-dbus)))
  1581. (propagated-inputs
  1582. `(("telepathy-glib" ,telepathy-glib)))
  1583. (home-page "https://telepathy.freedesktop.org/")
  1584. (synopsis "Telepathy IRC connection manager")
  1585. (description
  1586. "Idle is an IRC connection manager for the Telepathy framework. This
  1587. package enables usage of IRC channels and private messages in Telepathy instant
  1588. messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
  1589. (license (list license:lgpl2.1 license:lgpl2.1+))))
  1590. (define-public telepathy-mission-control
  1591. (package
  1592. (name "telepathy-mission-control")
  1593. (version "5.16.5")
  1594. (source
  1595. (origin
  1596. (method url-fetch)
  1597. (uri (string-append "https://telepathy.freedesktop.org/releases/"
  1598. "telepathy-mission-control/"
  1599. "telepathy-mission-control-" version ".tar.gz"))
  1600. (sha256
  1601. (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
  1602. (build-system gnu-build-system)
  1603. (native-inputs
  1604. `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
  1605. ("pkg-config" ,pkg-config)))
  1606. (inputs
  1607. `(("dconf" ,dconf)
  1608. ("gtk-doc" ,gtk-doc)
  1609. ("libgnome-keyring" ,libgnome-keyring)
  1610. ("python" ,python-2)
  1611. ("xsltproc" ,libxslt)))
  1612. (propagated-inputs
  1613. `(("telepathy-glib" ,telepathy-glib)))
  1614. (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
  1615. (synopsis "Telepathy real-time communication framework management daemon")
  1616. (description
  1617. "Telepathy Mission Control 5 is an account manager and channel dispatcher
  1618. for the Telepathy framework, allowing user interfaces and other clients to
  1619. share connections to real-time communication services without conflicting.")
  1620. (license license:lgpl2.1)))
  1621. (define-public colord-gtk
  1622. (package
  1623. (name "colord-gtk")
  1624. (version "0.1.26")
  1625. (source (origin
  1626. (method url-fetch)
  1627. (uri (string-append "https://www.freedesktop.org/software/colord"
  1628. "/releases/" name "-" version ".tar.xz"))
  1629. (sha256
  1630. (base32
  1631. "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
  1632. (build-system gnu-build-system)
  1633. (arguments '(#:tests? #f)) ; require the colord system service
  1634. (native-inputs
  1635. `(("gobject-introspection" ,gobject-introspection)
  1636. ("intltool" ,intltool)
  1637. ("pkg-config" ,pkg-config)
  1638. ("vala" ,vala)))
  1639. (propagated-inputs
  1640. ;; colord-gtk.pc refers to all these.
  1641. `(("colord" ,colord)
  1642. ("gtk+" ,gtk+)))
  1643. (synopsis "GTK integration for libcolord")
  1644. (home-page "https://www.freedesktop.org/software/colord/")
  1645. (description
  1646. "This is a GTK+ convenience library for interacting with colord. It is
  1647. useful for both applications which need colour management and applications that
  1648. wish to perform colour calibration.")
  1649. (license license:lgpl2.1+)))
  1650. (define-public libfprint
  1651. (package
  1652. (name "libfprint")
  1653. (version "1.90.7")
  1654. (source
  1655. (origin
  1656. (method git-fetch)
  1657. (uri (git-reference
  1658. (url "https://gitlab.freedesktop.org/libfprint/libfprint")
  1659. (commit (string-append "v" version))))
  1660. (file-name (git-file-name name version))
  1661. (sha256
  1662. (base32 "00pmdpxxjj4sh8qjq9ch3pylgg9w019rg1bbaw53a4wr637rrz43"))))
  1663. (build-system meson-build-system)
  1664. (arguments
  1665. '(#:configure-flags
  1666. (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
  1667. "/lib/udev/rules.d"))))
  1668. (native-inputs
  1669. `(("eudev" ,eudev)
  1670. ("glib:bin" ,glib "bin") ; for {glib-,}mkenums
  1671. ("gobject-introspection" ,gobject-introspection)
  1672. ("gtk-doc" ,gtk-doc/stable) ; for 88 KiB of API documentation
  1673. ("pkg-config" ,pkg-config)))
  1674. (inputs
  1675. `(("glib" ,glib)
  1676. ("gusb" ,gusb)
  1677. ("nss" ,nss) ; for the URU4x00 driver
  1678. ;; Replacing this with cairo works but just results in a reference
  1679. ;; (only) to pixman in the end.
  1680. ("pixman" ,pixman)))
  1681. (home-page "https://fprint.freedesktop.org/")
  1682. (synopsis "Library to access fingerprint readers")
  1683. (description
  1684. "libfprint is a library designed to make it easy for application
  1685. developers to add support for consumer fingerprint readers to their
  1686. software.")
  1687. (license license:lgpl2.1+)))
  1688. (define-public fprintd
  1689. (package
  1690. (name "fprintd")
  1691. (version "1.90.1")
  1692. (source
  1693. (origin
  1694. (method git-fetch)
  1695. (uri (git-reference
  1696. (url "https://gitlab.freedesktop.org/libfprint/fprintd")
  1697. (commit version)))
  1698. (file-name (git-file-name name version))
  1699. (sha256
  1700. (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
  1701. (build-system meson-build-system)
  1702. (arguments
  1703. `(#:configure-flags
  1704. (list "-Dsystemd_system_unit_dir=/tmp"
  1705. (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out")
  1706. "/share/dbus-1/system-services")
  1707. (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out")
  1708. "/lib/security"))
  1709. #:phases
  1710. (modify-phases %standard-phases
  1711. (add-before 'configure 'patch-output-directories
  1712. ;; Install files to our output, not that of the ‘owner’ package.
  1713. ;; These are not exposed as Meson options and must be patched.
  1714. (lambda* (#:key outputs #:allow-other-keys)
  1715. (let ((out (assoc-ref outputs "out")))
  1716. (substitute* "meson.build"
  1717. (("(dbus_interfaces_dir = ).*" _ set)
  1718. (string-append set "'" out "/share/dbus-1/interfaces'\n"))
  1719. (("(polkit_policy_directory = ).*" _ set)
  1720. (string-append set "'" out "/share/polkit-1/actions/'\n"))
  1721. (("(dbus_data_dir = ).*" _ set)
  1722. (string-append set "get_option('prefix')"
  1723. " / get_option('datadir')\n")))
  1724. #t)))
  1725. (add-before 'configure 'patch-mistake
  1726. (lambda _
  1727. (substitute* "meson.build"
  1728. (("(storage_path = )(get_option\\('prefix'\\))(.*)"
  1729. _ set mistake value)
  1730. (string-append set "''" value "\n")))
  1731. #t))
  1732. (add-before 'configure 'patch-systemd-dependencies
  1733. (lambda _
  1734. (substitute* "meson.build"
  1735. (("'(libsystemd|systemd)'") "'libelogind'"))
  1736. #t))
  1737. (add-before 'configure 'ignore-test-dependencies
  1738. (lambda _
  1739. (substitute* "meson.build"
  1740. (("pam_wrapper_dep .*") "")
  1741. ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
  1742. #t))
  1743. (add-before 'install 'no-polkit-magic
  1744. ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
  1745. (lambda _
  1746. (setenv "PKEXEC_UID" "something")
  1747. #t)))
  1748. #:tests? #f)) ; XXX depend on unpackaged packages
  1749. (native-inputs
  1750. `(("gettext" ,gettext-minimal)
  1751. ("glib:bin" ,glib "bin") ; for glib-genmarshal
  1752. ("libxslt" ,libxslt) ; for xsltproc
  1753. ("perl" ,perl) ; for pod2man
  1754. ("pkg-config" ,pkg-config)))
  1755. ;; For tests.
  1756. ;;("pam_wrapper" ,pam_wrapper)
  1757. ;;("python-pycairo" ,python-pycairo)
  1758. ;;("python-dbus" ,python-dbus)
  1759. ;;("python-dbusmock" ,python-dbusmock)
  1760. ;;("python-pygobject" ,python-pygobject)
  1761. ;;("python-pypamtest" ,python-pypamtest)
  1762. (inputs
  1763. `(("dbus-glib" ,dbus-glib)
  1764. ("elogind" ,elogind)
  1765. ("libfprint" ,libfprint)
  1766. ("linux-pam" ,linux-pam)
  1767. ("polkit" ,polkit)
  1768. ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
  1769. ;; the ‘libfprint-2’ dependency if they are not provided here.
  1770. ("gusb" ,gusb)
  1771. ("nss" ,nss)
  1772. ("pixman" ,pixman)))
  1773. (home-page "https://fprint.freedesktop.org/")
  1774. (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
  1775. (description
  1776. "fprintd is a D-Bus daemon that offers functionality of libfprint, a
  1777. library to access fingerprint readers, over the D-Bus interprocess
  1778. communication bus. This daemon layer above libfprint solves problems related
  1779. to applications simultaneously competing for fingerprint readers.")
  1780. (license license:gpl2+)))
  1781. (define-public desktop-file-utils
  1782. (package
  1783. (name "desktop-file-utils")
  1784. (version "0.26")
  1785. (source (origin
  1786. (method url-fetch)
  1787. (uri (string-append "https://www.freedesktop.org/software/"
  1788. "desktop-file-utils/releases/"
  1789. "desktop-file-utils-" version ".tar.xz"))
  1790. (sha256
  1791. (base32
  1792. "02bkfi6fyk4c0gh2avd897882ww5zl7qg7bzzf28qb57kvkvsvdj"))))
  1793. (build-system gnu-build-system)
  1794. (native-inputs
  1795. `(("autoconf" ,autoconf)
  1796. ("automake" ,automake)
  1797. ("pkg-config" ,pkg-config)))
  1798. (inputs
  1799. `(("glib" ,glib)))
  1800. (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
  1801. (synopsis "Utilities for working with desktop entries")
  1802. (description
  1803. "This package contains a few command line utilities for working with
  1804. desktop entries:
  1805. desktop-file-validate: validates a desktop file and prints warnings/errors
  1806. about desktop entry specification violations.
  1807. desktop-file-install: installs a desktop file to the applications directory,
  1808. optionally munging it a bit in transit.
  1809. update-desktop-database: updates the database containing a cache of MIME types
  1810. handled by desktop files.")
  1811. (license license:gpl2+)))
  1812. (define-public xdg-user-dirs
  1813. (package
  1814. (name "xdg-user-dirs")
  1815. (version "0.17")
  1816. (source (origin
  1817. (method url-fetch)
  1818. (uri (string-append "http://user-dirs.freedesktop.org/releases/"
  1819. name "-" version ".tar.gz"))
  1820. (sha256
  1821. (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
  1822. (build-system gnu-build-system)
  1823. (native-inputs
  1824. `(("gettext" ,gettext-minimal)
  1825. ("docbook-xsl" ,docbook-xsl)
  1826. ("docbook-xml" ,docbook-xml-4.3)
  1827. ("xsltproc" ,libxslt)))
  1828. (arguments
  1829. `(#:phases
  1830. (modify-phases %standard-phases
  1831. (add-before 'build 'locate-catalog-files
  1832. (lambda* (#:key inputs #:allow-other-keys)
  1833. (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
  1834. "/xml/dtd/docbook"))
  1835. (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
  1836. "/xml/xsl/docbook-xsl-"
  1837. ,(package-version docbook-xsl))))
  1838. (for-each (lambda (file)
  1839. (substitute* file
  1840. (("http://.*/docbookx\\.dtd")
  1841. (string-append xmldoc "/docbookx.dtd"))))
  1842. (find-files "man" "\\.xml$"))
  1843. (substitute* "man/Makefile"
  1844. (("http://.*/docbook\\.xsl")
  1845. (string-append xsldoc "/manpages/docbook.xsl")))
  1846. #t))))))
  1847. (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
  1848. (synopsis "Tool to help manage \"well known\" user directories")
  1849. (description "xdg-user-dirs is a tool to help manage \"well known\" user
  1850. directories, such as the desktop folder or the music folder. It also handles
  1851. localization (i.e. translation) of the file names. Designed to be
  1852. automatically run when a user logs in, xdg-user-dirs can also be run
  1853. manually by a user.")
  1854. (license license:gpl2)))
  1855. (define-public perl-file-basedir
  1856. (package
  1857. (name "perl-file-basedir")
  1858. (version "0.08")
  1859. (source
  1860. (origin
  1861. (method url-fetch)
  1862. (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
  1863. "File-BaseDir-" version ".tar.gz"))
  1864. (sha256
  1865. (base32
  1866. "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
  1867. (build-system perl-build-system)
  1868. (native-inputs
  1869. `(("perl-module-build" ,perl-module-build)
  1870. ("perl-file-which" ,perl-file-which)
  1871. ("perl-test-pod" ,perl-test-pod)
  1872. ("perl-test-pod-coverage" ,perl-test-pod-coverage)
  1873. ("xdg-user-dirs" ,xdg-user-dirs)))
  1874. (propagated-inputs
  1875. `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
  1876. (home-page "https://metacpan.org/release/File-BaseDir")
  1877. (synopsis "Use the Freedesktop.org base directory specification")
  1878. (description
  1879. "@code{File::Basedir} can be used to find directories and files as
  1880. specified by the Freedesktop.org Base Directory Specification. This
  1881. specifications gives a mechanism to locate directories for configuration,
  1882. application data and cache data.")
  1883. (license license:perl-license)))
  1884. (define-public perl-file-desktopentry
  1885. (package
  1886. (name "perl-file-desktopentry")
  1887. (version "0.22")
  1888. (source
  1889. (origin
  1890. (method url-fetch)
  1891. (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
  1892. "File-DesktopEntry-" version ".tar.gz"))
  1893. (sha256
  1894. (base32
  1895. "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
  1896. (build-system perl-build-system)
  1897. (native-inputs
  1898. `(("perl-test-pod" ,perl-test-pod)
  1899. ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
  1900. (propagated-inputs
  1901. `(("perl-file-basedir" ,perl-file-basedir)
  1902. ("perl-uri" ,perl-uri)))
  1903. (home-page "https://metacpan.org/release/File-DesktopEntry")
  1904. (synopsis "Handle @file{.desktop} files")
  1905. (description
  1906. "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
  1907. Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
  1908. applications define in those files.")
  1909. (license license:perl-license)))
  1910. (define-public perl-file-mimeinfo
  1911. (package
  1912. (name "perl-file-mimeinfo")
  1913. (version "0.29")
  1914. (source
  1915. (origin
  1916. (method url-fetch)
  1917. (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
  1918. "File-MimeInfo-" version ".tar.gz"))
  1919. (sha256
  1920. (base32
  1921. "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
  1922. (build-system perl-build-system)
  1923. ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
  1924. ;; perl-test-tiny as native-inputs.
  1925. (propagated-inputs
  1926. `(("shared-mime-info" ,shared-mime-info)
  1927. ("perl-file-desktopentry" ,perl-file-desktopentry)))
  1928. (arguments
  1929. ;; Some tests fail due to requiring the mimetype of perl files to be
  1930. ;; text/plain when they are actually application/x-perl.
  1931. `(#:tests? #f
  1932. #:phases
  1933. (modify-phases %standard-phases
  1934. (add-after 'install 'wrap-programs
  1935. (lambda* (#:key outputs #:allow-other-keys)
  1936. (let ((out (assoc-ref outputs "out")))
  1937. (for-each (lambda (prog)
  1938. (wrap-program (string-append out "/bin/" prog)
  1939. `("PERL5LIB" ":" prefix
  1940. (,(string-append (getenv "PERL5LIB") ":" out
  1941. "/lib/perl5/site_perl")))))
  1942. '("mimeopen" "mimetype")))
  1943. #t)))))
  1944. (home-page "https://metacpan.org/release/File-MimeInfo")
  1945. (synopsis "Determine file type from the file name")
  1946. (description
  1947. "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
  1948. It tries to implement the Freedesktop specification for a shared MIME
  1949. database.
  1950. This package also contains two related utilities:
  1951. @itemize
  1952. @item @command{mimetype} determines a file's MIME type;
  1953. @item @command{mimeopen} opens files in an appropriate program according to
  1954. their MIME type.
  1955. @end itemize")
  1956. (license license:perl-license)))
  1957. (define-public uchardet
  1958. (package
  1959. (name "uchardet")
  1960. (version "0.0.7")
  1961. (source
  1962. (origin
  1963. (method url-fetch)
  1964. (uri (string-append "https://www.freedesktop.org/software/"
  1965. name "/releases/" name "-" version ".tar.xz"))
  1966. (sha256
  1967. (base32 "1ca51sryhryqz82v4d0graaiqqq5w2f33a9gj83b910xmq499irz"))))
  1968. (build-system cmake-build-system)
  1969. (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
  1970. (synopsis "Encoding detector library")
  1971. (description "uchardet is an encoding detector library, which takes a
  1972. sequence of bytes in an unknown character encoding without any additional
  1973. information, and attempts to determine the encoding of the text. Returned
  1974. encoding names are iconv-compatible.")
  1975. ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
  1976. ;; combination is GPL 2.0+.
  1977. (license license:gpl2+)))
  1978. (define-public python-cchardet
  1979. (package
  1980. (name "python-cchardet")
  1981. (version "2.1.7")
  1982. (source
  1983. (origin
  1984. (method url-fetch)
  1985. (uri (pypi-uri "cchardet" version))
  1986. (sha256
  1987. (base32
  1988. "1bqfz85cd51sw0bvhvdq9ikccxi2ld7g5jpni4jkq1a5clrvca64"))))
  1989. (build-system python-build-system)
  1990. (inputs
  1991. `(("uchardet" ,uchardet)))
  1992. (home-page "https://github.com/PyYoshi/cChardet")
  1993. (synopsis "High-performance character encoding detection for Python")
  1994. (description "cChardet is a character encoding detector, written in
  1995. Python, that binds to the C library @code{uchardet} to increase performance.")
  1996. (license license:gpl2+)))
  1997. (define-public udiskie
  1998. (package
  1999. (name "udiskie")
  2000. (version "2.1.0")
  2001. (source
  2002. (origin
  2003. (method url-fetch)
  2004. (uri (pypi-uri "udiskie" version))
  2005. (sha256
  2006. (base32
  2007. "0smib8vbs9q37n7ynhzyw97q16fgdkcdw7fw69lci0xvyq00v1dz"))
  2008. ;; Remove support for the libappindicator library of the
  2009. ;; Unity desktop environment which is not in Guix.
  2010. (patches (search-patches "udiskie-no-appindicator.patch"))))
  2011. (build-system python-build-system)
  2012. (native-inputs
  2013. `(("asciidoc" ,asciidoc)
  2014. ("gettext" ,gettext-minimal)
  2015. ("gobject-introspection" ,gobject-introspection)))
  2016. (inputs
  2017. `(("gobject-introspection" ,gobject-introspection)
  2018. ("gtk+" ,gtk+)
  2019. ("libnotify" ,libnotify)
  2020. ("udisks" ,udisks)))
  2021. (propagated-inputs
  2022. `(("python-docopt" ,python-docopt)
  2023. ("python-pygobject" ,python-pygobject)
  2024. ("python-keyutils" ,python-keyutils)
  2025. ("python-pyxdg" ,python-pyxdg)
  2026. ("python-pyyaml" ,python-pyyaml)))
  2027. (arguments
  2028. `(#:phases
  2029. (modify-phases %standard-phases
  2030. (add-after 'install 'wrap-gi-typelib
  2031. (lambda* (#:key outputs #:allow-other-keys)
  2032. (let ((out (assoc-ref outputs "out"))
  2033. (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
  2034. (wrap-program (string-append out "/bin/udiskie")
  2035. `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
  2036. #t)))))
  2037. (home-page "https://github.com/coldfix/udiskie")
  2038. (synopsis "Automounter for removable media")
  2039. (description
  2040. "The @command{udiskie} program is a udisks2 front-end that
  2041. manages removable media such as CDs or flash drives from userspace.
  2042. Its features include:
  2043. @itemize
  2044. @item automount removable media,
  2045. @item notifications,
  2046. @item tray icon,
  2047. @item command line tools for manual (un)mounting,
  2048. @item LUKS encrypted devices,
  2049. @item unlocking with keyfiles,
  2050. @item loop devices (mounting ISO archives),
  2051. @item password caching.
  2052. @end itemize
  2053. ")
  2054. (license license:expat)))
  2055. (define-public plymouth
  2056. (package
  2057. (name "plymouth")
  2058. (version "0.9.4")
  2059. (source
  2060. (origin
  2061. (method url-fetch)
  2062. (uri (string-append "https://www.freedesktop.org/software/"
  2063. "plymouth/releases/" name "-" version ".tar.xz"))
  2064. (sha256
  2065. (base32
  2066. "0l8kg7b2vfxgz9gnrn0v2w4jvysj2cirp0nxads5sy05397pl6aa"))))
  2067. (build-system gnu-build-system)
  2068. (arguments
  2069. `(#:configure-flags
  2070. (list (string-append "--with-logo="
  2071. "/etc/plymouth/logo.png")
  2072. (string-append "--with-background-color="
  2073. "0x00ff00")
  2074. (string-append "--with-background-start-color-stop="
  2075. "0xff0000")
  2076. (string-append "--with-background-end-color-stop="
  2077. "0x0000ff")
  2078. "--localstatedir=/var"
  2079. "--with-boot-tty=/dev/console"
  2080. "--without-system-root-install"
  2081. "--without-rhgb-compat-link"
  2082. "--enable-drm"
  2083. "--disable-systemd-integration"
  2084. ;; Disable GTK to dramatically reduce the closure
  2085. ;; size from ~800 MiB to a little more than 200 MiB
  2086. "--disable-gtk")
  2087. #:phases
  2088. (modify-phases %standard-phases
  2089. (add-after 'unpack 'make-reproducible
  2090. (lambda _
  2091. (substitute* "src/main.c"
  2092. (("__DATE__") "\"guix\""))
  2093. #t))
  2094. (add-before 'configure 'fix-docbook
  2095. (lambda* (#:key inputs #:allow-other-keys)
  2096. (substitute* "docs/Makefile.in"
  2097. (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
  2098. (string-append (assoc-ref inputs "docbook-xsl")
  2099. "/xml/xsl/docbook-xsl-"
  2100. ,(package-version docbook-xsl)
  2101. "/manpages/docbook.xsl")))
  2102. (setenv "XML_CATALOG_FILES"
  2103. (string-append (assoc-ref inputs "docbook-xml")
  2104. "/xml/dtd/docbook/catalog.xml"))
  2105. #t)))))
  2106. (inputs
  2107. `(("glib" ,glib)
  2108. ("pango" ,pango)
  2109. ("libdrm" ,libdrm)
  2110. ("libpng" ,libpng)
  2111. ("eudev" ,eudev)))
  2112. (native-inputs
  2113. `(("pkg-config" ,pkg-config)
  2114. ("libxslt" ,libxslt)
  2115. ("docbook-xsl" ,docbook-xsl)
  2116. ("docbook-xml" ,docbook-xml)))
  2117. (synopsis "Graphical boot animation (splash) and logger")
  2118. (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
  2119. (description
  2120. "Plymouth is an application that runs very early in the boot process and
  2121. that provides a graphical boot animation while the boot process happens in the
  2122. background. You are not supposed to install this on your own, it is only
  2123. useful with system integration.")
  2124. (license license:gpl2+)))
  2125. (define-public libindicator
  2126. (package
  2127. (name "libindicator")
  2128. (version "12.10.1")
  2129. (source
  2130. (origin
  2131. (method url-fetch)
  2132. (uri (string-append
  2133. "https://launchpad.net/libindicator/"
  2134. (version-major+minor version) "/" version
  2135. "/+download/libindicator-" version ".tar.gz"))
  2136. (sha256
  2137. (base32
  2138. "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
  2139. (build-system gnu-build-system)
  2140. (native-inputs
  2141. `(("dbus-test-runner" ,dbus-test-runner)
  2142. ("glib:bin" ,glib "bin")
  2143. ("pkg-config" ,pkg-config)
  2144. ("xvfb" ,xorg-server-for-tests)))
  2145. (inputs
  2146. `(("gtk+" ,gtk+)
  2147. ("glib" ,glib)))
  2148. (arguments
  2149. `(#:make-flags '("CFLAGS=-Wno-error")
  2150. #:phases
  2151. (modify-phases %standard-phases
  2152. (add-before 'configure 'fix-missing-space-for-libm
  2153. (lambda* (#:key outputs #:allow-other-keys)
  2154. (substitute* "configure"
  2155. (("LIBM=\"-lm\"") "LIBM=\" -lm\""))
  2156. #t))
  2157. (add-before 'configure 'fix-test-paths
  2158. (lambda* (#:key inputs #:allow-other-keys)
  2159. (substitute* "tests/Makefile.in"
  2160. (("/bin/sh") (which "sh"))
  2161. (("#!/bin/bash") (string-append "#!" (which "bash")))
  2162. (("/usr/share")
  2163. (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
  2164. #t)))))
  2165. (home-page "https://launchpad.net/libindicator")
  2166. (synopsis "Ayatana indicators symbols and functions")
  2167. (description "A set of symbols and convenience functions for Ayatana indicators.")
  2168. (license license:gpl3)))
  2169. (define-public libappindicator
  2170. (package
  2171. (name "libappindicator")
  2172. (version "12.10.0")
  2173. (source
  2174. (origin
  2175. (method url-fetch)
  2176. (uri (string-append
  2177. "https://launchpad.net/libappindicator/"
  2178. (version-major+minor version) "/" version
  2179. "/+download/libappindicator-" version ".tar.gz"))
  2180. (modules '((guix build utils)))
  2181. (snippet
  2182. '(begin
  2183. ;; Fix 'multiple definitions' error from GCC 10
  2184. (substitute* "bindings/python/appindicatormodule.c"
  2185. (("^#include <pygobject.h>" all)
  2186. (string-append "#define NO_IMPORT_PYGOBJECT\n" all)))))
  2187. (sha256
  2188. (base32
  2189. "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
  2190. (build-system gnu-build-system)
  2191. (native-inputs
  2192. `(("dbus-test-runner" ,dbus-test-runner)
  2193. ("glib:bin" ,glib "bin")
  2194. ("gobject-introspection" ,gobject-introspection)
  2195. ("pkg-config" ,pkg-config)
  2196. ("xvfb" ,xorg-server-for-tests)))
  2197. (inputs
  2198. `(("dbus-glib" ,dbus-glib)
  2199. ("libindicator" ,libindicator)
  2200. ("python@2" ,python-2)
  2201. ("python2-pygtk" ,python2-pygtk)
  2202. ("python2-pygobject-2" ,python2-pygobject-2)
  2203. ;; ("mono" ,mono) ; requires non-packaged gapi
  2204. ("vala" ,vala)))
  2205. (propagated-inputs
  2206. `(("gtk+" ,gtk+)
  2207. ("libdbusmenu" ,libdbusmenu)))
  2208. (arguments
  2209. ;; FIXME: do not hardcode gtk version
  2210. `(#:configure-flags '("--with-gtk=3")
  2211. #:make-flags '("CFLAGS=-Wno-error")
  2212. #:tests? #f ; One test does not pass (it succeeds when it should fail).
  2213. #:phases
  2214. (modify-phases %standard-phases
  2215. (add-before 'configure 'fix-paths
  2216. (lambda* (#:key inputs #:allow-other-keys)
  2217. (substitute* "docs/reference/Makefile.in"
  2218. (("/bin/sh") (which "sh")))
  2219. (substitute* "tests/Makefile.in"
  2220. (("/bin/sh") (which "sh"))
  2221. (("#!/bin/bash") (string-append "#!" (which "bash")))
  2222. (("/usr") (string-append (assoc-ref inputs "dbus-test-runner"))))
  2223. (substitute* "bindings/python/Makefile.in"
  2224. (("-lappindicator") "-lappindicator3"))
  2225. #t))
  2226. (add-after 'unpack 'fix-codegen-path
  2227. (lambda _
  2228. (substitute* "configure"
  2229. (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
  2230. #t))
  2231. (add-after 'build 'build-bindings
  2232. (lambda _
  2233. (invoke "make" "-C" "bindings/python")
  2234. #t))
  2235. (add-after 'install 'install-bindings
  2236. (lambda _
  2237. (invoke "make" "-C" "bindings/python" "install")
  2238. #t)))))
  2239. (home-page "https://launchpad.net/libappindicator")
  2240. (synopsis "Allow applications to export a menu into the Unity menu bar")
  2241. (description "A library to allow applications to export a menu, originally
  2242. into the Unity menu bar. Based on KSNI, it also works in KDE and will
  2243. fallback to generic Systray support if none of those are available.")
  2244. (license license:lgpl2.1+)))
  2245. (define-public libportal
  2246. (package
  2247. (name "libportal")
  2248. (version "0.4")
  2249. (source (origin
  2250. (method git-fetch)
  2251. (uri (git-reference
  2252. (url "https://github.com/flatpak/libportal")
  2253. (commit version)))
  2254. (file-name (git-file-name name version))
  2255. (sha256
  2256. (base32
  2257. "1jh6wd96y4i218zbmmqw12zir8p88nm8dlsa3yx3lsqxd5c1krky"))))
  2258. (build-system meson-build-system)
  2259. (arguments
  2260. `(#:phases
  2261. (modify-phases %standard-phases
  2262. (add-after 'install 'move-doc
  2263. (lambda* (#:key outputs #:allow-other-keys)
  2264. (let ((out (assoc-ref outputs "out"))
  2265. (doc (assoc-ref outputs "doc"))
  2266. (html "/share/gtk-doc"))
  2267. (copy-recursively (string-append out html)
  2268. (string-append doc html))
  2269. (delete-file-recursively (string-append out html))
  2270. #t))))))
  2271. (native-inputs
  2272. `(("pkg-config" ,pkg-config)
  2273. ("gtk-doc" ,gtk-doc/stable)
  2274. ("docbook-xsl" ,docbook-xsl)
  2275. ("docbook-xml" ,docbook-xml)
  2276. ("libxml2" ,libxml2)
  2277. ("glib:bin" ,glib "bin")))
  2278. (propagated-inputs
  2279. `(("glib" ,glib)))
  2280. (outputs '("out" "doc"))
  2281. (home-page "https://github.com/flatpak/libportal")
  2282. (synopsis "Flatpak portal library")
  2283. (description
  2284. "libportal provides GIO-style async APIs for most Flatpak portals.")
  2285. (license license:lgpl2.1+)))
  2286. (define-public xdg-desktop-portal
  2287. (package
  2288. (name "xdg-desktop-portal")
  2289. (version "1.8.1")
  2290. (source (origin
  2291. (method git-fetch)
  2292. (uri (git-reference
  2293. (url "https://github.com/flatpak/xdg-desktop-portal")
  2294. (commit version)))
  2295. (file-name (git-file-name name version))
  2296. (sha256
  2297. (base32
  2298. "0pq0kmvzk56my396vh97pzw4wizwmlmzvv2kr2xv047x3044mr5n"))))
  2299. (build-system gnu-build-system)
  2300. (native-inputs
  2301. `(("pkg-config" ,pkg-config)
  2302. ("autoconf" ,autoconf)
  2303. ("automake" ,automake)
  2304. ("libtool" ,libtool)
  2305. ("glib:bin" ,glib "bin")
  2306. ("which" ,which)
  2307. ("gettext" ,gettext-minimal)))
  2308. (inputs
  2309. `(("glib" ,glib)
  2310. ("flatpak" ,flatpak)
  2311. ("fontconfig" ,fontconfig)
  2312. ("json-glib" ,json-glib)
  2313. ("libportal" ,libportal)
  2314. ("dbus" ,dbus)
  2315. ("geoclue" ,geoclue)
  2316. ("pipewire" ,pipewire-0.3)
  2317. ("fuse" ,fuse)))
  2318. (arguments
  2319. `(#:phases
  2320. (modify-phases %standard-phases
  2321. (add-after 'unpack 'po-chmod
  2322. (lambda _
  2323. ;; Make sure 'msgmerge' can modify the PO files.
  2324. (for-each (lambda (po)
  2325. (chmod po #o666))
  2326. (find-files "po" "\\.po$"))
  2327. #t)))))
  2328. (native-search-paths
  2329. (list (search-path-specification
  2330. (variable "XDG_DESKTOP_PORTAL_DIR")
  2331. (separator #f)
  2332. (files '("share/xdg-desktop-portal/portals")))))
  2333. (home-page "https://github.com/flatpak/xdg-desktop-portal")
  2334. (synopsis "Desktop integration portal for sandboxed apps")
  2335. (description
  2336. "xdg-desktop-portal is a @dfn{portal front-end service} for Flatpak and
  2337. possibly other desktop containment frameworks. It works by exposing a series
  2338. of D-Bus interfaces known as portals under a well-known
  2339. name (@code{org.freedesktop.portal.Desktop}) and object
  2340. path (@code{/org/freedesktop/portal/desktop}).
  2341. The portal interfaces include APIs for file access, opening URIs, printing
  2342. and others.")
  2343. (license license:lgpl2.1+)))
  2344. (define-public xdg-desktop-portal-gtk
  2345. (package
  2346. (name "xdg-desktop-portal-gtk")
  2347. (version "1.7.1")
  2348. (source (origin
  2349. (method git-fetch)
  2350. (uri (git-reference
  2351. (url "https://github.com/flatpak/xdg-desktop-portal-gtk")
  2352. (commit version)))
  2353. (file-name (git-file-name name version))
  2354. (sha256
  2355. (base32
  2356. "183iha9dxmvprn99ymgz17jx1lyn1fj5jyj6ghxl716zn9mxmird"))))
  2357. (build-system glib-or-gtk-build-system)
  2358. (arguments
  2359. `(#:phases
  2360. (modify-phases %standard-phases
  2361. (add-after 'unpack 'po-chmod
  2362. (lambda _
  2363. ;; Make sure 'msgmerge' can modify the PO files.
  2364. (for-each (lambda (po)
  2365. (chmod po #o666))
  2366. (find-files "po" "\\.po$"))
  2367. #t)))))
  2368. (native-inputs
  2369. `(("pkg-config" ,pkg-config)
  2370. ("autoconf" ,autoconf)
  2371. ("automake" ,automake)
  2372. ("libtool" ,libtool)
  2373. ("xdg-desktop-portal" ,xdg-desktop-portal)
  2374. ("glib:bin" ,glib "bin")
  2375. ("which" ,which)
  2376. ("gettext" ,gettext-minimal)))
  2377. (inputs
  2378. `(("glib" ,glib)
  2379. ("gtk" ,gtk+)
  2380. ("fontconfig" ,fontconfig)
  2381. ("gnome-desktop" ,gnome-desktop)
  2382. ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
  2383. (native-search-paths
  2384. (list (search-path-specification
  2385. (variable "XDG_DESKTOP_PORTAL_DIR")
  2386. (files '("share/xdg-desktop-portal/portals")))))
  2387. (home-page "https://github.com/flatpak/xdg-desktop-portal-gtk")
  2388. (synopsis "GTK implementation of xdg-desktop-portal")
  2389. (description
  2390. "This package provides a backend implementation for xdg-desktop-portal
  2391. which uses GTK+ and various pieces of GNOME infrastructure, such as the
  2392. @code{org.gnome.Shell.Screenshot} or @code{org.gnome.SessionManager} D-Bus
  2393. interfaces.")
  2394. (license license:lgpl2.1+)))
  2395. (define-public xdg-desktop-portal-wlr
  2396. (package
  2397. (name "xdg-desktop-portal-wlr")
  2398. (version "0.4.0")
  2399. (source (origin
  2400. (method git-fetch)
  2401. (uri (git-reference
  2402. (url "https://github.com/emersion/xdg-desktop-portal-wlr")
  2403. (commit (string-append "v" version))))
  2404. (file-name (git-file-name name version))
  2405. (sha256
  2406. (base32
  2407. "13fbzh8bjnhk4xs8j9bpc01q3hy27zpbf0gkk1fnh3hm5pnyfyiv"))))
  2408. (build-system meson-build-system)
  2409. (arguments
  2410. `(#:configure-flags
  2411. '("-Dsystemd=disabled"
  2412. "-Dsd-bus-provider=libelogind")))
  2413. (native-inputs
  2414. `(("cmake" ,cmake)
  2415. ("pkg-config" ,pkg-config)))
  2416. (inputs
  2417. `(("elogind" ,elogind)
  2418. ("iniparser" ,iniparser)
  2419. ("pipewire" ,pipewire-0.3)
  2420. ("inih" ,libinih)
  2421. ("wayland" ,wayland)
  2422. ("wayland-protocols" ,wayland-protocols)))
  2423. (home-page "https://github.com/emersion/xdg-desktop-portal-wlr")
  2424. (synopsis "@code{xdg-desktop-portal} backend for wlroots")
  2425. (description
  2426. "This package provides @code{xdg-desktop-portal-wlr}. This project
  2427. seeks to add support for the screenshot, screencast, and possibly
  2428. remote-desktop @code{xdg-desktop-portal} interfaces for wlroots based
  2429. compositors.")
  2430. (license license:expat)))
  2431. (define-public waypipe
  2432. (package
  2433. (name "waypipe")
  2434. (version "0.8.0")
  2435. (source
  2436. (origin
  2437. (method git-fetch)
  2438. (uri (git-reference
  2439. (url "https://gitlab.freedesktop.org/mstoeckl/waypipe")
  2440. (commit (string-append "v" version))))
  2441. (file-name (git-file-name name version))
  2442. (sha256
  2443. (base32 "1qa47ljfvb1vv3h647xwn1j5j8gfmcmdfaz4j8ygnkvj36y87vnz"))))
  2444. (build-system meson-build-system)
  2445. (arguments
  2446. `(#:phases
  2447. (modify-phases %standard-phases
  2448. (add-after 'unpack 'fix-sleep-path
  2449. (lambda* (#:key inputs #:allow-other-keys)
  2450. (let ((coreutils (assoc-ref inputs "coreutils")))
  2451. (substitute* "./test/startup_failure.py"
  2452. (("sleep") (string-append coreutils "/bin/sleep")))))))))
  2453. (native-inputs
  2454. `(("pkg-config" ,pkg-config)
  2455. ("scdoc" ,scdoc)
  2456. ;; For tests
  2457. ("python" ,python)
  2458. ("coreutils" ,coreutils)))
  2459. (home-page "https://gitlab.freedesktop.org/mstoeckl/waypipe")
  2460. (synopsis "Proxy for Wayland protocol applications")
  2461. (description
  2462. "Waypipe is a proxy for Wayland clients, with the aim of
  2463. supporting behavior like @samp{ssh -X}.")
  2464. (license license:expat)))