gnu: libretro-lowresnx: Update to 1.2.
[jackhill/guix/guix.git] / gnu / packages / robotics.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages robotics)
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (guix git-download)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix build-system cmake)
25 #:use-module (gnu packages avahi)
26 #:use-module (gnu packages cpp)
27 #:use-module (gnu packages gl)
28 #:use-module (gnu packages linux)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages protobuf)
31 #:use-module (gnu packages qt)
32 #:use-module (gnu packages sdl)
33 #:use-module (gnu packages valgrind)
34 #:use-module (gnu packages xml))
35
36 (define-public enki
37 ;; Previous versions use Qt4 and are unsuitable for Aseba.
38 (let ((commit "afd2d8e2f91c095f6745505ca1f32f31ea874200")
39 (revision "0"))
40 (package
41 (name "enki")
42 (version (git-version "2.0pre" revision commit))
43 (home-page "https://github.com/enki-community/enki/")
44 (source (origin
45 (method git-fetch)
46 (uri (git-reference (url home-page) (commit commit)))
47 (sha256
48 (base32
49 "1d1901zzsfml97hb4mb3ah3ab1bk4kh7bn6m7xrj1rv0gk9wkhq7"))
50 (file-name (string-append name "-" version "-checkout"))))
51 (build-system cmake-build-system)
52 (arguments
53 '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
54 (native-inputs `(("pkg-config" ,pkg-config)))
55 (inputs
56 ;; Optionally, add Python + Boost for Python bindings.
57 `(("sdl2" ,sdl2)))
58 (propagated-inputs
59 ;; 'Viewer.h' includes 'QGLWidget'.
60 `(("qtbase" ,qtbase) ;the viewer module needs Qt5 + MESA
61 ("mesa" ,mesa)))
62 (synopsis "Robot simulator")
63 (description
64 "Enki is a robot simulator written in C++. It provides collision and
65 limited physics support for robots evolving on a flat surface. On a
66 contemporary desktop computer, Enki is able to simulate groups of robots
67 hundred times faster than real-time.")
68
69 ;; The 'LICENSE' file as well as source file headers says that
70 ;; researchers using the software are "asked" to cite using a given
71 ;; citation, but that sentence is written as not being part of the
72 ;; license (fortunately).
73 (license license:gpl2+))))
74
75 (define-public aseba
76 ;; Use the commit that allows us to build with Qt5.
77 (let ((commit "3b35de80d5fdd47592b1c01d57e1f4ef37c5e5ea")
78 (revision "0"))
79 (package
80 (name "aseba")
81 (version (git-version "1.6.0" revision commit))
82 (home-page "https://github.com/aseba-community/aseba")
83 (source (origin
84 (method git-fetch)
85 (uri (git-reference (url home-page) (commit commit)
86 (recursive? #t))) ;for Blockly
87 (sha256
88 (base32
89 "0j31lmc9f0ksvkh0md2fgsz92hcsrwnrqqcynamizs2ah8iwlqi5"))
90 (file-name (string-append name "-" version "-checkout"))
91 (modules '((guix build utils)))
92 (snippet
93 ;; Add missing Qt5::Network.
94 '(begin
95 (substitute* "targets/playground/CMakeLists.txt"
96 (("target_link_libraries(.*)\\$\\{EXTRA_LIBS\\}" _ middle)
97 (string-append "target_link_libraries" middle
98 " Qt5::Network ${EXTRA_LIBS}")))
99 #t))))
100 (build-system cmake-build-system)
101 (arguments
102 '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
103 (native-inputs
104 `(("pkg-config" ,pkg-config)
105 ("valgrind" ,valgrind))) ;for tests
106 (inputs
107 `(("dashel" ,dashel)
108 ("enki" ,enki)
109 ("protobuf" ,protobuf-3.5) ;for logging
110 ("qtbase" ,qtbase)
111 ("qtsvg" ,qtsvg)
112 ("qttools" ,qttools) ;for libQt5Help, needed by "studio"
113 ("qtwebkit" ,qtwebkit)
114 ("qtx11extras" ,qtx11extras)
115 ("eudev" ,eudev)
116 ("libxml2" ,libxml2)
117 ("sdl2" ,sdl2)
118 ("avahi" ,avahi))) ;XXX: we need the libdnssd compat layer
119 (synopsis "Event-based robot programming tools")
120 (description
121 "Aseba means @dfn{actuator and sensor event-based architecture}.
122 It is a set of tools which allow beginners to program robots easily and
123 efficiently. It includes robot simulators, a programming language, and a
124 visual programming language (VPL) that is notably used together with the
125 Thymio educational robot.")
126
127 ;; Source file headers say "version 3.0" without "or any later version".
128 (license license:lgpl3))))