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, 2019 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 ng0 <ng0@n0.is>
6 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2018 Timo Eisenmann <eisenmann@fn.de>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages enlightenment)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system meson)
30 #:use-module (guix build-system python)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages bash)
33 #:use-module (gnu packages check)
34 #:use-module (gnu packages code)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages fontutils)
38 #:use-module (gnu packages freedesktop)
39 #:use-module (gnu packages fribidi)
40 #:use-module (gnu packages game-development)
41 #:use-module (gnu packages gettext)
42 #:use-module (gnu packages ghostscript)
43 #:use-module (gnu packages gl)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages gnome)
46 #:use-module (gnu packages gstreamer)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages image)
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages llvm)
51 #:use-module (gnu packages lua)
52 #:use-module (gnu packages pdf)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages photo)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages pulseaudio)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages python-xyz)
59 #:use-module (gnu packages tls)
60 #:use-module (gnu packages video)
61 #:use-module (gnu packages xdisorg)
62 #:use-module (gnu packages xorg)
63 #:use-module (ice-9 match))
72 "https://download.enlightenment.org/rel/libs/efl/efl-"
76 "1l0wdgzxqm2y919277b1p9d37xzg808zwxxaw0nn44arh8gqk68n"))))
77 (outputs '("out" ; 53 MB
79 (build-system gnu-build-system)
81 `(("pkg-config" ,pkg-config)))
83 `(("alsa-lib" ,alsa-lib)
85 ("ghostscript" ,ghostscript)
87 ("gstreamer" ,gstreamer)
88 ("gst-plugins-base" ,gst-plugins-base)
93 ("libsndfile" ,libsndfile)
94 ("libspectre" ,libspectre)
99 ("libxcomposite" ,libxcomposite)
100 ("libxcursor" ,libxcursor)
101 ("libxdamage" ,libxdamage)
102 ("libxdmcp" ,libxdmcp)
105 ("libxfixes" ,libxfixes)
106 ("libxinerama" ,libxinerama)
108 ("libxrandr" ,libxrandr)
109 ("libxrender" ,libxrender)
110 ("libxscrnsaver" ,libxscrnsaver)
113 ("openjpeg" ,openjpeg-1)
115 ("printproto" ,printproto)
116 ("pulseaudio" ,pulseaudio)
117 ("wayland-protocols" ,wayland-protocols)
120 ("xorgproto" ,xorgproto)))
122 ;; All these inputs are in package config files in section
124 `(("bullet" ,bullet) ; ephysics.pc
125 ("dbus" ,dbus) ; eldbus.pc, elementary.pc, elocation.pc, ethumb_client.pc
126 ("eudev" ,eudev) ; eeze.pc
127 ("fontconfig" ,fontconfig) ; evas.pc, evas-cxx.pc
128 ("freetype" ,freetype) ; evas.pc, evas-cxx.pc
129 ("fribidi" ,fribidi) ; evas.pc, evas-cxx.pc
130 ("glib" ,glib) ; ecore.pc, ecore-cxx.pc
131 ("harfbuzz" ,harfbuzz) ; evas.pc, evas-cxx.pc
132 ("luajit" ,luajit) ; elua.pc, evas.pc, evas-cxx.pc
133 ("libinput" ,libinput-minimal) ; elput.pc
134 ("libpng" ,libpng) ; evas.pc, evas-cxx.pc
135 ("libxkbcommon" ,libxkbcommon) ; ecore-wl2.pc, elementary.pc, elput.pc
136 ("mesa" ,mesa) ; ecore-drm2.pc
137 ("openssl" ,openssl) ; ecore-con.pc, eet.pc, eet-cxx.pc, emile.pc
138 ("util-linux" ,util-linux) ; mount: eeze.pc
139 ("wayland" ,wayland) ; ecore-wl2.pc, elementary.pc
140 ("zlib" ,zlib))) ; eet.pc, eet-cxx.pc, emile.pc
142 `(#:configure-flags '("--disable-silent-rules"
144 "--with-profile=release"
147 "--enable-image-loader-webp"
148 "--enable-multisense"
149 ,@(match (%current-system)
151 '("--with-opengl=es" "--with-egl"))
153 '("--with-opengl=full")))
160 (modify-phases %standard-phases
161 ;; If we don't hardcode the location of libcurl.so then we
162 ;; have to wrap the outputs of efl's dependencies in curl.
163 (add-after 'unpack 'hardcode-libcurl-location
164 (lambda* (#:key inputs #:allow-other-keys)
165 (let* ((curl (assoc-ref inputs "curl"))
166 (lib (string-append curl "/lib/")))
167 (substitute* "src/lib/ecore_con/ecore_con_url_curl.c"
168 (("libcurl.so.?" libcurl) ; libcurl.so.[45]
169 (string-append lib libcurl)))
171 (add-after 'unpack 'set-home-directory
172 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
173 (lambda _ (setenv "HOME" "/tmp") #t)))))
174 (home-page "https://www.enlightenment.org/about-efl")
175 (synopsis "Enlightenment Foundation Libraries")
177 "Enlightenment Foundation Libraries is a set of libraries developed
178 for Enlightenment. Libraries covers data serialization, wide support for
179 graphics rendering, UI layout and themes, interaction with OS, access to
180 removable devices or support for multimedia.")
181 ;; Different parts are under different licenses.
182 (license (list license:bsd-2 license:lgpl2.1 license:zlib))))
184 (define-public terminology
191 (string-append "https://download.enlightenment.org/rel/apps/"
192 "terminology/terminology-" version ".tar.xz"))
195 "0mm9v5a94369is3kaarnr3a28wy42wslzi1mcisaidlcldgv7f6p"))
196 (modules '((guix build utils)))
197 ;; Remove the bundled fonts.
200 (delete-file-recursively "data/fonts")
201 (substitute* "data/meson.build"
202 (("subdir\\('fonts'\\)") ""))
204 (build-system meson-build-system)
206 `(#:configure-flags (list "-Dtests=true"
207 (string-append "-Dedje-cc="
208 (assoc-ref %build-inputs "efl")
211 (modify-phases %standard-phases
212 (add-after 'unpack 'set-home-directory
213 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
214 (lambda _ (setenv "HOME" "/tmp") #t))
217 (with-directory-excursion
218 (string-append "../" ,name "-" ,version "/tests")
219 (invoke "sh" "run_tests.sh" "--verbose"
220 "-t" "../../build/src/bin/tytest"))))
221 (add-after 'install 'remove-test-binary
222 (lambda* (#:key outputs #:allow-other-keys)
223 ;; This file is not meant to be installed.
224 (delete-file (string-append (assoc-ref outputs "out")
228 `(("gettext" ,gettext-minimal)
230 ("pkg-config" ,pkg-config)))
233 (home-page "https://www.enlightenment.org/about-terminology")
234 (synopsis "Powerful terminal emulator based on EFL")
236 "Terminology is fast and feature rich terminal emulator. It is solely
237 based on Enlightenment Foundation Libraries. It supports multiple tabs, UTF-8,
238 URL and local path detection, themes, popup based content viewer for non-text
240 (license license:bsd-2)))
250 "https://download.enlightenment.org/rel/apps/rage/rage-"
254 "0gfzdd4jg78bkmj61yg49w7bzspl5m1nh6agqgs8k7qrq9q26xqy"))))
255 (build-system meson-build-system)
258 (modify-phases %standard-phases
259 (add-after 'unpack 'set-home-directory
260 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
261 (lambda _ (setenv "HOME" "/tmp") #t)))))
263 `(("pkg-config" ,pkg-config)))
266 (home-page "https://www.enlightenment.org/about-rage")
267 (synopsis "Video and audio player based on EFL")
269 "Rage is a video and audio player written with Enlightenment Foundation
270 Libraries with some extra bells and whistles.")
271 (license license:bsd-2)))
273 (define-public enlightenment
275 (name "enlightenment")
280 (string-append "https://download.enlightenment.org/rel/apps/"
281 name "/" name "-" version ".tar.xz"))
284 "0ygy891rrw5c7lhk539nhif77j88phvz2h0fhx172iaridy9kx2r"))
285 (patches (search-patches "enlightenment-fix-setuid-path.patch"))))
286 (build-system gnu-build-system)
289 (modify-phases %standard-phases
290 (add-before 'configure 'set-system-actions
291 (lambda* (#:key inputs #:allow-other-keys)
292 (setenv "HOME" "/tmp")
293 (let ((xkeyboard (assoc-ref inputs "xkeyboard-config"))
294 (setxkbmap (assoc-ref inputs "setxkbmap"))
295 (utils (assoc-ref inputs "util-linux"))
296 (libc (assoc-ref inputs "libc"))
297 (efl (assoc-ref inputs "efl")))
298 ;; We need to patch the path to 'base.lst' to be able
299 ;; to switch the keyboard layout in E.
300 (substitute* (list "src/modules/xkbswitch/e_mod_parse.c"
301 "src/modules/wizard/page_011.c")
302 (("/usr/share/X11/xkb/rules/xorg.lst")
303 (string-append xkeyboard
304 "/share/X11/xkb/rules/base.lst")))
305 (substitute* "src/bin/e_xkb.c"
307 (string-append "\"" setxkbmap "/bin/setxkbmap \"")))
308 (substitute* (list "src/bin/e_intl.c"
309 "src/modules/conf_intl/e_int_config_intl.c"
310 "src/modules/wizard/page_010.c")
311 (("locale -a") (string-append libc "/bin/locale -a")))
312 (substitute* "src/bin/e_import_config_dialog.c"
313 (("%s/edje_cc -v %s %s %s\", e_prefix_bin_get\\(\\)")
314 (string-append efl "/bin/edje_cc -v %s %s %s\"")))
315 (substitute* "src/modules/everything/evry_plug_apps.c"
317 (substitute* "configure"
318 (("/bin/mount") (string-append utils "/bin/mount"))
319 (("/bin/umount") (string-append utils "/bin/umount"))
320 (("/usr/bin/eject") (string-append utils "/bin/eject"))
321 (("/etc/acpi/sleep.sh force") "/run/current-system/profile/bin/loginctl suspend")
322 (("/etc/acpi/hibernate.sh force") "/run/current-system/profile/bin/loginctl hibernate")
323 (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now")
324 (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now"))
327 `(("gettext" ,gettext-minimal)
328 ("pkg-config" ,pkg-config)
329 ("util-linux" ,util-linux)))
331 `(("alsa-lib" ,alsa-lib)
334 ("freetype" ,freetype)
337 ("linux-pam" ,linux-pam)
338 ("setxkbmap" ,setxkbmap)
339 ("xcb-util-keysyms" ,xcb-util-keysyms)
340 ("xkeyboard-config" ,xkeyboard-config)))
341 (home-page "https://www.enlightenment.org/about-enlightenment")
342 (synopsis "Lightweight desktop environment")
344 "Enlightenment is resource friendly desktop environment with integrated
345 file manager, wide range of configuration options, plugin system allowing to
346 unload unused functionality, with support for touchscreen and suitable for
348 (license license:bsd-2)))
350 (define-public python-efl
357 (uri (string-append "https://download.enlightenment.org/rel/bindings/"
358 "python/python-efl-" version ".tar.xz"))
361 "1qhy63c3fs2bxkx2np5z14hyxbr12ii030crsjnhpbyw3mic0s63"))
362 (modules '((guix build utils)))
363 ;; Remove files generated by Cython
366 (copy-file "efl/dbus_mainloop/e_dbus.c" "efl/dbus_mainloop/e_dbus.q")
367 (for-each delete-file (find-files "efl" ".*\\.c$"))
368 (delete-file "efl/eo/efl.eo_api.h")
369 (copy-file "efl/dbus_mainloop/e_dbus.q" "efl/dbus_mainloop/e_dbus.c")
370 (delete-file "efl/dbus_mainloop/e_dbus.q")
372 (build-system python-build-system)
375 (modify-phases %standard-phases
378 (setenv "ENABLE_CYTHON" "1")
379 (invoke "python" "setup.py" "build")))
380 (add-before 'build 'set-flags
383 (string-append "-I" (assoc-ref %build-inputs "python-dbus")
384 "/include/dbus-1.0"))
386 (add-before 'check 'set-environment
388 ;; Some tests require write access to HOME.
389 (setenv "HOME" "/tmp")
390 ;; These tests try to connect to the internet.
391 (delete-file "tests/ecore/test_09_file_download.py")
392 (delete-file "tests/ecore/test_11_con.py")
395 `(("pkg-config" ,pkg-config)
396 ("python-cython" ,python-cython)))
399 ("python-dbus" ,python-dbus)))
400 (home-page "https://www.enlightenment.org/")
401 (synopsis "Python bindings for EFL")
403 "PYTHON-EFL are the python bindings for the whole Enlightenment Foundation
404 Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).")
405 (license license:lgpl3)))
407 (define-public python2-efl
408 (package-with-python2 python-efl))
417 (uri (string-append "https://download.enlightenment.org/rel/apps/edi/"
418 name "-" version ".tar.xz"))
421 "0iqkah327ms5m7k054hcik2l9v68i4mg9yy52brprfqpd5jk7pw8"))))
422 (build-system gnu-build-system)
425 (modify-phases %standard-phases
426 (add-after 'unpack 'set-home-directory
427 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
428 (lambda _ (setenv "HOME" "/tmp") #t)))
429 #:tests? #f)) ; tests require running dbus service
431 `(("pkg-config" ,pkg-config)))
435 (home-page "https://www.enlightenment.org/about-edi")
436 (synopsis "Development environment for Enlightenment")
437 (description "EDI is a development environment designed for and built using
438 the EFL. It's aim is to create a new, native development environment for Linux
439 that tries to lower the barrier to getting involved in Enlightenment development
440 and in creating applications based on the Enlightenment Foundation Library suite.")
441 (license (list license:public-domain ; data/extra/skeleton
442 license:gpl2)))) ; edi
450 (uri (pypi-uri "Lekha" version))
453 "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
454 (build-system python-build-system)
456 `(#:tests? #f ; no test target
459 (modify-phases %standard-phases
460 (add-after 'unpack 'fix-data-location
461 (lambda _ (substitute* "setup.py"
465 `(("python2-efl" ,python2-efl)
466 ("python2-pypdf2" ,python2-pypdf2)
467 ("python2-pyxdg" ,python2-pyxdg)))
468 (synopsis "Simple PDF viewer")
470 "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
471 (home-page "https://github.com/kaihu/lekha")
472 (license license:gpl3+)))
474 (define-public ephoto
481 (uri (list (string-append "http://www.smhouston.us/stuff/ephoto-"
483 (string-append "https://download.enlightenment.org/rel/"
484 "apps/ephoto/ephoto-" version ".tar.xz")))
487 "1q7v9abjp9jrs08xc7pqaac64yzax24dk1snjb9rciarzzh3mlzy"))))
488 (build-system gnu-build-system)
491 (modify-phases %standard-phases
492 (add-after 'unpack 'set-home-directory
493 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
494 (lambda _ (setenv "HOME" "/tmp") #t)))))
497 ("pkg-config" ,pkg-config)))
500 (home-page "http://smhouston.us/ephoto/")
501 (synopsis "EFL image viewer/editor/manipulator/slideshow creator")
502 (description "Ephoto is an image viewer and editor written using the
503 @dfn{Enlightenment Foundation Libraries} (EFL). It focuses on simplicity and
504 ease of use, while taking advantage of the speed and small footprint the EFL
507 Ephoto’s features include:
509 @item Browsing the file system and displaying images in an easy-to-use grid view.
510 @item Browsing images in a single image view format.
511 @item Viewing images in a slideshow.
512 @item Editing your image with features such as cropping, auto enhance,
513 blurring, sharpening, brightness/contrast/gamma adjustments, hue/saturation/value
514 adjustments, and color level adjustment.
515 @item Applying artistic filters to your image such as black and white and old
517 @item Drag And Drop along with file operations to easily maintain your photo
521 license:bsd-2 ; Ephoto's thumbnailing code