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