Merge branch 'master' into core-updates
[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@infotropique.org>
6 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages enlightenment)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (guix build-system meson)
29 #:use-module (guix build-system python)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages bash)
32 #:use-module (gnu packages check)
33 #:use-module (gnu packages code)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages curl)
36 #:use-module (gnu packages fontutils)
37 #:use-module (gnu packages freedesktop)
38 #:use-module (gnu packages fribidi)
39 #:use-module (gnu packages game-development)
40 #:use-module (gnu packages gettext)
41 #:use-module (gnu packages ghostscript)
42 #:use-module (gnu packages gl)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnome)
45 #:use-module (gnu packages gstreamer)
46 #:use-module (gnu packages gtk)
47 #:use-module (gnu packages image)
48 #:use-module (gnu packages linux)
49 #:use-module (gnu packages llvm)
50 #:use-module (gnu packages lua)
51 #:use-module (gnu packages pdf)
52 #:use-module (gnu packages photo)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages pulseaudio)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages tls)
57 #:use-module (gnu packages video)
58 #:use-module (gnu packages xdisorg)
59 #:use-module (gnu packages xorg))
60
61 (define-public efl
62 (package
63 (name "efl")
64 (version "1.20.7")
65 (source (origin
66 (method url-fetch)
67 (uri (string-append
68 "https://download.enlightenment.org/rel/libs/efl/efl-"
69 version ".tar.xz"))
70 (sha256
71 (base32
72 "1zkn5ix81xck3n84dxvkjh4alwc6zj8x989d0zqi5c6ppijvgadh"))))
73 (outputs '("out" ; 49 MB
74 "include")) ; 17 MB
75 (build-system gnu-build-system)
76 (native-inputs
77 `(("pkg-config" ,pkg-config)))
78 (inputs
79 `(("alsa-lib" ,alsa-lib)
80 ("curl" ,curl)
81 ("ghostscript" ,ghostscript)
82 ("giflib" ,giflib)
83 ("gstreamer" ,gstreamer)
84 ("gst-plugins-base" ,gst-plugins-base)
85 ("libexif" ,libexif)
86 ("libjpeg" ,libjpeg)
87 ("libraw" ,libraw)
88 ("librsvg" ,librsvg)
89 ("libspectre" ,libspectre)
90 ("libtiff" ,libtiff)
91 ("libwebp" ,libwebp)
92 ("libx11" ,libx11)
93 ("libxau" ,libxau)
94 ("libxcomposite" ,libxcomposite)
95 ("libxcursor" ,libxcursor)
96 ("libxdamage" ,libxdamage)
97 ("libxdmcp" ,libxdmcp)
98 ("libxext" ,libxext)
99 ("libxi" ,libxi)
100 ("libxfixes" ,libxfixes)
101 ("libxinerama" ,libxinerama)
102 ("libxp" ,libxp)
103 ("libxrandr" ,libxrandr)
104 ("libxrender" ,libxrender)
105 ("libxscrnsaver" ,libxscrnsaver)
106 ("libxtst" ,libxtst)
107 ("lz4" ,lz4)
108 ("openjpeg" ,openjpeg-1)
109 ("poppler" ,poppler)
110 ("printproto" ,printproto)
111 ("wayland-protocols" ,wayland-protocols)
112 ("xinput" ,xinput)
113 ("xpr" ,xpr)
114 ("xorgproto" ,xorgproto)))
115 (propagated-inputs
116 ;; All these inputs are in package config files in section
117 ;; Requires.private.
118 `(("bullet" ,bullet) ; ephysics.pc
119 ("dbus" ,dbus) ; eldbus.pc, elementary.pc, elocation.pc, ethumb_client.pc
120 ("eudev" ,eudev) ; eeze.pc
121 ("fontconfig" ,fontconfig) ; evas.pc, evas-cxx.pc
122 ("freetype" ,freetype) ; evas.pc, evas-cxx.pc
123 ("fribidi" ,fribidi) ; evas.pc, evas-cxx.pc
124 ("glib" ,glib) ; ecore.pc, ecore-cxx.pc
125 ("harfbuzz" ,harfbuzz) ; evas.pc, evas-cxx.pc
126 ("luajit" ,luajit) ; elua.pc, evas.pc, evas-cxx.pc
127 ("libinput" ,libinput-minimal) ; elput.pc
128 ("libpng" ,libpng) ; evas.pc, evas-cxx.pc
129 ("libsndfile" ,libsndfile) ; ecore-audio.pc, ecore-audio-cxx.pc
130 ("libxkbcommon" ,libxkbcommon) ; ecore-wl2.pc, elementary.pc, elput.pc
131 ("mesa" ,mesa) ; ecore-drm2.pc
132 ("openssl" ,openssl) ; ecore-con.pc, eet.pc, eet-cxx.pc, emile.pc
133 ("pulseaudio" ,pulseaudio) ; ecore-audio.pc, ecore-audio-cxx.pc
134 ("util-linux" ,util-linux) ; mount: eeze.pc
135 ("wayland" ,wayland) ; ecore-wl2.pc, elementary.pc
136 ("zlib" ,zlib))) ; eet.pc, eet-cxx.pc, emile.pc
137 (arguments
138 `(#:configure-flags '("--disable-silent-rules"
139 "--disable-systemd"
140 "--enable-liblz4"
141 "--enable-xinput22"
142 "--enable-image-loader-webp"
143 "--enable-multisense"
144 "--with-opengl=es"
145 "--enable-egl"
146 "--enable-harfbuzz"
147 ;; for wayland
148 "--enable-wayland"
149 "--enable-elput"
150 "--enable-drm")
151 #:phases
152 (modify-phases %standard-phases
153 ;; If we don't hardcode the location of libcurl.so then we
154 ;; have to wrap the outputs of efl's dependencies in curl.
155 (add-after 'unpack 'hardcode-libcurl-location
156 (lambda* (#:key inputs #:allow-other-keys)
157 (let* ((curl (assoc-ref inputs "curl"))
158 (lib (string-append curl "/lib/")))
159 (substitute* "src/lib/ecore_con/ecore_con_url_curl.c"
160 (("libcurl.so.?" libcurl) ; libcurl.so.[45]
161 (string-append lib libcurl)))
162 #t)))
163 (add-after 'unpack 'set-home-directory
164 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
165 (lambda _ (setenv "HOME" "/tmp") #t)))))
166 (home-page "https://www.enlightenment.org/about-efl")
167 (synopsis "Enlightenment Foundation Libraries")
168 (description
169 "Enlightenment Foundation Libraries is a set of libraries developed
170 for Enlightenment. Libraries covers data serialization, wide support for
171 graphics rendering, UI layout and themes, interaction with OS, access to
172 removable devices or support for multimedia.")
173 ;; Different parts are under different licenses.
174 (license (list license:bsd-2 license:lgpl2.1 license:zlib))))
175
176 (define-public terminology
177 (package
178 (name "terminology")
179 (version "1.1.1")
180 (source (origin
181 (method url-fetch)
182 (uri
183 (string-append "https://download.enlightenment.org/rel/apps/"
184 "terminology/terminology-" version ".tar.xz"))
185 (sha256
186 (base32
187 "05ncxvzb9rzkyjvd95hzn8lswqdwr8cix6rd54nqn9559jibh4ns"))
188 (modules '((guix build utils)))
189 ;; Remove the bundled fonts.
190 ;; TODO: Remove bundled lz4.
191 (snippet
192 '(begin
193 (delete-file-recursively "data/fonts")
194 (substitute* '("data/Makefile.in" "data/Makefile.am")
195 (("fonts") ""))
196 (substitute* "configure"
197 (("data/fonts/Makefile") "")
198 (("\\\"data/fonts/Makefile") "# \"data/fonts/Makefile"))
199 (substitute* '("data/themes/Makefile.in"
200 "data/themes/Makefile.am"
201 "data/themes/nyanology/Makefile.in"
202 "data/themes/nyanology/Makefile.am")
203 (("-fd \\$\\(top_srcdir\\)/data/fonts") ""))
204 #t))))
205 (build-system gnu-build-system)
206 (arguments
207 '(#:phases
208 (modify-phases %standard-phases
209 (add-after 'unpack 'set-home-directory
210 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
211 (lambda _ (setenv "HOME" "/tmp") #t)))))
212 (native-inputs
213 `(("gettext" ,gettext-minimal)
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.2")
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 "0b33w75s4w7xmz9cv8dyp8vy2gcffnrvjys20fhcpw26abw1wn2d"))))
269 (build-system gnu-build-system)
270 (arguments
271 `(#:configure-flags '("--enable-mount-eeze")
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 (utils (assoc-ref inputs "util-linux")))
278 ;; We need to patch the path to 'base.lst' to be able
279 ;; to switch the keyboard layout in E.
280 (substitute* "src/modules/xkbswitch/e_mod_parse.c"
281 (("/usr/share/X11/xkb/rules/xorg.lst")
282 (string-append xkeyboard
283 "/share/X11/xkb/rules/base.lst")))
284 (substitute* "configure"
285 (("/bin/mount") (string-append utils "/bin/mount"))
286 (("/bin/umount") (string-append utils "/bin/umount"))
287 (("/usr/bin/eject") (string-append utils "/bin/eject"))
288 (("/etc/acpi/sleep.sh force") "/run/current-system/profile/bin/loginctl suspend")
289 (("/etc/acpi/hibernate.sh force") "/run/current-system/profile/bin/loginctl hibernate")
290 (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now")
291 (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now"))
292 #t))))))
293 (native-inputs
294 `(("gettext" ,gettext-minimal)
295 ("pkg-config" ,pkg-config)
296 ("util-linux" ,util-linux)))
297 (inputs
298 `(("alsa-lib" ,alsa-lib)
299 ("dbus" ,dbus)
300 ("efl" ,efl)
301 ("freetype" ,freetype)
302 ("libxcb" ,libxcb)
303 ("libxext" ,libxext)
304 ("linux-pam" ,linux-pam)
305 ("xcb-util-keysyms" ,xcb-util-keysyms)
306 ("xkeyboard-config" ,xkeyboard-config)))
307 (home-page "https://www.enlightenment.org/about-enlightenment")
308 (synopsis "Lightweight desktop environment")
309 (description
310 "Enlightenment is resource friendly desktop environment with integrated
311 file manager, wide range of configuration options, plugin system allowing to
312 unload unused functionality, with support for touchscreen and suitable for
313 embedded systems.")
314 (license license:bsd-2)))
315
316 (define-public python-efl
317 (package
318 (name "python-efl")
319 (version "1.20.0")
320 (source
321 (origin
322 (method url-fetch)
323 (uri (list
324 (pypi-uri "python-efl" version)
325 (string-append "http://download.enlightenment.org/rel/bindings/"
326 "python/python-efl-" version ".tar.gz")))
327 (sha256
328 (base32
329 "1680pgpf501nhbc9arm0nfj6rpcw17aryh0pgmmmszxlgpifpdzy"))))
330 (build-system python-build-system)
331 (arguments
332 '(#:phases
333 (modify-phases %standard-phases
334 (replace 'build
335 (lambda _
336 (zero?
337 (system* "env" "ENABLE_CYTHON=1" "python" "setup.py" "build"))))
338 (add-before 'build 'set-flags
339 (lambda _
340 (setenv "CFLAGS"
341 (string-append "-I" (assoc-ref %build-inputs "python-dbus")
342 "/include/dbus-1.0"))
343 #t))
344 (add-before 'check 'set-environment
345 (lambda _
346 ;; Some tests require write access to HOME.
347 (setenv "HOME" "/tmp")
348 #t)))))
349 (native-inputs
350 `(("pkg-config" ,pkg-config)
351 ("python-cython" ,python-cython)))
352 (inputs
353 `(("efl" ,efl)
354 ("python-dbus" ,python-dbus)))
355 (home-page "https://www.enlightenment.org/")
356 (synopsis "Python bindings for EFL")
357 (description
358 "PYTHON-EFL are the python bindings for the whole Enlightenment Foundation
359 Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).")
360 (license license:lgpl3)))
361
362 (define-public python2-efl
363 (package-with-python2 python-efl))
364
365 (define-public edi
366 (package
367 (name "edi")
368 (version "0.6.0")
369 (source
370 (origin
371 (method url-fetch)
372 (uri (string-append "https://download.enlightenment.org/rel/apps/edi/"
373 name "-" version ".tar.xz"))
374 (sha256
375 (base32
376 "0iqkah327ms5m7k054hcik2l9v68i4mg9yy52brprfqpd5jk7pw8"))))
377 (build-system gnu-build-system)
378 (arguments
379 '(#:phases
380 (modify-phases %standard-phases
381 (add-after 'unpack 'set-home-directory
382 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
383 (lambda _ (setenv "HOME" "/tmp") #t)))
384 #:tests? #f)) ; tests require running dbus service
385 (native-inputs
386 `(("pkg-config" ,pkg-config)))
387 (inputs
388 `(("clang" ,clang)
389 ("efl" ,efl)))
390 (home-page "https://www.enlightenment.org/about-edi")
391 (synopsis "Development environment for Enlightenment")
392 (description "EDI is a development environment designed for and built using
393 the EFL. It's aim is to create a new, native development environment for Linux
394 that tries to lower the barrier to getting involved in Enlightenment development
395 and in creating applications based on the Enlightenment Foundation Library suite.")
396 (license (list license:public-domain ; data/extra/skeleton
397 license:gpl2)))) ; edi
398
399 (define-public lekha
400 (package
401 (name "lekha")
402 (version "0.2.1")
403 (source (origin
404 (method url-fetch)
405 (uri (pypi-uri "Lekha" version))
406 (sha256
407 (base32
408 "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
409 (build-system python-build-system)
410 (arguments
411 `(#:tests? #f ; no test target
412 #:python ,python-2
413 #:phases
414 (modify-phases %standard-phases
415 (add-after 'unpack 'fix-data-location
416 (lambda _ (substitute* "setup.py"
417 (("'/usr/")"'"))
418 #t)))))
419 (propagated-inputs
420 `(("python2-efl" ,python2-efl)
421 ("python2-pypdf2" ,python2-pypdf2)
422 ("python2-pyxdg" ,python2-pyxdg)))
423 (synopsis "Simple PDF viewer")
424 (description
425 "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
426 (home-page "https://github.com/kaihu/lekha")
427 (license license:gpl3+)))