freedesktop.scm 99 KB

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