gnu: python-jupyter-console: Update to 6.0.0.
[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, 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>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
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.
15 ;;;
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.
20 ;;;
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/>.
23
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))
64
65 (define-public efl
66 (package
67 (name "efl")
68 (version "1.22.2")
69 (source (origin
70 (method url-fetch)
71 (uri (string-append
72 "https://download.enlightenment.org/rel/libs/efl/efl-"
73 version ".tar.xz"))
74 (sha256
75 (base32
76 "1l0wdgzxqm2y919277b1p9d37xzg808zwxxaw0nn44arh8gqk68n"))))
77 (outputs '("out" ; 53 MB
78 "include")) ; 21 MB
79 (build-system gnu-build-system)
80 (native-inputs
81 `(("pkg-config" ,pkg-config)))
82 (inputs
83 `(("alsa-lib" ,alsa-lib)
84 ("curl" ,curl)
85 ("ghostscript" ,ghostscript)
86 ("giflib" ,giflib)
87 ("gstreamer" ,gstreamer)
88 ("gst-plugins-base" ,gst-plugins-base)
89 ("libexif" ,libexif)
90 ("libjpeg" ,libjpeg)
91 ("libraw" ,libraw)
92 ("librsvg" ,librsvg)
93 ("libsndfile" ,libsndfile)
94 ("libspectre" ,libspectre)
95 ("libtiff" ,libtiff)
96 ("libwebp" ,libwebp)
97 ("libx11" ,libx11)
98 ("libxau" ,libxau)
99 ("libxcomposite" ,libxcomposite)
100 ("libxcursor" ,libxcursor)
101 ("libxdamage" ,libxdamage)
102 ("libxdmcp" ,libxdmcp)
103 ("libxext" ,libxext)
104 ("libxi" ,libxi)
105 ("libxfixes" ,libxfixes)
106 ("libxinerama" ,libxinerama)
107 ("libxp" ,libxp)
108 ("libxrandr" ,libxrandr)
109 ("libxrender" ,libxrender)
110 ("libxscrnsaver" ,libxscrnsaver)
111 ("libxtst" ,libxtst)
112 ("lz4" ,lz4)
113 ("openjpeg" ,openjpeg-1)
114 ("poppler" ,poppler)
115 ("printproto" ,printproto)
116 ("pulseaudio" ,pulseaudio)
117 ("wayland-protocols" ,wayland-protocols)
118 ("xinput" ,xinput)
119 ("xpr" ,xpr)
120 ("xorgproto" ,xorgproto)))
121 (propagated-inputs
122 ;; All these inputs are in package config files in section
123 ;; Requires.private.
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
141 (arguments
142 `(#:configure-flags '("--disable-silent-rules"
143 "--disable-systemd"
144 "--with-profile=release"
145 "--enable-liblz4"
146 "--enable-xinput22"
147 "--enable-image-loader-webp"
148 "--enable-multisense"
149 ,@(match (%current-system)
150 ("armhf-linux"
151 '("--with-opengl=es" "--with-egl"))
152 (_
153 '("--with-opengl=full")))
154 "--enable-harfbuzz"
155 ;; for wayland
156 "--enable-wayland"
157 "--enable-elput"
158 "--enable-drm")
159 #:phases
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)))
170 #t)))
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")
176 (description
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))))
183
184 (define-public terminology
185 (package
186 (name "terminology")
187 (version "1.4.1")
188 (source (origin
189 (method url-fetch)
190 (uri
191 (string-append "https://download.enlightenment.org/rel/apps/"
192 "terminology/terminology-" version ".tar.xz"))
193 (sha256
194 (base32
195 "0mm9v5a94369is3kaarnr3a28wy42wslzi1mcisaidlcldgv7f6p"))
196 (modules '((guix build utils)))
197 ;; Remove the bundled fonts.
198 (snippet
199 '(begin
200 (delete-file-recursively "data/fonts")
201 (substitute* "data/meson.build"
202 (("subdir\\('fonts'\\)") ""))
203 #t))))
204 (build-system meson-build-system)
205 (arguments
206 `(#:configure-flags (list "-Dtests=true"
207 (string-append "-Dedje-cc="
208 (assoc-ref %build-inputs "efl")
209 "/bin/edje_cc"))
210 #:phases
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))
215 (replace 'check
216 (lambda _
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")
225 "/bin/tytest"))
226 #t)))))
227 (native-inputs
228 `(("gettext" ,gettext-minimal)
229 ("perl" ,perl)
230 ("pkg-config" ,pkg-config)))
231 (inputs
232 `(("efl" ,efl)))
233 (home-page "https://www.enlightenment.org/about-terminology")
234 (synopsis "Powerful terminal emulator based on EFL")
235 (description
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
239 contents and more.")
240 (license license:bsd-2)))
241
242 (define-public rage
243 (package
244 (name "rage")
245 (version "0.3.0")
246 (source (origin
247 (method url-fetch)
248 (uri
249 (string-append
250 "https://download.enlightenment.org/rel/apps/rage/rage-"
251 version ".tar.xz"))
252 (sha256
253 (base32
254 "0gfzdd4jg78bkmj61yg49w7bzspl5m1nh6agqgs8k7qrq9q26xqy"))))
255 (build-system meson-build-system)
256 (arguments
257 '(#:phases
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)))))
262 (native-inputs
263 `(("pkg-config" ,pkg-config)))
264 (inputs
265 `(("efl" ,efl)))
266 (home-page "https://www.enlightenment.org/about-rage")
267 (synopsis "Video and audio player based on EFL")
268 (description
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)))
272
273 (define-public enlightenment
274 (package
275 (name "enlightenment")
276 (version "0.22.4")
277 (source (origin
278 (method url-fetch)
279 (uri
280 (string-append "https://download.enlightenment.org/rel/apps/"
281 name "/" name "-" version ".tar.xz"))
282 (sha256
283 (base32
284 "0ygy891rrw5c7lhk539nhif77j88phvz2h0fhx172iaridy9kx2r"))
285 (patches (search-patches "enlightenment-fix-setuid-path.patch"))))
286 (build-system gnu-build-system)
287 (arguments
288 `(#:phases
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"
306 (("\"setxkbmap \"")
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"
316 (("/usr/bin/") ""))
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"))
325 #t))))))
326 (native-inputs
327 `(("gettext" ,gettext-minimal)
328 ("pkg-config" ,pkg-config)
329 ("util-linux" ,util-linux)))
330 (inputs
331 `(("alsa-lib" ,alsa-lib)
332 ("dbus" ,dbus)
333 ("efl" ,efl)
334 ("freetype" ,freetype)
335 ("libxcb" ,libxcb)
336 ("libxext" ,libxext)
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")
343 (description
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
347 embedded systems.")
348 (license license:bsd-2)))
349
350 (define-public python-efl
351 (package
352 (name "python-efl")
353 (version "1.22.0")
354 (source
355 (origin
356 (method url-fetch)
357 (uri (string-append "https://download.enlightenment.org/rel/bindings/"
358 "python/python-efl-" version ".tar.xz"))
359 (sha256
360 (base32
361 "1qhy63c3fs2bxkx2np5z14hyxbr12ii030crsjnhpbyw3mic0s63"))
362 (modules '((guix build utils)))
363 ;; Remove files generated by Cython
364 (snippet
365 '(begin
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")
371 #t))))
372 (build-system python-build-system)
373 (arguments
374 '(#:phases
375 (modify-phases %standard-phases
376 (replace 'build
377 (lambda _
378 (setenv "ENABLE_CYTHON" "1")
379 (invoke "python" "setup.py" "build")))
380 (add-before 'build 'set-flags
381 (lambda _
382 (setenv "CFLAGS"
383 (string-append "-I" (assoc-ref %build-inputs "python-dbus")
384 "/include/dbus-1.0"))
385 #t))
386 (add-before 'check 'set-environment
387 (lambda _
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")
393 #t)))))
394 (native-inputs
395 `(("pkg-config" ,pkg-config)
396 ("python-cython" ,python-cython)))
397 (inputs
398 `(("efl" ,efl)
399 ("python-dbus" ,python-dbus)))
400 (home-page "https://www.enlightenment.org/")
401 (synopsis "Python bindings for EFL")
402 (description
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)))
406
407 (define-public python2-efl
408 (package-with-python2 python-efl))
409
410 (define-public edi
411 (package
412 (name "edi")
413 (version "0.6.0")
414 (source
415 (origin
416 (method url-fetch)
417 (uri (string-append "https://download.enlightenment.org/rel/apps/edi/"
418 name "-" version ".tar.xz"))
419 (sha256
420 (base32
421 "0iqkah327ms5m7k054hcik2l9v68i4mg9yy52brprfqpd5jk7pw8"))))
422 (build-system gnu-build-system)
423 (arguments
424 '(#:phases
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
430 (native-inputs
431 `(("pkg-config" ,pkg-config)))
432 (inputs
433 `(("clang" ,clang)
434 ("efl" ,efl)))
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
443
444 (define-public lekha
445 (package
446 (name "lekha")
447 (version "0.2.1")
448 (source (origin
449 (method url-fetch)
450 (uri (pypi-uri "Lekha" version))
451 (sha256
452 (base32
453 "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
454 (build-system python-build-system)
455 (arguments
456 `(#:tests? #f ; no test target
457 #:python ,python-2
458 #:phases
459 (modify-phases %standard-phases
460 (add-after 'unpack 'fix-data-location
461 (lambda _ (substitute* "setup.py"
462 (("'/usr/")"'"))
463 #t)))))
464 (propagated-inputs
465 `(("python2-efl" ,python2-efl)
466 ("python2-pypdf2" ,python2-pypdf2)
467 ("python2-pyxdg" ,python2-pyxdg)))
468 (synopsis "Simple PDF viewer")
469 (description
470 "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
471 (home-page "https://github.com/kaihu/lekha")
472 (license license:gpl3+)))
473
474 (define-public ephoto
475 (package
476 (name "ephoto")
477 (version "1.5")
478 (source
479 (origin
480 (method url-fetch)
481 (uri (list (string-append "http://www.smhouston.us/stuff/ephoto-"
482 version ".tar.xz")
483 (string-append "https://download.enlightenment.org/rel/"
484 "apps/ephoto/ephoto-" version ".tar.xz")))
485 (sha256
486 (base32
487 "1q7v9abjp9jrs08xc7pqaac64yzax24dk1snjb9rciarzzh3mlzy"))))
488 (build-system gnu-build-system)
489 (arguments
490 '(#:phases
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)))))
495 (native-inputs
496 `(("check" ,check)
497 ("pkg-config" ,pkg-config)))
498 (inputs
499 `(("efl" ,efl)))
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
505 provide.
506
507 Ephoto’s features include:
508 @enumerate
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
516 photo.
517 @item Drag And Drop along with file operations to easily maintain your photo
518 directories.
519 @end enumerate\n")
520 (license (list
521 license:bsd-2 ; Ephoto's thumbnailing code
522 license:bsd-3))))