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