projects/guix·blob javascript-team · refs

106 lines · 4.2 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2018, 2022 Ludovic Courtès <[email protected]>
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 (guix gexp)
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages cpp)
28 #:use-module (gnu packages dns)
29 #:use-module (gnu packages gl)
30 #:use-module (gnu packages linux)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages protobuf)
33 #:use-module (gnu packages qt)
34 #:use-module (gnu packages sdl)
35 #:use-module (gnu packages valgrind)
36 #:use-module (gnu packages xml))
37
38(define-public enki
39 ;; Previous versions use Qt4 and are unsuitable for Aseba.
40 (let ((commit "afd2d8e2f91c095f6745505ca1f32f31ea874200")
41 (revision "0"))
42 (package
43 (name "enki")
44 (version (git-version "2.0pre" revision commit))
45 (home-page "https://github.com/enki-community/enki/")
46 (source (origin
47 (method git-fetch)
48 (uri (git-reference (url home-page) (commit commit)))
49 (sha256
50 (base32
51 "1d1901zzsfml97hb4mb3ah3ab1bk4kh7bn6m7xrj1rv0gk9wkhq7"))
52 (file-name (string-append name "-" version "-checkout"))))
53 (build-system cmake-build-system)
54 (arguments
55 '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
56 (native-inputs (list pkg-config))
57 (inputs
58 ;; Optionally, add Python + Boost for Python bindings.
59 (list sdl2))
60 (propagated-inputs
61 ;; 'Viewer.h' includes 'QGLWidget'.
62 (list qtbase-5 ;the viewer module needs Qt5 + MESA
63 mesa))
64 (synopsis "Robot simulator")
65 (description
66 "Enki is a robot simulator written in C++. It provides collision and
67limited physics support for robots evolving on a flat surface. On a
68contemporary desktop computer, Enki is able to simulate groups of robots
69hundred times faster than real-time.")
70
71 ;; The 'LICENSE' file as well as source file headers says that
72 ;; researchers using the software are "asked" to cite using a given
73 ;; citation, but that sentence is written as not being part of the
74 ;; license (fortunately).
75 (license license:gpl2+))))
76
77(define-public fusion
78 (package
79 (name "fusion")
80 (version "1.2.9")
81 (source
82 (origin
83 (method git-fetch)
84 (uri (git-reference
85 (url "https://github.com/xioTechnologies/Fusion")
86 (commit (string-append "v" version))))
87 (file-name (git-file-name name version))
88 (sha256
89 (base32 "0k5p9fc3zg49c9l8cfm08sgnzwkbz2brv7yfwsly2yfipl38w6xx"))))
90 (build-system cmake-build-system)
91 (arguments
92 (list
93 #:tests? #f
94 #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON")
95 #:phases
96 #~(modify-phases %standard-phases
97 (replace 'install
98 (lambda _ (install-file "Fusion/libFusion.so"
99 (string-append #$output "/lib")))))))
100 (home-page "https://github.com/xioTechnologies/Fusion")
101 (synopsis "Sensor fusion library for embedded systems")
102 (description "Fusion is a sensor fusion library implementing the Attitude
103and Heading Reference System (AHRS) algorithm, which combines available
104gyroscope, accelerometer, and magnetometer data into a single measurement of
105orientation relative to the Earth.")
106 (license license:expat)))