gnu: Add confusion-mdl.
[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.21.1")
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 "0a5907h896pvpix7a6idc2fspzy6d78xrzf84k8y9fyvnd14nxs4"))))
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.1")
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 "1ii8332bl88l8md3gvz5dhi9bjpm6shyf14ck9kfyy7d56hp71mc"))
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.4")
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 "0ygy891rrw5c7lhk539nhif77j88phvz2h0fhx172iaridy9kx2r"))
263 (patches (search-patches "enlightenment-fix-setuid-path.patch"))))
264 (build-system gnu-build-system)
265 (arguments
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* "src/modules/everything/evry_plug_apps.c"
279 (("/usr/bin/") ""))
280 (substitute* "configure"
281 (("/bin/mount") (string-append utils "/bin/mount"))
282 (("/bin/umount") (string-append utils "/bin/umount"))
283 (("/usr/bin/eject") (string-append utils "/bin/eject"))
284 (("/etc/acpi/sleep.sh force") "/run/current-system/profile/bin/loginctl suspend")
285 (("/etc/acpi/hibernate.sh force") "/run/current-system/profile/bin/loginctl hibernate")
286 (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now")
287 (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now"))
288 #t))))))
289 (native-inputs
290 `(("gettext" ,gettext-minimal)
291 ("pkg-config" ,pkg-config)
292 ("util-linux" ,util-linux)))
293 (inputs
294 `(("alsa-lib" ,alsa-lib)
295 ("dbus" ,dbus)
296 ("efl" ,efl)
297 ("freetype" ,freetype)
298 ("libxcb" ,libxcb)
299 ("libxext" ,libxext)
300 ("linux-pam" ,linux-pam)
301 ("xcb-util-keysyms" ,xcb-util-keysyms)
302 ("xkeyboard-config" ,xkeyboard-config)))
303 (home-page "https://www.enlightenment.org/about-enlightenment")
304 (synopsis "Lightweight desktop environment")
305 (description
306 "Enlightenment is resource friendly desktop environment with integrated
307 file manager, wide range of configuration options, plugin system allowing to
308 unload unused functionality, with support for touchscreen and suitable for
309 embedded systems.")
310 (license license:bsd-2)))
311
312 (define-public python-efl
313 (package
314 (name "python-efl")
315 (version "1.21.0")
316 (source
317 (origin
318 (method url-fetch)
319 (uri (string-append "http://download.enlightenment.org/rel/bindings/"
320 "python/python-efl-" version ".tar.xz"))
321 (sha256
322 (base32
323 "08x2cv8hnf004c3711250wrax21ffj5y8951pvk77h98als4pq47"))))
324 (build-system python-build-system)
325 (arguments
326 '(#:phases
327 (modify-phases %standard-phases
328 (replace 'build
329 (lambda _
330 (setenv "ENABLE_CYTHON" "1")
331 (invoke "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 ;; These tests try to connect to the internet.
343 (delete-file "tests/ecore/test_09_file_download.py")
344 (delete-file "tests/ecore/test_11_con.py")
345 #t)))))
346 (native-inputs
347 `(("pkg-config" ,pkg-config)
348 ("python-cython" ,python-cython)))
349 (inputs
350 `(("efl" ,efl)
351 ("python-dbus" ,python-dbus)))
352 (home-page "https://www.enlightenment.org/")
353 (synopsis "Python bindings for EFL")
354 (description
355 "PYTHON-EFL are the python bindings for the whole Enlightenment Foundation
356 Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).")
357 (license license:lgpl3)))
358
359 (define-public python2-efl
360 (package-with-python2 python-efl))
361
362 (define-public edi
363 (package
364 (name "edi")
365 (version "0.6.0")
366 (source
367 (origin
368 (method url-fetch)
369 (uri (string-append "https://download.enlightenment.org/rel/apps/edi/"
370 name "-" version ".tar.xz"))
371 (sha256
372 (base32
373 "0iqkah327ms5m7k054hcik2l9v68i4mg9yy52brprfqpd5jk7pw8"))))
374 (build-system gnu-build-system)
375 (arguments
376 '(#:phases
377 (modify-phases %standard-phases
378 (add-after 'unpack 'set-home-directory
379 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
380 (lambda _ (setenv "HOME" "/tmp") #t)))
381 #:tests? #f)) ; tests require running dbus service
382 (native-inputs
383 `(("pkg-config" ,pkg-config)))
384 (inputs
385 `(("clang" ,clang)
386 ("efl" ,efl)))
387 (home-page "https://www.enlightenment.org/about-edi")
388 (synopsis "Development environment for Enlightenment")
389 (description "EDI is a development environment designed for and built using
390 the EFL. It's aim is to create a new, native development environment for Linux
391 that tries to lower the barrier to getting involved in Enlightenment development
392 and in creating applications based on the Enlightenment Foundation Library suite.")
393 (license (list license:public-domain ; data/extra/skeleton
394 license:gpl2)))) ; edi
395
396 (define-public lekha
397 (package
398 (name "lekha")
399 (version "0.2.1")
400 (source (origin
401 (method url-fetch)
402 (uri (pypi-uri "Lekha" version))
403 (sha256
404 (base32
405 "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
406 (build-system python-build-system)
407 (arguments
408 `(#:tests? #f ; no test target
409 #:python ,python-2
410 #:phases
411 (modify-phases %standard-phases
412 (add-after 'unpack 'fix-data-location
413 (lambda _ (substitute* "setup.py"
414 (("'/usr/")"'"))
415 #t)))))
416 (propagated-inputs
417 `(("python2-efl" ,python2-efl)
418 ("python2-pypdf2" ,python2-pypdf2)
419 ("python2-pyxdg" ,python2-pyxdg)))
420 (synopsis "Simple PDF viewer")
421 (description
422 "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
423 (home-page "https://github.com/kaihu/lekha")
424 (license license:gpl3+)))
425
426 (define-public ephoto
427 (package
428 (name "ephoto")
429 (version "1.5")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (list (string-append "http://www.smhouston.us/stuff/ephoto-"
434 version ".tar.xz")
435 (string-append "https://download.enlightenment.org/rel/"
436 "apps/ephoto/ephoto-" version ".tar.xz")))
437 (sha256
438 (base32
439 "04kli43sfsy6s660g13pjc0kjmgdcmq8m4qh02vvpcwv60mf9mgz"))))
440 (build-system gnu-build-system)
441 (arguments
442 '(#:phases
443 (modify-phases %standard-phases
444 (add-after 'unpack 'set-home-directory
445 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
446 (lambda _ (setenv "HOME" "/tmp") #t)))))
447 (native-inputs
448 `(("check" ,check)
449 ("pkg-config" ,pkg-config)))
450 (inputs
451 `(("efl" ,efl)))
452 (home-page "http://smhouston.us/ephoto/")
453 (synopsis "EFL image viewer/editor/manipulator/slideshow creator")
454 (description "Ephoto is an image viewer and editor written using the
455 @dfn{Enlightenment Foundation Libraries} (EFL). It focuses on simplicity and ease
456 of use, while taking advantage of the speed and small footprint the EFL provide.
457
458 Ephoto’s features include:
459 @enumerate
460 @item Browsing the filesystem and displaying images in an easy to use grid view.
461 @item Browsing images in a single image view format.
462 @item Viewing images in a slideshow.
463 @item Editing your image with features such as cropping, auto enhance,
464 blurring, sharpening, brightness/contrast/gamma adjustments, hue/saturation/value
465 adjustments, and color level adjustment.
466 @item Applying artistic filters to your image such as black and white and old photo.
467 @item Drag And Drop along with file operations to easy maintain your photo directories.
468 @end enumerate\n")
469 (license (list
470 license:bsd-2 ; Ephoto's thumbnailing code
471 license:bsd-3))))