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 utils)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system meson)
31 #:use-module (guix build-system python)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages algebra)
34 #:use-module (gnu packages avahi)
35 #:use-module (gnu packages bash)
36 #:use-module (gnu packages check)
37 #:use-module (gnu packages code)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages curl)
40 #:use-module (gnu packages fontutils)
41 #:use-module (gnu packages freedesktop)
42 #:use-module (gnu packages fribidi)
43 #:use-module (gnu packages game-development)
44 #:use-module (gnu packages gettext)
45 #:use-module (gnu packages ghostscript)
46 #:use-module (gnu packages gl)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages gstreamer)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages ibus)
52 #:use-module (gnu packages image)
53 #:use-module (gnu packages linux)
54 #:use-module (gnu packages llvm)
55 #:use-module (gnu packages lua)
56 #:use-module (gnu packages pdf)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages photo)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages pulseaudio)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages python-xyz)
63 #:use-module (gnu packages tls)
64 #:use-module (gnu packages video)
65 #:use-module (gnu packages xdisorg)
66 #:use-module (gnu packages xorg)
67 #:use-module (ice-9 match))
76 "https://download.enlightenment.org/rel/libs/efl/efl-"
80 "00b9lp3h65254kdb1ys15fv7p3ln7qsvf15jkw4kli5ymagadkjk"))))
81 (build-system meson-build-system)
84 ("gettext" ,gettext-minimal)
85 ("pkg-config" ,pkg-config)))
89 ("gstreamer" ,gstreamer)
90 ("gst-plugins-base" ,gst-plugins-base)
95 ("libspectre" ,libspectre)
97 ("libxcomposite" ,libxcomposite)
98 ("libxcursor" ,libxcursor)
99 ("libxdamage" ,libxdamage)
100 ("libxdmcp" ,libxdmcp)
103 ("libxfixes" ,libxfixes)
104 ("libxinerama" ,libxinerama)
106 ("libxrandr" ,libxrandr)
107 ("libxrender" ,libxrender)
108 ("libxss" ,libxscrnsaver)
111 ("wayland-protocols" ,wayland-protocols)))
113 ;; All these inputs are in package config files in section
120 ("fontconfig" ,fontconfig)
121 ("freetype" ,freetype)
124 ("harfbuzz" ,harfbuzz)
126 ("libinput" ,libinput-minimal)
127 ("libjpeg" ,libjpeg-turbo)
129 ("libsndfile" ,libsndfile)
133 ("libxkbcommon" ,libxkbcommon)
136 ("pulseaudio" ,pulseaudio)
137 ("util-linux" ,util-linux "lib")
141 `(#:configure-flags '("-Dsystemd=false"
142 "-Dembedded-lz4=false"
143 "-Devas-loaders-disabler=json"
144 "-Dbuild-examples=false"
145 ;(string-append "-Ddictionaries-hyphen-dir="
146 ; (assoc-ref %build-inputs "hyphen")
149 "-Dnetwork-backend=connman"
150 ,@(match (%current-system)
156 "-Dwl-deprecated=true" ; ecore_wayland
157 "-Ddrm-deprecated=true" ; ecore_drm
160 #:tests? #f ; Many tests fail due to timeouts and network requests.
162 (modify-phases %standard-phases
163 ;; If we don't hardcode the location of libcurl.so then we
164 ;; have to wrap the outputs of efl's dependencies in curl.
165 (add-after 'unpack 'hardcode-libcurl-location
166 (lambda* (#:key inputs #:allow-other-keys)
167 (let* ((curl (assoc-ref inputs "curl"))
168 (lib (string-append curl "/lib/")))
169 (substitute* "src/lib/ecore_con/ecore_con_url_curl.c"
170 (("libcurl.so.?" libcurl) ; libcurl.so.[45]
171 (string-append lib libcurl)))
173 (add-after 'unpack 'fix-install-paths
175 (substitute* "dbus-services/meson.build"
177 "install_dir: join_paths(dir_data, 'dbus-1', 'services'))\n"))
178 (substitute* "src/tests/elementary/meson.build"
179 (("dir_data") "meson.source_root(), 'test-output'"))
181 (add-after 'unpack 'set-home-directory
182 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
183 (lambda _ (setenv "HOME" "/tmp") #t)))))
184 (home-page "https://www.enlightenment.org/about-efl")
185 (synopsis "Enlightenment Foundation Libraries")
187 "Enlightenment Foundation Libraries is a set of libraries developed
188 for Enlightenment. Libraries covers data serialization, wide support for
189 graphics rendering, UI layout and themes, interaction with OS, access to
190 removable devices or support for multimedia.")
191 ;; Different parts are under different licenses.
192 (license (list license:bsd-2 license:lgpl2.1 license:zlib))))
194 (define-public terminology
201 (string-append "https://download.enlightenment.org/rel/apps/"
202 "terminology/terminology-" version ".tar.xz"))
205 "0xxx4xyhis6fy3frgb34ip0aj0kc4zashf60gzbxmq5gadbb0p5r"))
206 (modules '((guix build utils)))
207 ;; Remove the bundled fonts.
210 (delete-file-recursively "data/fonts")
211 (substitute* "data/meson.build"
212 (("subdir\\('fonts'\\)") ""))
214 (build-system meson-build-system)
216 `(#:configure-flags (list "-Dtests=true"
217 (string-append "-Dedje-cc="
218 (assoc-ref %build-inputs "efl")
221 (modify-phases %standard-phases
222 (add-after 'unpack 'set-home-directory
223 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
224 (lambda _ (setenv "HOME" "/tmp") #t))
227 (with-directory-excursion
228 (string-append "../" ,name "-" ,version "/tests")
229 (invoke "sh" "run_tests.sh" "--verbose"
230 "-t" "../../build/src/bin/tytest"))))
231 (add-after 'install 'remove-test-binary
232 (lambda* (#:key outputs #:allow-other-keys)
233 ;; This file is not meant to be installed.
234 (delete-file (string-append (assoc-ref outputs "out")
238 `(("gettext" ,gettext-minimal)
240 ("pkg-config" ,pkg-config)))
243 (home-page "https://www.enlightenment.org/about-terminology")
244 (synopsis "Powerful terminal emulator based on EFL")
246 "Terminology is fast and feature rich terminal emulator. It is solely
247 based on Enlightenment Foundation Libraries. It supports multiple tabs, UTF-8,
248 URL and local path detection, themes, popup based content viewer for non-text
250 (license license:bsd-2)))
260 "https://download.enlightenment.org/rel/apps/rage/rage-"
264 "04fdk23bbgvni212zrfy4ndg7vmshbsjgicrhckdvhay87pk9i75"))))
265 (build-system meson-build-system)
268 (modify-phases %standard-phases
269 (add-after 'unpack 'set-home-directory
270 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
271 (lambda _ (setenv "HOME" "/tmp") #t)))))
273 `(("pkg-config" ,pkg-config)))
276 (home-page "https://www.enlightenment.org/about-rage")
277 (synopsis "Video and audio player based on EFL")
279 "Rage is a video and audio player written with Enlightenment Foundation
280 Libraries with some extra bells and whistles.")
281 (license license:bsd-2)))
283 (define-public enlightenment
285 (name "enlightenment")
290 (string-append "https://download.enlightenment.org/rel/apps/"
291 "enlightenment/enlightenment-" version ".tar.xz"))
294 "0d1cyl07w9pvi2pf029kablazks2q9aislzl46b6fq5m1465jc75"))
295 (patches (search-patches "enlightenment-fix-setuid-path.patch"))))
296 (build-system meson-build-system)
298 `(#:configure-flags '("-Dsystemd=false")
300 (modify-phases %standard-phases
301 (delete 'bootstrap) ; We don't want to run the autogen script.
302 (add-after 'unpack 'fix-dot-desktop-creation
304 (substitute* "data/session/meson.build"
305 (("HAVE_WAYLAND'.*") "HAVE_WAYLAND') == true\n"))
307 (add-before 'configure 'set-system-actions
308 (lambda* (#:key inputs #:allow-other-keys)
309 (setenv "HOME" "/tmp")
310 (let ((xkeyboard (assoc-ref inputs "xkeyboard-config"))
311 (setxkbmap (assoc-ref inputs "setxkbmap"))
312 (utils (assoc-ref inputs "util-linux"))
313 (libc (assoc-ref inputs "libc"))
314 (bluez (assoc-ref inputs "bluez"))
315 (bc (assoc-ref inputs "bc"))
316 (efl (assoc-ref inputs "efl")))
317 ;; We need to patch the path to 'base.lst' to be able
318 ;; to switch the keyboard layout in E.
319 (substitute* (list "src/modules/xkbswitch/e_mod_parse.c"
320 "src/modules/wizard/page_011.c")
321 (("/usr/share/X11/xkb/rules/xorg.lst")
322 (string-append xkeyboard
323 "/share/X11/xkb/rules/base.lst")))
324 (substitute* "src/bin/e_xkb.c"
326 (string-append "\"" setxkbmap "/bin/setxkbmap \"")))
327 (substitute* (list "src/bin/e_intl.c"
328 "src/modules/conf_intl/e_int_config_intl.c"
329 "src/modules/wizard/page_010.c")
330 (("locale -a") (string-append libc "/bin/locale -a")))
331 (substitute* "src/bin/e_import_config_dialog.c"
332 (("%s/edje_cc -v %s %s %s\", e_prefix_bin_get\\(\\)")
333 (string-append efl "/bin/edje_cc -v %s %s %s\"")))
334 (substitute* "src/modules/everything/evry_plug_apps.c"
336 (substitute* "src/modules/everything/evry_plug_calc.c"
337 (("bc -l") (string-append bc "/bin/bc -l")))
338 (substitute* "data/etc/meson.build"
339 (("/bin/mount") "/run/setuid-programs/mount")
340 (("/bin/umount") "/run/setuid-programs/umount")
341 (("/usr/bin/eject") (string-append utils "/bin/eject"))
342 (("/usr/bin/l2ping") (string-append bluez "/bin/l2ling"))
343 (("/bin/rfkill") (string-append utils "/sbin/rfkill"))
344 (("SUSPEND = ''") "SUSPEND = '/run/current-system/profile/bin/loginctl suspend'")
345 (("HIBERNATE = ''") "HIBERNATE = '/run/current-system/profile/bin/loginctl hibernate'")
346 (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now")
347 (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now"))
350 `(("gettext" ,gettext-minimal)
351 ("pkg-config" ,pkg-config)
352 ("util-linux" ,util-linux)))
354 `(("alsa-lib" ,alsa-lib)
359 ("freetype" ,freetype)
362 ("linux-pam" ,linux-pam)
363 ("puleseaudio" ,pulseaudio)
364 ("setxkbmap" ,setxkbmap)
365 ("xcb-util-keysyms" ,xcb-util-keysyms)
366 ("xkeyboard-config" ,xkeyboard-config)))
367 (home-page "https://www.enlightenment.org/about-enlightenment")
368 (synopsis "Lightweight desktop environment")
370 "Enlightenment is resource friendly desktop environment with integrated
371 file manager, wide range of configuration options, plugin system allowing to
372 unload unused functionality, with support for touchscreen and suitable for
374 (license license:bsd-2)))
376 (define-public enlightenment-wayland
378 (inherit enlightenment)
379 (name "enlightenment-wayland")
381 (substitute-keyword-arguments (package-arguments enlightenment)
382 ((#:configure-flags flags)
383 `(cons* "-Dwl=true" ,flags))))
385 `(("wayland-protocols" ,wayland-protocols)
386 ("xorg-server-xwayland" ,xorg-server-xwayland)
387 ,@(package-inputs enlightenment)))))
389 (define-public python-efl
396 (uri (string-append "https://download.enlightenment.org/rel/bindings/"
397 "python/python-efl-" version ".tar.xz"))
400 "16yn6a1b9167nfmryyi44ma40m20ansfpwgrvqzfvwix7qaz9pib"))
401 (modules '((guix build utils)))
402 ;; Remove files generated by Cython
405 (copy-file "efl/dbus_mainloop/e_dbus.c" "efl/dbus_mainloop/e_dbus.q")
406 (for-each delete-file (find-files "efl" ".*\\.c$"))
407 (delete-file "efl/eo/efl.eo_api.h")
408 (copy-file "efl/dbus_mainloop/e_dbus.q" "efl/dbus_mainloop/e_dbus.c")
409 (delete-file "efl/dbus_mainloop/e_dbus.q")
411 (build-system python-build-system)
414 (modify-phases %standard-phases
417 (setenv "ENABLE_CYTHON" "1")
418 (invoke "python" "setup.py" "build")))
419 (add-before 'build 'set-flags
422 (string-append "-I" (assoc-ref %build-inputs "python-dbus")
423 "/include/dbus-1.0"))
425 (add-before 'check 'set-environment
427 ;; Some tests require write access to HOME.
428 (setenv "HOME" "/tmp")
429 ;; These tests try to connect to the internet.
430 (delete-file "tests/ecore/test_09_file_download.py")
431 (delete-file "tests/ecore/test_11_con.py")
434 `(("pkg-config" ,pkg-config)
435 ("python-cython" ,python-cython)))
438 ("python-dbus" ,python-dbus)))
439 (home-page "https://www.enlightenment.org/")
440 (synopsis "Python bindings for EFL")
442 "PYTHON-EFL are the python bindings for the whole Enlightenment Foundation
443 Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).")
444 (license license:lgpl3)))
446 (define-public python2-efl
447 (package-with-python2 python-efl))
456 (uri (string-append "https://github.com/Enlightenment/edi/releases/"
457 "download/v" version "/edi-" version ".tar.xz"))
460 "01k8gp8r2wa6pyg3dkbm35m6hdsbss06hybghg0qjmd4mzswcd3a"))))
461 (build-system meson-build-system)
464 (modify-phases %standard-phases
465 (add-after 'unpack 'fix-clang-header
467 (substitute* "scripts/clang_include_dir.sh"
468 (("grep clang") "grep clang | head -n1"))
470 (add-after 'unpack 'set-home-directory
471 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
472 (lambda _ (setenv "HOME" "/tmp") #t)))
473 #:tests? #f)) ; tests require running dbus service
476 ("gettext" ,gettext-minimal)
477 ("pkg-config" ,pkg-config)))
481 (home-page "https://www.enlightenment.org/about-edi")
482 (synopsis "Development environment for Enlightenment")
483 (description "EDI is a development environment designed for and built using
484 the EFL. It's aim is to create a new, native development environment for Linux
485 that tries to lower the barrier to getting involved in Enlightenment development
486 and in creating applications based on the Enlightenment Foundation Library suite.")
487 (license (list license:public-domain ; data/extra/skeleton
489 license:gpl3)))) ; data/extra/examples/images/mono-runtime.png
497 (uri (pypi-uri "Lekha" version))
500 "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
501 (build-system python-build-system)
503 `(#:tests? #f ; no test target
506 (modify-phases %standard-phases
507 (add-after 'unpack 'fix-data-location
508 (lambda _ (substitute* "setup.py"
512 `(("python2-efl" ,python2-efl)
513 ("python2-pypdf2" ,python2-pypdf2)
514 ("python2-pyxdg" ,python2-pyxdg)))
515 (synopsis "Simple PDF viewer")
517 "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
518 (home-page "https://github.com/kaihu/lekha")
519 (license license:gpl3+)))
521 (define-public ephoto
528 (uri (string-append "https://download.enlightenment.org/rel/"
529 "apps/ephoto/ephoto-" version ".tar.xz"))
531 (base32 "1q7v9abjp9jrs08xc7pqaac64yzax24dk1snjb9rciarzzh3mlzy"))))
532 (build-system gnu-build-system)
535 (modify-phases %standard-phases
536 (add-after 'unpack 'set-home-directory
537 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
538 (lambda _ (setenv "HOME" "/tmp") #t)))))
541 ("pkg-config" ,pkg-config)))
544 (home-page "https://smhouston.us/projects/ephoto/")
545 (synopsis "EFL image viewer/editor/manipulator/slideshow creator")
546 (description "Ephoto is an image viewer and editor written using the
547 @dfn{Enlightenment Foundation Libraries} (EFL). It focuses on simplicity and
548 ease of use, while taking advantage of the speed and small footprint the EFL
551 Ephoto’s features include:
553 @item Browsing the file system and displaying images in an easy-to-use grid view.
554 @item Browsing images in a single image view format.
555 @item Viewing images in a slideshow.
556 @item Editing your image with features such as cropping, auto enhance,
557 blurring, sharpening, brightness/contrast/gamma adjustments, hue/saturation/value
558 adjustments, and color level adjustment.
559 @item Applying artistic filters to your image such as black and white and old
561 @item Drag And Drop along with file operations to easily maintain your photo
565 license:bsd-2 ; Ephoto's thumbnailing code
568 (define-public evisum
575 (uri (string-append "https://download.enlightenment.org/rel/apps/"
576 "evisum/evisum-" version ".tar.xz"))
579 "0gh3y2348pgf683sljnfry9k545h42dx75idyigcspsjsk7khisz"))))
580 (build-system meson-build-system)
582 '(#:tests? #f)) ; no tests
584 `(("pkg-config" ,pkg-config)))
587 (home-page "https://www.enlightenment.org")
588 (synopsis "EFL process viewer")
590 "This is a process monitor and system monitor using the
591 @dfn{Enlightenment Foundation Libraries} (EFL).")
592 (license license:bsd-2)))