Correct name and Email for ng0.
[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 ;;;
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 ("compositeproto" ,compositeproto)
81 ("curl" ,curl)
82 ("ghostscript" ,ghostscript)
83 ("giflib" ,giflib)
84 ("gstreamer" ,gstreamer)
85 ("gst-plugins-base" ,gst-plugins-base)
86 ("libexif" ,libexif)
87 ("libjpeg" ,libjpeg)
88 ("libraw" ,libraw)
89 ("librsvg" ,librsvg)
90 ("libspectre" ,libspectre)
91 ("libtiff" ,libtiff)
92 ("libwebp" ,libwebp)
93 ("libx11" ,libx11)
94 ("libxau" ,libxau)
95 ("libxcomposite" ,libxcomposite)
96 ("libxcursor" ,libxcursor)
97 ("libxdamage" ,libxdamage)
98 ("libxdmcp" ,libxdmcp)
99 ("libxext" ,libxext)
100 ("libxi" ,libxi)
101 ("libxfixes" ,libxfixes)
102 ("libxinerama" ,libxinerama)
103 ("libxp" ,libxp)
104 ("libxrandr" ,libxrandr)
105 ("libxrender" ,libxrender)
106 ("libxscrnsaver" ,libxscrnsaver)
107 ("libxtst" ,libxtst)
108 ("lz4" ,lz4)
109 ("openjpeg" ,openjpeg-1)
110 ("poppler" ,poppler)
111 ("printproto" ,printproto)
112 ("scrnsaverproto" ,scrnsaverproto)
113 ("wayland-protocols" ,wayland-protocols)
114 ("xextproto" ,xextproto)
115 ("xinput" ,xinput)
116 ("xpr" ,xpr)
117 ("xproto" ,xproto)))
118 (propagated-inputs
119 ;; All these inputs are in package config files in section
120 ;; Requires.private.
121 `(("bullet" ,bullet) ; ephysics.pc
122 ("dbus" ,dbus) ; eldbus.pc, elementary.pc, elocation.pc, ethumb_client.pc
123 ("eudev" ,eudev) ; eeze.pc
124 ("fontconfig" ,fontconfig) ; evas.pc, evas-cxx.pc
125 ("freetype" ,freetype) ; evas.pc, evas-cxx.pc
126 ("fribidi" ,fribidi) ; evas.pc, evas-cxx.pc
127 ("glib" ,glib) ; ecore.pc, ecore-cxx.pc
128 ("harfbuzz" ,harfbuzz) ; evas.pc, evas-cxx.pc
129 ("luajit" ,luajit) ; elua.pc, evas.pc, evas-cxx.pc
130 ("libinput" ,libinput-minimal) ; elput.pc
131 ("libpng" ,libpng) ; evas.pc, evas-cxx.pc
132 ("libsndfile" ,libsndfile) ; ecore-audio.pc, ecore-audio-cxx.pc
133 ("libxkbcommon" ,libxkbcommon) ; ecore-wl2.pc, elementary.pc, elput.pc
134 ("mesa" ,mesa) ; ecore-drm2.pc
135 ("openssl" ,openssl) ; ecore-con.pc, eet.pc, eet-cxx.pc, emile.pc
136 ("pulseaudio" ,pulseaudio) ; ecore-audio.pc, ecore-audio-cxx.pc
137 ("util-linux" ,util-linux) ; mount: eeze.pc
138 ("wayland" ,wayland) ; ecore-wl2.pc, elementary.pc
139 ("zlib" ,zlib))) ; eet.pc, eet-cxx.pc, emile.pc
140 (arguments
141 `(#:configure-flags '("--disable-silent-rules"
142 "--disable-systemd"
143 "--enable-liblz4"
144 "--enable-xinput22"
145 "--enable-image-loader-webp"
146 "--enable-multisense"
147 "--with-opengl=es"
148 "--enable-egl"
149 "--enable-harfbuzz"
150 ;; for wayland
151 "--enable-wayland"
152 "--enable-elput"
153 "--enable-drm")
154 #:phases
155 (modify-phases %standard-phases
156 ;; If we don't hardcode the location of libcurl.so then we
157 ;; have to wrap the outputs of efl's dependencies in curl.
158 (add-after 'unpack 'hardcode-libcurl-location
159 (lambda* (#:key inputs #:allow-other-keys)
160 (let* ((curl (assoc-ref inputs "curl"))
161 (lib (string-append curl "/lib/")))
162 (substitute* "src/lib/ecore_con/ecore_con_url_curl.c"
163 (("libcurl.so.?" libcurl) ; libcurl.so.[45]
164 (string-append lib libcurl)))
165 #t)))
166 (add-after 'unpack 'set-home-directory
167 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
168 (lambda _ (setenv "HOME" "/tmp") #t)))))
169 (home-page "https://www.enlightenment.org/about-efl")
170 (synopsis "Enlightenment Foundation Libraries")
171 (description
172 "Enlightenment Foundation Libraries is a set of libraries developed
173 for Enlightenment. Libraries covers data serialization, wide support for
174 graphics rendering, UI layout and themes, interaction with OS, access to
175 removable devices or support for multimedia.")
176 ;; Different parts are under different licenses.
177 (license (list license:bsd-2 license:lgpl2.1 license:zlib))))
178
179 (define-public terminology
180 (package
181 (name "terminology")
182 (version "1.1.1")
183 (source (origin
184 (method url-fetch)
185 (uri
186 (string-append "https://download.enlightenment.org/rel/apps/"
187 "terminology/terminology-" version ".tar.xz"))
188 (sha256
189 (base32
190 "05ncxvzb9rzkyjvd95hzn8lswqdwr8cix6rd54nqn9559jibh4ns"))
191 (modules '((guix build utils)))
192 ;; Remove the bundled fonts.
193 ;; TODO: Remove bundled lz4.
194 (snippet
195 '(begin
196 (delete-file-recursively "data/fonts")
197 (substitute* '("data/Makefile.in" "data/Makefile.am")
198 (("fonts") ""))
199 (substitute* "configure"
200 (("data/fonts/Makefile") "")
201 (("\\\"data/fonts/Makefile") "# \"data/fonts/Makefile"))
202 (substitute* '("data/themes/Makefile.in"
203 "data/themes/Makefile.am"
204 "data/themes/nyanology/Makefile.in"
205 "data/themes/nyanology/Makefile.am")
206 (("-fd \\$\\(top_srcdir\\)/data/fonts") ""))))))
207 (build-system gnu-build-system)
208 (arguments
209 '(#:phases
210 (modify-phases %standard-phases
211 (add-after 'unpack 'set-home-directory
212 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
213 (lambda _ (setenv "HOME" "/tmp") #t)))))
214 (native-inputs
215 `(("gettext" ,gettext-minimal)
216 ("pkg-config" ,pkg-config)))
217 (inputs
218 `(("efl" ,efl)))
219 (home-page "https://www.enlightenment.org/about-terminology")
220 (synopsis "Powerful terminal emulator based on EFL")
221 (description
222 "Terminology is fast and feature rich terminal emulator. It is solely
223 based on Enlightenment Foundation Libraries. It supports multiple tabs, UTF-8,
224 URL and local path detection, themes, popup based content viewer for non-text
225 contents and more.")
226 (license license:bsd-2)))
227
228 (define-public rage
229 (package
230 (name "rage")
231 (version "0.3.0")
232 (source (origin
233 (method url-fetch)
234 (uri
235 (string-append
236 "https://download.enlightenment.org/rel/apps/rage/rage-"
237 version ".tar.xz"))
238 (sha256
239 (base32
240 "0gfzdd4jg78bkmj61yg49w7bzspl5m1nh6agqgs8k7qrq9q26xqy"))))
241 (build-system meson-build-system)
242 (arguments
243 '(#:phases
244 (modify-phases %standard-phases
245 (add-after 'unpack 'set-home-directory
246 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
247 (lambda _ (setenv "HOME" "/tmp") #t)))))
248 (native-inputs
249 `(("pkg-config" ,pkg-config)))
250 (inputs
251 `(("efl" ,efl)))
252 (home-page "https://www.enlightenment.org/about-rage")
253 (synopsis "Video and audio player based on EFL")
254 (description
255 "Rage is a video and audio player written with Enlightenment Foundation
256 Libraries with some extra bells and whistles.")
257 (license license:bsd-2)))
258
259 (define-public enlightenment
260 (package
261 (name "enlightenment")
262 (version "0.22.2")
263 (source (origin
264 (method url-fetch)
265 (uri
266 (string-append "https://download.enlightenment.org/rel/apps/"
267 name "/" name "-" version ".tar.xz"))
268 (sha256
269 (base32
270 "0b33w75s4w7xmz9cv8dyp8vy2gcffnrvjys20fhcpw26abw1wn2d"))))
271 (build-system gnu-build-system)
272 (arguments
273 `(#:configure-flags '("--enable-mount-eeze")
274 #:phases
275 (modify-phases %standard-phases
276 (add-before 'configure 'set-system-actions
277 (lambda* (#:key inputs #:allow-other-keys)
278 (let ((xkeyboard (assoc-ref inputs "xkeyboard-config"))
279 (utils (assoc-ref inputs "util-linux")))
280 ;; We need to patch the path to 'base.lst' to be able
281 ;; to switch the keyboard layout in E.
282 (substitute* "src/modules/xkbswitch/e_mod_parse.c"
283 (("/usr/share/X11/xkb/rules/xorg.lst")
284 (string-append xkeyboard
285 "/share/X11/xkb/rules/base.lst")))
286 (substitute* "configure"
287 (("/bin/mount") (string-append utils "/bin/mount"))
288 (("/bin/umount") (string-append utils "/bin/umount"))
289 (("/usr/bin/eject") (string-append utils "/bin/eject"))
290 (("/etc/acpi/sleep.sh force") "/run/current-system/profile/bin/loginctl suspend")
291 (("/etc/acpi/hibernate.sh force") "/run/current-system/profile/bin/loginctl hibernate")
292 (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now")
293 (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now"))
294 #t))))))
295 (native-inputs
296 `(("gettext" ,gettext-minimal)
297 ("pkg-config" ,pkg-config)
298 ("util-linux" ,util-linux)))
299 (inputs
300 `(("alsa-lib" ,alsa-lib)
301 ("dbus" ,dbus)
302 ("efl" ,efl)
303 ("freetype" ,freetype)
304 ("libxcb" ,libxcb)
305 ("libxext" ,libxext)
306 ("linux-pam" ,linux-pam)
307 ("xcb-util-keysyms" ,xcb-util-keysyms)
308 ("xkeyboard-config" ,xkeyboard-config)))
309 (home-page "https://www.enlightenment.org/about-enlightenment")
310 (synopsis "Lightweight desktop environment")
311 (description
312 "Enlightenment is resource friendly desktop environment with integrated
313 file manager, wide range of configuration options, plugin system allowing to
314 unload unused functionality, with support for touchscreen and suitable for
315 embedded systems.")
316 (license license:bsd-2)))
317
318 (define-public python-efl
319 (package
320 (name "python-efl")
321 (version "1.20.0")
322 (source
323 (origin
324 (method url-fetch)
325 (uri (list
326 (pypi-uri "python-efl" version)
327 (string-append "http://download.enlightenment.org/rel/bindings/"
328 "python/python-efl-" version ".tar.gz")))
329 (sha256
330 (base32
331 "1680pgpf501nhbc9arm0nfj6rpcw17aryh0pgmmmszxlgpifpdzy"))))
332 (build-system python-build-system)
333 (arguments
334 '(#:phases
335 (modify-phases %standard-phases
336 (replace 'build
337 (lambda _
338 (zero?
339 (system* "env" "ENABLE_CYTHON=1" "python" "setup.py" "build"))))
340 (add-before 'build 'set-flags
341 (lambda _
342 (setenv "CFLAGS"
343 (string-append "-I" (assoc-ref %build-inputs "python-dbus")
344 "/include/dbus-1.0"))
345 #t))
346 (add-before 'check 'set-environment
347 (lambda _
348 ;; Some tests require write access to HOME.
349 (setenv "HOME" "/tmp")
350 #t)))))
351 (native-inputs
352 `(("pkg-config" ,pkg-config)
353 ("python-cython" ,python-cython)))
354 (inputs
355 `(("efl" ,efl)
356 ("python-dbus" ,python-dbus)))
357 (home-page "https://www.enlightenment.org/")
358 (synopsis "Python bindings for EFL")
359 (description
360 "PYTHON-EFL are the python bindings for the whole Enlightenment Foundation
361 Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).")
362 (license license:lgpl3)))
363
364 (define-public python2-efl
365 (package-with-python2 python-efl))
366
367 (define-public edi
368 (package
369 (name "edi")
370 (version "0.6.0")
371 (source
372 (origin
373 (method url-fetch)
374 (uri (string-append "https://download.enlightenment.org/rel/apps/edi/"
375 name "-" version ".tar.xz"))
376 (sha256
377 (base32
378 "0iqkah327ms5m7k054hcik2l9v68i4mg9yy52brprfqpd5jk7pw8"))))
379 (build-system gnu-build-system)
380 (arguments
381 '(#:phases
382 (modify-phases %standard-phases
383 (add-after 'unpack 'set-home-directory
384 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
385 (lambda _ (setenv "HOME" "/tmp") #t)))
386 #:tests? #f)) ; tests require running dbus service
387 (native-inputs
388 `(("pkg-config" ,pkg-config)))
389 (inputs
390 `(("clang" ,clang)
391 ("efl" ,efl)))
392 (home-page "https://www.enlightenment.org/about-edi")
393 (synopsis "Development environment for Enlightenment")
394 (description "EDI is a development environment designed for and built using
395 the EFL. It's aim is to create a new, native development environment for Linux
396 that tries to lower the barrier to getting involved in Enlightenment development
397 and in creating applications based on the Enlightenment Foundation Library suite.")
398 (license (list license:public-domain ; data/extra/skeleton
399 license:gpl2)))) ; edi
400
401 (define-public lekha
402 (package
403 (name "lekha")
404 (version "0.2.1")
405 (source (origin
406 (method url-fetch)
407 (uri (pypi-uri "Lekha" version))
408 (sha256
409 (base32
410 "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
411 (build-system python-build-system)
412 (arguments
413 `(#:tests? #f ; no test target
414 #:python ,python-2
415 #:phases
416 (modify-phases %standard-phases
417 (add-after 'unpack 'fix-data-location
418 (lambda _ (substitute* "setup.py"
419 (("'/usr/")"'"))
420 #t)))))
421 (propagated-inputs
422 `(("python2-efl" ,python2-efl)
423 ("python2-pypdf2" ,python2-pypdf2)
424 ("python2-pyxdg" ,python2-pyxdg)))
425 (synopsis "Simple PDF viewer")
426 (description
427 "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
428 (home-page "https://github.com/kaihu/lekha")
429 (license license:gpl3+)))