Commit | Line | Data |
---|---|---|
17ce0d45 EJ |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com> | |
0b69897b | 3 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
e8b40974 | 4 | ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com> |
27031358 | 5 | ;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org> |
8da3513f | 6 | ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> |
cdc81cce | 7 | ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> |
17ce0d45 EJ |
8 | ;;; |
9 | ;;; This file is part of GNU Guix. | |
10 | ;;; | |
11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
12 | ;;; under the terms of the GNU General Public License as published by | |
13 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
14 | ;;; your option) any later version. | |
15 | ;;; | |
16 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;;; GNU General Public License for more details. | |
20 | ;;; | |
21 | ;;; You should have received a copy of the GNU General Public License | |
22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
23 | ||
24 | (define-module (gnu packages cpp) | |
25 | #:use-module ((guix licenses) #:prefix license:) | |
26 | #:use-module (guix packages) | |
27 | #:use-module (guix download) | |
e8b40974 FT |
28 | #:use-module (guix git-download) |
29 | #:use-module (guix build-system cmake) | |
17ce0d45 | 30 | #:use-module (guix build-system gnu) |
7e08be71 | 31 | #:use-module (guix build-system python) |
17ce0d45 | 32 | #:use-module (gnu packages) |
e8b40974 FT |
33 | #:use-module (gnu packages autotools) |
34 | #:use-module (gnu packages check) | |
e3c0676a | 35 | #:use-module (gnu packages code) |
e8b40974 | 36 | #:use-module (gnu packages compression) |
e3c0676a | 37 | #:use-module (gnu packages llvm) |
cdc81cce | 38 | #:use-module (gnu packages perl) |
e8b40974 | 39 | #:use-module (gnu packages pkg-config) |
8da3513f MO |
40 | #:use-module (gnu packages tls) |
41 | #:use-module (gnu packages web)) | |
17ce0d45 EJ |
42 | |
43 | (define-public libzen | |
44 | (package | |
45 | (name "libzen") | |
c304543e | 46 | (version "0.4.37") |
17ce0d45 EJ |
47 | (source (origin |
48 | (method url-fetch) | |
c0588f98 PN |
49 | ;; Warning: This source has proved unreliable 1 time at least. |
50 | ;; Consider an alternate source or report upstream if this | |
51 | ;; happens again. | |
17ce0d45 EJ |
52 | (uri (string-append "https://mediaarea.net/download/source/" |
53 | name "/" version "/" | |
54 | name "_" version ".tar.bz2")) | |
55 | (sha256 | |
56 | (base32 | |
c0588f98 | 57 | "1dkqbgabzpa6bd7dkqrvd35sdxrhr6qxalb88f3dw0afk65xqb0k")))) |
17ce0d45 EJ |
58 | (native-inputs |
59 | `(("autoconf" ,autoconf) | |
60 | ("automake" ,automake) | |
61 | ("libtool" ,libtool))) | |
62 | (build-system gnu-build-system) | |
63 | (arguments | |
64 | '(#:phases | |
65 | ;; build scripts not in root of archive | |
66 | (modify-phases %standard-phases | |
d10092b8 | 67 | (add-after 'unpack 'pre-configure |
17ce0d45 | 68 | (lambda _ |
c0588f98 PN |
69 | (chdir "Project/GNU/Library") |
70 | #t))))) | |
17ce0d45 EJ |
71 | (home-page "https://github.com/MediaArea/ZenLib") |
72 | (synopsis "C++ utility library") | |
73 | (description "ZenLib is a C++ utility library. It includes classes for handling | |
74 | strings, configuration, bit streams, threading, translation, and cross-platform | |
75 | operating system functions.") | |
76 | (license license:zlib))) | |
e8b40974 FT |
77 | |
78 | (define-public rct | |
79 | (let* ((commit "b3e6f41d9844ef64420e628e0c65ed98278a843a") | |
1e72a23d | 80 | (revision "2")) |
e8b40974 FT |
81 | (package |
82 | (name "rct") | |
1e72a23d | 83 | (version (git-version "0.0.0" revision commit)) |
e8b40974 FT |
84 | (source (origin |
85 | (method git-fetch) | |
86 | (uri (git-reference | |
1e72a23d | 87 | (url "https://github.com/Andersbakken/rct") |
e8b40974 FT |
88 | (commit commit))) |
89 | (sha256 | |
90 | (base32 | |
91 | "1m2931jacka27ghnpgf1z1plkkr64z0pga4r4zdrfpp2d7xnrdvb")) | |
a893dc2f | 92 | (patches (search-patches "rct-add-missing-headers.patch")) |
e8b40974 FT |
93 | (file-name (git-file-name name version)))) |
94 | (build-system cmake-build-system) | |
95 | (arguments | |
96 | '(#:configure-flags | |
a893dc2f FT |
97 | '("-DWITH_TESTS=ON" ; To run the test suite |
98 | "-DRCT_RTTI_ENABLED=ON"))) | |
e8b40974 FT |
99 | (native-inputs |
100 | `(("cppunit" ,cppunit) | |
bad12e83 LF |
101 | ("pkg-config" ,pkg-config))) |
102 | (inputs | |
103 | `(("openssl" ,openssl) | |
e8b40974 | 104 | ("zlib" ,zlib))) |
1e72a23d | 105 | (home-page "https://github.com/Andersbakken/rct") |
e8b40974 FT |
106 | (synopsis "C++ library providing Qt-like APIs on top of the STL") |
107 | (description "Rct is a set of C++ tools that provide nicer (more Qt-like) | |
108 | APIs on top of Standard Template Library (@dfn{STL}) classes.") | |
109 | (license (list license:expat ; cJSON | |
110 | license:bsd-4))))) ; everything else (LICENSE.txt) | |
27031358 LC |
111 | |
112 | (define-public dashel | |
113 | (package | |
114 | (name "dashel") | |
115 | (version "1.3.3") | |
6d42b87f TGR |
116 | (source |
117 | (origin | |
118 | (method git-fetch) | |
119 | (uri (git-reference | |
120 | (url "https://github.com/aseba-community/dashel.git") | |
121 | (commit version))) | |
122 | (sha256 | |
123 | (base32 "0anks2l2i2qp0wlzqck1qgpq15a3l6dg8lw2h8s4nsj7f61lffwy")) | |
124 | (file-name (git-file-name name version)))) | |
27031358 | 125 | (build-system cmake-build-system) |
6d42b87f | 126 | (arguments '(#:tests? #f)) ; no tests |
27031358 | 127 | (native-inputs `(("pkg-config" ,pkg-config))) |
6d42b87f | 128 | (home-page "https://github.com/aseba-community/dashel") |
27031358 LC |
129 | (synopsis "Data stream helper encapsulation library") |
130 | (description | |
131 | "Dashel is a data stream helper encapsulation C++ library. It provides a | |
132 | unified access to TCP/UDP sockets, serial ports, console, and files streams. | |
133 | It also allows a server application to wait for any activity on any | |
134 | combination of these streams.") | |
135 | (license license:bsd-3))) | |
655ca713 FT |
136 | |
137 | (define-public xsimd | |
138 | (package | |
139 | (name "xsimd") | |
7f5c1233 | 140 | (version "7.2.3") |
e8211364 TGR |
141 | (source |
142 | (origin | |
143 | (method git-fetch) | |
144 | (uri (git-reference | |
145 | (url "https://github.com/QuantStack/xsimd.git") | |
146 | (commit version))) | |
147 | (sha256 | |
7f5c1233 | 148 | (base32 "1ny2qin1j4h35mljivh8z52kwdyjxf4yxlzb8j52ji91v2ccc88j")) |
e8211364 | 149 | (file-name (git-file-name name version)))) |
655ca713 FT |
150 | (build-system cmake-build-system) |
151 | (arguments | |
7f5c1233 TGR |
152 | `(#:configure-flags (list "-DBUILD_TESTS=ON") |
153 | #:test-target "xtest")) | |
655ca713 FT |
154 | (native-inputs |
155 | `(("googletest" ,googletest))) | |
e8211364 | 156 | (home-page "https://github.com/QuantStack/xsimd") |
655ca713 FT |
157 | (synopsis "C++ wrappers for SIMD intrinsics and math implementations") |
158 | (description "xsimd provides a unified means for using SIMD features for | |
159 | library authors. Namely, it enables manipulation of batches of numbers with | |
160 | the same arithmetic operators as for single values. It also provides | |
161 | accelerated implementation of common mathematical functions operating on | |
162 | batches.") | |
163 | (license license:bsd-3))) | |
385357c0 FT |
164 | |
165 | (define-public fifo-map | |
166 | (let* ((commit "0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9") | |
167 | (revision "0") | |
168 | (version (git-version "1.1.1" revision commit))) | |
169 | (package | |
170 | (name "fifo-map") | |
171 | (version version) | |
172 | (home-page "https://github.com/nlohmann/fifo_map") | |
173 | (source (origin | |
174 | (method git-fetch) | |
175 | (uri (git-reference | |
176 | (url home-page) | |
177 | (commit commit))) | |
178 | (sha256 | |
179 | (base32 | |
180 | "0pi77b75kp0l7z454ihcd14nzpi3nc5m4nyjbsgy5f9bw3676196")) | |
181 | (patches (search-patches "fifo-map-remove-catch.hpp.patch" | |
182 | "fifo-map-fix-flags-for-gcc.patch")) | |
183 | (file-name (git-file-name name version)) | |
184 | (modules '((guix build utils))) | |
185 | (snippet '(delete-file-recursively "./test/thirdparty")))) | |
186 | (native-inputs | |
187 | `(("catch2" ,catch-framework2))) | |
188 | (build-system cmake-build-system) | |
189 | (arguments | |
190 | `(#:phases | |
191 | (modify-phases %standard-phases | |
192 | (replace 'check | |
193 | (lambda _ | |
194 | (invoke "./unit"))) | |
195 | (replace 'install | |
196 | (lambda* (#:key outputs #:allow-other-keys) | |
197 | (let* ((out (assoc-ref outputs "out")) | |
198 | (inc (string-append out "/include/fifo_map"))) | |
199 | (with-directory-excursion | |
200 | (string-append "../" ,name "-" ,version "-checkout") | |
201 | (install-file "src/fifo_map.hpp" inc) | |
202 | #t))))))) | |
203 | (synopsis "FIFO-ordered associative container for C++") | |
204 | (description "Fifo_map is a C++ header only library for associative | |
205 | container which uses the order in which keys were inserted to the container | |
206 | as ordering relation.") | |
207 | (license license:expat)))) | |
e3c0676a FT |
208 | |
209 | (define-public json-modern-cxx | |
210 | (package | |
211 | (name "json-modern-cxx") | |
ff97c862 | 212 | (version "3.7.0") |
8f22bf9e | 213 | (home-page "https://github.com/nlohmann/json") |
e3c0676a FT |
214 | (source |
215 | (origin | |
8f22bf9e MB |
216 | (method git-fetch) |
217 | (uri (git-reference (url home-page) | |
218 | (commit (string-append "v" version)))) | |
e3c0676a FT |
219 | (sha256 |
220 | (base32 | |
ff97c862 | 221 | "0v7xih4zjixxxfvkfbs7a8j9qcvpwlsv4vrkbyns3hc7b44nb8ap")) |
8f22bf9e | 222 | (file-name (git-file-name name version)) |
e3c0676a FT |
223 | (modules '((guix build utils))) |
224 | (snippet | |
225 | '(begin | |
ff97c862 MB |
226 | ;; Delete bundled software. Preserve doctest_compatibility.h, which |
227 | ;; is a wrapper library added by this package. | |
228 | (install-file "./test/thirdparty/doctest/doctest_compatibility.h" "/tmp") | |
229 | (for-each delete-file-recursively | |
230 | '("./third_party" "./test/thirdparty" "./benchmarks/thirdparty")) | |
231 | (install-file "/tmp/doctest_compatibility.h" "./test/thirdparty/doctest") | |
232 | ||
233 | ;; Adjust for the unbundled fifo_map and doctest. | |
234 | (substitute* "./test/thirdparty/doctest/doctest_compatibility.h" | |
235 | (("#include \"doctest\\.h\"") | |
236 | "#include <doctest/doctest.h>")) | |
e3c0676a | 237 | (with-directory-excursion "test/src" |
ff97c862 | 238 | (let ((files (find-files "." "\\.cpp$"))) |
e3c0676a FT |
239 | (substitute* files |
240 | (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp) | |
241 | (string-append | |
8f22bf9e MB |
242 | "#include <fifo_map/" fifo-map-hpp ">"))))) |
243 | #t)))) | |
e3c0676a | 244 | (native-inputs |
ff97c862 MB |
245 | `(("amalgamate" ,amalgamate) |
246 | ("doctest" ,doctest))) | |
e3c0676a | 247 | (inputs |
ff97c862 | 248 | `(("fifo-map" ,fifo-map))) |
e3c0676a FT |
249 | (build-system cmake-build-system) |
250 | (synopsis "JSON parser and printer library for C++") | |
251 | (description "JSON for Modern C++ is a C++ JSON library that provides | |
cfcfc6ab | 252 | intuitive syntax and trivial integration.") |
e3c0676a | 253 | (license license:expat))) |
6f3c8506 FT |
254 | |
255 | (define-public xtl | |
256 | (package | |
257 | (name "xtl") | |
7dadce38 | 258 | (version "0.6.8") |
6f3c8506 | 259 | (source (origin |
0bb41aec KK |
260 | (method git-fetch) |
261 | (uri | |
262 | (git-reference | |
263 | (url "https://github.com/QuantStack/xtl.git") | |
264 | (commit version))) | |
6f3c8506 FT |
265 | (sha256 |
266 | (base32 | |
7dadce38 | 267 | "13gm8vm1b9nzvlcc632f9khnjw1xdjqj6c7k51r173y1hlk0div7")) |
0bb41aec | 268 | (file-name (git-file-name name version)))) |
6f3c8506 FT |
269 | (native-inputs |
270 | `(("googletest" ,googletest) | |
271 | ("json-modern-cxx" ,json-modern-cxx))) | |
272 | (arguments | |
273 | `(#:configure-flags | |
274 | '("-DBUILD_TESTS=ON") | |
275 | #:phases | |
276 | (modify-phases %standard-phases | |
277 | (replace 'check | |
278 | (lambda* _ | |
279 | (with-directory-excursion "test" | |
280 | (invoke "./test_xtl") | |
281 | #t)))))) | |
282 | (home-page "https://github.com/QuantStack/xtl") | |
283 | (build-system cmake-build-system) | |
284 | (synopsis "C++ template library providing some basic tools") | |
285 | (description "xtl is a C++ header-only template library providing basic | |
286 | tools (containers, algorithms) used by other QuantStack packages.") | |
287 | (license license:bsd-3))) | |
8da3513f MO |
288 | |
289 | (define-public ccls | |
290 | (package | |
291 | (name "ccls") | |
292 | (version "0.20190823.3") | |
293 | (source | |
294 | (origin | |
295 | (method git-fetch) | |
296 | (uri (git-reference | |
297 | (url "https://github.com/MaskRay/ccls") | |
298 | (commit version))) | |
299 | (sha256 | |
300 | (base32 "1sx31zp6q2qc6fz3r78rx34zp2x4blrqzxwbpww71vb6lp1clmdm")) | |
301 | (file-name (git-file-name name version)))) | |
302 | (build-system cmake-build-system) | |
303 | (arguments | |
304 | '(#:tests? #f)) ; no check target. | |
305 | (inputs | |
306 | `(("rapidjson" ,rapidjson))) | |
307 | (native-inputs | |
308 | `(("clang" ,clang) | |
309 | ("llvm" ,llvm))) | |
310 | (home-page "https://github.com/MaskRay/ccls") | |
311 | (synopsis "C/C++/Objective-C language server") | |
312 | (description | |
313 | "@code{ccls} is a server implementing the Language Server Protocol (LSP) | |
314 | for C, C++ and Objective-C languages. It uses @code{clang} to perform static | |
315 | code analysis and supports cross references, hierarchies, completion and | |
316 | syntax highlighting. @code{ccls} is derived from @code{cquery} which is not | |
317 | maintained anymore.") | |
318 | (license license:asl2.0))) | |
cdc81cce PN |
319 | |
320 | (define-public gperftools | |
321 | (package | |
322 | (name "gperftools") | |
323 | (version "2.7") | |
324 | (source | |
325 | (origin | |
326 | (method git-fetch) | |
327 | (uri (git-reference | |
328 | (url "https://github.com/gperftools/gperftools") | |
329 | (commit (string-append "gperftools-" version)))) | |
330 | (sha256 | |
331 | (base32 "0amvwrzn5qc0b0jpxpy5g6zkmj97zjh4hhjrd130hsg2lwwcwhy1")) | |
332 | (file-name (git-file-name name version)))) | |
333 | (build-system gnu-build-system) | |
334 | (native-inputs | |
335 | `(("autoconf" ,autoconf) | |
336 | ("automake" ,automake) | |
337 | ("libtool" ,libtool) | |
338 | ;; For tests: | |
339 | ("perl" ,perl))) | |
340 | (home-page "https://github.com/gperftools/gperftools") | |
341 | (synopsis "Multi-threaded malloc() and performance analysis tools for C++") | |
342 | (description | |
343 | "@code{gperftools} is a collection of a high-performance multi-threaded | |
344 | malloc() implementation plus some thread-friendly performance analysis | |
345 | tools: | |
346 | ||
347 | @itemize | |
348 | @item tcmalloc, | |
349 | @item heap profiler, | |
350 | @item heap checker, | |
351 | @item CPU checker. | |
352 | @end itemize\n") | |
353 | (license license:bsd-3))) | |
7e08be71 MO |
354 | |
355 | (define-public cpplint | |
356 | (package | |
357 | (name "cpplint") | |
358 | (version "1.4.4") | |
359 | (source | |
360 | (origin | |
361 | (method git-fetch) | |
362 | ;; Fetch from github instead of pypi, since the test cases are not in | |
363 | ;; the pypi archive. | |
364 | (uri (git-reference | |
365 | (url "https://github.com/cpplint/cpplint") | |
366 | (commit version))) | |
367 | (sha256 | |
368 | (base32 "1ns9wbizr10w7rpyp106d7ip68s5nyskr54vw9bij11sci9z0v3j")) | |
369 | (file-name (git-file-name name version)))) | |
370 | (build-system python-build-system) | |
371 | (home-page "https://github.com/cpplint/cpplint") | |
372 | (synopsis "Static code checker for C++") | |
373 | (description "@code{cpplint} is a command-line tool to check C/C++ files | |
374 | for style issues following Google’s C++ style guide. While Google maintains | |
375 | it's own version of the tool, this is a fork that aims to be more responsive | |
376 | and make @code{cpplint} usable in wider contexts.") | |
377 | (license license:bsd-3))) |