gnu: nnn: Don't use NAME in source URI.
[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 Nils Gillmann <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 (sha256
75 (base32
76 "0a5907h896pvpix7a6idc2fspzy6d78xrzf84k8y9fyvnd14nxs4"))))
77 (outputs '("out" ; 49 MB
78 "include")) ; 17 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 ("libspectre" ,libspectre)
94 ("libtiff" ,libtiff)
95 ("libwebp" ,libwebp)
96 ("libx11" ,libx11)
97 ("libxau" ,libxau)
98 ("libxcomposite" ,libxcomposite)
99 ("libxcursor" ,libxcursor)
100 ("libxdamage" ,libxdamage)
101 ("libxdmcp" ,libxdmcp)
102 ("libxext" ,libxext)
103 ("libxi" ,libxi)
104 ("libxfixes" ,libxfixes)
105 ("libxinerama" ,libxinerama)
106 ("libxp" ,libxp)
107 ("libxrandr" ,libxrandr)
108 ("libxrender" ,libxrender)
109 ("libxscrnsaver" ,libxscrnsaver)
110 ("libxtst" ,libxtst)
111 ("lz4" ,lz4)
112 ("openjpeg" ,openjpeg-1)
113 ("poppler" ,poppler)
114 ("printproto" ,printproto)
115 ("wayland-protocols" ,wayland-protocols)
116 ("xinput" ,xinput)
117 ("xpr" ,xpr)
118 ("xorgproto" ,xorgproto)))
119 (propagated-inputs
120 ;; All these inputs are in package config files in section
121 ;; Requires.private.
122 `(("bullet" ,bullet) ; ephysics.pc
123 ("dbus" ,dbus) ; eldbus.pc, elementary.pc, elocation.pc, ethumb_client.pc
124 ("eudev" ,eudev) ; eeze.pc
125 ("fontconfig" ,fontconfig) ; evas.pc, evas-cxx.pc
126 ("freetype" ,freetype) ; evas.pc, evas-cxx.pc
127 ("fribidi" ,fribidi) ; evas.pc, evas-cxx.pc
128 ("glib" ,glib) ; ecore.pc, ecore-cxx.pc
129 ("harfbuzz" ,harfbuzz) ; evas.pc, evas-cxx.pc
130 ("luajit" ,luajit) ; elua.pc, evas.pc, evas-cxx.pc
131 ("libinput" ,libinput-minimal) ; elput.pc
132 ("libpng" ,libpng) ; evas.pc, evas-cxx.pc
133 ("libsndfile" ,libsndfile) ; ecore-audio.pc, ecore-audio-cxx.pc
134 ("libxkbcommon" ,libxkbcommon) ; ecore-wl2.pc, elementary.pc, elput.pc
135 ("mesa" ,mesa) ; ecore-drm2.pc
136 ("openssl" ,openssl) ; ecore-con.pc, eet.pc, eet-cxx.pc, emile.pc
137 ("pulseaudio" ,pulseaudio) ; ecore-audio.pc, ecore-audio-cxx.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.3.2")
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 "1kclxzadmk272s9spa7n704pcb1c611ixxrq88w5zk22va0i25xm"))
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 '(#:phases
207 (modify-phases %standard-phases
208 (add-after 'unpack 'set-home-directory
209 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
210 (lambda _ (setenv "HOME" "/tmp") #t)))))
211 (native-inputs
212 `(("gettext" ,gettext-minimal)
213 ("perl" ,perl)
214 ("pkg-config" ,pkg-config)))
215 (inputs
216 `(("efl" ,efl)))
217 (home-page "https://www.enlightenment.org/about-terminology")
218 (synopsis "Powerful terminal emulator based on EFL")
219 (description
220 "Terminology is fast and feature rich terminal emulator. It is solely
221 based on Enlightenment Foundation Libraries. It supports multiple tabs, UTF-8,
222 URL and local path detection, themes, popup based content viewer for non-text
223 contents and more.")
224 (license license:bsd-2)))
225
226 (define-public rage
227 (package
228 (name "rage")
229 (version "0.3.0")
230 (source (origin
231 (method url-fetch)
232 (uri
233 (string-append
234 "https://download.enlightenment.org/rel/apps/rage/rage-"
235 version ".tar.xz"))
236 (sha256
237 (base32
238 "0gfzdd4jg78bkmj61yg49w7bzspl5m1nh6agqgs8k7qrq9q26xqy"))))
239 (build-system meson-build-system)
240 (arguments
241 '(#:phases
242 (modify-phases %standard-phases
243 (add-after 'unpack 'set-home-directory
244 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
245 (lambda _ (setenv "HOME" "/tmp") #t)))))
246 (native-inputs
247 `(("pkg-config" ,pkg-config)))
248 (inputs
249 `(("efl" ,efl)))
250 (home-page "https://www.enlightenment.org/about-rage")
251 (synopsis "Video and audio player based on EFL")
252 (description
253 "Rage is a video and audio player written with Enlightenment Foundation
254 Libraries with some extra bells and whistles.")
255 (license license:bsd-2)))
256
257 (define-public enlightenment
258 (package
259 (name "enlightenment")
260 (version "0.22.4")
261 (source (origin
262 (method url-fetch)
263 (uri
264 (string-append "https://download.enlightenment.org/rel/apps/"
265 name "/" name "-" version ".tar.xz"))
266 (sha256
267 (base32
268 "0ygy891rrw5c7lhk539nhif77j88phvz2h0fhx172iaridy9kx2r"))
269 (patches (search-patches "enlightenment-fix-setuid-path.patch"))))
270 (build-system gnu-build-system)
271 (arguments
272 `(#:phases
273 (modify-phases %standard-phases
274 (add-before 'configure 'set-system-actions
275 (lambda* (#:key inputs #:allow-other-keys)
276 (let ((xkeyboard (assoc-ref inputs "xkeyboard-config"))
277 (setxkbmap (assoc-ref inputs "setxkbmap"))
278 (utils (assoc-ref inputs "util-linux"))
279 (libc (assoc-ref inputs "libc"))
280 (efl (assoc-ref inputs "efl")))
281 ;; We need to patch the path to 'base.lst' to be able
282 ;; to switch the keyboard layout in E.
283 (substitute* (list "src/modules/xkbswitch/e_mod_parse.c"
284 "src/modules/wizard/page_011.c")
285 (("/usr/share/X11/xkb/rules/xorg.lst")
286 (string-append xkeyboard
287 "/share/X11/xkb/rules/base.lst")))
288 (substitute* "src/bin/e_xkb.c"
289 (("\"setxkbmap \"")
290 (string-append "\"" setxkbmap "/bin/setxkbmap \"")))
291 (substitute* (list "src/bin/e_intl.c"
292 "src/modules/conf_intl/e_int_config_intl.c"
293 "src/modules/wizard/page_010.c")
294 (("locale -a") (string-append libc "/bin/locale -a")))
295 (substitute* "src/bin/e_import_config_dialog.c"
296 (("%s/edje_cc -v %s %s %s\", e_prefix_bin_get\\(\\)")
297 (string-append efl "/bin/edje_cc -v %s %s %s\"")))
298 (substitute* "src/modules/everything/evry_plug_apps.c"
299 (("/usr/bin/") ""))
300 (substitute* "configure"
301 (("/bin/mount") (string-append utils "/bin/mount"))
302 (("/bin/umount") (string-append utils "/bin/umount"))
303 (("/usr/bin/eject") (string-append utils "/bin/eject"))
304 (("/etc/acpi/sleep.sh force") "/run/current-system/profile/bin/loginctl suspend")
305 (("/etc/acpi/hibernate.sh force") "/run/current-system/profile/bin/loginctl hibernate")
306 (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now")
307 (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now"))
308 #t))))))
309 (native-inputs
310 `(("gettext" ,gettext-minimal)
311 ("pkg-config" ,pkg-config)
312 ("util-linux" ,util-linux)))
313 (inputs
314 `(("alsa-lib" ,alsa-lib)
315 ("dbus" ,dbus)
316 ("efl" ,efl)
317 ("freetype" ,freetype)
318 ("libxcb" ,libxcb)
319 ("libxext" ,libxext)
320 ("linux-pam" ,linux-pam)
321 ("setxkbmap" ,setxkbmap)
322 ("xcb-util-keysyms" ,xcb-util-keysyms)
323 ("xkeyboard-config" ,xkeyboard-config)))
324 (home-page "https://www.enlightenment.org/about-enlightenment")
325 (synopsis "Lightweight desktop environment")
326 (description
327 "Enlightenment is resource friendly desktop environment with integrated
328 file manager, wide range of configuration options, plugin system allowing to
329 unload unused functionality, with support for touchscreen and suitable for
330 embedded systems.")
331 (license license:bsd-2)))
332
333 (define-public python-efl
334 (package
335 (name "python-efl")
336 (version "1.21.0")
337 (source
338 (origin
339 (method url-fetch)
340 (uri (string-append "http://download.enlightenment.org/rel/bindings/"
341 "python/python-efl-" version ".tar.xz"))
342 (sha256
343 (base32
344 "08x2cv8hnf004c3711250wrax21ffj5y8951pvk77h98als4pq47"))))
345 (build-system python-build-system)
346 (arguments
347 '(#:phases
348 (modify-phases %standard-phases
349 (replace 'build
350 (lambda _
351 (setenv "ENABLE_CYTHON" "1")
352 (invoke "python" "setup.py" "build")))
353 (add-before 'build 'set-flags
354 (lambda _
355 (setenv "CFLAGS"
356 (string-append "-I" (assoc-ref %build-inputs "python-dbus")
357 "/include/dbus-1.0"))
358 #t))
359 (add-before 'check 'set-environment
360 (lambda _
361 ;; Some tests require write access to HOME.
362 (setenv "HOME" "/tmp")
363 ;; These tests try to connect to the internet.
364 (delete-file "tests/ecore/test_09_file_download.py")
365 (delete-file "tests/ecore/test_11_con.py")
366 #t)))))
367 (native-inputs
368 `(("pkg-config" ,pkg-config)
369 ("python-cython" ,python-cython)))
370 (inputs
371 `(("efl" ,efl)
372 ("python-dbus" ,python-dbus)))
373 (home-page "https://www.enlightenment.org/")
374 (synopsis "Python bindings for EFL")
375 (description
376 "PYTHON-EFL are the python bindings for the whole Enlightenment Foundation
377 Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).")
378 (license license:lgpl3)))
379
380 (define-public python2-efl
381 (package-with-python2 python-efl))
382
383 (define-public edi
384 (package
385 (name "edi")
386 (version "0.6.0")
387 (source
388 (origin
389 (method url-fetch)
390 (uri (string-append "https://download.enlightenment.org/rel/apps/edi/"
391 name "-" version ".tar.xz"))
392 (sha256
393 (base32
394 "0iqkah327ms5m7k054hcik2l9v68i4mg9yy52brprfqpd5jk7pw8"))))
395 (build-system gnu-build-system)
396 (arguments
397 '(#:phases
398 (modify-phases %standard-phases
399 (add-after 'unpack 'set-home-directory
400 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
401 (lambda _ (setenv "HOME" "/tmp") #t)))
402 #:tests? #f)) ; tests require running dbus service
403 (native-inputs
404 `(("pkg-config" ,pkg-config)))
405 (inputs
406 `(("clang" ,clang)
407 ("efl" ,efl)))
408 (home-page "https://www.enlightenment.org/about-edi")
409 (synopsis "Development environment for Enlightenment")
410 (description "EDI is a development environment designed for and built using
411 the EFL. It's aim is to create a new, native development environment for Linux
412 that tries to lower the barrier to getting involved in Enlightenment development
413 and in creating applications based on the Enlightenment Foundation Library suite.")
414 (license (list license:public-domain ; data/extra/skeleton
415 license:gpl2)))) ; edi
416
417 (define-public lekha
418 (package
419 (name "lekha")
420 (version "0.2.1")
421 (source (origin
422 (method url-fetch)
423 (uri (pypi-uri "Lekha" version))
424 (sha256
425 (base32
426 "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
427 (build-system python-build-system)
428 (arguments
429 `(#:tests? #f ; no test target
430 #:python ,python-2
431 #:phases
432 (modify-phases %standard-phases
433 (add-after 'unpack 'fix-data-location
434 (lambda _ (substitute* "setup.py"
435 (("'/usr/")"'"))
436 #t)))))
437 (propagated-inputs
438 `(("python2-efl" ,python2-efl)
439 ("python2-pypdf2" ,python2-pypdf2)
440 ("python2-pyxdg" ,python2-pyxdg)))
441 (synopsis "Simple PDF viewer")
442 (description
443 "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
444 (home-page "https://github.com/kaihu/lekha")
445 (license license:gpl3+)))
446
447 (define-public ephoto
448 (package
449 (name "ephoto")
450 (version "1.5")
451 (source
452 (origin
453 (method url-fetch)
454 (uri (list (string-append "http://www.smhouston.us/stuff/ephoto-"
455 version ".tar.xz")
456 (string-append "https://download.enlightenment.org/rel/"
457 "apps/ephoto/ephoto-" version ".tar.xz")))
458 (sha256
459 (base32
460 "04kli43sfsy6s660g13pjc0kjmgdcmq8m4qh02vvpcwv60mf9mgz"))))
461 (build-system gnu-build-system)
462 (arguments
463 '(#:phases
464 (modify-phases %standard-phases
465 (add-after 'unpack 'set-home-directory
466 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
467 (lambda _ (setenv "HOME" "/tmp") #t)))))
468 (native-inputs
469 `(("check" ,check)
470 ("pkg-config" ,pkg-config)))
471 (inputs
472 `(("efl" ,efl)))
473 (home-page "http://smhouston.us/ephoto/")
474 (synopsis "EFL image viewer/editor/manipulator/slideshow creator")
475 (description "Ephoto is an image viewer and editor written using the
476 @dfn{Enlightenment Foundation Libraries} (EFL). It focuses on simplicity and
477 ease of use, while taking advantage of the speed and small footprint the EFL
478 provide.
479
480 Ephoto’s features include:
481 @enumerate
482 @item Browsing the file system and displaying images in an easy-to-use grid view.
483 @item Browsing images in a single image view format.
484 @item Viewing images in a slideshow.
485 @item Editing your image with features such as cropping, auto enhance,
486 blurring, sharpening, brightness/contrast/gamma adjustments, hue/saturation/value
487 adjustments, and color level adjustment.
488 @item Applying artistic filters to your image such as black and white and old
489 photo.
490 @item Drag And Drop along with file operations to easily maintain your photo
491 directories.
492 @end enumerate\n")
493 (license (list
494 license:bsd-2 ; Ephoto's thumbnailing code
495 license:bsd-3))))