gnu: Add Enki.
[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 gl)
26 #:use-module (gnu packages pkg-config)
27 #:use-module (gnu packages qt)
28 #:use-module (gnu packages sdl))
29
30 (define-public enki
31 ;; Previous versions use Qt4 and are unsuitable for Aseba.
32 (let ((commit "afd2d8e2f91c095f6745505ca1f32f31ea874200")
33 (revision "0"))
34 (package
35 (name "enki")
36 (version (git-version "2.0pre" revision commit))
37 (home-page "https://github.com/enki-community/enki/")
38 (source (origin
39 (method git-fetch)
40 (uri (git-reference (url home-page) (commit commit)))
41 (sha256
42 (base32
43 "1d1901zzsfml97hb4mb3ah3ab1bk4kh7bn6m7xrj1rv0gk9wkhq7"))
44 (file-name (string-append name "-" version "-checkout"))))
45 (build-system cmake-build-system)
46 (arguments
47 '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
48 (native-inputs `(("pkg-config" ,pkg-config)))
49 (inputs
50 ;; Optionally, add Python + Boost for Python bindings.
51 `(("sdl2" ,sdl2)))
52 (propagated-inputs
53 ;; 'Viewer.h' includes 'QGLWidget'.
54 `(("qtbase" ,qtbase) ;the viewer module needs Qt5 + MESA
55 ("mesa" ,mesa)))
56 (synopsis "Robot simulator")
57 (description
58 "Enki is a robot simulator written in C++. It provides collision and
59 limited physics support for robots evolving on a flat surface. On a
60 contemporary desktop computer, Enki is able to simulate groups of robots
61 hundred times faster than real-time.")
62
63 ;; The 'LICENSE' file as well as source file headers says that
64 ;; researchers using the software are "asked" to cite using a given
65 ;; citation, but that sentence is written as not being part of the
66 ;; license (fortunately).
67 (license license:gpl2+))))