gnu: calibre: Remove unrar test.
[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 ng0 <ng0@n0.is>
6 ;;; Copyright © 2018 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.21.1")
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 (patches (search-patches "efl-mesa-compat.patch"))
75 (sha256
76 (base32
77 "0a5907h896pvpix7a6idc2fspzy6d78xrzf84k8y9fyvnd14nxs4"))))
78 (outputs '("out" ; 49 MB
79 "include")) ; 17 MB
80 (build-system gnu-build-system)
81 (native-inputs
82 `(("pkg-config" ,pkg-config)))
83 (inputs
84 `(("alsa-lib" ,alsa-lib)
85 ("curl" ,curl)
86 ("ghostscript" ,ghostscript)
87 ("giflib" ,giflib)
88 ("gstreamer" ,gstreamer)
89 ("gst-plugins-base" ,gst-plugins-base)
90 ("libexif" ,libexif)
91 ("libjpeg" ,libjpeg)
92 ("libraw" ,libraw)
93 ("librsvg" ,librsvg)
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 ("wayland-protocols" ,wayland-protocols)
117 ("xinput" ,xinput)
118 ("xpr" ,xpr)
119 ("xorgproto" ,xorgproto)))
120 (propagated-inputs
121 ;; All these inputs are in package config files in section
122 ;; Requires.private.
123 `(("bullet" ,bullet) ; ephysics.pc
124 ("dbus" ,dbus) ; eldbus.pc, elementary.pc, elocation.pc, ethumb_client.pc
125 ("eudev" ,eudev) ; eeze.pc
126 ("fontconfig" ,fontconfig) ; evas.pc, evas-cxx.pc
127 ("freetype" ,freetype) ; evas.pc, evas-cxx.pc
128 ("fribidi" ,fribidi) ; evas.pc, evas-cxx.pc
129 ("glib" ,glib) ; ecore.pc, ecore-cxx.pc
130 ("harfbuzz" ,harfbuzz) ; evas.pc, evas-cxx.pc
131 ("luajit" ,luajit) ; elua.pc, evas.pc, evas-cxx.pc
132 ("libinput" ,libinput-minimal) ; elput.pc
133 ("libpng" ,libpng) ; evas.pc, evas-cxx.pc
134 ("libsndfile" ,libsndfile) ; ecore-audio.pc, ecore-audio-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 ("pulseaudio" ,pulseaudio) ; ecore-audio.pc, ecore-audio-cxx.pc
139 ("util-linux" ,util-linux) ; mount: eeze.pc
140 ("wayland" ,wayland) ; ecore-wl2.pc, elementary.pc
141 ("zlib" ,zlib))) ; eet.pc, eet-cxx.pc, emile.pc
142 (arguments
143 `(#:configure-flags '("--disable-silent-rules"
144 "--disable-systemd"
145 "--with-profile=release"
146 "--enable-liblz4"
147 "--enable-xinput22"
148 "--enable-image-loader-webp"
149 "--enable-multisense"
150 ,@(match (%current-system)
151 ("armhf-linux"
152 '("--with-opengl=es" "--with-egl"))
153 (_
154 '("--with-opengl=full")))
155 "--enable-harfbuzz"
156 ;; for wayland
157 "--enable-wayland"
158 "--enable-elput"
159 "--enable-drm")
160 #:phases
161 (modify-phases %standard-phases
162 ;; If we don't hardcode the location of libcurl.so then we
163 ;; have to wrap the outputs of efl's dependencies in curl.
164 (add-after 'unpack 'hardcode-libcurl-location
165 (lambda* (#:key inputs #:allow-other-keys)
166 (let* ((curl (assoc-ref inputs "curl"))
167 (lib (string-append curl "/lib/")))
168 (substitute* "src/lib/ecore_con/ecore_con_url_curl.c"
169 (("libcurl.so.?" libcurl) ; libcurl.so.[45]
170 (string-append lib libcurl)))
171 #t)))
172 (add-after 'unpack 'set-home-directory
173 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
174 (lambda _ (setenv "HOME" "/tmp") #t)))))
175 (home-page "https://www.enlightenment.org/about-efl")
176 (synopsis "Enlightenment Foundation Libraries")
177 (description
178 "Enlightenment Foundation Libraries is a set of libraries developed
179 for Enlightenment. Libraries covers data serialization, wide support for
180 graphics rendering, UI layout and themes, interaction with OS, access to
181 removable devices or support for multimedia.")
182 ;; Different parts are under different licenses.
183 (license (list license:bsd-2 license:lgpl2.1 license:zlib))))
184
185 (define-public terminology
186 (package
187 (name "terminology")
188 (version "1.4.0")
189 (source (origin
190 (method url-fetch)
191 (uri
192 (string-append "https://download.enlightenment.org/rel/apps/"
193 "terminology/terminology-" version ".tar.xz"))
194 (sha256
195 (base32
196 "0q1y7fadj42n23aspx9y8hm4w4xlc316wc3415wnf75ibsx08ngd"))
197 (modules '((guix build utils)))
198 ;; Remove the bundled fonts.
199 (snippet
200 '(begin
201 (delete-file-recursively "data/fonts")
202 (substitute* "data/meson.build"
203 (("subdir\\('fonts'\\)") ""))
204 #t))))
205 (build-system meson-build-system)
206 (arguments
207 `(#:configure-flags '("-Dtests=true")
208 #:phases
209 (modify-phases %standard-phases
210 (add-after 'unpack 'set-home-directory
211 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
212 (lambda _ (setenv "HOME" "/tmp") #t))
213 (replace 'check
214 (lambda _
215 (with-directory-excursion
216 (string-append "../" ,name "-" ,version "/tests")
217 (invoke "sh" "run_tests.sh" "--verbose"
218 "-t" "../../build/src/bin/tytest"))))
219 (add-after 'install 'remove-test-binary
220 (lambda* (#:key outputs #:allow-other-keys)
221 ;; This file is not meant to be installed.
222 (delete-file (string-append (assoc-ref outputs "out")
223 "/bin/tytest"))
224 #t)))))
225 (native-inputs
226 `(("gettext" ,gettext-minimal)
227 ("perl" ,perl)
228 ("pkg-config" ,pkg-config)))
229 (inputs
230 `(("efl" ,efl)))
231 (home-page "https://www.enlightenment.org/about-terminology")
232 (synopsis "Powerful terminal emulator based on EFL")
233 (description
234 "Terminology is fast and feature rich terminal emulator. It is solely
235 based on Enlightenment Foundation Libraries. It supports multiple tabs, UTF-8,
236 URL and local path detection, themes, popup based content viewer for non-text
237 contents and more.")
238 (license license:bsd-2)))
239
240 (define-public rage
241 (package
242 (name "rage")
243 (version "0.3.0")
244 (source (origin
245 (method url-fetch)
246 (uri
247 (string-append
248 "https://download.enlightenment.org/rel/apps/rage/rage-"
249 version ".tar.xz"))
250 (sha256
251 (base32
252 "0gfzdd4jg78bkmj61yg49w7bzspl5m1nh6agqgs8k7qrq9q26xqy"))))
253 (build-system meson-build-system)
254 (arguments
255 '(#:phases
256 (modify-phases %standard-phases
257 (add-after 'unpack 'set-home-directory
258 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
259 (lambda _ (setenv "HOME" "/tmp") #t)))))
260 (native-inputs
261 `(("pkg-config" ,pkg-config)))
262 (inputs
263 `(("efl" ,efl)))
264 (home-page "https://www.enlightenment.org/about-rage")
265 (synopsis "Video and audio player based on EFL")
266 (description
267 "Rage is a video and audio player written with Enlightenment Foundation
268 Libraries with some extra bells and whistles.")
269 (license license:bsd-2)))
270
271 (define-public enlightenment
272 (package
273 (name "enlightenment")
274 (version "0.22.4")
275 (source (origin
276 (method url-fetch)
277 (uri
278 (string-append "https://download.enlightenment.org/rel/apps/"
279 name "/" name "-" version ".tar.xz"))
280 (sha256
281 (base32
282 "0ygy891rrw5c7lhk539nhif77j88phvz2h0fhx172iaridy9kx2r"))
283 (patches (search-patches "enlightenment-fix-setuid-path.patch"))))
284 (build-system gnu-build-system)
285 (arguments
286 `(#:phases
287 (modify-phases %standard-phases
288 (add-before 'configure 'set-system-actions
289 (lambda* (#:key inputs #:allow-other-keys)
290 (let ((xkeyboard (assoc-ref inputs "xkeyboard-config"))
291 (setxkbmap (assoc-ref inputs "setxkbmap"))
292 (utils (assoc-ref inputs "util-linux"))
293 (libc (assoc-ref inputs "libc"))
294 (efl (assoc-ref inputs "efl")))
295 ;; We need to patch the path to 'base.lst' to be able
296 ;; to switch the keyboard layout in E.
297 (substitute* (list "src/modules/xkbswitch/e_mod_parse.c"
298 "src/modules/wizard/page_011.c")
299 (("/usr/share/X11/xkb/rules/xorg.lst")
300 (string-append xkeyboard
301 "/share/X11/xkb/rules/base.lst")))
302 (substitute* "src/bin/e_xkb.c"
303 (("\"setxkbmap \"")
304 (string-append "\"" setxkbmap "/bin/setxkbmap \"")))
305 (substitute* (list "src/bin/e_intl.c"
306 "src/modules/conf_intl/e_int_config_intl.c"
307 "src/modules/wizard/page_010.c")
308 (("locale -a") (string-append libc "/bin/locale -a")))
309 (substitute* "src/bin/e_import_config_dialog.c"
310 (("%s/edje_cc -v %s %s %s\", e_prefix_bin_get\\(\\)")
311 (string-append efl "/bin/edje_cc -v %s %s %s\"")))
312 (substitute* "src/modules/everything/evry_plug_apps.c"
313 (("/usr/bin/") ""))
314 (substitute* "configure"
315 (("/bin/mount") (string-append utils "/bin/mount"))
316 (("/bin/umount") (string-append utils "/bin/umount"))
317 (("/usr/bin/eject") (string-append utils "/bin/eject"))
318 (("/etc/acpi/sleep.sh force") "/run/current-system/profile/bin/loginctl suspend")
319 (("/etc/acpi/hibernate.sh force") "/run/current-system/profile/bin/loginctl hibernate")
320 (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now")
321 (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now"))
322 #t))))))
323 (native-inputs
324 `(("gettext" ,gettext-minimal)
325 ("pkg-config" ,pkg-config)
326 ("util-linux" ,util-linux)))
327 (inputs
328 `(("alsa-lib" ,alsa-lib)
329 ("dbus" ,dbus)
330 ("efl" ,efl)
331 ("freetype" ,freetype)
332 ("libxcb" ,libxcb)
333 ("libxext" ,libxext)
334 ("linux-pam" ,linux-pam)
335 ("setxkbmap" ,setxkbmap)
336 ("xcb-util-keysyms" ,xcb-util-keysyms)
337 ("xkeyboard-config" ,xkeyboard-config)))
338 (home-page "https://www.enlightenment.org/about-enlightenment")
339 (synopsis "Lightweight desktop environment")
340 (description
341 "Enlightenment is resource friendly desktop environment with integrated
342 file manager, wide range of configuration options, plugin system allowing to
343 unload unused functionality, with support for touchscreen and suitable for
344 embedded systems.")
345 (license license:bsd-2)))
346
347 (define-public python-efl
348 (package
349 (name "python-efl")
350 (version "1.21.0")
351 (source
352 (origin
353 (method url-fetch)
354 (uri (string-append "http://download.enlightenment.org/rel/bindings/"
355 "python/python-efl-" version ".tar.xz"))
356 (sha256
357 (base32
358 "08x2cv8hnf004c3711250wrax21ffj5y8951pvk77h98als4pq47"))))
359 (build-system python-build-system)
360 (arguments
361 '(#:phases
362 (modify-phases %standard-phases
363 (replace 'build
364 (lambda _
365 (setenv "ENABLE_CYTHON" "1")
366 (invoke "python" "setup.py" "build")))
367 (add-before 'build 'set-flags
368 (lambda _
369 (setenv "CFLAGS"
370 (string-append "-I" (assoc-ref %build-inputs "python-dbus")
371 "/include/dbus-1.0"))
372 #t))
373 (add-before 'check 'set-environment
374 (lambda _
375 ;; Some tests require write access to HOME.
376 (setenv "HOME" "/tmp")
377 ;; These tests try to connect to the internet.
378 (delete-file "tests/ecore/test_09_file_download.py")
379 (delete-file "tests/ecore/test_11_con.py")
380 #t)))))
381 (native-inputs
382 `(("pkg-config" ,pkg-config)
383 ("python-cython" ,python-cython)))
384 (inputs
385 `(("efl" ,efl)
386 ("python-dbus" ,python-dbus)))
387 (home-page "https://www.enlightenment.org/")
388 (synopsis "Python bindings for EFL")
389 (description
390 "PYTHON-EFL are the python bindings for the whole Enlightenment Foundation
391 Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).")
392 (license license:lgpl3)))
393
394 (define-public python2-efl
395 (package-with-python2 python-efl))
396
397 (define-public edi
398 (package
399 (name "edi")
400 (version "0.6.0")
401 (source
402 (origin
403 (method url-fetch)
404 (uri (string-append "https://download.enlightenment.org/rel/apps/edi/"
405 name "-" version ".tar.xz"))
406 (sha256
407 (base32
408 "0iqkah327ms5m7k054hcik2l9v68i4mg9yy52brprfqpd5jk7pw8"))))
409 (build-system gnu-build-system)
410 (arguments
411 '(#:phases
412 (modify-phases %standard-phases
413 (add-after 'unpack 'set-home-directory
414 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
415 (lambda _ (setenv "HOME" "/tmp") #t)))
416 #:tests? #f)) ; tests require running dbus service
417 (native-inputs
418 `(("pkg-config" ,pkg-config)))
419 (inputs
420 `(("clang" ,clang)
421 ("efl" ,efl)))
422 (home-page "https://www.enlightenment.org/about-edi")
423 (synopsis "Development environment for Enlightenment")
424 (description "EDI is a development environment designed for and built using
425 the EFL. It's aim is to create a new, native development environment for Linux
426 that tries to lower the barrier to getting involved in Enlightenment development
427 and in creating applications based on the Enlightenment Foundation Library suite.")
428 (license (list license:public-domain ; data/extra/skeleton
429 license:gpl2)))) ; edi
430
431 (define-public lekha
432 (package
433 (name "lekha")
434 (version "0.2.1")
435 (source (origin
436 (method url-fetch)
437 (uri (pypi-uri "Lekha" version))
438 (sha256
439 (base32
440 "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
441 (build-system python-build-system)
442 (arguments
443 `(#:tests? #f ; no test target
444 #:python ,python-2
445 #:phases
446 (modify-phases %standard-phases
447 (add-after 'unpack 'fix-data-location
448 (lambda _ (substitute* "setup.py"
449 (("'/usr/")"'"))
450 #t)))))
451 (propagated-inputs
452 `(("python2-efl" ,python2-efl)
453 ("python2-pypdf2" ,python2-pypdf2)
454 ("python2-pyxdg" ,python2-pyxdg)))
455 (synopsis "Simple PDF viewer")
456 (description
457 "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
458 (home-page "https://github.com/kaihu/lekha")
459 (license license:gpl3+)))
460
461 (define-public ephoto
462 (package
463 (name "ephoto")
464 (version "1.5")
465 (source
466 (origin
467 (method url-fetch)
468 (uri (list (string-append "http://www.smhouston.us/stuff/ephoto-"
469 version ".tar.xz")
470 (string-append "https://download.enlightenment.org/rel/"
471 "apps/ephoto/ephoto-" version ".tar.xz")))
472 (sha256
473 (base32
474 "04kli43sfsy6s660g13pjc0kjmgdcmq8m4qh02vvpcwv60mf9mgz"))))
475 (build-system gnu-build-system)
476 (arguments
477 '(#:phases
478 (modify-phases %standard-phases
479 (add-after 'unpack 'set-home-directory
480 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
481 (lambda _ (setenv "HOME" "/tmp") #t)))))
482 (native-inputs
483 `(("check" ,check)
484 ("pkg-config" ,pkg-config)))
485 (inputs
486 `(("efl" ,efl)))
487 (home-page "http://smhouston.us/ephoto/")
488 (synopsis "EFL image viewer/editor/manipulator/slideshow creator")
489 (description "Ephoto is an image viewer and editor written using the
490 @dfn{Enlightenment Foundation Libraries} (EFL). It focuses on simplicity and
491 ease of use, while taking advantage of the speed and small footprint the EFL
492 provide.
493
494 Ephoto’s features include:
495 @enumerate
496 @item Browsing the file system and displaying images in an easy-to-use grid view.
497 @item Browsing images in a single image view format.
498 @item Viewing images in a slideshow.
499 @item Editing your image with features such as cropping, auto enhance,
500 blurring, sharpening, brightness/contrast/gamma adjustments, hue/saturation/value
501 adjustments, and color level adjustment.
502 @item Applying artistic filters to your image such as black and white and old
503 photo.
504 @item Drag And Drop along with file operations to easily maintain your photo
505 directories.
506 @end enumerate\n")
507 (license (list
508 license:bsd-2 ; Ephoto's thumbnailing code
509 license:bsd-3))))