enlightenment.scm 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015 Tomáš Čech <sleep_walker@suse.cz>
  3. ;;; Copyright © 2015 Daniel Pimentel <d4n1@member.fsf.org>
  4. ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
  5. ;;; Copyright © 2017 ng0 <ng0@no-reply.pragmatique.xyz>
  6. ;;;
  7. ;;; This file is part of GNU Guix.
  8. ;;;
  9. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  10. ;;; under the terms of the GNU General Public License as published by
  11. ;;; the Free Software Foundation; either version 3 of the License, or (at
  12. ;;; your option) any later version.
  13. ;;;
  14. ;;; GNU Guix is distributed in the hope that it will be useful, but
  15. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ;;; GNU General Public License for more details.
  18. ;;;
  19. ;;; You should have received a copy of the GNU General Public License
  20. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  21. (define-module (gnu packages enlightenment)
  22. #:use-module ((guix licenses) #:prefix license:)
  23. #:use-module (guix packages)
  24. #:use-module (guix download)
  25. #:use-module (guix build-system gnu)
  26. #:use-module (guix build-system python)
  27. #:use-module (gnu packages)
  28. #:use-module (gnu packages bash)
  29. #:use-module (gnu packages check)
  30. #:use-module (gnu packages code)
  31. #:use-module (gnu packages compression)
  32. #:use-module (gnu packages curl)
  33. #:use-module (gnu packages fontutils)
  34. #:use-module (gnu packages freedesktop)
  35. #:use-module (gnu packages fribidi)
  36. #:use-module (gnu packages game-development)
  37. #:use-module (gnu packages gettext)
  38. #:use-module (gnu packages ghostscript)
  39. #:use-module (gnu packages gl)
  40. #:use-module (gnu packages glib)
  41. #:use-module (gnu packages gnome)
  42. #:use-module (gnu packages gstreamer)
  43. #:use-module (gnu packages gtk)
  44. #:use-module (gnu packages image)
  45. #:use-module (gnu packages linux)
  46. #:use-module (gnu packages llvm)
  47. #:use-module (gnu packages lua)
  48. #:use-module (gnu packages pdf)
  49. #:use-module (gnu packages photo)
  50. #:use-module (gnu packages pkg-config)
  51. #:use-module (gnu packages pulseaudio)
  52. #:use-module (gnu packages python)
  53. #:use-module (gnu packages tls)
  54. #:use-module (gnu packages video)
  55. #:use-module (gnu packages xdisorg)
  56. #:use-module (gnu packages xorg))
  57. (define-public efl
  58. (package
  59. (name "efl")
  60. (version "1.20.4")
  61. (source (origin
  62. (method url-fetch)
  63. (uri (string-append
  64. "https://download.enlightenment.org/rel/libs/efl/efl-"
  65. version ".tar.xz"))
  66. (sha256
  67. (base32
  68. "1jxha61gsil6hs9zb72zsyh3gmdipvfnlc9v3palb2bm0b23aq9i"))))
  69. (build-system gnu-build-system)
  70. (native-inputs
  71. `(("pkg-config" ,pkg-config)))
  72. (inputs
  73. `(("alsa-lib" ,alsa-lib)
  74. ("compositeproto" ,compositeproto)
  75. ("curl" ,curl)
  76. ("ghostscript" ,ghostscript)
  77. ("giflib" ,giflib)
  78. ("gstreamer" ,gstreamer)
  79. ("gst-plugins-base" ,gst-plugins-base)
  80. ("libexif" ,libexif)
  81. ("libjpeg" ,libjpeg)
  82. ("libraw" ,libraw)
  83. ("librsvg" ,librsvg)
  84. ("libspectre" ,libspectre)
  85. ("libtiff" ,libtiff)
  86. ("libwebp" ,libwebp)
  87. ("libx11" ,libx11)
  88. ("libxau" ,libxau)
  89. ("libxcomposite" ,libxcomposite)
  90. ("libxcursor" ,libxcursor)
  91. ("libxdamage" ,libxdamage)
  92. ("libxdmcp" ,libxdmcp)
  93. ("libxext" ,libxext)
  94. ("libxi" ,libxi)
  95. ("libxfixes" ,libxfixes)
  96. ("libxinerama" ,libxinerama)
  97. ("libxp" ,libxp)
  98. ("libxrandr" ,libxrandr)
  99. ("libxrender" ,libxrender)
  100. ("libxscrnsaver" ,libxscrnsaver)
  101. ("libxtst" ,libxtst)
  102. ("lz4" ,lz4)
  103. ("openjpeg" ,openjpeg-1)
  104. ("poppler" ,poppler)
  105. ("printproto" ,printproto)
  106. ("scrnsaverproto" ,scrnsaverproto)
  107. ("wayland-protocols" ,wayland-protocols)
  108. ("xextproto" ,xextproto)
  109. ("xinput" ,xinput)
  110. ("xpr" ,xpr)
  111. ("xproto" ,xproto)))
  112. (propagated-inputs
  113. ;; All these inputs are in package config files in section
  114. ;; Requires.private.
  115. `(("bullet" ,bullet) ; ephysics.pc
  116. ("dbus" ,dbus) ; eldbus.pc, elementary.pc, elocation.pc, ethumb_client.pc
  117. ("eudev" ,eudev) ; eeze.pc
  118. ("fontconfig" ,fontconfig) ; evas.pc, evas-cxx.pc
  119. ("freetype" ,freetype) ; evas.pc, evas-cxx.pc
  120. ("fribidi" ,fribidi) ; evas.pc, evas-cxx.pc
  121. ("glib" ,glib) ; ecore.pc, ecore-cxx.pc
  122. ("harfbuzz" ,harfbuzz) ; evas.pc, evas-cxx.pc
  123. ("luajit" ,luajit) ; elua.pc, evas.pc, evas-cxx.pc
  124. ("libinput" ,libinput-minimal) ; elput.pc
  125. ("libpng" ,libpng) ; evas.pc, evas-cxx.pc
  126. ("libsndfile" ,libsndfile) ; ecore-audio.pc, ecore-audio-cxx.pc
  127. ("libxkbcommon" ,libxkbcommon) ; ecore-wl2.pc, elementary.pc, elput.pc
  128. ("mesa" ,mesa) ; ecore-drm2.pc
  129. ("openssl" ,openssl) ; ecore-con.pc, eet.pc, eet-cxx.pc, emile.pc
  130. ("pulseaudio" ,pulseaudio) ; ecore-audio.pc, ecore-audio-cxx.pc
  131. ("util-linux" ,util-linux) ; mount: eeze.pc
  132. ("wayland" ,wayland) ; ecore-wl2.pc, elementary.pc
  133. ("zlib" ,zlib))) ; eet.pc, eet-cxx.pc, emile.pc
  134. (arguments
  135. `(#:configure-flags '("--disable-silent-rules"
  136. "--disable-systemd"
  137. "--enable-liblz4"
  138. "--enable-xinput22"
  139. "--enable-image-loader-webp"
  140. "--enable-multisense"
  141. "--with-opengl=es"
  142. "--enable-egl"
  143. "--enable-harfbuzz"
  144. ;; for wayland
  145. "--enable-wayland"
  146. "--enable-elput"
  147. "--enable-drm")
  148. #:phases
  149. (modify-phases %standard-phases
  150. ;; If we don't hardcode the location of libcurl.so then we
  151. ;; have to wrap the outputs of efl's dependencies in curl.
  152. (add-after 'unpack 'hardcode-libcurl-location
  153. (lambda* (#:key inputs #:allow-other-keys)
  154. (let* ((curl (assoc-ref inputs "curl"))
  155. (lib (string-append curl "/lib/")))
  156. (substitute* "src/lib/ecore_con/ecore_con_url_curl.c"
  157. (("libcurl.so.?" libcurl) ; libcurl.so.[45]
  158. (string-append lib libcurl)))
  159. #t)))
  160. (add-after 'unpack 'set-home-directory
  161. ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
  162. (lambda _ (setenv "HOME" "/tmp") #t)))))
  163. (home-page "https://www.enlightenment.org/about-efl")
  164. (synopsis "Enlightenment Foundation Libraries")
  165. (description
  166. "Enlightenment Foundation Libraries is a set of libraries developed
  167. for Enlightenment. Libraries covers data serialization, wide support for
  168. graphics rendering, UI layout and themes, interaction with OS, access to
  169. removable devices or support for multimedia.")
  170. ;; Different parts are under different licenses.
  171. (license (list license:bsd-2 license:lgpl2.1 license:zlib))))
  172. (define-public terminology
  173. (package
  174. (name "terminology")
  175. (version "1.1.1")
  176. (source (origin
  177. (method url-fetch)
  178. (uri
  179. (string-append "https://download.enlightenment.org/rel/apps/"
  180. "terminology/terminology-" version ".tar.xz"))
  181. (sha256
  182. (base32
  183. "05ncxvzb9rzkyjvd95hzn8lswqdwr8cix6rd54nqn9559jibh4ns"))
  184. (modules '((guix build utils)))
  185. ;; Remove the bundled fonts.
  186. ;; TODO: Remove bundled lz4.
  187. (snippet
  188. '(begin
  189. (delete-file-recursively "data/fonts")
  190. (substitute* '("data/Makefile.in" "data/Makefile.am")
  191. (("fonts") ""))
  192. (substitute* "configure"
  193. (("data/fonts/Makefile") "")
  194. (("\\\"data/fonts/Makefile") "# \"data/fonts/Makefile"))
  195. (substitute* '("data/themes/Makefile.in"
  196. "data/themes/Makefile.am"
  197. "data/themes/nyanology/Makefile.in"
  198. "data/themes/nyanology/Makefile.am")
  199. (("-fd \\$\\(top_srcdir\\)/data/fonts") ""))))))
  200. (build-system gnu-build-system)
  201. (arguments
  202. '(#:phases
  203. (modify-phases %standard-phases
  204. (add-after 'unpack 'set-home-directory
  205. ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
  206. (lambda _ (setenv "HOME" "/tmp") #t)))))
  207. (native-inputs
  208. `(("gettext" ,gettext-minimal)
  209. ("pkg-config" ,pkg-config)))
  210. (inputs
  211. `(("efl" ,efl)))
  212. (home-page "https://www.enlightenment.org/about-terminology")
  213. (synopsis "Powerful terminal emulator based on EFL")
  214. (description
  215. "Terminology is fast and feature rich terminal emulator. It is solely
  216. based on Enlightenment Foundation Libraries. It supports multiple tabs, UTF-8,
  217. URL and local path detection, themes, popup based content viewer for non-text
  218. contents and more.")
  219. (license license:bsd-2)))
  220. (define-public rage
  221. (package
  222. (name "rage")
  223. (version "0.2.1")
  224. (source (origin
  225. (method url-fetch)
  226. (uri
  227. (string-append
  228. "https://download.enlightenment.org/rel/apps/rage/rage-"
  229. version ".tar.xz"))
  230. (sha256
  231. (base32
  232. "06kbgcnbhl9clhdl7k983m4d0n6ggsl4qvizzi1nrp8c7np87fix"))))
  233. (build-system gnu-build-system)
  234. (arguments
  235. '(#:phases
  236. (modify-phases %standard-phases
  237. (add-after 'unpack 'set-home-directory
  238. ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
  239. (lambda _ (setenv "HOME" "/tmp") #t)))))
  240. (native-inputs
  241. `(("pkg-config" ,pkg-config)))
  242. (inputs
  243. `(("efl" ,efl)))
  244. (home-page "https://www.enlightenment.org/about-rage")
  245. (synopsis "Video and audio player based on EFL")
  246. (description
  247. "Rage is a video and audio player written with Enlightenment Foundation
  248. Libraries with some extra bells and whistles.")
  249. (license license:bsd-2)))
  250. (define-public enlightenment
  251. (package
  252. (name "enlightenment")
  253. (version "0.21.9")
  254. (source (origin
  255. (method url-fetch)
  256. (uri
  257. (string-append "https://download.enlightenment.org/rel/apps/"
  258. name "/" name "-" version ".tar.xz"))
  259. (sha256
  260. (base32
  261. "0w5f3707hyfc20i6xqh4jlr5p2yhy1z794061mjsz2rp4w00qmpb"))))
  262. (build-system gnu-build-system)
  263. (arguments
  264. `(#:configure-flags '("--enable-mount-eeze")
  265. #:phases
  266. (modify-phases %standard-phases
  267. (add-before 'configure 'set-system-actions
  268. (lambda* (#:key inputs #:allow-other-keys)
  269. (let ((xkeyboard (assoc-ref inputs "xkeyboard-config"))
  270. (utils (assoc-ref inputs "util-linux")))
  271. ;; We need to patch the path to 'base.lst' to be able
  272. ;; to switch the keyboard layout in E.
  273. (substitute* "src/modules/xkbswitch/e_mod_parse.c"
  274. (("/usr/share/X11/xkb/rules/xorg.lst")
  275. (string-append xkeyboard
  276. "/share/X11/xkb/rules/base.lst")))
  277. (substitute* "configure"
  278. (("/bin/mount") (string-append utils "/bin/mount"))
  279. (("/bin/umount") (string-append utils "/bin/umount"))
  280. (("/usr/bin/eject") (string-append utils "/bin/eject"))
  281. ; TODO: Replace suspend and hibernate also.
  282. (("/sbin/shutdown -h now") "/run/current-system/profile/sbin/halt")
  283. (("/sbin/shutdown -r now") "/run/current-system/profile/sbin/reboot"))
  284. #t))))))
  285. (native-inputs
  286. `(("gettext" ,gettext-minimal)
  287. ("pkg-config" ,pkg-config)
  288. ("util-linux" ,util-linux)))
  289. (inputs
  290. `(("alsa-lib" ,alsa-lib)
  291. ("dbus" ,dbus)
  292. ("efl" ,efl)
  293. ("freetype" ,freetype)
  294. ("libxcb" ,libxcb)
  295. ("libxext" ,libxext)
  296. ("linux-pam" ,linux-pam)
  297. ("xcb-util-keysyms" ,xcb-util-keysyms)
  298. ("xkeyboard-config" ,xkeyboard-config)))
  299. (home-page "https://www.enlightenment.org/about-enlightenment")
  300. (synopsis "Lightweight desktop environment")
  301. (description
  302. "Enlightenment is resource friendly desktop environment with integrated
  303. file manager, wide range of configuration options, plugin system allowing to
  304. unload unused functionality, with support for touchscreen and suitable for
  305. embedded systems.")
  306. (license license:bsd-2)))
  307. (define-public python-efl
  308. (package
  309. (name "python-efl")
  310. (version "1.20.0")
  311. (source
  312. (origin
  313. (method url-fetch)
  314. (uri (list
  315. (pypi-uri "python-efl" version)
  316. (string-append "http://download.enlightenment.org/rel/bindings/"
  317. "python/python-efl-" version ".tar.gz")))
  318. (sha256
  319. (base32
  320. "1680pgpf501nhbc9arm0nfj6rpcw17aryh0pgmmmszxlgpifpdzy"))))
  321. (build-system python-build-system)
  322. (arguments
  323. '(#:phases
  324. (modify-phases %standard-phases
  325. (replace 'build
  326. (lambda _
  327. (zero?
  328. (system* "env" "ENABLE_CYTHON=1" "python" "setup.py" "build"))))
  329. (add-before 'build 'set-flags
  330. (lambda _
  331. (setenv "CFLAGS"
  332. (string-append "-I" (assoc-ref %build-inputs "python-dbus")
  333. "/include/dbus-1.0"))
  334. #t))
  335. (add-before 'check 'set-environment
  336. (lambda _
  337. ;; Some tests require write access to HOME.
  338. (setenv "HOME" "/tmp")
  339. #t)))))
  340. (native-inputs
  341. `(("pkg-config" ,pkg-config)
  342. ("python-cython" ,python-cython)))
  343. (inputs
  344. `(("efl" ,efl)
  345. ("python-dbus" ,python-dbus)))
  346. (home-page "https://www.enlightenment.org/")
  347. (synopsis "Python bindings for EFL")
  348. (description
  349. "PYTHON-EFL are the python bindings for the whole Enlightenment Foundation
  350. Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).")
  351. (license license:lgpl3)))
  352. (define-public python2-efl
  353. (package-with-python2 python-efl))
  354. (define-public edi
  355. (package
  356. (name "edi")
  357. (version "0.5.1")
  358. (source
  359. (origin
  360. (method url-fetch)
  361. (uri (string-append "https://github.com/ajwillia-ms/edi/releases/"
  362. "download/v" version "/edi-" version ".tar.bz2"))
  363. (sha256
  364. (base32
  365. "0k0ymi9ilhkypqb9pniv365kh3jgbl2g2k0ylvsmisn2jhbqk49a"))))
  366. (build-system gnu-build-system)
  367. (arguments
  368. '(#:phases
  369. (modify-phases %standard-phases
  370. (add-after 'unpack 'set-home-directory
  371. ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
  372. (lambda _ (setenv "HOME" "/tmp") #t)))
  373. #:configure-flags '("--with-tests=coverage")))
  374. (native-inputs
  375. `(("check" ,check)
  376. ("lcov" ,lcov)
  377. ("pkg-config" ,pkg-config)))
  378. (inputs
  379. `(("clang" ,clang)
  380. ("efl" ,efl)))
  381. (home-page "https://www.enlightenment.org/about-edi")
  382. (synopsis "Development environment for Enlightenment")
  383. (description "EDI is a development environment designed for and built using
  384. the EFL. It's aim is to create a new, native development environment for Linux
  385. that tries to lower the barrier to getting involved in Enlightenment development
  386. and in creating applications based on the Enlightenment Foundation Library suite.")
  387. (license (list license:public-domain ; data/extra/skeleton
  388. license:gpl2)))) ; edi
  389. (define-public lekha
  390. (package
  391. (name "lekha")
  392. (version "0.2.1")
  393. (source (origin
  394. (method url-fetch)
  395. (uri (pypi-uri "Lekha" version))
  396. (sha256
  397. (base32
  398. "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
  399. (build-system python-build-system)
  400. (arguments
  401. `(#:tests? #f ; no test target
  402. #:python ,python-2
  403. #:phases
  404. (modify-phases %standard-phases
  405. (add-after 'unpack 'fix-data-location
  406. (lambda _ (substitute* "setup.py"
  407. (("'/usr/")"'"))
  408. #t)))))
  409. (propagated-inputs
  410. `(("python2-efl" ,python2-efl)
  411. ("python2-pypdf2" ,python2-pypdf2)
  412. ("python2-pyxdg" ,python2-pyxdg)))
  413. (synopsis "Simple PDF viewer")
  414. (description
  415. "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
  416. (home-page "https://github.com/kaihu/lekha")
  417. (license license:gpl3+)))