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