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, 2020 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 Nikita <nikita@n0.is>
6 ;;; Copyright © 2018, 2019, 2020 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 bittorrent)
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 "0ajwc8lmay5ai7nsrp778g393h0p4h98p4c22gic2w61fgkcd5fy"))))
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)
98 ("libxcomposite" ,libxcomposite)
99 ("libxcursor" ,libxcursor)
100 ("libxdamage" ,libxdamage)
101 ("libxdmcp" ,libxdmcp)
104 ("libxfixes" ,libxfixes)
105 ("libxinerama" ,libxinerama)
106 ("libxrandr" ,libxrandr)
107 ("libxrender" ,libxrender)
108 ("libxss" ,libxscrnsaver)
111 ("openjpeg" ,openjpeg)
113 ("util-linux" ,util-linux "lib")
114 ("wayland-protocols" ,wayland-protocols)))
116 ;; All these inputs are in package config files in section
122 ("fontconfig" ,fontconfig)
123 ("freetype" ,freetype)
126 ("harfbuzz" ,harfbuzz)
127 ("libinput" ,libinput-minimal)
128 ("libjpeg" ,libjpeg-turbo)
129 ("libsndfile" ,libsndfile)
132 ("libxkbcommon" ,libxkbcommon)
136 ("pulseaudio" ,pulseaudio)
140 `(#:configure-flags '("-Dsystemd=false"
142 "-Dembedded-lz4=false"
143 "-Devas-loaders-disabler=json"
144 "-Dbuild-examples=false"
145 "-Decore-imf-loaders-disabler=scim"
148 "-Dmount-path=/run/setuid-programs/mount"
149 "-Dunmount-path=/run/setuid-programs/umount"
150 ;(string-append "-Ddictionaries-hyphen-dir="
151 ; (assoc-ref %build-inputs "hyphen")
153 "-Dnetwork-backend=connman"
157 #:tests? #f ; Many tests fail due to timeouts and network requests.
159 (modify-phases %standard-phases
160 ;; If we don't hardcode the location of libcurl.so and others then we
161 ;; have to wrap the outputs of efl's dependencies in those libraries.
162 (add-after 'unpack 'hardcode-dynamic-libraries
163 (lambda* (#:key inputs #:allow-other-keys)
164 (let ((curl (assoc-ref inputs "curl"))
165 (pulse (assoc-ref inputs "pulseaudio"))
166 (sndfile (assoc-ref inputs "libsndfile"))
168 (substitute* "src/lib/ecore_con/ecore_con_url_curl.c"
169 (("libcurl.so.?" libcurl) ; libcurl.so.[45]
170 (string-append curl lib libcurl)))
171 (substitute* "src/lib/ecore_audio/ecore_audio.c"
172 (("libpulse.so.0" libpulse)
173 (string-append pulse lib libpulse))
174 (("libsndfile.so.1" libsnd)
175 (string-append sndfile lib libsnd)))
177 (add-after 'unpack 'fix-install-paths
179 (substitute* "dbus-services/meson.build"
181 "install_dir: join_paths(dir_data, 'dbus-1', 'services'))\n"))
182 (substitute* "src/tests/elementary/meson.build"
183 (("dir_data") "meson.source_root(), 'test-output'"))
185 (add-after 'unpack 'set-home-directory
186 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
187 (lambda _ (setenv "HOME" "/tmp") #t)))))
188 (home-page "https://www.enlightenment.org/about-efl")
189 (synopsis "Enlightenment Foundation Libraries")
191 "Enlightenment Foundation Libraries is a set of libraries developed
192 for Enlightenment. Libraries covers data serialization, wide support for
193 graphics rendering, UI layout and themes, interaction with OS, access to
194 removable devices or support for multimedia.")
195 ;; Different parts are under different licenses.
196 (license (list license:bsd-2 license:lgpl2.1 license:zlib))))
198 (define-public terminology
205 (string-append "https://download.enlightenment.org/rel/apps/"
206 "terminology/terminology-" version ".tar.xz"))
209 "1fxqjf7g30ix4qxi6366rrax27s3maxq43z2vakwnhz4mp49m9h4"))
210 (modules '((guix build utils)))
211 ;; Remove the bundled fonts.
214 (delete-file-recursively "data/fonts")
215 (substitute* "data/meson.build"
216 (("subdir\\('fonts'\\)") ""))
218 (build-system meson-build-system)
220 `(#:configure-flags (list "-Dtests=true"
221 (string-append "-Dedje-cc="
222 (assoc-ref %build-inputs "efl")
225 (modify-phases %standard-phases
226 (add-after 'unpack 'set-home-directory
227 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
228 (lambda _ (setenv "HOME" "/tmp") #t))
231 (with-directory-excursion
232 (string-append "../" ,name "-" ,version "/tests")
233 (invoke "sh" "run_tests.sh" "--verbose"
234 "-t" "../../build/src/bin/tytest"))))
235 (add-after 'install 'remove-test-binary
236 (lambda* (#:key outputs #:allow-other-keys)
237 ;; This file is not meant to be installed.
238 (delete-file (string-append (assoc-ref outputs "out")
242 `(("gettext" ,gettext-minimal)
244 ("pkg-config" ,pkg-config)))
247 (home-page "https://www.enlightenment.org/about-terminology")
248 (synopsis "Powerful terminal emulator based on EFL")
250 "Terminology is fast and feature rich terminal emulator. It is solely
251 based on Enlightenment Foundation Libraries. It supports multiple tabs, UTF-8,
252 URL and local path detection, themes, popup based content viewer for non-text
254 (license license:bsd-2)))
264 "https://download.enlightenment.org/rel/apps/rage/rage-"
268 "04fdk23bbgvni212zrfy4ndg7vmshbsjgicrhckdvhay87pk9i75"))))
269 (build-system meson-build-system)
272 (modify-phases %standard-phases
273 (add-after 'unpack 'set-home-directory
274 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
275 (lambda _ (setenv "HOME" "/tmp") #t)))))
277 `(("pkg-config" ,pkg-config)))
280 (home-page "https://www.enlightenment.org/about-rage")
281 (synopsis "Video and audio player based on EFL")
283 "Rage is a video and audio player written with Enlightenment Foundation
284 Libraries with some extra bells and whistles.")
285 (license license:bsd-2)))
287 (define-public enlightenment
289 (name "enlightenment")
294 (string-append "https://download.enlightenment.org/rel/apps/"
295 "enlightenment/enlightenment-" version ".tar.xz"))
298 "1wfz0rwwsx7c1mkswn4hc9xw1i6bsdirhxiycf7ha2vcipqy465y"))
299 (patches (search-patches "enlightenment-fix-setuid-path.patch"))))
300 (build-system meson-build-system)
303 (let ((efl (assoc-ref %build-inputs "efl")))
304 (list "-Dsystemd=false"
307 (string-append "-Dedje-cc=" efl "/bin/edje_cc")
308 (string-append "-Deldbus-codegen=" efl "/bin/eldbus-codegen")
309 (string-append "-Deet=" efl "/bin/eet")))
311 (modify-phases %standard-phases
312 (delete 'bootstrap) ; We don't want to run the autogen script.
313 (add-before 'configure 'set-system-actions
314 (lambda* (#:key inputs #:allow-other-keys)
315 (setenv "HOME" "/tmp")
316 (let ((xkeyboard (assoc-ref inputs "xkeyboard-config"))
317 (setxkbmap (assoc-ref inputs "setxkbmap"))
318 (libc (assoc-ref inputs "libc"))
319 (bc (assoc-ref inputs "bc"))
320 (efl (assoc-ref inputs "efl")))
321 ;; We need to patch the path to 'base.lst' to be able
322 ;; to switch the keyboard layout in E.
323 (substitute* (list "src/modules/xkbswitch/e_mod_parse.c"
324 "src/modules/wizard/page_011.c")
325 (("/usr/share/X11/xkb/rules/xorg.lst")
326 (string-append xkeyboard
327 "/share/X11/xkb/rules/base.lst")))
328 (substitute* "src/bin/e_xkb.c"
330 (string-append "\"" setxkbmap "/bin/setxkbmap \"")))
331 (substitute* (list "src/bin/e_intl.c"
332 "src/modules/conf_intl/e_int_config_intl.c"
333 "src/modules/wizard/page_010.c")
334 (("locale -a") (string-append libc "/bin/locale -a")))
335 (substitute* "src/modules/everything/evry_plug_apps.c"
337 (substitute* '("src/bin/e_sys_main.c"
338 "src/bin/e_util_suid.h")
339 (("PATH=/bin:/usr/bin:/sbin:/usr/sbin")
340 (string-append "PATH=/run/setuid-programs:"
341 "/run/current-system/profile/bin:"
342 "/run/current-system/profile/sbin")))
343 (substitute* "src/modules/everything/evry_plug_calc.c"
344 (("bc -l") (string-append bc "/bin/bc -l")))
345 (substitute* "data/etc/meson.build"
346 (("/bin/mount") "/run/setuid-programs/mount")
347 (("/bin/umount") "/run/setuid-programs/umount")
348 (("/usr/bin/eject") "/run/current-system/profile/bin/eject"))
349 (substitute* "src/bin/system/e_system_power.c"
350 (("systemctl") "loginctl"))
353 `(("gettext" ,gettext-minimal)
354 ("pkg-config" ,pkg-config)))
356 `(("alsa-lib" ,alsa-lib)
360 ("freetype" ,freetype)
363 ("linux-pam" ,linux-pam)
364 ("puleseaudio" ,pulseaudio)
365 ("setxkbmap" ,setxkbmap)
366 ("xcb-util-keysyms" ,xcb-util-keysyms)
367 ("xkeyboard-config" ,xkeyboard-config)
368 ("xorg-server-xwayland" ,xorg-server-xwayland)))
371 ("libxkbcommon" ,libxkbcommon)
372 ("wayland-protocols" ,wayland-protocols)))
373 (home-page "https://www.enlightenment.org/about-enlightenment")
374 (synopsis "Lightweight desktop environment")
376 "Enlightenment is resource friendly desktop environment with integrated
377 file manager, wide range of configuration options, plugin system allowing to
378 unload unused functionality, with support for touchscreen and suitable for
380 (license license:bsd-2)))
382 (define-public enlightenment-wayland
383 (deprecated-package "enlightenment-wayland" enlightenment))
385 (define-public python-efl
392 (uri (string-append "https://download.enlightenment.org/rel/bindings/"
393 "python/python-efl-" version ".tar.xz"))
396 "1vk1cdd959gia4a9qzyq56a9zw3lqf9ck66k8c9g3c631mp5cfpy"))
397 (modules '((guix build utils)))
398 ;; Remove files generated by Cython
401 (for-each (lambda (file)
402 (let ((generated-file
403 (string-append (string-drop-right file 3) "c")))
404 (when (file-exists? generated-file)
405 (delete-file generated-file))))
406 (find-files "efl" "\\.pyx$"))
407 (delete-file "efl/eo/efl.eo_api.h")
409 (build-system python-build-system)
412 (modify-phases %standard-phases
415 (setenv "ENABLE_CYTHON" "1")
416 (invoke "python" "setup.py" "build")))
417 (add-before 'build 'set-flags
420 (string-append "-I" (assoc-ref %build-inputs "python-dbus")
421 "/include/dbus-1.0"))
423 (add-before 'check 'set-environment
425 ;; Some tests require write access to HOME.
426 (setenv "HOME" "/tmp")
427 ;; These tests try to connect to the internet.
428 (delete-file "tests/ecore/test_09_file_download.py")
429 (delete-file "tests/ecore/test_11_con.py")
432 `(("pkg-config" ,pkg-config)
433 ("python-cython" ,python-cython)))
436 ("python-dbus" ,python-dbus)))
437 (home-page "https://www.enlightenment.org/")
438 (synopsis "Python bindings for EFL")
440 "PYTHON-EFL are the python bindings for the whole Enlightenment Foundation
441 Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).")
442 (license license:lgpl3)))
444 (define-public python2-efl
445 (package-with-python2 python-efl))
454 (uri (string-append "https://github.com/Enlightenment/edi/releases/"
455 "download/v" version "/edi-" version ".tar.xz"))
458 "01k8gp8r2wa6pyg3dkbm35m6hdsbss06hybghg0qjmd4mzswcd3a"))))
459 (build-system meson-build-system)
462 (modify-phases %standard-phases
463 (add-after 'unpack 'fix-clang-header
465 (substitute* "scripts/clang_include_dir.sh"
466 (("grep clang") "grep clang | head -n1"))
468 (add-after 'unpack 'set-home-directory
469 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
470 (lambda _ (setenv "HOME" "/tmp") #t)))
471 #:tests? #f)) ; tests require running dbus service
474 ("gettext" ,gettext-minimal)
475 ("pkg-config" ,pkg-config)))
479 (home-page "https://www.enlightenment.org/about-edi")
480 (synopsis "Development environment for Enlightenment")
481 (description "EDI is a development environment designed for and built using
482 the EFL. It's aim is to create a new, native development environment for Linux
483 that tries to lower the barrier to getting involved in Enlightenment development
484 and in creating applications based on the Enlightenment Foundation Library suite.")
485 (license (list license:public-domain ; data/extra/skeleton
487 license:gpl3)))) ; data/extra/examples/images/mono-runtime.png
495 (uri (pypi-uri "Lekha" version))
498 "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
499 (build-system python-build-system)
501 `(#:tests? #f ; no test target
504 (modify-phases %standard-phases
505 (add-after 'unpack 'fix-data-location
506 (lambda _ (substitute* "setup.py"
510 `(("python2-efl" ,python2-efl)
511 ("python2-pypdf2" ,python2-pypdf2)
512 ("python2-pyxdg" ,python2-pyxdg)))
513 (synopsis "Simple PDF viewer")
515 "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
516 (home-page "https://github.com/kaihu/lekha")
517 (license license:gpl3+)))
519 (define-public ephoto
526 (uri (string-append "https://download.enlightenment.org/rel/"
527 "apps/ephoto/ephoto-" version ".tar.xz"))
529 (base32 "1q7v9abjp9jrs08xc7pqaac64yzax24dk1snjb9rciarzzh3mlzy"))))
530 (build-system gnu-build-system)
533 (modify-phases %standard-phases
534 (add-after 'unpack 'set-home-directory
535 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
536 (lambda _ (setenv "HOME" "/tmp") #t)))))
539 ("pkg-config" ,pkg-config)))
542 (home-page "https://smhouston.us/projects/ephoto/")
543 (synopsis "EFL image viewer/editor/manipulator/slideshow creator")
544 (description "Ephoto is an image viewer and editor written using the
545 @dfn{Enlightenment Foundation Libraries} (EFL). It focuses on simplicity and
546 ease of use, while taking advantage of the speed and small footprint the EFL
549 Ephoto’s features include:
551 @item Browsing the file system and displaying images in an easy-to-use grid view.
552 @item Browsing images in a single image view format.
553 @item Viewing images in a slideshow.
554 @item Editing your image with features such as cropping, auto enhance,
555 blurring, sharpening, brightness/contrast/gamma adjustments, hue/saturation/value
556 adjustments, and color level adjustment.
557 @item Applying artistic filters to your image such as black and white and old
559 @item Drag And Drop along with file operations to easily maintain your photo
563 license:bsd-2 ; Ephoto's thumbnailing code
566 (define-public evisum
573 (uri (string-append "https://download.enlightenment.org/rel/apps/"
574 "evisum/evisum-" version ".tar.xz"))
576 (base32 "1ip3w2d476g45sivqvm1madfyqmkni9q2i99qqxk53859jgs91pa"))))
577 (build-system meson-build-system)
579 '(#:tests? #f)) ; no tests
581 `(("pkg-config" ,pkg-config)))
584 (home-page "https://www.enlightenment.org")
585 (synopsis "EFL process viewer")
587 "This is a process monitor and system monitor using the
588 @dfn{Enlightenment Foundation Libraries} (EFL).")
589 (license license:bsd-2)))
598 (uri (string-append "https://download.enlightenment.org/rel/apps/epour"
599 "/epour-" version ".tar.xz"))
602 "0g9f9p01hsq6dcf4cs1pwq95g6fpkyjgwqlvdjk1km1i5gj5ygqw"))))
603 (build-system python-build-system)
605 `(#:tests? #f ; no test target
608 (modify-phases %standard-phases
609 (add-after 'unpack 'find-theme-dir
610 (lambda* (#:key outputs #:allow-other-keys)
611 (let ((out (assoc-ref outputs "out")))
612 (substitute* "epour/gui/__init__.py"
613 (("join\\(data_path")
614 (string-append "join(\"" out "/share/epour\"")))
617 `(("intltool" ,intltool)
618 ("python-distutils-extra" ,python-distutils-extra)))
620 `(("libtorrent-rasterbar" ,libtorrent-rasterbar)
621 ("python-dbus" ,python-dbus)
622 ("python-efl" ,python-efl)
623 ("python-pyxdg" ,python-pyxdg)))
624 (home-page "https://www.enlightenment.org")
625 (synopsis "EFL Bittorrent client")
626 (description "Epour is a BitTorrent client based on the @dfn{Enlightenment
627 Foundation Libraries} (EFL) and rb-libtorrent.")
628 (license license:gpl3+)))