Commit | Line | Data |
---|---|---|
8f8b2451 | 1 | ;;; GNU Guix --- Functional package management for GNU |
b457f3cc | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020 Andreas Enge <andreas@enge.fr> |
da95c817 | 3 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> |
a53d6719 | 4 | ;;; Copyright © 2014, 2016, 2017 John Darrington <jmd@gnu.org> |
aa2e83cc | 5 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Eric Bavier <bavier@posteo.net> |
df354a77 | 6 | ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch> |
182d6311 | 7 | ;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org> |
0b2c8838 | 8 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> |
32158110 | 9 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
df129041 | 10 | ;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org> |
f0a9cb9c | 11 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
45147b0c | 12 | ;;; Copyright © 2015 Fabian Harfert <fhmgufs@web.de> |
ec8c7e47 | 13 | ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> |
1d3c6a31 | 14 | ;;; Copyright © 2016, 2018, 2020 Kei Kebreau <kkebreau@posteo.net> |
ba40ce5b | 15 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> |
d7cff656 | 16 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> |
2fd26d05 | 17 | ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be> |
f1cc312e | 18 | ;;; Copyright © 2017, 2018, 2019, 2020 Paul Garlick <pgarlick@tourbillion-technology.com> |
3c986a7d | 19 | ;;; Copyright © 2017 Nikita <nikita@n0.is> |
ba1be533 | 20 | ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com> |
d109b1e8 | 21 | ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org> |
b18b9d20 | 22 | ;;; Copyright © 2017, 2019 Arun Isaac <arunisaac@systemreboot.net> |
0fe654eb | 23 | ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
dc7d6d4e | 24 | ;;; Copyright © 2017 Dave Love <me@fx@gnu.org> |
3bc74090 | 25 | ;;; Copyright © 2018, 2019 Jan Nieuwenhuizen <janneke@gnu.org> |
41835f94 | 26 | ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> |
910deec6 | 27 | ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com> |
07254d8b | 28 | ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com> |
c745b6f6 | 29 | ;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com> |
daa6036f | 30 | ;;; Copyright © 2018 Eric Brown <brown@fastmail.com> |
564cf93f | 31 | ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> |
c2cf286c | 32 | ;;; Copyright © 2018 Amin Bandali <bandali@gnu.org> |
6f8c4195 | 33 | ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
4cb5d251 | 34 | ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com> |
3b7828cc | 35 | ;;; Copyright © 2019 Robert Smith <robertsmith@posteo.net> |
f6b4d395 | 36 | ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> |
aac148a8 | 37 | ;;; Copyright © 2020 Felix Gruber <felgru@posteo.net> |
70c98efa | 38 | ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in> |
525e83ec | 39 | ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> |
b60e2d48 | 40 | ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz> |
8f8b2451 AE |
41 | ;;; |
42 | ;;; This file is part of GNU Guix. | |
43 | ;;; | |
44 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
45 | ;;; under the terms of the GNU General Public License as published by | |
46 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
47 | ;;; your option) any later version. | |
48 | ;;; | |
49 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
50 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
51 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
52 | ;;; GNU General Public License for more details. | |
53 | ;;; | |
54 | ;;; You should have received a copy of the GNU General Public License | |
55 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
56 | ||
57 | (define-module (gnu packages maths) | |
ec322be2 | 58 | #:use-module (ice-9 regex) |
a6b9ebc2 | 59 | #:use-module (ice-9 match) |
8f8b2451 | 60 | #:use-module (gnu packages) |
b5b73a82 | 61 | #:use-module ((guix licenses) #:prefix license:) |
8f8b2451 AE |
62 | #:use-module (guix packages) |
63 | #:use-module (guix download) | |
54052a54 | 64 | #:use-module (guix git-download) |
0e2672ae | 65 | #:use-module (guix utils) |
fa574a6d | 66 | #:use-module ((guix build utils) #:select (alist-replace)) |
da95c817 | 67 | #:use-module (guix build-system cmake) |
72c71d24 | 68 | #:use-module (guix build-system glib-or-gtk) |
c9dfa3c7 | 69 | #:use-module (guix build-system gnu) |
560acf25 | 70 | #:use-module (guix build-system python) |
63e07468 | 71 | #:use-module (guix build-system ruby) |
3de01d3f | 72 | #:use-module (gnu packages algebra) |
ab5f3f21 | 73 | #:use-module (gnu packages audio) |
5143517c | 74 | #:use-module (gnu packages autotools) |
fa574a6d | 75 | #:use-module (gnu packages base) |
3de01d3f | 76 | #:use-module (gnu packages bison) |
a17d4564 | 77 | #:use-module (gnu packages boost) |
e73b49fb | 78 | #:use-module (gnu packages check) |
3de01d3f | 79 | #:use-module (gnu packages cmake) |
c9dfa3c7 | 80 | #:use-module (gnu packages compression) |
668c06ac | 81 | #:use-module (gnu packages curl) |
b7b27a8f | 82 | #:use-module (gnu packages cyrus-sasl) |
8a0dd289 | 83 | #:use-module (gnu packages dbm) |
528bb464 | 84 | #:use-module (gnu packages documentation) |
57e544e8 | 85 | #:use-module (gnu packages elf) |
70c98efa | 86 | #:use-module (gnu packages file) |
3de01d3f | 87 | #:use-module (gnu packages flex) |
668c06ac | 88 | #:use-module (gnu packages fltk) |
f3929800 | 89 | #:use-module (gnu packages fontutils) |
1dba6407 | 90 | #:use-module (gnu packages gettext) |
da95c817 | 91 | #:use-module (gnu packages gcc) |
73fed4f8 | 92 | #:use-module (gnu packages gd) |
668c06ac | 93 | #:use-module (gnu packages ghostscript) |
70c98efa | 94 | #:use-module (gnu packages glib) |
889187a4 | 95 | #:use-module (gnu packages graphviz) |
f3929800 | 96 | #:use-module (gnu packages gtk) |
70c98efa | 97 | #:use-module (gnu packages icu4c) |
45147b0c | 98 | #:use-module (gnu packages image) |
2fd26d05 | 99 | #:use-module (gnu packages java) |
668c06ac | 100 | #:use-module (gnu packages less) |
8731e527 | 101 | #:use-module (gnu packages lisp) |
ab5f3f21 | 102 | #:use-module (gnu packages linux) |
bc3a2e35 | 103 | #:use-module (gnu packages logging) |
6e64766a | 104 | #:use-module (gnu packages lua) |
5698b8b8 | 105 | #:use-module (gnu packages gnome) |
1b39a196 | 106 | #:use-module (gnu packages guile) |
668c06ac JD |
107 | #:use-module (gnu packages xorg) |
108 | #:use-module (gnu packages gl) | |
9f913401 | 109 | #:use-module (gnu packages imagemagick) |
8731e527 | 110 | #:use-module (gnu packages m4) |
d8c7eeb9 | 111 | #:use-module (gnu packages mpi) |
b92eee75 | 112 | #:use-module (gnu packages multiprecision) |
528bb464 | 113 | #:use-module (gnu packages netpbm) |
bd3d71cb | 114 | #:use-module (gnu packages onc-rpc) |
668c06ac | 115 | #:use-module (gnu packages pcre) |
5698b8b8 | 116 | #:use-module (gnu packages popt) |
c9dfa3c7 AE |
117 | #:use-module (gnu packages perl) |
118 | #:use-module (gnu packages pkg-config) | |
ab5f3f21 | 119 | #:use-module (gnu packages pulseaudio) |
da95c817 | 120 | #:use-module (gnu packages python) |
589e3f4e | 121 | #:use-module (gnu packages python-web) |
44d10b1f | 122 | #:use-module (gnu packages python-xyz) |
5b05dce7 | 123 | #:use-module (gnu packages qt) |
c9dfa3c7 | 124 | #:use-module (gnu packages readline) |
63e07468 | 125 | #:use-module (gnu packages ruby) |
2742f87e | 126 | #:use-module (gnu packages tbb) |
479c4273 | 127 | #:use-module (gnu packages scheme) |
b7194849 | 128 | #:use-module (gnu packages shells) |
df354a77 | 129 | #:use-module (gnu packages tcl) |
668c06ac | 130 | #:use-module (gnu packages texinfo) |
8f9ac901 | 131 | #:use-module (gnu packages tex) |
b7b27a8f | 132 | #:use-module (gnu packages tls) |
5b05dce7 | 133 | #:use-module (gnu packages version-control) |
9aafbc0c | 134 | #:use-module (gnu packages wxwidgets) |
c12efc72 | 135 | #:use-module (gnu packages xml) |
a17d4564 | 136 | #:use-module (srfi srfi-1)) |
8f8b2451 | 137 | |
193abc82 JD |
138 | (define-public aris |
139 | (package | |
1f45f18a JD |
140 | (name "aris") |
141 | (version "2.2") | |
142 | (source (origin | |
143 | (method url-fetch) | |
144 | (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz")) | |
145 | (sha256 (base32 | |
146 | "1q1887ryqdr9sn0522hc7p16kqwlxxyz5dkmma8ar2nxplhgll7q")))) | |
147 | (build-system gnu-build-system) | |
148 | (inputs `(("gtk+" ,gtk+) | |
149 | ("libxml2" ,libxml2))) | |
150 | (native-inputs `(("pkg-config" ,pkg-config))) | |
151 | (synopsis "Natural deduction first-order logic interface") | |
152 | (description "Aris is a program for performing logical proofs. It supports | |
153 | propositional and predicate logic, as well as Boolean algebra and | |
154 | arithmetical logic. In addition to its predefined inference and equivalence | |
155 | rules, Aris also supports references to older proofs. Its use of standard | |
156 | logical symbols and its natural deduction interface make it easy to use for | |
157 | beginners.") | |
158 | (license license:gpl3+) | |
6fd52309 | 159 | (home-page "https://www.gnu.org/software/aris/"))) |
193abc82 | 160 | |
9c45c519 JD |
161 | (define-public c-graph |
162 | (package | |
163 | (name "c-graph") | |
0ef54303 | 164 | (version "2.0.1") |
9c45c519 JD |
165 | (source (origin |
166 | (method url-fetch) | |
167 | (uri (string-append "mirror://gnu/c-graph/c-graph-" version | |
168 | ".tar.gz")) | |
169 | (sha256 (base32 | |
0ef54303 | 170 | "092412jzxy6wdvpk96pfj499hpmaww8xllavbvlqspfpr7ips9id")))) |
9c45c519 JD |
171 | (build-system gnu-build-system) |
172 | (inputs | |
0ef54303 | 173 | `(("fortran" ,gfortran))) |
a3947cb1 | 174 | (synopsis "Visualizing and demonstrating convolution") |
9c45c519 | 175 | (description |
0ef54303 | 176 | "GNU C-Graph is a tool for demonstrating the theory of convolution. |
a3947cb1 LC |
177 | Thus, it can serve as an excellent aid to students of signal and systems |
178 | theory in visualizing the convolution process. Rather than forcing the | |
179 | student to write code, the program offers an intuitive interface with | |
180 | interactive dialogs to guide them.") | |
9c45c519 | 181 | (license license:gpl3+) |
6fd52309 | 182 | (home-page "https://www.gnu.org/software/c-graph/"))) |
9c45c519 | 183 | |
d91025e3 TD |
184 | (define-public coda |
185 | (package | |
186 | (name "coda") | |
9285f8bb | 187 | (version "2.19") |
d91025e3 TD |
188 | (source |
189 | (origin | |
190 | (method url-fetch) | |
191 | (uri (string-append "https://github.com/stcorp/coda/releases/download/" | |
192 | version "/coda-" version ".tar.gz")) | |
193 | (sha256 | |
9285f8bb | 194 | (base32 "1fbxd2afm7dshd92p10yy8dwbr9gc1h1fmnnnmr7d0c5lnw80245")) |
4b12fe5c TD |
195 | (patches (search-patches "coda-use-system-libs.patch")) |
196 | (modules '((guix build utils))) | |
197 | (snippet | |
198 | ;; Make sure we don't use the bundled software. | |
6cbee49d MW |
199 | '(begin |
200 | (for-each (lambda (d) | |
201 | (delete-file-recursively (string-append "libcoda/" d))) | |
202 | '("zlib" "pcre" "expat")) | |
203 | #t)))) | |
d91025e3 TD |
204 | (native-inputs |
205 | `(("fortran" ,gfortran) | |
206 | ("python" ,python) | |
207 | ("python-numpy" ,python-numpy))) | |
208 | (inputs | |
209 | `(("zlib" ,zlib) | |
4b12fe5c TD |
210 | ("pcre" ,pcre) |
211 | ("expat" ,expat) | |
d91025e3 TD |
212 | ("hdf4" ,hdf4-alt) |
213 | ("hdf5" ,hdf5))) | |
214 | (build-system gnu-build-system) | |
215 | (arguments | |
4b12fe5c TD |
216 | '(#:configure-flags '("--with-hdf4" "--with-hdf5" "--enable-python" |
217 | "LIBS= -lz -lpcre -lexpat"))) | |
d91025e3 TD |
218 | (synopsis "A common interface to various earth observation data formats") |
219 | (description | |
220 | "The Common Data Access toolbox (CODA) provides a set of interfaces for | |
221 | reading remote sensing data from earth observation data files. It consists of | |
222 | command line applications and interfaces to the C, Fortran, Python, and Java | |
223 | programming languages.") | |
224 | (home-page "https://stcorp.nl/coda") | |
225 | (license license:gpl2+))) | |
226 | ||
d65f0661 KK |
227 | (define-public qhull |
228 | (package | |
229 | (name "qhull") | |
9e919830 | 230 | (version "2019.1") |
d65f0661 KK |
231 | (source (origin |
232 | (method url-fetch) | |
233 | (uri (string-append "http://www.qhull.org/download/qhull-" | |
234 | (car (string-split version #\.)) | |
9e919830 | 235 | "-src-7.3.2.tgz")) |
d65f0661 KK |
236 | (sha256 |
237 | (base32 | |
9e919830 | 238 | "1ys3vh3qq0v9lh452xb932vp63advds1pxk42lk7cc1niiar0y9b")))) |
d65f0661 KK |
239 | (build-system cmake-build-system) |
240 | (synopsis "Calculate convex hulls and related structures") | |
241 | (description | |
242 | "@code{Qhull} computes the convex hull, Delaunay triangulation, Voronoi | |
243 | diagram, halfspace intersection about a point, furthest-site Delaunay | |
244 | triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, | |
245 | 3-d, 4-d, and higher dimensions. @code{Qhull} implements the Quickhull | |
246 | algorithm for computing the convex hull. It handles roundoff errors from | |
247 | floating point arithmetic. It computes volumes, surface areas, and | |
248 | approximations to the convex hull. | |
249 | ||
250 | @code{Qhull} does not support triangulation of non-convex surfaces, mesh | |
251 | generation of non-convex objects, medium-sized inputs in 9-D and higher, alpha | |
252 | shapes, weighted Voronoi diagrams, Voronoi volumes, or constrained Delaunay | |
253 | triangulations.") | |
254 | (home-page "http://qhull.org") | |
255 | (license (license:non-copyleft "file://COPYING.txt" | |
256 | "See COPYING in the distribution.")))) | |
257 | ||
a8fa86c4 RW |
258 | (define-public python-cvxopt |
259 | (package | |
260 | (name "python-cvxopt") | |
a7c7015a | 261 | (version "1.2.3") |
a8fa86c4 RW |
262 | (source (origin |
263 | (method git-fetch) | |
264 | (uri (git-reference | |
265 | (url "https://github.com/cvxopt/cvxopt.git") | |
266 | (commit version))) | |
267 | (file-name (git-file-name name version)) | |
268 | (sha256 | |
269 | (base32 | |
a7c7015a | 270 | "1kiy2m62xgs2d5id6dnnwy4vap85cd70p7pgkb9nh23qf9xnak7b")))) |
a8fa86c4 RW |
271 | (build-system python-build-system) |
272 | (arguments | |
273 | `(#:phases | |
274 | (modify-phases %standard-phases | |
275 | (add-after 'unpack 'find-libraries | |
276 | (lambda* (#:key inputs #:allow-other-keys) | |
277 | (setenv "CVXOPT_BLAS_LIB" "openblas") | |
278 | (setenv "CVXOPT_BUILD_FFTW" "1") | |
279 | (setenv "CVXOPT_BUILD_GLPK" "1") | |
280 | (setenv "CVXOPT_BUILD_GSL" "1") | |
281 | #t))))) | |
282 | (inputs | |
283 | `(("fftw" ,fftw) | |
284 | ("glpk" ,glpk) | |
285 | ("gsl" ,gsl) | |
286 | ("lapack" ,lapack) | |
287 | ("openblas" ,openblas) | |
288 | ("suitesparse" ,suitesparse))) | |
289 | (home-page "https://www.cvxopt.org") | |
290 | (synopsis "Python library for convex optimization") | |
291 | (description | |
292 | "CVXOPT is a package for convex optimization based on the Python | |
293 | programming language. Its main purpose is to make the development of software | |
294 | for convex optimization applications straightforward by building on Python’s | |
295 | extensive standard library and on the strengths of Python as a high-level | |
296 | programming language.") | |
297 | (license license:gpl3+))) | |
298 | ||
299 | (define-public python2-cvxopt | |
300 | (package-with-python2 python-cvxopt)) | |
301 | ||
8f8b2451 AE |
302 | (define-public units |
303 | (package | |
304 | (name "units") | |
494a8cd0 | 305 | (version "2.19") |
8f8b2451 AE |
306 | (source (origin |
307 | (method url-fetch) | |
308 | (uri (string-append "mirror://gnu/units/units-" version | |
309 | ".tar.gz")) | |
310 | (sha256 (base32 | |
494a8cd0 | 311 | "0mk562g7dnidjgfgvkxxpvlba66fh1ykmfd9ylzvcln1vxmi6qj2")))) |
8f8b2451 | 312 | (build-system gnu-build-system) |
0498d248 | 313 | (inputs |
a2549713 EB |
314 | `(("readline" ,readline) |
315 | ("python" ,python-wrapper) ;for 'units_cur' script | |
0498d248 EB |
316 | ("python-requests" ,python-requests))) |
317 | (arguments | |
318 | `(#:phases (modify-phases %standard-phases | |
319 | (add-after 'install 'wrap-units_cur | |
320 | (lambda* (#:key outputs #:allow-other-keys) | |
321 | (let* ((out (assoc-ref outputs "out")) | |
322 | (bin (string-append out "/bin"))) | |
323 | (wrap-program (string-append bin "/units_cur") | |
324 | `("PYTHONPATH" ":" prefix | |
325 | ,(search-path-as-string->list (getenv "PYTHONPATH")))) | |
326 | #t)))))) | |
8f8b2451 AE |
327 | (synopsis "Conversion between thousands of scales") |
328 | (description | |
574e86f9 | 329 | "GNU Units converts numeric quantities between units of measure. It |
7c125ce0 AK |
330 | can handle scale changes through adaptive usage of standard scale |
331 | prefixes (micro-, kilo-, etc.). It can also handle nonlinear | |
332 | conversions such as Fahrenheit to Celsius. Its interpreter is powerful | |
333 | enough to be used effectively as a scientific calculator.") | |
8f8b2451 | 334 | (license license:gpl3+) |
6fd52309 | 335 | (home-page "https://www.gnu.org/software/units/"))) |
c9dfa3c7 | 336 | |
61a529b4 RW |
337 | (define-public double-conversion |
338 | (package | |
339 | (name "double-conversion") | |
1c7d7f3f | 340 | (version "3.1.5") |
b343850e | 341 | (home-page "https://github.com/google/double-conversion") |
61a529b4 | 342 | (source (origin |
2bdc73fb | 343 | (method git-fetch) |
a4de1a65 MB |
344 | (uri (git-reference (url home-page) |
345 | (commit (string-append "v" version)))) | |
2bdc73fb | 346 | (file-name (git-file-name name version)) |
61a529b4 RW |
347 | (sha256 |
348 | (base32 | |
1c7d7f3f | 349 | "0csy4pjw1p8rp6g5qxi2h0ychhhp1fldv7gb761627fs2mclw9gv")))) |
61a529b4 RW |
350 | (build-system cmake-build-system) |
351 | (arguments | |
352 | '(#:test-target "test" | |
353 | #:configure-flags '("-DBUILD_SHARED_LIBS=ON" | |
354 | "-DBUILD_TESTING=ON"))) | |
61a529b4 RW |
355 | (synopsis "Conversion routines for IEEE doubles") |
356 | (description | |
357 | "The double-conversion library provides binary-decimal and decimal-binary | |
358 | routines for IEEE doubles. The library consists of efficient conversion | |
359 | routines that have been extracted from the V8 JavaScript engine.") | |
360 | (license license:bsd-3))) | |
361 | ||
182d6311 ML |
362 | (define-public dionysus |
363 | (package | |
364 | (name "dionysus") | |
bd041e7f | 365 | (version "1.4.0") |
182d6311 ML |
366 | (source (origin |
367 | (method url-fetch) | |
368 | (uri (string-append "mirror://gnu/dionysus/dionysus-" version | |
bd041e7f | 369 | ".tar.xz")) |
182d6311 ML |
370 | (sha256 |
371 | (base32 | |
bd041e7f | 372 | "194pzs1mlsj4ww6v37qq3961h5hckm5h805cv0r14xj3g9wfx2sk")))) |
182d6311 ML |
373 | (build-system gnu-build-system) |
374 | (inputs `(("tcl" ,tcl))) ;for 'tclsh' | |
375 | (synopsis "Local search for universal constants and scientific values") | |
376 | (description | |
377 | "GNU Dionysus is a convenient system for quickly retrieving the values of | |
378 | mathematical constants used in science and engineering. Values can be | |
379 | searched using a simple command-line tool, choosing from three databases: | |
380 | universal constants, atomic numbers, and constants related to | |
381 | semiconductors.") | |
382 | (license license:gpl3+) | |
6fd52309 | 383 | (home-page "https://www.gnu.org/software/dionysus/"))) |
182d6311 | 384 | |
b60e2d48 NB |
385 | (define-public dsfmt |
386 | (package | |
387 | (name "dsfmt") | |
388 | (version "2.2.3") | |
389 | (source | |
390 | (origin | |
391 | (method url-fetch) | |
392 | (uri | |
393 | (string-append | |
394 | "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/" | |
395 | "dSFMT-src-" version ".tar.gz")) | |
396 | (sha256 | |
397 | (base32 | |
398 | "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42")) | |
399 | (modules '((guix build utils))) | |
400 | ;; Don't distribute html documentation with bundled jquery. | |
401 | (snippet | |
402 | '(begin | |
403 | (delete-file-recursively "html") #t)) | |
404 | ;; Add patches borrowed from Julia. | |
405 | (patches | |
406 | (list | |
407 | (origin | |
408 | (method url-fetch) | |
409 | (uri (string-append | |
410 | "https://raw.githubusercontent.com/JuliaLang/julia/" | |
411 | "v1.3.0/deps/patches/dSFMT.c.patch")) | |
412 | (sha256 (base32 | |
413 | "09mhv11bms8jsmkmdqvlcgljwhzw3b6n9nncpi2b6dla9798hw2y")) | |
414 | (file-name "dSFMT.c.patch")) | |
415 | (origin | |
416 | (method url-fetch) | |
417 | (uri (string-append | |
418 | "https://raw.githubusercontent.com/JuliaLang/julia/" | |
419 | "v1.3.0/deps/patches/dSFMT.h.patch")) | |
420 | (sha256 (base32 | |
421 | "1py5rd0yxic335lzka23f6x2dhncrpizpyrk57gi2f28c0p98y5n")) | |
422 | (file-name "dSFMT.h.patch")))))) | |
423 | (build-system gnu-build-system) | |
424 | (arguments | |
425 | `(#:phases | |
426 | (modify-phases %standard-phases | |
427 | (delete 'configure) ; no configure script | |
428 | (replace 'build | |
429 | ;; Upstream Makefile does not build a shared library. Borrow from Julia | |
430 | ;; https://github.com/JuliaLang/julia/blob/v1.3.0/deps/dsfmt.mk | |
431 | (lambda _ | |
432 | (invoke | |
433 | "gcc" "-DNDEBUG" "-DDSFMT_MEXP=19937" | |
434 | "-fPIC" "-DDSFMT_DO_NOT_USE_OLD_NAMES" | |
435 | "-O3" "-finline-functions" "-fomit-frame-pointer" | |
436 | "-fno-strict-aliasing" "--param" "max-inline-insns-single=1800" | |
437 | "-Wmissing-prototypes" "-Wall" "-std=c99" "-shared" "dSFMT.c" | |
438 | "-o" "libdSFMT.so"))) | |
439 | (replace 'install ; no "install" target | |
440 | (lambda* (#:key outputs #:allow-other-keys) | |
441 | (let* ((out (assoc-ref outputs "out")) | |
442 | (lib (string-append out "/lib")) | |
443 | (inc (string-append out "/include")) | |
444 | (doc (string-append out "/share/doc/" ,name "-" ,version))) | |
445 | (install-file "libdSFMT.so" lib) | |
446 | (install-file "dSFMT.h" inc) | |
447 | (install-file "LICENSE.txt" doc) | |
448 | #t)))))) | |
449 | (synopsis "Double precision SIMD-oriented Fast Mersenne Twister") | |
450 | (description | |
451 | "The dSMFT package speeds up Fast Mersenne Twister generation by avoiding | |
452 | the expensive conversion of integer to double (floating point). dSFMT directly | |
453 | generates double precision floating point pseudorandom numbers which have the | |
454 | IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985) | |
455 | format. dSFMT is only available on the CPUs which use IEEE 754 format double | |
456 | precision floating point numbers.") | |
457 | (home-page "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/") | |
458 | (license license:bsd-3))) | |
459 | ||
88bd1804 AE |
460 | (define-public gsl |
461 | (package | |
462 | (name "gsl") | |
7ad3c812 | 463 | (version "2.6") |
ab2cc5cd LC |
464 | (source (origin |
465 | (method url-fetch) | |
466 | (uri (string-append "mirror://gnu/gsl/gsl-" | |
467 | version ".tar.gz")) | |
468 | (sha256 | |
469 | (base32 | |
7ad3c812 | 470 | "1a460zj9xmbgvcymkdhqh313c4l29mn9cffbi5vf33x3qygk70mp")))) |
88bd1804 | 471 | (build-system gnu-build-system) |
71e0f288 | 472 | (arguments |
c745b6f6 MB |
473 | (let ((system (%current-system))) |
474 | (cond | |
f0a9cb9c EF |
475 | ((or (string-prefix? "aarch64" system) |
476 | (string-prefix? "powerpc" system)) | |
477 | ;; Some sparse matrix tests are failing on AArch64 and PowerPC: | |
c745b6f6 MB |
478 | ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html |
479 | '(#:phases (modify-phases %standard-phases | |
480 | (add-before 'check 'disable-failing-tests | |
481 | (lambda _ | |
482 | (substitute* "spmatrix/test.c" | |
483 | ((".*test_complex.*") "\n")) | |
484 | #t))))) | |
0ad05c15 | 485 | ((string-prefix? "i686" system) |
c745b6f6 MB |
486 | ;; There are rounding issues with these tests on i686: |
487 | ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html | |
488 | ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html | |
489 | '(#:phases (modify-phases %standard-phases | |
490 | (add-before 'check 'disable-failing-tests | |
491 | (lambda _ | |
492 | (substitute* "linalg/test.c" | |
493 | ((".*gsl_test\\(test_LU_decomp.*") "\n") | |
494 | ((".*gsl_test\\(test_LUc_decomp.*") "\n") | |
495 | ((".*gsl_test\\(test_cholesky_decomp.*") "\n") | |
496 | ((".*gsl_test\\(test_COD_lssolve2.*") "\n")) | |
497 | (substitute* "spmatrix/test.c" | |
498 | ((".*test_all.*") "\n") | |
499 | ((".*test_float.*") "\n") | |
500 | ((".*test_complex.*") "\n")) | |
501 | #t))))) | |
502 | (else '())))) | |
6f766069 | 503 | (home-page "https://www.gnu.org/software/gsl/") |
88bd1804 AE |
504 | (synopsis "Numerical library for C and C++") |
505 | (description | |
a22dc0c4 LC |
506 | "The GNU Scientific Library is a library for numerical analysis in C |
507 | and C++. It includes a wide range of mathematical routines, with over 1000 | |
508 | functions in total. Subject areas covered by the library include: | |
509 | differential equations, linear algebra, Fast Fourier Transforms and random | |
510 | numbers.") | |
88bd1804 AE |
511 | (license license:gpl3+))) |
512 | ||
b92eee75 AE |
513 | (define-public glpk |
514 | (package | |
515 | (name "glpk") | |
445929e0 | 516 | (version "4.65") |
b92eee75 AE |
517 | (source |
518 | (origin | |
519 | (method url-fetch) | |
520 | (uri (string-append "mirror://gnu/glpk/glpk-" | |
521 | version ".tar.gz")) | |
522 | (sha256 | |
523 | (base32 | |
445929e0 | 524 | "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2")))) |
b92eee75 AE |
525 | (build-system gnu-build-system) |
526 | (inputs | |
527 | `(("gmp" ,gmp))) | |
528 | (arguments | |
529 | `(#:configure-flags '("--with-gmp"))) | |
82110ef6 | 530 | (home-page "https://www.gnu.org/software/glpk/") |
79c311b8 | 531 | (synopsis "GNU Linear Programming Kit, supporting the MathProg language") |
b92eee75 AE |
532 | (description |
533 | "GLPK is a C library for solving large-scale linear programming (LP), | |
534 | mixed integer programming (MIP), and other related problems. It supports the | |
535 | GNU MathProg modeling language, a subset of the AMPL language, and features a | |
536 | translator for the language. In addition to the C library, a stand-alone | |
537 | LP/MIP solver is included in the package.") | |
538 | (license license:gpl3+))) | |
539 | ||
b146763a AE |
540 | (define-public 4ti2 |
541 | (package | |
542 | (name "4ti2") | |
eea4a091 | 543 | (version "1.6.9") |
b146763a AE |
544 | (source |
545 | (origin | |
eea4a091 TGR |
546 | (method url-fetch) |
547 | (uri (string-append "https://github.com/4ti2/4ti2/releases/download/" | |
548 | "Release_" | |
549 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) | |
550 | version) | |
551 | "/4ti2-" version ".tar.gz")) | |
552 | (sha256 | |
553 | (base32 "0rj92x6p9m3la5gasjbj7sa569im527ffmka5y2sv1amgd3fflrh")))) | |
b146763a AE |
554 | (build-system gnu-build-system) |
555 | (native-inputs | |
556 | `(("which" ,(@ (gnu packages base) which)))) ; for the tests | |
557 | (inputs | |
558 | `(("glpk" ,glpk) | |
559 | ("gmp" ,gmp))) | |
560 | (home-page "http://www.4ti2.de/") | |
561 | (synopsis "Mathematical tool suite for problems on linear spaces") | |
562 | (description | |
563 | "4ti2 implements algorithms for solving algebraic, geometric and | |
564 | combinatorial problems on linear spaces. Among others, it solves systems | |
565 | of linear equations, computes extreme rays of polyhedral cones, solves | |
566 | integer programming problems and computes Markov bases for statistics.") | |
567 | (license license:gpl2+))) | |
568 | ||
53696f10 AE |
569 | (define-public cddlib |
570 | (package | |
571 | (name "cddlib") | |
7fe491fb | 572 | (version "0.94i") |
53696f10 AE |
573 | (source |
574 | (origin | |
575 | (method url-fetch) | |
182dde82 | 576 | (uri (string-append "ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-" |
53696f10 AE |
577 | (string-delete #\. version) ".tar.gz")) |
578 | (sha256 | |
579 | (base32 | |
7fe491fb | 580 | "00zdgiqb91vx6gd2103h3ijij0llspsxc6zz3iw2bll39fvkl4xq")))) |
53696f10 AE |
581 | (build-system gnu-build-system) |
582 | (inputs | |
583 | `(("gmp" ,gmp))) | |
584 | (home-page "https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html") | |
585 | (synopsis "Library for convex hulls and extreme rays of polyhedra") | |
586 | (description | |
587 | "The C-library cddlib implements the Double Description Method of | |
588 | Motzkin et al. for generating all vertices (i.e. extreme points) and extreme | |
589 | rays of a general convex polyhedron given by a system of linear inequalities | |
590 | in arbitrary dimension. It can also be used for the converse operation of | |
591 | computing convex hulls.") | |
592 | (license license:gpl2+))) | |
593 | ||
0ffc2d53 AE |
594 | (define-public lrslib |
595 | (package | |
596 | (name "lrslib") | |
597 | (version "7.0a") | |
598 | (source | |
599 | (origin | |
600 | (method url-fetch) | |
601 | (uri (string-append "http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/" | |
602 | "lrslib-0" | |
603 | (string-delete #\. version) ".tar.gz")) | |
604 | (sha256 | |
605 | (base32 | |
606 | "034fa45r9hwx6ljmgpxk2872q34nklkalpdkc6s9hqw57rivi36k")))) | |
607 | (build-system gnu-build-system) | |
608 | (inputs | |
609 | `(("gmp" ,gmp))) | |
610 | (arguments | |
611 | `(#:tests? #f ; no check phase | |
612 | #:make-flags `("CC=gcc" | |
613 | ,(string-append "prefix=" (assoc-ref %outputs "out")) | |
614 | "all-shared") | |
615 | #:phases | |
616 | (modify-phases %standard-phases | |
617 | (replace 'configure | |
618 | (lambda _ | |
619 | (substitute* "makefile" | |
620 | (("-L \\.") "-L . -Wl,-rpath='$$ORIGIN/../lib'")) | |
621 | #t))))) | |
622 | (home-page "http://cgm.cs.mcgill.ca/~avis/C/lrs.html") | |
623 | (synopsis "Convex hulls of polyhedra with exact arithmetic") | |
624 | (description | |
625 | "The C code of lrslib implements the reverse search algorithm for | |
626 | vertex enumeration and convex hull problems. Its input file format is | |
627 | compatible with cddlib. All computations are done exactly in either | |
628 | multiple precision or fixed integer arithmetic. Output is not stored | |
629 | in memory, so even problems with very large output sizes can sometimes | |
630 | be solved.") | |
631 | (license license:gpl2+))) | |
632 | ||
b457f3cc AE |
633 | (define-public vinci |
634 | (package | |
635 | (name "vinci") | |
636 | (version "1.0.5") | |
637 | (source | |
638 | (origin | |
639 | (method url-fetch) | |
640 | (uri (string-append "https://www.math.u-bordeaux.fr/~aenge/software/" | |
641 | "vinci/vinci-" version ".tar.gz")) | |
642 | (sha256 | |
643 | (base32 | |
644 | "1aq0qc1y27iw9grhgnyji3290wwfznsrk3sg6ynqpxwjdda53h4m")))) | |
645 | (build-system gnu-build-system) | |
646 | (inputs | |
647 | `(("lrslib" ,lrslib))) | |
648 | (arguments | |
649 | `(#:tests? #f ; no check phase | |
650 | #:phases | |
651 | (modify-phases %standard-phases | |
652 | (replace 'configure | |
653 | ;; register the lrs location in the config file | |
654 | (lambda* (#:key inputs #:allow-other-keys) | |
655 | (let* ((lrs (assoc-ref inputs "lrslib")) | |
656 | (lrsexec (string-append lrs "/bin/lrs"))) | |
657 | (substitute* "vinci.h" | |
658 | (("#define LRS_EXEC \"lrs\"") | |
659 | (string-append "#define LRS_EXEC \"" lrsexec "\"")))) | |
660 | #t)) | |
661 | (replace 'install | |
662 | (lambda* (#:key outputs #:allow-other-keys) | |
663 | (let* ((out (assoc-ref outputs "out")) | |
664 | (bin (string-append out "/bin"))) | |
665 | (install-file "vinci" bin)) | |
666 | #t))))) | |
667 | (home-page | |
668 | "https://www.math.u-bordeaux.fr/~aenge/?category=software&page=vinci") | |
669 | (synopsis "Volume computation for polytopes") | |
670 | (description | |
671 | "Vinci implements a number of volume computation algorithms for convex | |
672 | polytopes in arbitrary dimension. The polytopes can be given by their | |
673 | V-representation (as the convex hull of a finite number of vertices), by | |
674 | their H-representation (as the bounded intersection of a finite number of | |
675 | halfspaces) or by their double description with both representations.") | |
676 | (license license:gpl2+))) | |
677 | ||
865a69dd RW |
678 | (define-public arpack-ng |
679 | (package | |
680 | (name "arpack-ng") | |
f03c4ec6 | 681 | (version "3.6.3") |
c0edb5b5 | 682 | (home-page "https://github.com/opencollab/arpack-ng") |
622ef2b9 MB |
683 | (source (origin |
684 | (method git-fetch) | |
685 | (uri (git-reference (url home-page) (commit version))) | |
686 | (file-name (git-file-name name version)) | |
687 | (sha256 | |
688 | (base32 | |
f03c4ec6 | 689 | "1wljl96yqxc9v8r49c37lscwkdp58kaacfb9p6s6nvpm31haax4y")))) |
865a69dd | 690 | (build-system gnu-build-system) |
c0edb5b5 LC |
691 | (native-inputs |
692 | `(("autoconf" ,autoconf) | |
693 | ("automake" ,automake) | |
694 | ("libtool" ,libtool))) | |
865a69dd RW |
695 | (inputs |
696 | `(("lapack" ,lapack) | |
19afbea1 | 697 | ("fortran" ,gfortran))) |
865a69dd RW |
698 | (synopsis "Fortran subroutines for solving eigenvalue problems") |
699 | (description | |
700 | "ARPACK-NG is a collection of Fortran77 subroutines designed to solve | |
701 | large scale eigenvalue problems.") | |
166191b3 | 702 | (license (license:non-copyleft "file://COPYING" |
865a69dd RW |
703 | "See COPYING in the distribution.")))) |
704 | ||
c0edb5b5 LC |
705 | (define-public arpack-ng-3.3.0 |
706 | (package | |
707 | (inherit arpack-ng) | |
708 | (version "3.3.0") | |
709 | (name (package-name arpack-ng)) | |
710 | (home-page (package-home-page arpack-ng)) | |
711 | (source | |
712 | (origin | |
713 | (method url-fetch) | |
714 | (uri (string-append home-page "/archive/" version ".tar.gz")) | |
715 | (file-name (string-append name "-" version ".tar.gz")) | |
716 | (sha256 | |
717 | (base32 | |
718 | "1cz53wqzcf6czmcpfb3vb61xi0rn5bwhinczl65hpmbrglg82ndd")))))) | |
719 | ||
8c94c886 EB |
720 | (define-public arpack-ng-openmpi |
721 | (package (inherit arpack-ng) | |
722 | (name "arpack-ng-openmpi") | |
723 | (inputs | |
724 | `(("mpi" ,openmpi) | |
725 | ,@(package-inputs arpack-ng))) | |
4f387541 LC |
726 | (arguments |
727 | (substitute-keyword-arguments (package-arguments arpack-ng) | |
728 | ((#:configure-flags _ '()) | |
aa82260b PG |
729 | ''("--enable-mpi")) |
730 | ((#:phases phases '%standard-phases) | |
731 | `(modify-phases ,phases | |
bbe46a4a EB |
732 | (add-before 'check 'mpi-setup |
733 | ,%openmpi-setup))))) | |
8c94c886 EB |
734 | (synopsis "Fortran subroutines for solving eigenvalue problems with MPI"))) |
735 | ||
da95c817 NK |
736 | (define-public lapack |
737 | (package | |
738 | (name "lapack") | |
e6de152d | 739 | (version "3.9.0") |
da95c817 NK |
740 | (source |
741 | (origin | |
742 | (method url-fetch) | |
743 | (uri (string-append "http://www.netlib.org/lapack/lapack-" | |
744 | version ".tgz")) | |
745 | (sha256 | |
746 | (base32 | |
e6de152d | 747 | "1155qixp26c12yrxc76z9mlfw2h3xxymxxv5znpgzh5gaykpndgj")))) |
da95c817 NK |
748 | (build-system cmake-build-system) |
749 | (home-page "http://www.netlib.org/lapack/") | |
19afbea1 | 750 | (inputs `(("fortran" ,gfortran) |
e6de152d | 751 | ("python" ,python-wrapper))) |
da95c817 | 752 | (arguments |
3ab869b6 | 753 | `(#:configure-flags (list |
3ab869b6 LC |
754 | "-DBUILD_SHARED_LIBS:BOOL=YES" |
755 | "-DLAPACKE=ON" | |
3ab869b6 | 756 | ;; Build the 'LAPACKE_clatms' functions. |
e6de152d KH |
757 | "-DLAPACKE_WITH_TMG=ON" |
758 | "-DBUILD_TESTING=ON"))) | |
da95c817 NK |
759 | (synopsis "Library for numerical linear algebra") |
760 | (description | |
761 | "LAPACK is a Fortran 90 library for solving the most commonly occurring | |
762 | problems in numerical linear algebra.") | |
166191b3 | 763 | (license (license:non-copyleft "file://LICENSE" |
da95c817 | 764 | "See LICENSE in the distribution.")))) |
73fed4f8 | 765 | |
e1ff597a EB |
766 | (define-public scalapack |
767 | (package | |
768 | (name "scalapack") | |
769 | (version "2.0.2") | |
770 | (source | |
771 | (origin | |
772 | (method url-fetch) | |
773 | (uri (string-append "http://www.netlib.org/scalapack/scalapack-" | |
774 | version ".tgz")) | |
775 | (sha256 | |
776 | (base32 | |
f73750e6 EB |
777 | "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c")) |
778 | (patches (search-patches "scalapack-blacs-mpi-deprecations.patch")))) | |
e1ff597a EB |
779 | (build-system cmake-build-system) |
780 | (inputs | |
781 | `(("mpi" ,openmpi) | |
782 | ("fortran" ,gfortran) | |
783 | ("lapack" ,lapack))) ;for testing only | |
784 | (arguments | |
6df2a50a LC |
785 | `(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES") |
786 | #:phases (modify-phases %standard-phases | |
bbe46a4a EB |
787 | (add-before 'check 'mpi-setup |
788 | ,%openmpi-setup)))) | |
e1ff597a EB |
789 | (home-page "http://www.netlib.org/scalapack/") |
790 | (synopsis "Library for scalable numerical linear algebra") | |
791 | (description | |
792 | "ScaLAPACK is a Fortran 90 library of high-performance linear algebra | |
793 | routines on parallel distributed memory machines. ScaLAPACK solves dense and | |
794 | banded linear systems, least squares problems, eigenvalue problems, and | |
795 | singular value problems.") | |
adb223b8 LC |
796 | (license (license:non-copyleft "file://LICENSE" |
797 | "See LICENSE in the distribution.")))) | |
e1ff597a | 798 | |
73fed4f8 | 799 | (define-public gnuplot |
5f800540 KK |
800 | (package |
801 | (name "gnuplot") | |
cb1d8aee | 802 | (version "5.2.7") |
5f800540 KK |
803 | (source (origin |
804 | (method url-fetch) | |
805 | (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/" | |
806 | version "/gnuplot-" | |
807 | version ".tar.gz")) | |
808 | (sha256 | |
cb1d8aee | 809 | (base32 "1vglp4la40f5dpj0zdj63zprrkyjgzy068p35bz5dqxjyczm1zlp")))) |
5f800540 KK |
810 | (build-system gnu-build-system) |
811 | (inputs `(("readline" ,readline) | |
812 | ("cairo" ,cairo) | |
813 | ("pango" ,pango) | |
6e64766a DM |
814 | ("gd" ,gd) |
815 | ("lua" ,lua))) | |
612a387f RW |
816 | (native-inputs |
817 | `(("pkg-config" ,pkg-config) | |
818 | ("texlive" ,texlive-tiny))) | |
07254d8b AM |
819 | (arguments `(#:configure-flags (list (string-append |
820 | "--with-texdir=" %output | |
821 | "/texmf-local/tex/latex/gnuplot")))) | |
5f800540 KK |
822 | (home-page "http://www.gnuplot.info") |
823 | (synopsis "Command-line driven graphing utility") | |
824 | (description "Gnuplot is a portable command-line driven graphing | |
35b9e423 | 825 | utility. It was originally created to allow scientists and students to |
73fed4f8 | 826 | visualize mathematical functions and data interactively, but has grown to |
35b9e423 | 827 | support many non-interactive uses such as web scripting. It is also used as a |
73fed4f8 | 828 | plotting engine by third-party applications like Octave.") |
5f800540 KK |
829 | ;; X11 Style with the additional restriction that derived works may only be |
830 | ;; distributed as patches to the original. | |
831 | (license (license:fsf-free | |
832 | "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright")))) | |
668c06ac | 833 | |
32f70e1f TD |
834 | (define-public gctp |
835 | (package | |
836 | (name "gctp") | |
837 | (version "2.0.0") | |
838 | (source | |
839 | (origin | |
5db874d1 TGR |
840 | (method git-fetch) |
841 | (uri (git-reference | |
842 | (url "https://github.com/OkoSanto/GCTP.git") | |
843 | (commit (string-append "v" version)))) | |
844 | (file-name (git-file-name name version)) | |
32f70e1f | 845 | (sha256 |
5db874d1 | 846 | (base32 "11wqmd443b4nksdbzp1msdws3av948nmwq1xz80w6hka3ss2aigd")))) |
32f70e1f TD |
847 | (native-inputs |
848 | `(("fortran" ,gfortran))) | |
849 | (build-system gnu-build-system) | |
850 | (synopsis "General Cartographic Transformation Package (GCTP)") | |
851 | (description | |
852 | "The General Cartographic Transformation Package (GCTP) is a system of | |
853 | software routines designed to permit the transformation of coordinate pairs | |
854 | from one map projection to another. The GCTP is the standard computer | |
855 | software used by the National Mapping Division for map projection | |
856 | computations.") | |
857 | (home-page "https://github.com/OkoSanto/GCTP") | |
0f7cd95b | 858 | (license license:public-domain))) ;https://www2.usgs.gov/laws/info_policies.html |
32f70e1f | 859 | |
becbbefc TD |
860 | (define-public hdf4 |
861 | (package | |
862 | (name "hdf4") | |
c959d99f | 863 | (version "4.2.14") |
becbbefc TD |
864 | (source |
865 | (origin | |
866 | (method url-fetch) | |
867 | (uri (string-append "https://support.hdfgroup.org/ftp/HDF/releases/HDF" | |
868 | version "/src/hdf-" version ".tar.bz2")) | |
869 | (sha256 | |
c959d99f | 870 | (base32 "0n29klrrbwan9307np0d9hr128dlpc4nnlf57a140080ll3jmp8l")) |
15ca49b2 AE |
871 | (patches (search-patches "hdf4-architectures.patch" |
872 | "hdf4-reproducibility.patch" | |
bd3d71cb MB |
873 | "hdf4-shared-fortran.patch" |
874 | "hdf4-tirpc.patch")))) | |
becbbefc TD |
875 | (build-system gnu-build-system) |
876 | (native-inputs | |
877 | `(("gfortran" ,gfortran) | |
878 | ("bison" ,bison) | |
879 | ("flex" ,flex))) | |
880 | (inputs | |
881 | `(("zlib" ,zlib) | |
4bd428a7 | 882 | ("libjpeg" ,libjpeg-turbo) |
bd3d71cb | 883 | ("libtirpc" ,libtirpc))) |
becbbefc TD |
884 | (arguments |
885 | `(#:parallel-tests? #f | |
bd3d71cb MB |
886 | #:configure-flags (list "--enable-shared" |
887 | (string-append "CPPFLAGS=-I" | |
888 | (assoc-ref %build-inputs "libtirpc") | |
889 | "/include/tirpc")) | |
becbbefc TD |
890 | #:phases |
891 | (modify-phases %standard-phases | |
953a12fa EF |
892 | ;; This is inspired by two of Debian's patches. |
893 | (add-before 'configure 'add-more-aarch64-support | |
894 | (lambda _ | |
895 | (substitute* '("mfhdf/ncgen/ncgen.l" | |
896 | "mfhdf/ncgen/ncgenyy.c" | |
897 | "mfhdf/libsrc/netcdf.h.in") | |
898 | (("AIX5L64") "__aarch64__")) | |
899 | #t)) | |
becbbefc TD |
900 | (add-before 'configure 'patchbuild |
901 | (lambda _ | |
902 | (substitute* | |
903 | '("mfhdf/hdfimport/testutil.sh.in" "hdf/util/testutil.sh.in") | |
904 | (("/bin/rm") "rm") | |
905 | (("/bin/mkdir") "mkdir")) | |
906 | (substitute* (find-files "." "^Makefile\\.in$") | |
907 | (("@HDF_BUILD_XDR_TRUE@XDR_ADD = \ | |
908 | -R\\$\\(abs_top_builddir\\)/mfhdf/xdr/\\.libs") "") | |
909 | (("@HDF_BUILD_SHARED_TRUE@AM_LDFLAGS = \ | |
910 | -R\\$\\(abs_top_builddir\\)/mfhdf/libsrc/\\.libs \ | |
953a12fa | 911 | -R\\$\\(abs_top_builddir\\)/hdf/src/\\.libs \\$\\(XDR_ADD\\)") "")) |
e464b455 TD |
912 | #t)) |
913 | (add-after 'configure 'patch-settings | |
914 | (lambda _ | |
915 | ;; libhdf4.settings contains the full path of the | |
916 | ;; compilers used, and its contents are included in | |
917 | ;; .so-files. We truncate the hashes to avoid | |
918 | ;; unnecessary store references to those compilers: | |
919 | (substitute* "libhdf4.settings" | |
920 | (("(/gnu/store/)([a-Z0-9]*)" all prefix hash) | |
921 | (string-append prefix (string-take hash 10) "..."))) | |
922 | #t)) | |
fadd962f MB |
923 | (add-after 'install 'provide-absolute-libjpeg-reference |
924 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
925 | (let ((out (assoc-ref outputs "out")) | |
926 | (libjpeg (assoc-ref inputs "libjpeg"))) | |
927 | ;; libjpeg-turbo does not provide a .la file, so libtool is | |
928 | ;; unable to add an absolute reference for -ljpeg in the .la | |
929 | ;; files. Fix it manually to avoid having to propagate it. | |
930 | (substitute* (find-files (string-append out "/lib") "\\.la$") | |
931 | (("-ljpeg") | |
932 | (string-append "-L" libjpeg "/lib -ljpeg"))) | |
933 | #t)))))) | |
becbbefc TD |
934 | (home-page "https://www.hdfgroup.org/products/hdf4/") |
935 | (synopsis | |
936 | "Library and multi-object file format for storing and managing data") | |
937 | (description "HDF4 is a library and multi-object file format for storing | |
938 | and managing data between machines. HDF4 is an older hierarchical data format, | |
939 | incompatible with HDF5.") | |
940 | (license | |
941 | (license:non-copyleft | |
942 | "https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/COPYING")))) | |
943 | ||
944 | (define-public hdf4-alt | |
945 | (package | |
946 | (inherit hdf4) | |
947 | (name "hdf4-alt") | |
948 | (arguments | |
949 | (substitute-keyword-arguments (package-arguments hdf4) | |
950 | ((#:configure-flags flags) `(cons* "--disable-netcdf" ,flags)))) | |
951 | (synopsis | |
952 | "HDF4 without netCDF API, can be combined with the regular netCDF library"))) | |
953 | ||
7ee3f1a2 JD |
954 | (define-public hdf5 |
955 | (package | |
956 | (name "hdf5") | |
7b84610e | 957 | (version "1.8.21") |
7ee3f1a2 JD |
958 | (source |
959 | (origin | |
960 | (method url-fetch) | |
2da63064 TD |
961 | (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" |
962 | "hdf5-" (version-major+minor version) | |
963 | "/hdf5-" version "/src/hdf5-" | |
dcd9d163 LF |
964 | version ".tar.bz2") |
965 | (string-append "https://support.hdfgroup.org/ftp/HDF5/" | |
966 | "current" | |
7b84610e EB |
967 | (match (string-split version #\.) |
968 | ((major minor _ ...) | |
969 | (string-append major minor))) | |
dcd9d163 | 970 | "/src/hdf5-" version ".tar.bz2"))) |
7ee3f1a2 | 971 | (sha256 |
7b84610e | 972 | (base32 "03glk4w4wyb1jyb443g53y3y1ncnf6mj2cqwm6avfr2awkgb3cg5")) |
7fedc3fd EB |
973 | (patches (search-patches "hdf5-config-date.patch" |
974 | "hdf5-1.8-mpi-deprecations.patch")))) | |
7ee3f1a2 | 975 | (build-system gnu-build-system) |
12ed1216 AE |
976 | (inputs |
977 | `(("zlib" ,zlib))) | |
e3a1a1de | 978 | (native-inputs |
3ea420f3 LC |
979 | `(("gfortran" ,gfortran) |
980 | ("perl" ,perl))) ;part of the test machinery needs Perl | |
e3a1a1de TD |
981 | (outputs '("out" ; core library |
982 | "fortran")) ; fortran interface | |
7ee3f1a2 | 983 | (arguments |
62126576 | 984 | `(;; Some of the users, notably Flann, need the C++ interface. |
e3a1a1de TD |
985 | #:configure-flags '("--enable-cxx" |
986 | "--enable-fortran" | |
549d1571 LC |
987 | "--enable-fortran2003" |
988 | ||
989 | ;; Build a thread-safe library. Unfortunately, | |
990 | ;; 'configure' invites you to either turn off C++, | |
991 | ;; Fortran, and the high-level interface (HL), or | |
992 | ;; to pass '--enable-unsupported'. Debian | |
993 | ;; packagers chose to pass '--enable-unsupported' | |
994 | ;; and we follow their lead here. | |
995 | "--enable-threadsafe" | |
996 | "--with-pthread" | |
997 | "--enable-unsupported") | |
4dba441c RW |
998 | ;; Use -fPIC to allow the R bindings to link with the static libraries |
999 | #:make-flags (list "CFLAGS=-fPIC" | |
1000 | "CXXFLAGS=-fPIC") | |
62126576 | 1001 | #:phases |
f622e212 EB |
1002 | (modify-phases %standard-phases |
1003 | (add-before 'configure 'patch-configure | |
e3a1a1de | 1004 | (lambda* (#:key outputs #:allow-other-keys) |
f622e212 | 1005 | (substitute* "configure" |
b8d9c93b | 1006 | (("/bin/mv") "mv")) |
e3a1a1de TD |
1007 | (substitute* "fortran/src/Makefile.in" |
1008 | (("libhdf5_fortran_la_LDFLAGS =") | |
1009 | (string-append "libhdf5_fortran_la_LDFLAGS = -Wl-rpath=" | |
1010 | (assoc-ref outputs "fortran") "/lib"))) | |
1011 | (substitute* "hl/fortran/src/Makefile.in" | |
1012 | (("libhdf5hl_fortran_la_LDFLAGS =") | |
1013 | (string-append "libhdf5hl_fortran_la_LDFLAGS = -Wl,-rpath=" | |
1014 | (assoc-ref outputs "fortran") "/lib"))) | |
b8d9c93b | 1015 | #t)) |
fd0378a1 TD |
1016 | (add-after 'configure 'patch-settings |
1017 | (lambda _ | |
1018 | ;; libhdf5.settings contains the full path of the | |
1019 | ;; compilers used, and its contents are included in | |
1020 | ;; libhdf5.so. We truncate the hashes to avoid | |
1021 | ;; unnecessary store references to those compilers: | |
1022 | (substitute* "src/libhdf5.settings" | |
1023 | (("(/gnu/store/)([a-Z0-9]*)" all prefix hash) | |
d8f46d52 RW |
1024 | (string-append prefix (string-take hash 10) "...")) |
1025 | ;; Don't record the build-time kernel version to make the | |
1026 | ;; settings file reproducible. | |
1027 | (("Uname information:.*") | |
1028 | "Uname information: Linux\n")) | |
b8d9c93b | 1029 | #t)) |
f622e212 EB |
1030 | (add-after 'install 'patch-references |
1031 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1032 | (let ((bin (string-append (assoc-ref outputs "out") "/bin")) | |
1033 | (zlib (assoc-ref inputs "zlib"))) | |
1034 | (substitute* (find-files bin "h5p?cc") | |
1035 | (("-lz" lib) | |
1036 | (string-append "-L" zlib "/lib " lib))) | |
e3a1a1de TD |
1037 | #t))) |
1038 | (add-after 'install 'split | |
1039 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1040 | ;; Move all fortran-related files | |
1041 | (let* ((out (assoc-ref outputs "out")) | |
1042 | (bin (string-append out "/bin")) | |
1043 | (lib (string-append out "/lib")) | |
1044 | (inc (string-append out "/include")) | |
1045 | (ex (string-append out "/share/hdf5_examples/fortran")) | |
1046 | (fort (assoc-ref outputs "fortran")) | |
1047 | (fbin (string-append fort "/bin")) | |
1048 | (flib (string-append fort "/lib")) | |
1049 | (finc (string-append fort "/include")) | |
1050 | (fex (string-append fort "/share/hdf5_examples/fortran"))) | |
1051 | (mkdir-p fbin) | |
1052 | (mkdir-p flib) | |
1053 | (mkdir-p finc) | |
1054 | (mkdir-p fex) | |
b0d1e60f PG |
1055 | ;; Note: When built with --enable-parallel, the 'h5fc' file |
1056 | ;; doesn't exist, hence this condition. | |
1057 | (when (file-exists? (string-append bin "/h5fc")) | |
1058 | (rename-file (string-append bin "/h5fc") | |
1059 | (string-append fbin "/h5fc"))) | |
e3a1a1de TD |
1060 | (for-each (lambda (file) |
1061 | (rename-file file | |
1062 | (string-append flib "/" (basename file)))) | |
1063 | (find-files lib ".*fortran.*")) | |
1064 | (for-each (lambda (file) | |
1065 | (rename-file file | |
1066 | (string-append finc "/" (basename file)))) | |
1067 | (find-files inc ".*mod")) | |
1068 | (for-each (lambda (file) | |
1069 | (rename-file file | |
1070 | (string-append fex "/" (basename file)))) | |
1071 | (find-files ex ".*")) | |
1072 | (delete-file-recursively ex)) | |
1073 | #t))))) | |
0a44f9c4 | 1074 | (home-page "https://www.hdfgroup.org") |
516e93f8 | 1075 | (synopsis "Management suite for extremely large and complex data") |
7ee3f1a2 JD |
1076 | (description "HDF5 is a suite that makes possible the management of |
1077 | extremely large and complex data collections.") | |
d4bf49b1 | 1078 | (license (license:x11-style |
0a44f9c4 | 1079 | "https://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING")))) |
7ee3f1a2 | 1080 | |
bb47aca5 RW |
1081 | (define-public hdf5-1.10 |
1082 | (package (inherit hdf5) | |
cb169aae | 1083 | (version "1.10.6") |
bb47aca5 RW |
1084 | (source |
1085 | (origin | |
1086 | (method url-fetch) | |
1087 | (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" | |
1088 | "hdf5-" (version-major+minor version) | |
1089 | "/hdf5-" version "/src/hdf5-" | |
1090 | version ".tar.bz2") | |
1091 | (string-append "https://support.hdfgroup.org/ftp/HDF5/" | |
1092 | "current" | |
1093 | (apply string-append | |
1094 | (take (string-split version #\.) 2)) | |
1095 | "/src/hdf5-" version ".tar.bz2"))) | |
1096 | (sha256 | |
cb169aae | 1097 | (base32 "1gf38x51128hn00744358w27xgzjk0ff4wra4yxh2lk804ck1mh9")) |
94fea21b | 1098 | (patches (search-patches "hdf5-config-date.patch")))))) |
bb47aca5 | 1099 | |
2fd26d05 TD |
1100 | (define-public hdf-java |
1101 | (package | |
2a509880 RW |
1102 | (name "hdf-java") |
1103 | (version "3.3.2") | |
1104 | (source | |
1105 | (origin | |
1106 | (method url-fetch) | |
1107 | (uri (string-append | |
0a44f9c4 | 1108 | "https://www.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfjni-" |
2a509880 RW |
1109 | version "/src/CMake-hdfjava-" version ".tar.gz")) |
1110 | (sha256 | |
1111 | (base32 "0m1gp2aspcblqzmpqbdpfp6giskws85ds6p5gz8sx7asyp7wznpr")) | |
1112 | (modules '((guix build utils))) | |
1113 | (snippet ; Make sure we don't use the bundled sources and binaries. | |
1114 | `(begin | |
1115 | (for-each delete-file | |
1116 | (list "SZip.tar.gz" "ZLib.tar.gz" "JPEG8d.tar.gz" | |
1117 | "HDF4.tar.gz" "HDF5.tar.gz")) | |
1118 | (delete-file-recursively ,(string-append "hdfjava-" version "/lib")) | |
1119 | #t)))) | |
1120 | (build-system gnu-build-system) | |
1121 | (native-inputs | |
1122 | `(("jdk" ,icedtea "jdk") | |
1123 | ("automake" ,automake) ; For up to date 'config.guess' and 'config.sub'. | |
1124 | ;; For tests: | |
1125 | ("hamcrest-core" ,java-hamcrest-core) | |
1126 | ("junit" ,java-junit) | |
1127 | ("slf4j-simple" ,java-slf4j-simple))) | |
1128 | (inputs | |
1129 | `(("hdf4" ,hdf4) | |
1130 | ("hdf5" ,hdf5) | |
1131 | ("zlib" ,zlib) | |
4bd428a7 | 1132 | ("libjpeg" ,libjpeg-turbo) |
2a509880 RW |
1133 | ("slf4j-api" ,java-slf4j-api))) |
1134 | (arguments | |
1135 | `(#:configure-flags | |
1136 | (list (string-append "--target=" ,(or (%current-target-system) (%current-system))) | |
1137 | (string-append "--with-jdk=" (assoc-ref %build-inputs "jdk") "/include," | |
1138 | (assoc-ref %build-inputs "jdk") "/lib" ) | |
1139 | (string-append "--with-hdf4=" (assoc-ref %build-inputs "hdf4") "/lib") | |
1140 | (string-append "--with-hdf5=" (assoc-ref %build-inputs "hdf5") "/lib")) | |
2fd26d05 | 1141 | |
2a509880 RW |
1142 | #:make-flags |
1143 | (list (string-append "HDFLIB=" (assoc-ref %build-inputs "hdf4") "/lib") | |
1144 | (string-append "HDF5LIB=" (assoc-ref %build-inputs "hdf5") "/lib") | |
1145 | (string-append "ZLIB=" (assoc-ref %build-inputs "zlib") "/lib/libz.so") | |
1146 | (string-append "JPEGLIB=" | |
1147 | (assoc-ref %build-inputs "libjpeg") "/lib/libjpeg.so") | |
1148 | "LLEXT=so") | |
2fd26d05 | 1149 | |
2a509880 RW |
1150 | #:phases |
1151 | (modify-phases %standard-phases | |
1152 | (add-before 'configure 'chdir-to-source | |
1153 | (lambda _ (chdir ,(string-append "hdfjava-" version)) #t)) | |
1154 | (add-before 'configure 'patch-build | |
1155 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1156 | (substitute* "configure" | |
1157 | (("COPT=\"") "COPT=\"-O2 ") ; CFLAGS is ignored in Makefiles | |
1158 | (("/bin/cat") (which "cat"))) | |
1159 | ;; Set classpath for compilation | |
1160 | (substitute* '("hdf/hdf5lib/Makefile.in" | |
1161 | "hdf/hdf5lib/exceptions/Makefile.in" | |
1162 | "hdf/hdflib/Makefile.in") | |
1163 | (("\\$\\(TOP\\)/lib/slf4j-api-1\\.7\\.5\\.jar") | |
1164 | (string-append (assoc-ref inputs "slf4j-api") | |
1165 | "/share/java/slf4j-api.jar"))) | |
1166 | ;; Replace outdated config.sub and config.guess: | |
1167 | (with-directory-excursion "config" | |
1168 | (for-each (lambda (file) | |
1169 | (install-file | |
1170 | (string-append (assoc-ref inputs "automake") | |
1171 | "/share/automake-" | |
1172 | ,(version-major+minor (package-version automake)) | |
1173 | "/" file) ".")) | |
1174 | '("config.sub" "config.guess"))) | |
64dc8b0b | 1175 | |
2a509880 RW |
1176 | ;; Fix embedded version number |
1177 | (let ((hdf5version (list ,@(string-split (package-version hdf5) #\.)))) | |
1178 | (substitute* "hdf/hdf5lib/H5.java" | |
1179 | (("1, 8, 19") | |
1180 | (string-join hdf5version ", ")))) | |
64dc8b0b | 1181 | |
2a509880 RW |
1182 | (mkdir-p (string-append (assoc-ref outputs "out"))) |
1183 | ;; Set classpath for tests | |
1184 | (let* ((build-dir (getcwd)) | |
1185 | (lib (string-append build-dir "/lib")) | |
1186 | (jhdf (string-append lib "/jhdf.jar")) | |
1187 | (jhdf5 (string-append lib "/jhdf5.jar")) | |
1188 | (testjars | |
1189 | (map (lambda (i) | |
1190 | (string-append (assoc-ref inputs i) | |
1191 | "/share/java/" i ".jar")) | |
1192 | '("junit" "hamcrest-core" "slf4j-api" "slf4j-simple"))) | |
1193 | (class-path | |
1194 | (string-join `("." ,build-dir ,jhdf ,jhdf5 ,@testjars) ":"))) | |
2fd26d05 | 1195 | |
2a509880 RW |
1196 | (substitute* '("test/hdf5lib/Makefile.in" |
1197 | "test/hdf5lib/junit.sh.in" | |
1198 | "examples/runExample.sh.in") | |
1199 | (("/usr/bin/test") | |
1200 | (string-append (assoc-ref inputs "coreutils") | |
1201 | "/bin/test")) | |
1202 | (("/usr/bin/uname") | |
1203 | (string-append (assoc-ref inputs "coreutils") | |
1204 | "/bin/uname")) | |
1205 | (("CLASSPATH=[^\n]*") | |
1206 | (string-append "CLASSPATH=" class-path))) | |
1207 | (setenv "CLASSPATH" class-path)) | |
1208 | #t)) | |
1209 | (add-before 'check 'build-examples | |
1210 | (lambda _ | |
1211 | (apply invoke `("javac" | |
1212 | ,@(find-files "examples" ".*\\.java")))))) | |
2fd26d05 | 1213 | |
2a509880 | 1214 | #:parallel-build? #f |
2fd26d05 | 1215 | |
2a509880 RW |
1216 | #:parallel-tests? #f )) |
1217 | (home-page "https://support.hdfgroup.org/products/java") | |
1218 | (synopsis "Java interface for the HDF4 and HDF5 libraries") | |
1219 | (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use | |
2fd26d05 TD |
1220 | the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are |
1221 | implemented in C.") | |
1222 | ||
2a509880 RW |
1223 | ;; BSD-style license: |
1224 | (license (license:x11-style | |
1225 | "https://support.hdfgroup.org/ftp/HDF5/hdf-java\ | |
2fd26d05 TD |
1226 | /current/src/unpacked/COPYING")))) |
1227 | ||
d3c4f3bb TD |
1228 | (define-public hdf-eos2 |
1229 | (package | |
1230 | (name "hdf-eos2") | |
1231 | (version "19.1.0") | |
1232 | (source | |
1233 | (origin | |
1234 | (method url-fetch) | |
1235 | (uri "ftp://edhs1.gsfc.nasa.gov\ | |
1236 | /edhs/hdfeos/latest_release/HDF-EOS2.19v1.00.tar.Z") | |
1237 | (sha256 | |
1238 | (base32 "0c9fcz25s292ldap12wxmlrvnyz99z24p63d8fwx51bf8s0s1zrz")) | |
1239 | (patches (search-patches "hdf-eos2-remove-gctp.patch" | |
1240 | "hdf-eos2-build-shared.patch" | |
1241 | "hdf-eos2-fortrantests.patch")))) | |
1242 | (build-system gnu-build-system) | |
1243 | (native-inputs | |
1244 | `(("gfortran" ,gfortran))) | |
1245 | (inputs | |
1246 | `(("hdf4" ,hdf4-alt) ; assume most HDF-EOS2 users won't use the HDF4 netCDF API | |
25bdbb61 | 1247 | ;; XXX: These inputs are really dependencies of hdf4. |
d3c4f3bb | 1248 | ("zlib" ,zlib) |
4bd428a7 | 1249 | ("libjpeg" ,libjpeg-turbo) |
25bdbb61 MB |
1250 | ("libtirpc" ,libtirpc) |
1251 | ||
d3c4f3bb TD |
1252 | ("gctp" ,gctp))) |
1253 | (arguments | |
1254 | `( #:configure-flags '("--enable-install-include" "--enable-shared" | |
1255 | "CC=h4cc -Df2cFortran" "LIBS=-lgctp") | |
1256 | #:parallel-tests? #f)) | |
2aaa09f1 | 1257 | (home-page "https://hdfeos.org/software/library.php#HDF-EOS2") |
d3c4f3bb TD |
1258 | (synopsis "HDF4-based data format for NASA's Earth Observing System") |
1259 | (description "HDF-EOS2 is a software library built on HDF4 which supports | |
1260 | the construction of data structures used in NASA's Earth Observing | |
1261 | System (Grid, Point and Swath).") | |
1262 | ||
1263 | ;; Source files carry a permissive license header. | |
1264 | (license (license:non-copyleft home-page)))) | |
1265 | ||
0f43f835 TD |
1266 | (define-public hdf-eos5 |
1267 | (package | |
1268 | (name "hdf-eos5") | |
1269 | (version "1.15") | |
1270 | (source (origin | |
1271 | (method url-fetch) | |
1272 | (uri (string-append "ftp://edhs1.gsfc.nasa.gov\ | |
1273 | /edhs/hdfeos5/latest_release/HDF-EOS5." version ".tar.Z")) | |
1274 | (sha256 | |
1275 | (base32 | |
1276 | "1p83333nzzy8rn5chxlm0hrkjjnhh2w1ji8ac0f9q4xzg838i58i")) | |
1277 | (patches (search-patches "hdf-eos5-build-shared.patch" | |
1278 | "hdf-eos5-remove-gctp.patch" | |
1279 | "hdf-eos5-fix-szip.patch" | |
1280 | "hdf-eos5-fortrantests.patch")))) | |
1281 | (native-inputs | |
1282 | `(("gfortran" ,gfortran))) | |
1283 | (build-system gnu-build-system) | |
1284 | (inputs | |
1285 | `(("hdf5" ,hdf5) | |
1286 | ("zlib" ,zlib) | |
1287 | ("gctp" ,gctp))) | |
1288 | (arguments | |
1289 | `(#:configure-flags '("--enable-install-include" "--enable-shared" | |
1290 | "CC=h5cc -Df2cFortran" "LIBS=-lgctp") | |
1291 | #:parallel-tests? #f)) | |
1292 | (synopsis "HDF5-based data format for NASA's Earth Observing System") | |
1293 | (description | |
1294 | "HDF-EOS5 is a software library built on HDF5 to support the construction | |
1295 | of data structures used in NASA's Earth Observing System (Grid, Point and | |
1296 | Swath).") | |
1297 | (home-page "http://www.hdfeos.org/software/library.php#HDF-EOS5") | |
1298 | ||
1299 | ;; Source files carry a permissive license header. | |
1300 | (license (license:non-copyleft home-page)))) | |
1301 | ||
c8378eea EB |
1302 | (define-public hdf5-parallel-openmpi |
1303 | (package (inherit hdf5) | |
1304 | (name "hdf5-parallel-openmpi") | |
1305 | (inputs | |
1306 | `(("mpi" ,openmpi) | |
1307 | ,@(package-inputs hdf5))) | |
1308 | (arguments | |
45201bf2 PG |
1309 | (substitute-keyword-arguments (package-arguments hdf5) |
1310 | ((#:configure-flags flags) | |
549d1571 LC |
1311 | ``("--enable-parallel" |
1312 | ,@(delete "--enable-cxx" | |
1313 | (delete "--enable-threadsafe" ,flags)))) | |
c8378eea EB |
1314 | ((#:phases phases) |
1315 | `(modify-phases ,phases | |
45201bf2 PG |
1316 | (add-after 'build 'mpi-setup |
1317 | ,%openmpi-setup) | |
c8378eea EB |
1318 | (add-before 'check 'patch-tests |
1319 | (lambda _ | |
1320 | ;; OpenMPI's mpirun will exit with non-zero status if it | |
1321 | ;; detects an "abnormal termination", i.e. any process not | |
784c3da1 | 1322 | ;; calling MPI_Finalize(). Since the test is explicitly |
c8378eea EB |
1323 | ;; avoiding MPI_Finalize so as not to have at_exit and thus |
1324 | ;; H5C_flush_cache from being called, mpirun will always | |
1325 | ;; complain, so turn this test off. | |
1326 | (substitute* "testpar/Makefile" | |
1327 | (("(^TEST_PROG_PARA.*)t_pflush1(.*)" front back) | |
1328 | (string-append front back "\n"))) | |
1329 | (substitute* "tools/h5diff/testph5diff.sh" | |
1330 | (("/bin/sh") (which "sh"))) | |
1331 | #t)))))) | |
1332 | (synopsis "Management suite for data with parallel IO support"))) | |
1333 | ||
0b2c8838 RW |
1334 | (define-public hdf5-blosc |
1335 | (package | |
1336 | (name "hdf5-blosc") | |
1337 | (version "1.0.0") | |
1338 | (source | |
1339 | (origin | |
1340 | (method git-fetch) | |
1341 | (uri (git-reference | |
1342 | (url "https://github.com/Blosc/hdf5-blosc.git") | |
1343 | (commit (string-append "v" version)))) | |
1344 | (file-name (git-file-name name version)) | |
1345 | (sha256 | |
1346 | (base32 "1nj2bm1v6ymm3fmyvhbn6ih5fgdiapavlfghh1pvbmhw71cysyqs")))) | |
1347 | (build-system cmake-build-system) | |
1348 | (arguments | |
1349 | `(#:configure-flags | |
1350 | (list (string-append "-DBLOSC_INSTALL_DIR=" | |
1351 | (assoc-ref %build-inputs "c-blosc")) | |
1352 | (string-append "-DPLUGIN_INSTALL_PATH=" | |
1353 | (assoc-ref %outputs "out") | |
1354 | "/hdf5/lib/plugin")) | |
1355 | #:phases | |
1356 | (modify-phases %standard-phases | |
1357 | (add-after 'unpack 'do-not-build-blosc | |
1358 | (lambda _ | |
1359 | (substitute* "CMakeLists.txt" | |
1360 | (("set\\(BLOSC_INSTALL_DIR.*") "") | |
1361 | (("ExternalProject_Add\\(project_blosc") "message(")) | |
1362 | #t))))) | |
1363 | (inputs | |
1364 | `(("c-blosc" ,c-blosc) | |
1365 | ("hdf5" ,hdf5-1.10))) | |
1366 | (home-page "https://github.com/Blosc/hdf5-blosc") | |
1367 | (synopsis "Filter for HDF5 using the Blosc compressor") | |
1368 | (description "This is a filter for HDF5 that uses the Blosc compressor; by | |
1369 | installing this filter, you can read and write HDF5 files with | |
1370 | Blosc-compressed datasets.") | |
1371 | (license license:expat))) | |
c8378eea | 1372 | |
00775104 EB |
1373 | (define-public h5check |
1374 | (package | |
1375 | (name "h5check") | |
1376 | (version "2.0.1") | |
1377 | (source | |
1378 | (origin | |
1379 | (method url-fetch) | |
0a44f9c4 | 1380 | (uri (string-append "https://www.hdfgroup.org/ftp/HDF5/tools/" |
00775104 EB |
1381 | "h5check/src/h5check-" version ".tar.gz")) |
1382 | (sha256 | |
1383 | (base32 | |
1384 | "1gm76jbwhz9adbxgn14zx8cj33dmjdr2g5xcy0m9c2gakp8w59kj")))) | |
1385 | (build-system gnu-build-system) | |
1386 | (inputs `(("hdf5" ,hdf5))) ;h5cc for tests | |
1387 | (home-page "https://www.hdfgroup.org/products/hdf5_tools/h5check.html") | |
1388 | (synopsis "HDF5 format checker") | |
1389 | (description "@code{h5check} is a validation tool for verifying that an | |
1390 | HDF5 file is encoded according to the HDF File Format Specification.") | |
1391 | (license (license:x11-style "file://COPYING")))) | |
1392 | ||
a53d6719 JD |
1393 | (define-public itpp |
1394 | (package | |
1395 | (name "itpp") | |
1396 | (version "4.3.1") | |
1397 | (source (origin | |
1398 | (method url-fetch) | |
1399 | (uri (string-append "mirror://sourceforge/itpp/itpp/" | |
1400 | version "/itpp-" | |
1401 | version ".tar.gz")) | |
1402 | (sha256 | |
1403 | (base32 | |
1404 | "14ddy2xnb6sgp4hiax9v5sv4pr4l4dd4ps76nfha3nrpr1ikhcqm")))) | |
1405 | (build-system cmake-build-system) | |
1406 | (arguments `(#:tests? #f)) ; Tests require googletest *sources* | |
1407 | (inputs `(("lapack" ,lapack) | |
1408 | ("fftw" ,fftw))) | |
3a4d5df2 RW |
1409 | ;; FIXME: Even though the fonts are available dvips complains: |
1410 | ;; "Font cmmi10 not found; characters will be left blank." | |
1411 | (native-inputs | |
1412 | `(("texlive" ,texlive-tiny) | |
1413 | ("ghostscript" ,ghostscript) | |
1414 | ("doxygen" ,doxygen))) | |
a53d6719 JD |
1415 | (home-page "http://itpp.sourceforge.net") |
1416 | (synopsis "C++ library of maths, signal processing and communication classes") | |
1417 | (description "IT++ is a C++ library of mathematical, signal processing and | |
1418 | communication classes and functions. Its main use is in simulation of | |
1419 | communication systems and for performing research in the area of | |
1420 | communications. The kernel of the library consists of generic vector and | |
1421 | matrix classes, and a set of accompanying routines. Such a kernel makes IT++ | |
1422 | similar to MATLAB, GNU Octave or SciPy.") | |
1423 | (license license:gpl3+))) | |
1424 | ||
889187a4 EB |
1425 | (define-public netcdf |
1426 | (package | |
1427 | (name "netcdf") | |
a4b0bfb1 | 1428 | (version "4.4.1.1") |
889187a4 EB |
1429 | (source |
1430 | (origin | |
1431 | (method url-fetch) | |
1432 | (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/netcdf/" | |
1433 | "netcdf-" version ".tar.gz")) | |
1434 | (sha256 | |
1435 | (base32 | |
a4b0bfb1 EB |
1436 | "1blc7ik5yin7i0ls2kag0a9xjk12m0dzx6v1x88az3ras3scci2d")) |
1437 | (patches (search-patches "netcdf-date-time.patch" | |
1438 | "netcdf-tst_h_par.patch")))) | |
889187a4 EB |
1439 | (build-system gnu-build-system) |
1440 | (native-inputs | |
1441 | `(("m4" ,m4) | |
1442 | ("doxygen" ,doxygen) | |
1443 | ("graphviz" ,graphviz))) | |
1444 | (inputs | |
db825570 TD |
1445 | `(("hdf4" ,hdf4-alt) |
1446 | ("hdf5" ,hdf5) | |
1447 | ("zlib" ,zlib) | |
4bd428a7 | 1448 | ("libjpeg" ,libjpeg-turbo))) |
889187a4 | 1449 | (arguments |
db825570 | 1450 | `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4") |
43d01672 TD |
1451 | |
1452 | #:phases (modify-phases %standard-phases | |
1453 | (add-before 'configure 'fix-source-date | |
1454 | (lambda _ | |
1455 | ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build | |
1456 | ;; environment, `date -u -d ${SOURCE_DATE_EPOCH}` will evaluate | |
1457 | ;; to '1st hour of the current day', and therefore makes the | |
1458 | ;; package not reproducible. | |
1459 | (substitute* "./configure" | |
1460 | (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"") | |
1461 | "date --date='@0'")) | |
1462 | #t)) | |
1463 | (add-after 'configure 'patch-settings | |
1464 | (lambda _ | |
1465 | ;; libnetcdf.settings contains the full filename of the compilers | |
1466 | ;; used to build the library. We truncate the hashes of those | |
1467 | ;; filenames to avoid unnecessary references to the corresponding | |
1468 | ;; store items. | |
1469 | (substitute* "libnetcdf.settings" | |
1470 | (("(/gnu/store/)([a-Z0-9]*)" all prefix hash) | |
1471 | (string-append prefix (string-take hash 10) "..."))) | |
1472 | #t))) | |
1473 | ||
889187a4 | 1474 | #:parallel-tests? #f)) ;various race conditions |
821aa687 | 1475 | (home-page "https://www.unidata.ucar.edu/software/netcdf/") |
889187a4 EB |
1476 | (synopsis "Library for scientific data") |
1477 | (description "NetCDF is an interface for scientific data access and a | |
1478 | software library that provides an implementation of the interface. The netCDF | |
1479 | library defines a machine-independent format for representing scientific data. | |
1480 | Together, the interface, library, and format support the creation, access, and | |
1481 | sharing of scientific data.") | |
1482 | (license (license:x11-style "file://COPYRIGHT")))) | |
1483 | ||
1484 | (define-public netcdf-parallel-openmpi | |
1485 | (package (inherit netcdf) | |
1486 | (name "netcdf-parallel-openmpi") | |
1487 | (inputs | |
1488 | `(("mpi" ,openmpi) | |
1489 | ,@(alist-replace "hdf5" (list hdf5-parallel-openmpi) | |
1490 | (package-inputs netcdf)))) | |
1491 | ;; TODO: Replace pkg-config references in nc-config with absolute references | |
1492 | (arguments | |
1493 | (substitute-keyword-arguments (package-arguments netcdf) | |
1494 | ((#:configure-flags flags) | |
1495 | `(cons* "CC=mpicc" "CXX=mpicxx" | |
1496 | "--enable-parallel-tests" | |
1497 | ;; Shared libraries not supported with parallel IO. | |
1498 | "--disable-shared" "--with-pic" | |
1499 | ,flags)))))) | |
1500 | ||
300200b6 TD |
1501 | (define-public netcdf-fortran |
1502 | (package | |
1503 | (name "netcdf-fortran") | |
1504 | (version "4.4.4") | |
1505 | (source (origin | |
1506 | (method url-fetch) | |
1507 | (uri (string-append | |
1508 | "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-" | |
1509 | version ".tar.gz")) | |
1510 | (sha256 | |
1511 | (base32 | |
1512 | "0xaxdcg1p83zmypwml3swsnr3ccn38inwldyr1l3wa4dbwbrblxj")))) | |
1513 | (build-system gnu-build-system) | |
1514 | (arguments | |
1515 | `(#:parallel-tests? #f)) | |
1516 | (inputs | |
1517 | `(("netcdf" ,netcdf))) | |
1518 | (native-inputs | |
1519 | `(("gfortran" ,gfortran))) | |
1520 | (synopsis "Fortran interface for the netCDF library") | |
1521 | (description (package-description netcdf)) | |
1522 | (home-page (package-home-page netcdf)) | |
1523 | (license (package-license netcdf)))) | |
1524 | ||
1b39a196 RJ |
1525 | (define-public nlopt |
1526 | (package | |
1527 | (name "nlopt") | |
1528 | (version "2.4.2") | |
1529 | (source (origin | |
1530 | (method url-fetch) | |
1531 | (uri (string-append "http://ab-initio.mit.edu/nlopt/nlopt-" | |
1532 | version ".tar.gz")) | |
1533 | (sha256 | |
1534 | (base32 "12cfkkhcdf4zmb6h7y6qvvdvqjs2xf9sjpa3rl3bq76px4yn76c0")))) | |
1535 | (build-system gnu-build-system) | |
1536 | (arguments | |
1537 | `(;; Shared libraries are not built by default. They are required to | |
1538 | ;; build the Guile, Octave, and Python bindings. | |
1539 | #:configure-flags '("--enable-shared") | |
1540 | ||
1541 | #:phases | |
1542 | (modify-phases %standard-phases | |
1543 | (add-before 'configure 'set-libnlopt-file-name | |
1544 | (lambda* (#:key outputs #:allow-other-keys) | |
1545 | ;; Make sure the Scheme module refers to the library by its | |
1546 | ;; absolute file name (we cannot do that from a snippet | |
1547 | ;; because the expansion of @libdir@ contains | |
1548 | ;; ${exec_prefix}.) | |
1549 | (let ((out (assoc-ref outputs "out"))) | |
1550 | (substitute* "swig/nlopt.scm.in" | |
1551 | (("libnlopt") | |
1552 | (string-append out "/lib/libnlopt"))) | |
1553 | #t)))))) | |
1554 | (inputs `(("guile" ,guile-2.0))) | |
1555 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1556 | (home-page "http://ab-initio.mit.edu/wiki/") | |
1557 | (synopsis "Library for nonlinear optimization") | |
1558 | (description "NLopt is a library for nonlinear optimization, providing a | |
1559 | common interface for a number of different free optimization routines available | |
1560 | online as well as original implementations of various other algorithms.") | |
1561 | (license license:lgpl2.1+))) | |
1562 | ||
005c787d LC |
1563 | (define-public ipopt |
1564 | (package | |
1565 | (name "ipopt") | |
98a5cd51 | 1566 | (version "3.12.12") |
005c787d LC |
1567 | (source (origin |
1568 | (method url-fetch) | |
1569 | (uri (string-append | |
1570 | "http://www.coin-or.org/download/source/Ipopt/Ipopt-" | |
1571 | version".tgz")) | |
1572 | (sha256 | |
1573 | (base32 | |
98a5cd51 | 1574 | "07yn9rzdswjk8n246qq6ci9ssf2bcplkifcpsfz9j6cdxw9vgbkv")) |
005c787d LC |
1575 | (modules '((guix build utils))) |
1576 | (snippet | |
1577 | ;; Make sure we don't use the bundled software. | |
6cbee49d MW |
1578 | '(begin |
1579 | (delete-file-recursively "ThirdParty") | |
1580 | #t)))) | |
005c787d | 1581 | (build-system gnu-build-system) |
ad1c4537 LC |
1582 | (arguments |
1583 | '(#:phases (modify-phases %standard-phases | |
1584 | (add-after 'install 'add--L-flags-in-ipopt.pc | |
1585 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1586 | ;; The '.pc' file lists '-llapack -lblas' in "Libs"; | |
1587 | ;; move it to "Libs.private" where it belongs, and add a | |
1588 | ;; '-L' flag for LAPACK. | |
1589 | (let ((out (assoc-ref outputs "out")) | |
1590 | (lapack (assoc-ref inputs "lapack"))) | |
1591 | (substitute* (string-append out "/lib/pkgconfig/" | |
1592 | "ipopt.pc") | |
1593 | (("Libs: (.*)-llapack -lblas(.*)$" _ before after) | |
1594 | (string-append "Libs: " before " " after "\n" | |
1595 | "Libs.private: " before | |
1596 | "-L" lapack "/lib -llapack -lblas " | |
1597 | after "\n"))) | |
1598 | #t)))))) | |
005c787d LC |
1599 | (native-inputs |
1600 | `(("gfortran" ,gfortran))) | |
1601 | (inputs | |
1602 | ;; TODO: Maybe add dependency on COIN-MUMPS, ASL, and HSL. | |
ad1c4537 | 1603 | `(("lapack" ,lapack))) ;for both libblas and liblapack |
005c787d LC |
1604 | (home-page "http://www.coin-or.org") |
1605 | (synopsis "Large-scale nonlinear optimizer") | |
1606 | (description | |
1607 | "The Interior Point Optimizer (IPOPT) is a software package for | |
1608 | large-scale nonlinear optimization. It provides C++, C, and Fortran | |
1609 | interfaces.") | |
1610 | (license license:epl1.0))) | |
1611 | ||
ecfbc51f RW |
1612 | (define-public clp |
1613 | (package | |
1614 | (name "clp") | |
bb9f9e1d | 1615 | (version "1.17.6") |
ecfbc51f RW |
1616 | (source (origin |
1617 | (method url-fetch) | |
1618 | (uri (string-append "https://www.coin-or.org/download/source/" | |
1619 | "Clp/Clp-" version ".tgz")) | |
1620 | (sha256 | |
1621 | (base32 | |
bb9f9e1d | 1622 | "0ap1f0lxppa6pnbc4bg7ih7a96avwaki482nig8w5fr3vg9wvkzr")) |
ecfbc51f RW |
1623 | (modules '((guix build utils))) |
1624 | (snippet | |
1625 | ;; Make sure we don't use the bundled software. | |
1626 | '(begin | |
1627 | (delete-file-recursively "ThirdParty") | |
1628 | #t)))) | |
1629 | (build-system gnu-build-system) | |
1630 | (native-inputs | |
1631 | `(("gfortran" ,gfortran) | |
1632 | ("pkg-config" ,pkg-config))) | |
1633 | (inputs | |
1634 | `(("openblas" ,openblas))) | |
1635 | (home-page "https://www.coin-or.org") | |
1636 | (synopsis "Linear programming solver") | |
1637 | (description | |
1638 | "CLP is a high quality linear programming solver. Its main strengths are | |
1639 | its dual and primal Simplex algorithms. It also has a barrier algorithm for | |
1640 | linear and quadratic objectives. There are limited facilities for nonlinear | |
1641 | and quadratic objectives using the Simplex algorithm.") | |
1642 | (license license:epl1.0))) | |
1643 | ||
f9940ef1 LC |
1644 | (define-public ceres |
1645 | (package | |
1646 | (name "ceres-solver") | |
e0bee0de | 1647 | (version "1.14.0") |
f9940ef1 LC |
1648 | (home-page "http://ceres-solver.org/") |
1649 | (source (origin | |
1650 | (method url-fetch) | |
1651 | (uri (string-append home-page "ceres-solver-" | |
1652 | version ".tar.gz")) | |
1653 | (sha256 | |
1654 | (base32 | |
e0bee0de | 1655 | "13lfxy8x58w8vprr0nkbzziaijlh0vvqshgahvcgw0mrqdgh0i27")))) |
f9940ef1 LC |
1656 | (build-system cmake-build-system) |
1657 | (arguments | |
1658 | ;; TODO: Build HTML user documentation and install separately. | |
bc3a2e35 | 1659 | '(#:configure-flags '("-DBUILD_EXAMPLES=OFF" |
f9940ef1 LC |
1660 | "-DBUILD_SHARED_LIBS=ON") |
1661 | ||
1662 | #:phases (modify-phases %standard-phases | |
1663 | (add-before 'configure 'set-library-directory | |
1664 | (lambda _ | |
1665 | ;; Install libraries to lib/, not lib64/. | |
1666 | (substitute* "internal/ceres/CMakeLists.txt" | |
1667 | (("set\\(LIB_SUFFIX \"64\"\\)") | |
1668 | "set(LIB_SUFFIX \"\")")) | |
1669 | #t))))) | |
1670 | (native-inputs | |
1671 | `(("pkg-config" ,pkg-config))) | |
468e0b18 LC |
1672 | (propagated-inputs |
1673 | `(("glog" ,glog))) ;for #include <glog/glog.h> | |
f9940ef1 LC |
1674 | (inputs |
1675 | `(("eigen" ,eigen) | |
1676 | ("blas" ,openblas) | |
1677 | ("lapack" ,lapack) | |
1678 | ("suitesparse" ,suitesparse) | |
1679 | ("gflags" ,gflags))) | |
1680 | (synopsis "C++ library for solving large optimization problems") | |
1681 | (description | |
1682 | "Ceres Solver is a C++ library for modeling and solving large, | |
1683 | complicated optimization problems. It is a feature rich, mature and | |
1684 | performant library which has been used in production since 2010. Ceres Solver | |
1685 | can solve two kinds of problems: | |
1686 | @enumerate | |
1687 | @item non-linear least squares problems with bounds constraints; | |
1688 | @item general unconstrained optimization problems. | |
1689 | @end enumerate\n") | |
1690 | (license license:bsd-3))) | |
1691 | ||
b66741ed | 1692 | ;; For a fully featured Octave, users are strongly recommended also to install |
5ca4fe96 | 1693 | ;; the following packages: less, ghostscript, gnuplot. |
5537603f | 1694 | (define-public octave-cli |
668c06ac | 1695 | (package |
5537603f | 1696 | (name "octave-cli") |
8a0dd289 | 1697 | (version "5.2.0") |
668c06ac JD |
1698 | (source |
1699 | (origin | |
1700 | (method url-fetch) | |
1701 | (uri (string-append "mirror://gnu/octave/octave-" | |
f5a077b1 | 1702 | version ".tar.lz")) |
668c06ac JD |
1703 | (sha256 |
1704 | (base32 | |
8a0dd289 | 1705 | "1848dq6nxzal8gwjrcp6xhi5gq96w89nss9d9rz75q408gb3mbl6")))) |
668c06ac JD |
1706 | (build-system gnu-build-system) |
1707 | (inputs | |
697df13f EF |
1708 | `(("alsa-lib" ,alsa-lib) |
1709 | ("arpack" ,arpack-ng) | |
8a0dd289 | 1710 | ("bdb" ,bdb) |
697df13f | 1711 | ("curl" ,curl) |
1ec78e9d EB |
1712 | ("fftw" ,fftw) |
1713 | ("fftwf" ,fftwf) | |
668c06ac JD |
1714 | ("fltk" ,fltk) |
1715 | ("fontconfig" ,fontconfig) | |
1716 | ("freetype" ,freetype) | |
697df13f EF |
1717 | ("gl2ps" ,gl2ps) |
1718 | ("glpk" ,glpk) | |
1ec78e9d | 1719 | ("glu" ,glu) |
ab5f3f21 | 1720 | ("graphicsmagick" ,graphicsmagick) |
a533c5a1 MB |
1721 | |
1722 | ;; TODO: libjpeg-turbo is indirectly required through libtiff. In | |
1723 | ;; the next rebuild cycle, add an absolute reference for -ljpeg in | |
1724 | ;; libtiff.la instead of having to provide it here. | |
1725 | ("libjpeg" ,libjpeg-turbo) | |
1726 | ||
697df13f EF |
1727 | ("hdf5" ,hdf5) |
1728 | ("lapack" ,lapack) | |
ab5f3f21 | 1729 | ("libsndfile" ,libsndfile) |
697df13f EF |
1730 | ("libxft" ,libxft) |
1731 | ("mesa" ,mesa) | |
1732 | ("pcre" ,pcre) | |
ab5f3f21 | 1733 | ("portaudio" ,portaudio) |
697df13f EF |
1734 | ("qhull" ,qhull) |
1735 | ("readline" ,readline) | |
1736 | ("suitesparse" ,suitesparse) | |
1737 | ("texinfo" ,texinfo) | |
1738 | ("zlib" ,zlib))) | |
668c06ac | 1739 | (native-inputs |
f5a077b1 EF |
1740 | `(("lzip" ,lzip) |
1741 | ("gfortran" ,gfortran) | |
668c06ac JD |
1742 | ("pkg-config" ,pkg-config) |
1743 | ("perl" ,perl) | |
1ec78e9d EB |
1744 | ;; The following inputs are not actually used in the build process. |
1745 | ;; However, the ./configure gratuitously tests for their existence and | |
1746 | ;; assumes that programs not present at build time are also not, and | |
1747 | ;; can never be, available at run time! If these inputs are therefore | |
1748 | ;; not present, support for them will be built out. However, Octave | |
1749 | ;; will still run without them, albeit without the features they | |
668c06ac JD |
1750 | ;; provide. |
1751 | ("less" ,less) | |
668c06ac JD |
1752 | ("ghostscript" ,ghostscript) |
1753 | ("gnuplot" ,gnuplot))) | |
116af86f KK |
1754 | ;; Octave code uses this variable to detect directories holding multiple CA |
1755 | ;; certificates to verify peers with. This is required for the networking | |
1756 | ;; functions that require encryption to work properly. | |
1757 | (native-search-paths | |
1758 | (list (search-path-specification | |
1759 | (variable "CURLOPT_CAPATH") | |
1760 | (files '("etc/ssl/certs"))))) | |
668c06ac | 1761 | (arguments |
b7b27a8f KY |
1762 | `(#:configure-flags |
1763 | (list (string-append "--with-shell=" | |
1764 | (assoc-ref %build-inputs "bash") | |
a533c5a1 MB |
1765 | "/bin/sh") |
1766 | ||
1767 | ;; XXX: Without this flag, linking octave-cli fails with | |
1768 | ;; undefined references to 'logf@GLIBCXX_3.4' et.al. due to | |
1769 | ;; not pulling in liboctinterp.la for -lstdc++. | |
1770 | "--enable-link-all-dependencies") | |
5ca4fe96 AI |
1771 | #:phases |
1772 | (modify-phases %standard-phases | |
1773 | (add-after 'configure 'configure-makeinfo | |
1774 | (lambda* (#:key inputs #:allow-other-keys) | |
b18b9d20 AI |
1775 | (substitute* "libinterp/corefcn/help.h" |
1776 | (("\"makeinfo\"") | |
1777 | (string-append | |
1778 | "\"" (assoc-ref inputs "texinfo") "/bin/makeinfo\""))) | |
5ca4fe96 | 1779 | #t))))) |
f5a077b1 | 1780 | (home-page "https://www.gnu.org/software/octave/") |
668c06ac | 1781 | (synopsis "High-level language for numerical computation") |
1ec78e9d EB |
1782 | (description "GNU Octave is a high-level interpreted language that is |
1783 | specialized for numerical computations. It can be used for both linear and | |
1784 | non-linear applications and it provides great support for visualizing results. | |
1785 | Work may be performed both at the interactive command-line as well as via | |
1786 | script files.") | |
668c06ac | 1787 | (license license:gpl3+))) |
3de01d3f | 1788 | |
e0ae7e73 | 1789 | (define-public octave |
5537603f | 1790 | (package (inherit octave-cli) |
e0ae7e73 | 1791 | (name "octave") |
7a3772b3 | 1792 | (source (origin |
5537603f | 1793 | (inherit (package-source octave-cli)))) |
36ce25f0 KK |
1794 | (inputs |
1795 | `(("qscintilla" ,qscintilla) | |
1796 | ("qt" ,qtbase) | |
5537603f | 1797 | ,@(package-inputs octave-cli))) |
36ce25f0 KK |
1798 | (native-inputs |
1799 | `(("qttools" , qttools) ;for lrelease | |
70bb5d88 | 1800 | ("texlive" ,(texlive-union (list texlive-epsf))) ; for texi2dvi |
5537603f | 1801 | ,@(package-native-inputs octave-cli))) |
36ce25f0 | 1802 | (arguments |
5537603f | 1803 | (substitute-keyword-arguments (package-arguments octave-cli) |
36ce25f0 KK |
1804 | ((#:phases phases) |
1805 | `(modify-phases ,phases | |
1806 | (add-before 'configure 'patch-qscintilla-library-name | |
1807 | (lambda* (#:key inputs #:allow-other-keys) | |
1808 | ;; The QScintilla library that the Octave configure script tries | |
1809 | ;; to link with should be named libqscintilla-qt5.so, but the | |
1810 | ;; QScintilla input provides the shared library as | |
1811 | ;; libqscintilla2_qt5.so. | |
1812 | (substitute* "configure" | |
1813 | (("qscintilla2-qt5") | |
1814 | "qscintilla2_qt5")) | |
1815 | #t)))))))) | |
1816 | ||
5d4bd4cc PG |
1817 | (define-public opencascade-oce |
1818 | (package | |
1819 | (name "opencascade-oce") | |
1820 | (version "0.17.2") | |
1821 | (source | |
1822 | (origin | |
830971bf TGR |
1823 | (method git-fetch) |
1824 | (uri (git-reference | |
1825 | (url "https://github.com/tpaviot/oce.git") | |
1826 | (commit (string-append "OCE-" version)))) | |
1827 | (file-name (git-file-name name version)) | |
a4f393b7 | 1828 | (patches (search-patches "opencascade-oce-glibc-2.26.patch")) |
5d4bd4cc | 1829 | (sha256 |
830971bf | 1830 | (base32 "0rg5wzkvfmzfl6v2amyryb8dnjad0nn9kyr607wy2gch6rciah69")))) |
5d4bd4cc PG |
1831 | (build-system cmake-build-system) |
1832 | (arguments | |
1833 | '(#:configure-flags | |
1834 | (list "-DOCE_TESTING:BOOL=ON" | |
1835 | "-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=ON" | |
1836 | "-DOCE_DRAW:BOOL=ON" | |
1837 | (string-append "-DOCE_INSTALL_PREFIX:PATH=" | |
1838 | (assoc-ref %outputs "out")) | |
1839 | "-UCMAKE_INSTALL_RPATH"))) | |
1840 | (inputs | |
1841 | `(("freetype" ,freetype) | |
1842 | ("glu" ,glu) | |
1843 | ("libxmu" ,libxmu) | |
1844 | ("mesa" ,mesa) | |
1845 | ("tcl" ,tcl) | |
1846 | ("tk" ,tk))) | |
1847 | (native-inputs | |
1848 | `(("python" ,python-wrapper))) | |
1849 | (home-page "https://github.com/tpaviot/oce") | |
1850 | (synopsis "Libraries for 3D modeling and numerical simulation") | |
1851 | (description | |
1852 | "Open CASCADE is a set of libraries for the development of applications | |
1853 | dealing with 3D CAD data or requiring industrial 3D capabilities. It includes | |
1854 | C++ class libraries providing services for 3D surface and solid modeling, CAD | |
1855 | data exchange, and visualization. It is used for development of specialized | |
1856 | software dealing with 3D models in design (CAD), manufacturing (CAM), | |
1857 | numerical simulation (CAE), measurement equipment (CMM), and quality | |
1858 | control (CAQ) domains. | |
1859 | ||
1860 | This is the ``Community Edition'' (OCE) of Open CASCADE, which gathers | |
1861 | patches, improvements, and experiments contributed by users over the official | |
1862 | Open CASCADE library.") | |
1863 | (license (list license:lgpl2.1; OCE libraries, with an exception for the | |
1864 | ; use of header files; see | |
1865 | ; OCCT_LGPL_EXCEPTION.txt | |
1866 | license:public-domain; files | |
1867 | ; src/Standard/Standard_StdAllocator.hxx and | |
1868 | ; src/NCollection/NCollection_StdAllocator.hxx | |
1869 | license:expat; file src/OpenGl/OpenGl_glext.h | |
1870 | license:bsd-3)))); test framework gtest | |
1871 | ||
37dc2920 PG |
1872 | (define-public opencascade-occt |
1873 | (package | |
1874 | (name "opencascade-occt") | |
1875 | (version "7.3.0p3") | |
1876 | (source | |
1877 | (origin | |
1878 | (method git-fetch) | |
1879 | (uri (git-reference | |
1880 | (url "https://git.dev.opencascade.org/repos/occt.git") | |
1881 | (commit | |
1882 | (string-append "V" | |
1883 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) | |
1884 | version))))) | |
1885 | (file-name (git-file-name name version)) | |
1886 | (sha256 | |
1887 | (base32 "0bdywwxb6mk0ykbiajlvsb37295akqjp0a60y672qjfa67k0ljv4")) | |
1888 | (modules '((guix build utils))) | |
1889 | (snippet | |
1890 | '(begin | |
1891 | ;; Remove files specific to non-free operating systems. | |
1892 | (delete-file-recursively "samples/ios") | |
1893 | (delete-file-recursively "samples/mfc") | |
1894 | (delete-file-recursively "samples/qt/FuncDemo") | |
1895 | (delete-file "genconf.bat") | |
1896 | (delete-file "gendoc.bat") | |
1897 | (delete-file "genproj.bat") | |
1898 | (delete-file "upgrade.bat") | |
1899 | ;; Remove references to deleted files. | |
1900 | (substitute* "dox/FILES_HTML.txt" | |
1901 | ((".*standard.*") "" ) | |
1902 | ((".*UIKitSample.*") "")) | |
1903 | #t)))) | |
1904 | (build-system cmake-build-system) | |
1905 | (arguments | |
1906 | '(;; There is no test target for make. OCCT provides an | |
1907 | ;; 'Automated Testing System', which may be accessed after | |
1908 | ;; installation via the draw.sh script. draw.sh is located in | |
1909 | ;; the bin directory. For details see: | |
1910 | ;; https://www.opencascade.com/doc/occt-7.3.0/overview/html/\ | |
1911 | ;; occt_dev_guides__tests.html | |
1912 | #:tests? #f | |
1913 | ;; Configure without freeimage: attempting to link against the | |
1914 | ;; freeimage version 3.17 library leads to 'undefined | |
1915 | ;; reference' errors. | |
1916 | #:configure-flags | |
1917 | (list "-DUSE_FREEIMAGE:BOOL=OFF" | |
1918 | "-DUSE_TBB:BOOL=ON" | |
1919 | "-DUSE_VTK:BOOL=OFF" | |
1920 | "-DBUILD_DOC_Overview:BOOL=OFF" | |
1921 | "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" | |
1922 | "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" | |
1923 | "-UCMAKE_INSTALL_LIBDIR"))) | |
1924 | (inputs | |
1925 | `(("doxygen" ,doxygen) | |
1926 | ;("freeimage" ,freeimage) | |
1927 | ("freetype" ,freetype) | |
1928 | ("glu" ,glu) | |
1929 | ("libxext" ,libxext) | |
1930 | ("libxi" ,libxi) | |
1931 | ("libxmu" ,libxmu) | |
1932 | ("mesa" ,mesa) | |
1933 | ("tbb" ,tbb) | |
1934 | ("tcl" ,tcl) | |
1935 | ("tk" ,tk))) | |
1936 | ;; TODO: build Overview documentation and add 'doc' output. | |
1937 | (home-page "https://www.opencascade.com") | |
1938 | (synopsis "Libraries for 3D modeling and numerical simulation") | |
1939 | (description | |
1940 | "Open CASCADE is a set of libraries for the development of applications | |
1941 | dealing with 3D CAD data or requiring industrial 3D capabilities. It includes | |
1942 | C++ class libraries providing services for 3D surface and solid modeling, CAD | |
1943 | data exchange, and visualization. It is used for development of specialized | |
1944 | software dealing with 3D models in design (CAD), manufacturing (CAM), | |
1945 | numerical simulation (CAE), measurement equipment (CMM), and quality | |
1946 | control (CAQ) domains. | |
1947 | ||
1948 | This is the certified version of the Open Cascade Technology (OCCT) library.") | |
1949 | (license (list ;; OCCT library: | |
1950 | license:lgpl2.1; with an exception for the use of header | |
1951 | ; files, see OCCT_LGPL_EXCEPTION.txt. | |
1952 | ;; Files src/OpenGl/glext.h, adm/cmake/cotire.cmake and | |
1953 | ;; src/OpenGl/OpenGl_HaltonSampler.hxx: | |
1954 | license:expat | |
1955 | ;; Files src/ExprIntrp/ExprIntrp.tab.* and | |
1956 | ;; src/StepFile/step.tab.*: | |
1957 | license:gpl3+ ; with Bison 2.2 exception. | |
1958 | ;; File src/NCollection/NCollection_UtfIterator.lxx: | |
1959 | (license:non-copyleft | |
1960 | "https://www.unicode.org/license.html") | |
1961 | ;; File src/NCollection/NCollection_StdAllocator.hxx: | |
1962 | license:public-domain)))) | |
1963 | ||
3de01d3f EB |
1964 | (define-public gmsh |
1965 | (package | |
1966 | (name "gmsh") | |
8a4d14fa | 1967 | (version "2.16.0") |
3de01d3f EB |
1968 | (source |
1969 | (origin | |
abed5df7 PG |
1970 | (method git-fetch) |
1971 | (uri (git-reference | |
1972 | (url "https://gitlab.onelab.info/gmsh/gmsh.git") | |
1973 | (commit | |
1974 | (string-append "gmsh_" | |
1975 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) | |
1976 | version))))) | |
1977 | (file-name (git-file-name name version)) | |
3de01d3f | 1978 | (sha256 |
abed5df7 | 1979 | (base32 "08rq4jajwmlpivnm9yifz2jhaivnz065lnk0h2zv773nwl9wf162")) |
3de01d3f EB |
1980 | (modules '((guix build utils))) |
1981 | (snippet | |
1982 | ;; Remove non-free METIS code | |
6cbee49d MW |
1983 | '(begin |
1984 | (delete-file-recursively "contrib/Metis") | |
1985 | #t)))) | |
3de01d3f | 1986 | (build-system cmake-build-system) |
3de01d3f EB |
1987 | (propagated-inputs |
1988 | `(("fltk" ,fltk) | |
19afbea1 | 1989 | ("gfortran" ,gfortran) |
3de01d3f | 1990 | ("gmp" ,gmp) |
40029cbe | 1991 | ("hdf5" ,hdf5) |
3de01d3f EB |
1992 | ("lapack" ,lapack) |
1993 | ("mesa" ,mesa) | |
85f41902 | 1994 | ("glu" ,glu) |
45548139 | 1995 | ("opencascade-oce" ,opencascade-oce) |
3de01d3f EB |
1996 | ("libx11" ,libx11) |
1997 | ("libxext" ,libxext))) | |
66395a61 EF |
1998 | (inputs |
1999 | `(("fontconfig" ,fontconfig) | |
2000 | ("libxft" ,libxft))) | |
3de01d3f EB |
2001 | (arguments |
2002 | `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF" | |
2003 | "-DENABLE_BUILD_SHARED:BOOL=ON" | |
45548139 | 2004 | "-DENABLE_BUILD_DYNAMIC:BOOL=ON"))) |
0746c33e | 2005 | (home-page "http://gmsh.info/") |
3de01d3f | 2006 | (synopsis "3D finite element grid generator") |
edf684ef EB |
2007 | (description "Gmsh is a 3D finite element grid generator with a built-in |
2008 | CAD engine and post-processor. Its design goal is to provide a fast, light | |
2009 | and user-friendly meshing tool with parametric input and advanced | |
2010 | visualization capabilities. Gmsh is built around four modules: geometry, | |
2011 | mesh, solver and post-processing. The specification of any input to these | |
2012 | modules is done either interactively using the graphical user interface or in | |
2013 | ASCII text files using Gmsh's own scripting language.") | |
3de01d3f | 2014 | (license license:gpl2+))) |
b9100e2f | 2015 | |
6d5f63b6 JD |
2016 | (define-public maxflow |
2017 | (package | |
2018 | (name "maxflow") | |
0af12a13 TGR |
2019 | ;; Versioning is ambiguous: the git tag matching this commit is ‘3.0.5’, |
2020 | ;; which matches CMakeLists.txt, but README.md and CHANGES say ‘3.04’. | |
2021 | (version "3.0.5") | |
6d5f63b6 JD |
2022 | (source (origin |
2023 | (method git-fetch) | |
2024 | (uri (git-reference | |
2025 | (url "https://github.com/gerddie/maxflow.git") | |
0af12a13 | 2026 | (commit version))) |
2dc0a6cf | 2027 | (file-name (git-file-name name version)) |
6d5f63b6 JD |
2028 | (sha256 |
2029 | (base32 | |
2030 | "0rll38whw55h0vcjrrwdnh9ascvxby0ph7n1l0d12z17cg215kkb")))) | |
2031 | (build-system cmake-build-system) | |
0be9038c | 2032 | (home-page "https://pub.ist.ac.at/~vnk/software.html") |
6d5f63b6 JD |
2033 | (synopsis "Library implementing Maxflow algorithm") |
2034 | (description "An implementation of the maxflow algorithm described in | |
2035 | @cite{An Experimental Comparison of Min-Cut/Max-Flow Algorithms for | |
2036 | Energy Minimization in Computer Vision.\n | |
2037 | Yuri Boykov and Vladimir Kolmogorov.\n | |
2038 | In IEEE Transactions on Pattern Analysis and Machine Intelligence,\n | |
2039 | September 2004}") | |
2040 | (license license:gpl3+))) | |
2041 | ||
b9100e2f EB |
2042 | (define-public petsc |
2043 | (package | |
2044 | (name "petsc") | |
4f7a4a06 | 2045 | (version "3.11.2") |
b9100e2f EB |
2046 | (source |
2047 | (origin | |
2048 | (method url-fetch) | |
2049 | ;; The *-lite-* tarball does not contain the *large* documentation | |
2050 | (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/" | |
2051 | "petsc-lite-" version ".tar.gz")) | |
2052 | (sha256 | |
4f7a4a06 | 2053 | (base32 "1645nwwcp9bcnfnxikk480mhbbacdvhsay2c401818hk97dqj5nx")))) |
b2c52fc9 TGR |
2054 | (outputs '("out" ; libraries and headers |
2055 | "examples")) ; ~30MiB of examples | |
b9100e2f EB |
2056 | (build-system gnu-build-system) |
2057 | (native-inputs | |
6fec298d | 2058 | `(("python" ,python-2))) |
b9100e2f | 2059 | (inputs |
19afbea1 | 2060 | `(("gfortran" ,gfortran) |
b9100e2f | 2061 | ("lapack" ,lapack) |
f258212d | 2062 | ("superlu" ,superlu) |
b9100e2f EB |
2063 | ;; leaving out hdf5 and fftw, as petsc expects them to be built with mpi |
2064 | ;; leaving out opengl, as configuration seems to only be for mac | |
2065 | )) | |
2066 | (arguments | |
2067 | `(#:test-target "test" | |
b2c52fc9 | 2068 | #:parallel-build? #f ; build is parallel by default |
b9100e2f EB |
2069 | #:configure-flags |
2070 | `("--with-mpi=0" | |
f258212d | 2071 | "--with-openmp=1" |
c15be128 | 2072 | "--with-superlu=1") |
9731c412 EB |
2073 | #:make-flags |
2074 | ;; Honor (parallel-job-count) for build. Do not use --with-make-np, | |
2075 | ;; whose value is dumped to $out/lib/petsc/conf/petscvariables. | |
2076 | (list (format #f "MAKE_NP=~a" (parallel-job-count))) | |
b9100e2f | 2077 | #:phases |
64dcc289 EB |
2078 | (modify-phases %standard-phases |
2079 | (replace 'configure | |
2080 | ;; PETSc's configure script is actually a python script, so we can't | |
2081 | ;; run it with bash. | |
2082 | (lambda* (#:key outputs (configure-flags '()) | |
2083 | #:allow-other-keys) | |
2084 | (let* ((prefix (assoc-ref outputs "out")) | |
2085 | (flags `(,(string-append "--prefix=" prefix) | |
2086 | ,@configure-flags))) | |
2087 | (format #t "build directory: ~s~%" (getcwd)) | |
2088 | (format #t "configure flags: ~s~%" flags) | |
49fdd357 | 2089 | (apply invoke "./configure" flags)))) |
64dcc289 | 2090 | (add-after 'configure 'clean-local-references |
9731c412 | 2091 | (lambda* (#:key outputs #:allow-other-keys) |
64dcc289 EB |
2092 | (let ((out (assoc-ref outputs "out"))) |
2093 | (substitute* (find-files "." "^petsc(conf|machineinfo).h$") | |
b730b437 EB |
2094 | ;; Prevent build directory from leaking into compiled code |
2095 | (((getcwd)) out) | |
2096 | ;; Scrub timestamp for reproducibility | |
fafd623e | 2097 | ((".*Libraries compiled on.*") "")) |
9731c412 EB |
2098 | (substitute* (find-files "." "petscvariables") |
2099 | ;; Do not expose build machine characteristics, set to defaults. | |
2100 | (("MAKE_NP = [:digit:]+") "MAKE_NP = 2") | |
2101 | (("NPMAX = [:digit:]+") "NPMAX = 2")) | |
fafd623e | 2102 | #t))) |
64dcc289 | 2103 | (add-after 'install 'clean-install |
10b11968 EB |
2104 | ;; Try to keep installed files from leaking build directory names. |
2105 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
64dcc289 | 2106 | (let ((out (assoc-ref outputs "out"))) |
10b11968 | 2107 | (substitute* (map (lambda (file) |
9a899cce | 2108 | (string-append out "/lib/petsc/conf/" file)) |
fafd623e | 2109 | '("petscvariables")) |
10b11968 EB |
2110 | (((getcwd)) out)) |
2111 | ;; Make compiler references point to the store | |
9a899cce | 2112 | (substitute* (string-append out "/lib/petsc/conf/petscvariables") |
dfdf5716 EB |
2113 | (("= (gcc|g\\+\\+|gfortran)" _ compiler) |
2114 | (string-append "= " (which compiler)))) | |
10b11968 EB |
2115 | ;; PETSc installs some build logs, which aren't necessary. |
2116 | (for-each (lambda (file) | |
9a899cce | 2117 | (let ((f (string-append out "/lib/petsc/conf/" file))) |
10b11968 EB |
2118 | (when (file-exists? f) |
2119 | (delete-file f)))) | |
9a899cce EB |
2120 | '("configure.log" "make.log" "gmake.log" |
2121 | "test.log" "error.log" "RDict.db" | |
fafd623e | 2122 | "PETScBuildInternal.cmake" |
10b11968 | 2123 | ;; Once installed, should uninstall with Guix |
fafd623e | 2124 | "uninstall.py")) |
a3a99e27 EB |
2125 | #t))) |
2126 | (add-after 'install 'move-examples | |
2127 | (lambda* (#:key outputs #:allow-other-keys) | |
2128 | (let* ((out (assoc-ref outputs "out")) | |
2129 | (examples (assoc-ref outputs "examples")) | |
2130 | (exdir (string-append out "/share/petsc/examples")) | |
2131 | (exdir' (string-append examples "/share/petsc/examples"))) | |
2132 | (copy-recursively exdir exdir') | |
2133 | (delete-file-recursively exdir) | |
fafd623e | 2134 | #t)))))) |
2299d83e | 2135 | (home-page "https://www.mcs.anl.gov/petsc") |
16ecf3ff | 2136 | (synopsis "Library to solve PDEs") |
b9100e2f EB |
2137 | (description "PETSc, pronounced PET-see (the S is silent), is a suite of |
2138 | data structures and routines for the scalable (parallel) solution of | |
2139 | scientific applications modeled by partial differential equations.") | |
166191b3 | 2140 | (license (license:non-copyleft |
2299d83e | 2141 | "https://www.mcs.anl.gov/petsc/documentation/copyright.html")))) |
b9100e2f EB |
2142 | |
2143 | (define-public petsc-complex | |
2144 | (package (inherit petsc) | |
2145 | (name "petsc-complex") | |
2146 | (arguments | |
2147 | (substitute-keyword-arguments (package-arguments petsc) | |
2148 | ((#:configure-flags cf) | |
2149 | `(cons "--with-scalar-type=complex" ,cf)))) | |
16ecf3ff | 2150 | (synopsis "Library to solve PDEs (with complex scalars)"))) |
183e44ae | 2151 | |
d8c7eeb9 EB |
2152 | (define-public petsc-openmpi |
2153 | (package (inherit petsc) | |
2154 | (name "petsc-openmpi") | |
2155 | (inputs | |
9e2aa70b | 2156 | `(("hdf5" ,hdf5-parallel-openmpi) |
af523673 | 2157 | ("hypre" ,hypre-openmpi) |
9e2aa70b PG |
2158 | ("metis" ,metis) |
2159 | ("mumps" ,mumps-openmpi) | |
2160 | ("openmpi" ,openmpi) | |
2161 | ("scalapack" ,scalapack) | |
72f95783 | 2162 | ("scotch" ,pt-scotch32) |
d8c7eeb9 EB |
2163 | ,@(package-inputs petsc))) |
2164 | (arguments | |
2165 | (substitute-keyword-arguments (package-arguments petsc) | |
2166 | ((#:configure-flags cf) | |
af523673 PG |
2167 | ``("--with-hypre=1" |
2168 | "--with-mpiexec=mpirun" | |
9e2aa70b PG |
2169 | "--with-metis=1" |
2170 | "--with-mumps=1" | |
2171 | "--with-scalapack=1" | |
2172 | "--with-ptscotch=1" | |
d8c7eeb9 EB |
2173 | ,(string-append "--with-mpi-dir=" |
2174 | (assoc-ref %build-inputs "openmpi")) | |
71ca16b5 PG |
2175 | ,(string-append "--with-hdf5-include=" |
2176 | (assoc-ref %build-inputs "hdf5") "/include") | |
2177 | ,(string-append "--with-hdf5-lib=" | |
2178 | (assoc-ref %build-inputs "hdf5") "/lib/libhdf5.a") | |
2179 | ,@(delete "--with-mpi=0" ,cf))) | |
2180 | ((#:phases phases) | |
2181 | `(modify-phases ,phases | |
9e2aa70b | 2182 | (add-before 'configure 'mpi-setup |
bbe46a4a | 2183 | ,%openmpi-setup))))) |
9e2aa70b | 2184 | (synopsis "Library to solve PDEs (with MUMPS and MPI support)"))) |
d8c7eeb9 EB |
2185 | |
2186 | (define-public petsc-complex-openmpi | |
2187 | (package (inherit petsc-complex) | |
2188 | (name "petsc-complex-openmpi") | |
2189 | (inputs | |
2190 | `(("openmpi" ,openmpi) | |
2191 | ,@(package-inputs petsc-complex))) | |
2192 | (arguments | |
2193 | (substitute-keyword-arguments (package-arguments petsc-complex) | |
2194 | ((#:configure-flags cf) | |
2195 | ``("--with-mpiexec=mpirun" | |
2196 | ,(string-append "--with-mpi-dir=" | |
2197 | (assoc-ref %build-inputs "openmpi")) | |
e586c6fa EB |
2198 | ,@(delete "--with-mpi=0" ,cf))) |
2199 | ((#:phases phases) | |
2200 | `(modify-phases ,phases | |
2201 | (add-before 'configure 'mpi-setup | |
2202 | ,%openmpi-setup))))) | |
16ecf3ff | 2203 | (synopsis "Library to solve PDEs (with complex scalars and MPI support)"))) |
d8c7eeb9 | 2204 | |
90ff2874 PG |
2205 | (define-public python-petsc4py |
2206 | (package | |
2207 | (name "python-petsc4py") | |
f1cc312e | 2208 | (version "3.11.0") |
90ff2874 PG |
2209 | (source |
2210 | (origin | |
2211 | (method url-fetch) | |
2212 | (uri (pypi-uri "petsc4py" version)) | |
2213 | (sha256 | |
2214 | (base32 | |
f1cc312e | 2215 | "1rm1qj5wlkhxl39by9n78lh3gbmii31wsnb8j1rr5hvfr5xgbx2q")))) |
90ff2874 PG |
2216 | (build-system python-build-system) |
2217 | (arguments | |
2218 | `(#:phases | |
2219 | (modify-phases %standard-phases | |
2220 | (add-before 'build 'pre-build | |
2221 | (lambda _ | |
2222 | ;; Define path to PETSc installation. | |
2223 | (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc")) | |
2224 | #t)) | |
2225 | (add-before 'check 'mpi-setup | |
2226 | ,%openmpi-setup)))) | |
2227 | (inputs | |
2228 | `(("petsc" ,petsc-openmpi) | |
2229 | ("python-numpy" ,python-numpy))) | |
2230 | (home-page "https://bitbucket.org/petsc/petsc4py/") | |
2231 | (synopsis "Python bindings for PETSc") | |
2232 | (description "PETSc, the Portable, Extensible Toolkit for | |
2233 | Scientific Computation, is a suite of data structures and routines for | |
2234 | the scalable (parallel) solution of scientific applications modeled by | |
2235 | partial differential equations. It employs the MPI standard for all | |
2236 | message-passing communication. @code{petsc4py} provides Python | |
2237 | bindings to almost all functions of PETSc.") | |
2238 | (license license:bsd-3))) | |
2239 | ||
560acf25 MB |
2240 | (define-public python-kiwisolver |
2241 | (package | |
2242 | (name "python-kiwisolver") | |
2243 | (version "1.0.1") | |
2244 | (source (origin | |
2245 | (method url-fetch) | |
2246 | (uri (pypi-uri "kiwisolver" version)) | |
2247 | (sha256 | |
2248 | (base32 | |
2249 | "0y22ci86znwwwfhbmvbgdfnbi6lv5gv2xkdlxvjw7lml43ayafyf")))) | |
2250 | (build-system python-build-system) | |
2251 | (home-page "https://github.com/nucleic/kiwi") | |
2252 | (synopsis "Fast implementation of the Cassowary constraint solver") | |
2253 | (description | |
2254 | "Kiwi is an efficient C++ implementation of the Cassowary constraint | |
2255 | solving algorithm. Kiwi has been designed from the ground up to be | |
2256 | lightweight and fast. Kiwi ranges from 10x to 500x faster than the original | |
2257 | Cassowary solver with typical use cases gaining a 40x improvement. Memory | |
2258 | savings are consistently > 5x.") | |
2259 | (license license:bsd-3))) | |
2260 | ||
2261 | (define-public python2-kiwisolver | |
2262 | (package-with-python2 python-kiwisolver)) | |
2263 | ||
a7f01414 EB |
2264 | (define-public slepc |
2265 | (package | |
2266 | (name "slepc") | |
a13e0f3d | 2267 | (version "3.11.1") |
a7f01414 EB |
2268 | (source |
2269 | (origin | |
2270 | (method url-fetch) | |
baeaf882 EB |
2271 | (uri (string-append "http://slepc.upv.es/download/distrib/slepc-" |
2272 | version ".tar.gz")) | |
a7f01414 EB |
2273 | (sha256 |
2274 | (base32 | |
a13e0f3d | 2275 | "1yq84q9wannc8xwapxpay4ypdd675picwi395hhsdvng9q6hf5j8")))) |
a7f01414 EB |
2276 | (build-system gnu-build-system) |
2277 | (native-inputs | |
a13e0f3d EB |
2278 | `(("python" ,python-2) |
2279 | ("petsc:examples" ,petsc "examples"))) ;for gmakegen.py script | |
a7f01414 EB |
2280 | (inputs |
2281 | `(("arpack" ,arpack-ng) | |
2282 | ("gfortran" ,gfortran))) | |
2283 | (propagated-inputs | |
2284 | `(("petsc" ,petsc))) | |
2285 | (arguments | |
2286 | `(#:parallel-build? #f ;build is parallel by default | |
2287 | #:configure-flags | |
2288 | `(,(string-append "--with-arpack-dir=" | |
9cf52454 | 2289 | (assoc-ref %build-inputs "arpack") "/lib")) |
9731c412 | 2290 | #:make-flags ;honor (parallel-job-count) |
a13e0f3d EB |
2291 | `(,(format #f "MAKE_NP=~a" (parallel-job-count)) |
2292 | ,(string-append "PETSCCONFIGDIR=" | |
2293 | (assoc-ref %build-inputs "petsc:examples") | |
2294 | "/share/petsc/examples/config")) | |
a7f01414 EB |
2295 | #:phases |
2296 | (modify-phases %standard-phases | |
8787c555 | 2297 | (replace 'configure |
a7f01414 EB |
2298 | ;; configure is a python script, so we can't run it with bash. |
2299 | (lambda* (#:key inputs outputs (configure-flags '()) | |
2300 | #:allow-other-keys) | |
2301 | (let* ((prefix (assoc-ref outputs "out")) | |
2302 | (flags `(,(string-append "--prefix=" prefix) | |
2303 | ,@configure-flags))) | |
2304 | (format #t "build directory: ~s~%" (getcwd)) | |
2305 | (format #t "configure flags: ~s~%" flags) | |
2306 | (setenv "SLEPC_DIR" (getcwd)) | |
9cf52454 | 2307 | (setenv "PETSC_DIR" (assoc-ref inputs "petsc")) |
c6840089 | 2308 | (apply invoke "./configure" flags)))) |
8787c555 | 2309 | (add-after 'install 'delete-doc |
a7f01414 EB |
2310 | ;; TODO: SLEPc installs HTML documentation alongside headers in |
2311 | ;; $out/include. We'd like to move them to share/doc, but delete | |
2312 | ;; them for now, as they are incomplete and installing the complete | |
2313 | ;; documentation is difficult. | |
2314 | (lambda* (#:key outputs #:allow-other-keys) | |
2315 | (let* ((out (assoc-ref outputs "out"))) | |
0f6dc120 TGR |
2316 | (for-each delete-file (find-files out "\\.html$")) |
2317 | #t))) | |
8787c555 | 2318 | (add-after 'install 'clean-install |
a7f01414 EB |
2319 | ;; Clean up unnecessary build logs from installation. |
2320 | (lambda* (#:key outputs #:allow-other-keys) | |
2321 | (let ((out (assoc-ref outputs "out"))) | |
2322 | (for-each (lambda (file) | |
2323 | (let ((f (string-append out "/lib/slepc/conf/" file))) | |
2324 | (when (file-exists? f) | |
2325 | (delete-file f)))) | |
2326 | '("configure.log" "make.log" "gmake.log" | |
2327 | "test.log" "error.log" "RDict.db" | |
0f6dc120 TGR |
2328 | "uninstall.py")) |
2329 | #t)))))) | |
a7f01414 EB |
2330 | (home-page "http://slepc.upv.es") |
2331 | (synopsis "Scalable library for eigenproblems") | |
2332 | (description "SLEPc is a software library for the solution of large sparse | |
2333 | eigenproblems on parallel computers. It can be used for the solution of | |
2334 | linear eigenvalue problems formulated in either standard or generalized form, | |
2335 | as well as other related problems such as the singular value decomposition. | |
2336 | The emphasis of the software is on methods and techniques appropriate for | |
2337 | problems in which the associated matrices are sparse, for example, those | |
2338 | arising after the discretization of partial differential equations.") | |
3c524f21 | 2339 | (license license:bsd-2))) |
a7f01414 EB |
2340 | |
2341 | (define-public slepc-complex | |
2342 | (package (inherit slepc) | |
2343 | (name "slepc-complex") | |
2344 | (propagated-inputs | |
2345 | `(("petsc" ,petsc-complex) | |
2346 | ,@(alist-delete "petsc" (package-propagated-inputs slepc)))) | |
2347 | (synopsis "Scalable library for eigenproblems (with complex scalars)"))) | |
2348 | ||
2349 | (define-public slepc-openmpi | |
2350 | (package (inherit slepc) | |
2351 | (name "slepc-openmpi") | |
6df2a50a LC |
2352 | (arguments |
2353 | (substitute-keyword-arguments (package-arguments slepc) | |
2354 | ((#:phases phases '%standard-phases) | |
2355 | `(modify-phases ,phases | |
bbe46a4a EB |
2356 | (add-before 'check 'mpi-setup |
2357 | ,%openmpi-setup))))) | |
a7f01414 EB |
2358 | (inputs |
2359 | `(("mpi" ,openmpi) | |
2360 | ("arpack" ,arpack-ng-openmpi) | |
2361 | ,@(alist-delete "arpack" (package-inputs slepc)))) | |
2362 | (propagated-inputs | |
2363 | `(("petsc" ,petsc-openmpi) | |
2364 | ,@(alist-delete "petsc" (package-propagated-inputs slepc)))) | |
2365 | (synopsis "Scalable library for eigenproblems (with MPI support)"))) | |
2366 | ||
2367 | (define-public slepc-complex-openmpi | |
2368 | (package (inherit slepc-openmpi) | |
2369 | (name "slepc-complex-openmpi") | |
2370 | (propagated-inputs | |
2371 | `(("petsc" ,petsc-complex-openmpi) | |
2372 | ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi)))) | |
2373 | (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)"))) | |
2374 | ||
6b5687d0 PG |
2375 | (define-public python-slepc4py |
2376 | (package | |
2377 | (name "python-slepc4py") | |
09bad3cd | 2378 | (version "3.11.0") |
6b5687d0 PG |
2379 | (source |
2380 | (origin | |
2381 | (method url-fetch) | |
2382 | (uri (pypi-uri "slepc4py" version)) | |
2383 | (sha256 | |
2384 | (base32 | |
09bad3cd | 2385 | "1ksp08kxf4wg408b9nn39z3qfhy643j22d4rfbl30vzxk2rxh4lq")))) |
6b5687d0 PG |
2386 | (build-system python-build-system) |
2387 | (arguments | |
2388 | `(#:phases | |
2389 | (modify-phases %standard-phases | |
2390 | (add-before 'build 'pre-build | |
2391 | (lambda _ | |
2392 | ;; Define path to PETSc installation. | |
2393 | (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc")) | |
2394 | ;; Define path to SLEPc installation. | |
2395 | (setenv "SLEPC_DIR" (assoc-ref %build-inputs "slepc")) | |
2396 | #t)) | |
2397 | (add-before 'check 'mpi-setup | |
2398 | ,%openmpi-setup)))) | |
2399 | (inputs | |
2400 | `(("python-numpy" ,python-numpy) | |
2401 | ("python-petsc4py" ,python-petsc4py) | |
2402 | ("slepc" ,slepc-openmpi))) | |
2403 | (home-page "https://bitbucket.org/slepc/slepc4py/") | |
2404 | (synopsis "Python bindings for SLEPc") | |
2405 | (description "SLEPc, the Scalable Library for Eigenvalue Problem | |
2406 | Computations, is based on PETSc, the Portable, Extensible Toolkit for | |
2407 | Scientific Computation. It employs the MPI standard for all | |
2408 | message-passing communication. @code{slepc4py} provides Python | |
2409 | bindings to almost all functions of SLEPc.") | |
2410 | (license license:bsd-3))) | |
2411 | ||
cec86422 EB |
2412 | (define-public mumps |
2413 | (package | |
2414 | (name "mumps") | |
5dbc79eb | 2415 | (version "5.2.1") |
cec86422 EB |
2416 | (source |
2417 | (origin | |
2418 | (method url-fetch) | |
2419 | (uri (string-append "http://mumps.enseeiht.fr/MUMPS_" | |
2420 | version ".tar.gz")) | |
2421 | (sha256 | |
2422 | (base32 | |
5dbc79eb | 2423 | "0jklh54x4y3ik1zkw6db7766kakjm5910diyaghfxxf8vwsgr26r")) |
06e12395 MB |
2424 | (patches (search-patches "mumps-build-parallelism.patch" |
2425 | "mumps-shared-libseq.patch" | |
2426 | "mumps-shared-mumps.patch" | |
2427 | "mumps-shared-pord.patch")))) | |
cec86422 EB |
2428 | (build-system gnu-build-system) |
2429 | (inputs | |
2430 | `(("fortran" ,gfortran) | |
2431 | ;; These are required for linking against mumps, but we let the user | |
2432 | ;; declare the dependency. | |
2433 | ("blas" ,openblas) | |
2434 | ("metis" ,metis) | |
2435 | ("scotch" ,scotch))) | |
2436 | (arguments | |
2437 | `(#:modules ((ice-9 match) | |
2438 | (ice-9 popen) | |
2439 | (srfi srfi-1) | |
2440 | ,@%gnu-build-system-modules) | |
2441 | #:phases | |
2442 | (modify-phases %standard-phases | |
fba78d18 | 2443 | (replace 'configure |
cec86422 EB |
2444 | (lambda* (#:key inputs #:allow-other-keys) |
2445 | (call-with-output-file "Makefile.inc" | |
2446 | (lambda (port) | |
2447 | (format port " | |
2448 | PLAT = | |
2449 | LIBEXT = .a | |
2450 | OUTC = -o | |
2451 | OUTF = -o | |
2452 | RM = rm -f~:[ | |
2453 | CC = gcc | |
2454 | FC = gfortran | |
2455 | FL = gfortran | |
2456 | INCSEQ = -I$(topdir)/libseq | |
06e12395 | 2457 | LIBSEQ = $(topdir)/libseq/libmpiseq.a |
cec86422 EB |
2458 | LIBSEQNEEDED = libseqneeded~; |
2459 | CC = mpicc | |
2460 | FC = mpifort | |
2461 | FL = mpifort~] | |
2462 | AR = ar vr # rules require trailing space, ugh... | |
2463 | RANLIB = ranlib | |
06e12395 MB |
2464 | BLASDIR = ~a |
2465 | LIBBLAS = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR) -lopenblas~@[ | |
2466 | SCALAPDIR = ~a | |
2467 | SCALAP = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lscalapack~] | |
cec86422 EB |
2468 | LIBOTHERS = -pthread |
2469 | CDEFS = -DAdd_ | |
2470 | PIC = -fPIC | |
2471 | OPTF = -O2 -DALLOW_NON_INIT $(PIC) | |
2472 | OPTL = -O2 $(PIC) | |
2473 | OPTC = -O2 $(PIC) | |
2474 | INCS = $(INCSEQ) | |
2475 | LIBS = $(SCALAP) $(LIBSEQ) | |
2476 | LPORDDIR = $(topdir)/PORD/lib | |
2477 | IPORD = -I$(topdir)/PORD/include | |
06e12395 | 2478 | LPORD = $(LPORDDIR)/libpord.a |
cec86422 EB |
2479 | ORDERINGSF = -Dpord~@[ |
2480 | METISDIR = ~a | |
2481 | IMETIS = -I$(METISDIR)/include | |
06e12395 | 2482 | LMETIS = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis |
cec86422 EB |
2483 | ORDERINGSF += -Dmetis~]~@[~:{ |
2484 | SCOTCHDIR = ~a | |
2485 | ISCOTCH = -I$(SCOTCHDIR)/include | |
06e12395 | 2486 | LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr |
cec86422 EB |
2487 | ORDERINGSF += ~a~}~] |
2488 | ORDERINGSC = $(ORDERINGSF) | |
06e12395 | 2489 | LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ) |
cec86422 EB |
2490 | IORDERINGSF = $(ISCOTCH) |
2491 | IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)" | |
2492 | (assoc-ref inputs "mpi") | |
2493 | (assoc-ref inputs "blas") | |
2494 | (assoc-ref inputs "scalapack") | |
2495 | (assoc-ref inputs "metis") | |
2496 | (match (list (assoc-ref inputs "pt-scotch") | |
2497 | (assoc-ref inputs "scotch")) | |
2498 | ((#f #f) | |
2499 | #f) | |
2500 | ((#f scotch) | |
2501 | `((,scotch "" "-Dscotch"))) | |
2502 | ((ptscotch _) | |
2503 | `((,ptscotch | |
2504 | "-lptesmumps -lptscotch -lptscotcherr " | |
2505 | "-Dptscotch"))))))))) | |
fba78d18 | 2506 | (replace 'build |
cec86422 EB |
2507 | ;; By default only the d-precision library is built. Make with "all" |
2508 | ;; target so that all precision libraries and examples are built. | |
2509 | (lambda _ | |
b414cf52 TGR |
2510 | (invoke "make" "all" |
2511 | (format #f "-j~a" (parallel-job-count))))) | |
fba78d18 | 2512 | (replace 'check |
cec86422 EB |
2513 | ;; Run the simple test drivers, which read test input from stdin: |
2514 | ;; from the "real" input for the single- and double-precision | |
2515 | ;; testers, and from the "cmplx" input for complex-precision | |
2516 | ;; testers. The EXEC-PREFIX key is used by the mumps-openmpi | |
2517 | ;; package to prefix execution with "mpirun". | |
2518 | (lambda* (#:key (exec-prefix '()) #:allow-other-keys) | |
2519 | (with-directory-excursion "examples" | |
2520 | (every | |
2521 | (lambda (prec type) | |
2522 | (let ((tester (apply open-pipe* | |
2523 | `(,OPEN_WRITE | |
2524 | ,@exec-prefix | |
2525 | ,(string-append "./" prec | |
2526 | "simpletest")))) | |
2527 | (input (open-input-file | |
2528 | (string-append "input_simpletest_" type)))) | |
2529 | (begin | |
2530 | (dump-port input tester) | |
2531 | (close-port input) | |
2532 | (zero? (close-pipe tester))))) | |
2533 | '("s" "d" "c" "z") | |
2534 | '("real" "real" "cmplx" "cmplx"))))) | |
fba78d18 EB |
2535 | (replace 'install |
2536 | (lambda* (#:key outputs #:allow-other-keys) | |
2537 | (let* ((out (assoc-ref outputs "out")) | |
2538 | (libdir (string-append out "/lib"))) | |
2539 | (copy-recursively "lib" libdir) | |
2540 | (copy-recursively "include" (string-append out "/include")) | |
2541 | (when (file-exists? "libseq/libmpiseq.a") | |
2542 | (install-file "libseq/libmpiseq.a" libdir)) | |
06e12395 MB |
2543 | (when (file-exists? "libseq/libmpiseq.so") |
2544 | (install-file "libseq/libmpiseq.so" libdir)) | |
fba78d18 | 2545 | #t)))))) |
cec86422 EB |
2546 | (home-page "http://mumps.enseeiht.fr") |
2547 | (synopsis "Multifrontal sparse direct solver") | |
2548 | (description | |
2549 | "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a | |
57e69c1d | 2550 | sparse system of linear equations A x = b using Gaussian elimination.") |
cec86422 EB |
2551 | (license license:cecill-c))) |
2552 | ||
2553 | (define-public mumps-metis | |
2554 | (package (inherit mumps) | |
2555 | (name "mumps-metis") | |
2556 | (inputs | |
2557 | (alist-delete "scotch" (package-inputs mumps))))) | |
2558 | ||
2559 | (define-public mumps-openmpi | |
2560 | (package (inherit mumps) | |
2561 | (name "mumps-openmpi") | |
2562 | (inputs | |
2563 | `(("mpi" ,openmpi) | |
2564 | ("scalapack" ,scalapack) | |
2565 | ("pt-scotch" ,pt-scotch) | |
2566 | ,@(alist-delete "scotch" (package-inputs mumps)))) | |
2567 | (arguments | |
2568 | (substitute-keyword-arguments (package-arguments mumps) | |
2569 | ((#:phases phases) | |
2570 | `(modify-phases ,phases | |
bbe46a4a EB |
2571 | (add-before 'check 'mpi-setup |
2572 | ,%openmpi-setup) | |
6df2a50a LC |
2573 | (replace 'check |
2574 | (lambda _ | |
2575 | ((assoc-ref ,phases 'check) | |
2576 | #:exec-prefix '("mpirun" "-n" "2")))))))) | |
cec86422 EB |
2577 | (synopsis "Multifrontal sparse direct solver (with MPI)"))) |
2578 | ||
2579 | (define-public mumps-metis-openmpi | |
2580 | (package (inherit mumps-openmpi) | |
2581 | (name "mumps-metis-openmpi") | |
2582 | (inputs | |
2583 | (alist-delete "pt-scotch" (package-inputs mumps-openmpi))))) | |
2584 | ||
63e07468 BW |
2585 | (define-public ruby-asciimath |
2586 | (package | |
2587 | (name "ruby-asciimath") | |
2588 | (version "1.0.4") | |
2589 | (source | |
2590 | (origin | |
2591 | (method url-fetch) | |
2592 | (uri (rubygems-uri "asciimath" version)) | |
2593 | (sha256 | |
2594 | (base32 | |
2595 | "1d80kiph5mc78zps7si1hv48kv4k12mzaq8jk5kb3pqpjdr72qmc")))) | |
2596 | (build-system ruby-build-system) | |
2597 | (arguments | |
2598 | '(#:phases | |
2599 | (modify-phases %standard-phases | |
2600 | ;; Apply this patch | |
2601 | ;; https://github.com/asciidoctor/asciimath/commit/1c06fdc8086077f4785479f78b0823a4a72d7948 | |
2602 | (add-after 'unpack 'patch-remove-spurious-backslashes | |
2603 | (lambda _ | |
2604 | (substitute* "spec/parser_spec.rb" | |
2605 | (("\\\\\"") | |
9923d5a4 TGR |
2606 | "\"")) |
2607 | #t))))) | |
63e07468 BW |
2608 | (native-inputs |
2609 | `(("bundler" ,bundler) | |
2610 | ("ruby-rspec" ,ruby-rspec))) | |
2611 | (synopsis "AsciiMath parsing and conversion library") | |
2612 | (description | |
2613 | "A pure Ruby AsciiMath parsing and conversion library. AsciiMath is an | |
2614 | easy-to-write markup language for mathematics.") | |
2615 | (home-page "https://github.com/asciidoctor/asciimath") | |
2616 | (license license:expat))) | |
2617 | ||
183e44ae EB |
2618 | (define-public superlu |
2619 | (package | |
2620 | (name "superlu") | |
995a09e0 | 2621 | (version "5.2.1") |
183e44ae EB |
2622 | (source |
2623 | (origin | |
2624 | (method url-fetch) | |
48fe5c36 | 2625 | (uri (string-append "https://portal.nersc.gov/project/sparse/superlu/" |
183e44ae EB |
2626 | "superlu_" version ".tar.gz")) |
2627 | (sha256 | |
995a09e0 EB |
2628 | (base32 "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8")) |
2629 | (modules '((guix build utils))) | |
2630 | (snippet | |
2631 | ;; Replace the non-free implementation of MC64 with a stub adapted | |
2632 | ;; from Debian | |
2633 | '(begin | |
2634 | (use-modules (ice-9 regex) | |
2635 | (ice-9 rdelim)) | |
2636 | (call-with-output-file "SRC/mc64ad.c" | |
2637 | (lambda (port) | |
2638 | (display " | |
2639 | #include <stdio.h> | |
2640 | #include <stdlib.h> | |
2641 | void mc64id_(int *a) { | |
2642 | fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\"); | |
2643 | abort (); | |
2644 | } | |
2645 | void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g, | |
2646 | int *h, int *i, int *j, int *k, double *l, int *m, int *n) { | |
2647 | fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\"); | |
2648 | abort (); | |
2649 | }\n" port))) | |
2650 | ;; Remove the corresponding license verbiage. MC64 license follows | |
2651 | ;; a "------" line separator. | |
2652 | (with-atomic-file-replacement "License.txt" | |
2653 | (let ((rx (make-regexp "-{8}"))) | |
2654 | (lambda (in out) | |
2655 | (let loop () | |
2656 | (let ((line (read-line in 'concat))) | |
2657 | (unless (regexp-exec rx line) | |
2658 | (display line out) | |
6cbee49d MW |
2659 | (loop)))) |
2660 | #t))))))) | |
995a09e0 | 2661 | (build-system cmake-build-system) |
183e44ae EB |
2662 | (native-inputs |
2663 | `(("tcsh" ,tcsh))) | |
2664 | (inputs | |
995a09e0 | 2665 | `(("blas" ,openblas) |
19afbea1 | 2666 | ("gfortran" ,gfortran))) |
183e44ae | 2667 | (arguments |
995a09e0 EB |
2668 | `(#:configure-flags '("-Denable_blaslib:BOOL=NO" ;do not use internal cblas |
2669 | "-DTPL_BLAS_LIBRARIES=openblas" | |
677bc34d | 2670 | "-DBUILD_SHARED_LIBS:BOOL=YES"))) |
48fe5c36 | 2671 | (home-page "https://portal.nersc.gov/project/sparse/superlu/") |
183e44ae EB |
2672 | (synopsis "Supernodal direct solver for sparse linear systems") |
2673 | (description | |
2674 | "SuperLU is a general purpose library for the direct solution of large, | |
2675 | sparse, nonsymmetric systems of linear equations on high performance machines. | |
2676 | The library is written in C and is callable from either C or Fortran. The | |
2677 | library routines perform an LU decomposition with partial pivoting and | |
2678 | triangular system solves through forward and back substitution. The library | |
2679 | also provides threshold-based ILU factorization preconditioners.") | |
995a09e0 EB |
2680 | (license (list license:bsd-3 |
2681 | license:gpl2+ ;EXAMPLE/*fgmr.c | |
2682 | (license:fsf-free "file://SRC/colamd.h"))))) | |
f8ed036a | 2683 | |
a54aefea EB |
2684 | (define-public superlu-dist |
2685 | (package | |
2686 | (name "superlu-dist") | |
aa2e83cc | 2687 | (version "6.2.0") |
a54aefea EB |
2688 | (source |
2689 | (origin | |
2690 | (method url-fetch) | |
aa2e83cc | 2691 | (uri (string-append "https://portal.nersc.gov/project/sparse/superlu/" |
a54aefea EB |
2692 | "superlu_dist_" version ".tar.gz")) |
2693 | (sha256 | |
aa2e83cc | 2694 | (base32 "1ynmwqajc9sc3my2hssa5k9s58ggvizqv9rdss0j7w99pbh5mnvw")) |
0921eff2 | 2695 | (modules '((guix build utils))) |
29080870 EB |
2696 | (snippet |
2697 | ;; Replace the non-free implementation of MC64 with a stub | |
2698 | '(begin | |
0921eff2 | 2699 | (call-with-output-file "SRC/mc64ad_dist.c" |
29080870 EB |
2700 | (lambda (port) |
2701 | (display " | |
2702 | #include <stdio.h> | |
2703 | #include <stdlib.h> | |
0921eff2 | 2704 | void mc64id_dist(int *a) { |
29080870 EB |
2705 | fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\"); |
2706 | abort (); | |
2707 | } | |
0921eff2 | 2708 | void mc64ad_dist (int *a, int *b, int *c, int *d, int *e, double *f, int *g, |
29080870 EB |
2709 | int *h, int *i, int *j, int *k, double *l, int *m, int *n) { |
2710 | fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\"); | |
2711 | abort (); | |
2712 | }\n" port))) | |
29080870 | 2713 | (substitute* "SRC/util.c" ;adjust default algorithm |
6161141e EB |
2714 | (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag_MC64;") |
2715 | ;; TODO: set to "LargeDiag_AWPM" once combinatorial-blas has | |
2716 | ;; general (i.e. non-square) processor-grid support. | |
2717 | "RowPerm = NOROWPERM;")) | |
6cbee49d | 2718 | #t)) |
6161141e | 2719 | (patches (search-patches "superlu-dist-scotchmetis.patch" |
aa2e83cc | 2720 | "superlu-dist-awpm-grid.patch")))) |
6161141e | 2721 | (build-system cmake-build-system) |
a54aefea EB |
2722 | (native-inputs |
2723 | `(("tcsh" ,tcsh))) | |
2724 | (inputs | |
6161141e EB |
2725 | `(("gfortran" ,gfortran) |
2726 | ("blas" ,openblas) | |
2727 | ("lapack" ,lapack) | |
2728 | ("combblas" ,combinatorial-blas))) | |
a54aefea | 2729 | (propagated-inputs |
6161141e EB |
2730 | `(("mpi" ,openmpi) ;headers include MPI heades |
2731 | ("parmetis" ,pt-scotch32 "metis") | |
2732 | ("pt-scotch" ,pt-scotch32))) | |
a54aefea | 2733 | (arguments |
6161141e EB |
2734 | `(#:parallel-tests? #f ;tests use MPI and OpenMP |
2735 | #:configure-flags (list "-DBUILD_SHARED_LIBS:BOOL=YES" | |
2736 | "-DTPL_ENABLE_COMBBLASLIB=YES" | |
2737 | "-DTPL_BLAS_LIBRARIES=-lopenblas" | |
2738 | "-DTPL_LAPACK_LIBRARIES=-llapack" | |
2739 | (string-append "-DTPL_PARMETIS_LIBRARIES=" | |
2740 | (string-join | |
2741 | '("ptscotchparmetis" "ptscotch" "ptscotcherr" | |
2742 | "scotchmetis" "scotch" "scotcherr") | |
2743 | ";")) | |
2744 | (string-append "-DTPL_PARMETIS_INCLUDE_DIRS=" | |
2745 | (assoc-ref %build-inputs "parmetis") | |
2746 | "/include") | |
2747 | "-DTPL_ENABLE_COMBBLASLIB=ON" | |
2748 | (string-append "-DTPL_COMBBLAS_INCLUDE_DIRS=" | |
2749 | (assoc-ref %build-inputs "combblas") | |
2750 | "/include/CombBLAS;" | |
2751 | (assoc-ref %build-inputs "combblas") | |
2752 | "/include/BipartiteMatchings") | |
2753 | "-DTPL_COMBBLAS_LIBRARIES=CombBLAS") | |
a54aefea | 2754 | #:phases |
dc1d3cde | 2755 | (modify-phases %standard-phases |
6161141e | 2756 | (add-before 'configure 'set-c++-standard |
dc1d3cde | 2757 | (lambda _ |
6161141e EB |
2758 | (substitute* "CMakeLists.txt" |
2759 | ;; AWPM headers require C++14 | |
2760 | (("CMAKE_CXX_STANDARD 11") "CMAKE_CXX_STANDARD 14")))) | |
bbe46a4a EB |
2761 | (add-before 'check 'mpi-setup |
2762 | ,%openmpi-setup) | |
6161141e EB |
2763 | (add-before 'check 'omp-setup |
2764 | (lambda _ (setenv "OMP_NUM_THREADS" "1") #t))))) | |
a54aefea EB |
2765 | (home-page (package-home-page superlu)) |
2766 | (synopsis "Parallel supernodal direct solver") | |
2767 | (description | |
2768 | "SuperLU_DIST is a parallel extension to the serial SuperLU library. | |
2769 | It is targeted for distributed memory parallel machines. SuperLU_DIST is | |
2770 | implemented in ANSI C, and MPI for communications.") | |
2771 | (license license:bsd-3))) | |
2772 | ||
f8ed036a EB |
2773 | (define-public scotch |
2774 | (package | |
2775 | (name "scotch") | |
fd373343 | 2776 | (version "6.0.6") |
f8ed036a EB |
2777 | (source |
2778 | (origin | |
2779 | (method url-fetch) | |
1dc31097 TGR |
2780 | (uri (string-append "https://gforge.inria.fr/frs/download.php/" |
2781 | "latestfile/298/scotch_" version ".tar.gz")) | |
f8ed036a | 2782 | (sha256 |
fd373343 EB |
2783 | (base32 "1ky4k9r6jvajhqaqnnx6h8fkmds2yxgp70dpr1qzwcyhi2nhqvv8")) |
2784 | (patches (search-patches "scotch-build-parallelism.patch" | |
2785 | "scotch-integer-declarations.patch")))) | |
f8ed036a EB |
2786 | (build-system gnu-build-system) |
2787 | (inputs | |
525e83ec VL |
2788 | `(("zlib" ,zlib))) |
2789 | (native-inputs | |
2790 | `(("flex" ,flex) | |
f8ed036a | 2791 | ("bison" ,bison))) |
fd373343 | 2792 | (outputs '("out" "metis")) |
f8ed036a | 2793 | (arguments |
fd373343 EB |
2794 | `(#:make-flags (list (string-append "prefix=" %output)) |
2795 | #:phases | |
d6602ee9 EB |
2796 | (modify-phases %standard-phases |
2797 | (add-after | |
2798 | 'unpack 'chdir-to-src | |
d67a7e9e | 2799 | (lambda _ (chdir "src") #t)) |
d6602ee9 EB |
2800 | (replace |
2801 | 'configure | |
2802 | (lambda _ | |
2803 | (call-with-output-file "Makefile.inc" | |
2804 | (lambda (port) | |
2805 | (format port " | |
f8ed036a EB |
2806 | EXE = |
2807 | LIB = .a | |
2808 | OBJ = .o | |
2809 | MAKE = make | |
2810 | AR = ar | |
2811 | ARFLAGS = -ruv | |
cf0ec6c4 | 2812 | CAT = cat |
f8ed036a EB |
2813 | CCS = gcc |
2814 | CCP = mpicc | |
2815 | CCD = gcc | |
2816 | CPPFLAGS =~{ -D~a~} | |
6c798540 | 2817 | CFLAGS = -O2 -g -fPIC $(CPPFLAGS) |
f8ed036a EB |
2818 | LDFLAGS = -lz -lm -lrt -lpthread |
2819 | CP = cp | |
2820 | LEX = flex -Pscotchyy -olex.yy.c | |
2821 | LN = ln | |
2822 | MKDIR = mkdir | |
2823 | MV = mv | |
2824 | RANLIB = ranlib | |
2825 | YACC = bison -pscotchyy -y -b y | |
2826 | " | |
d6602ee9 EB |
2827 | '("COMMON_FILE_COMPRESS_GZ" |
2828 | "COMMON_PTHREAD" | |
2829 | "COMMON_RANDOM_FIXED_SEED" | |
fd373343 | 2830 | "INTSIZE64" ;use 'int64_t' |
cf0ec6c4 EB |
2831 | ;; Prevents symbolc clashes with libesmumps |
2832 | "SCOTCH_RENAME" | |
d6602ee9 EB |
2833 | ;; XXX: Causes invalid frees in superlu-dist tests |
2834 | ;; "SCOTCH_PTHREAD" | |
2835 | ;; "SCOTCH_PTHREAD_NUMBER=2" | |
d67a7e9e TGR |
2836 | "restrict=__restrict")))) |
2837 | #t)) | |
bbe46a4a | 2838 | (add-after 'build 'build-esmumps |
cf0ec6c4 | 2839 | (lambda _ |
d67a7e9e TGR |
2840 | (invoke "make" |
2841 | (format #f "-j~a" (parallel-job-count)) | |
2842 | "esmumps"))) | |
fd373343 EB |
2843 | (add-before 'install 'make-install-dirs |
2844 | (lambda* (#:key outputs #:allow-other-keys) | |
2845 | (mkdir (assoc-ref outputs "out")))) | |
2846 | (add-after 'install 'install-metis | |
2847 | (lambda* (#:key outputs #:allow-other-keys) | |
2848 | (let ((out (assoc-ref outputs "metis"))) | |
2849 | (mkdir out) | |
2850 | ;; metis files are not installed with 'make install' | |
2851 | (for-each (lambda (f) | |
2852 | (install-file f (string-append out "/include"))) | |
2853 | (find-files "../include/" ".*metis\\.h")) | |
2854 | (for-each (lambda (f) | |
2855 | (install-file f (string-append out "/lib"))) | |
2856 | (find-files "../lib/" ".*metis\\..*")) | |
2857 | #t)))))) | |
d5730000 | 2858 | (home-page "https://www.labri.fr/perso/pelegrin/scotch/") |
f8ed036a EB |
2859 | (synopsis "Programs and libraries for graph algorithms") |
2860 | (description "SCOTCH is a set of programs and libraries which implement | |
2861 | the static mapping and sparse matrix reordering algorithms developed within | |
2862 | the SCOTCH project. Its purpose is to apply graph theory, with a divide and | |
2863 | conquer approach, to scientific computing problems such as graph and mesh | |
2864 | partitioning, static mapping, and sparse matrix ordering, in application | |
2865 | domains ranging from structural mechanics to operating systems or | |
2866 | bio-chemistry.") | |
2867 | ;; See LICENSE_en.txt | |
2868 | (license license:cecill-c))) | |
6acb4adb | 2869 | |
1c39f3b8 PG |
2870 | (define-public scotch32 |
2871 | ;; This is the 'INTSIZE32' variant, which uses 32-bit integers, as needed by | |
2872 | ;; some applications. | |
2873 | (package (inherit scotch) | |
2874 | (name "scotch32") | |
2875 | (arguments | |
2876 | (substitute-keyword-arguments (package-arguments scotch) | |
2877 | ((#:phases scotch-phases) | |
2878 | `(modify-phases ,scotch-phases | |
2879 | (replace | |
2880 | 'configure | |
2881 | (lambda _ | |
2882 | (call-with-output-file "Makefile.inc" | |
2883 | (lambda (port) | |
2884 | (format port " | |
2885 | EXE = | |
2886 | LIB = .a | |
2887 | OBJ = .o | |
2888 | MAKE = make | |
2889 | AR = ar | |
2890 | ARFLAGS = -ruv | |
2891 | CAT = cat | |
2892 | CCS = gcc | |
2893 | CCP = mpicc | |
2894 | CCD = gcc | |
2895 | CPPFLAGS =~{ -D~a~} | |
2896 | CFLAGS = -O2 -g -fPIC $(CPPFLAGS) | |
2897 | LDFLAGS = -lz -lm -lrt -lpthread | |
2898 | CP = cp | |
2899 | LEX = flex -Pscotchyy -olex.yy.c | |
2900 | LN = ln | |
2901 | MKDIR = mkdir | |
2902 | MV = mv | |
2903 | RANLIB = ranlib | |
2904 | YACC = bison -pscotchyy -y -b y | |
2905 | " | |
2906 | '("COMMON_FILE_COMPRESS_GZ" | |
2907 | "COMMON_PTHREAD" | |
2908 | "COMMON_RANDOM_FIXED_SEED" | |
2909 | "INTSIZE32" ;use 32-bit integers. See INSTALL.txt | |
2910 | ;; Prevents symbolc clashes with libesmumps | |
2911 | "SCOTCH_RENAME" | |
2912 | ;; XXX: Causes invalid frees in superlu-dist tests | |
2913 | ;; "SCOTCH_PTHREAD" | |
2914 | ;; "SCOTCH_PTHREAD_NUMBER=2" | |
2915 | "restrict=__restrict")))))))))) | |
2916 | (synopsis | |
2917 | "Programs and libraries for graph algorithms (32-bit integers)"))) | |
2918 | ||
6acb4adb EB |
2919 | (define-public pt-scotch |
2920 | (package (inherit scotch) | |
2921 | (name "pt-scotch") | |
2922 | (propagated-inputs | |
2923 | `(("openmpi" ,openmpi))) ;Headers include MPI headers | |
2924 | (arguments | |
2925 | (substitute-keyword-arguments (package-arguments scotch) | |
2926 | ((#:phases scotch-phases) | |
d6602ee9 EB |
2927 | `(modify-phases ,scotch-phases |
2928 | (replace | |
2929 | 'build | |
d6602ee9 | 2930 | (lambda _ |
c491f7f8 LC |
2931 | (invoke "make" (format #f "-j~a" (parallel-job-count)) |
2932 | "ptscotch" "ptesmumps") | |
2933 | ||
2934 | ;; Install the serial metis compatibility library | |
2935 | (invoke "make" "-C" "libscotchmetis" "install"))) | |
2936 | (add-before 'check 'mpi-setup | |
2937 | ,%openmpi-setup) | |
2938 | (replace 'check | |
2939 | (lambda _ | |
2940 | (invoke "make" "ptcheck"))))))) | |
6acb4adb | 2941 | (synopsis "Programs and libraries for graph algorithms (with MPI)"))) |
5698b8b8 | 2942 | |
1c25a52c PG |
2943 | (define-public pt-scotch32 |
2944 | (package (inherit scotch32) | |
2945 | (name "pt-scotch32") | |
2946 | (propagated-inputs | |
2947 | `(("openmpi" ,openmpi))) ;headers include MPI headers | |
2948 | (arguments | |
c4d4a779 PG |
2949 | (substitute-keyword-arguments (package-arguments scotch32) |
2950 | ((#:phases scotch32-phases) | |
2951 | `(modify-phases ,scotch32-phases | |
1c25a52c PG |
2952 | (replace 'build |
2953 | (lambda _ | |
c491f7f8 LC |
2954 | (invoke "make" (format #f "-j~a" (parallel-job-count)) |
2955 | "ptscotch" "ptesmumps") | |
2956 | ;; Install the serial metis compatibility library | |
2957 | (invoke "make" "-C" "libscotchmetis" "install"))) | |
2958 | (add-before 'check 'mpi-setup | |
2959 | ,%openmpi-setup) | |
1c25a52c PG |
2960 | (replace 'check |
2961 | (lambda _ | |
c491f7f8 | 2962 | (invoke "make" "ptcheck"))))))) |
1c25a52c PG |
2963 | (synopsis |
2964 | "Programs and libraries for graph algorithms (with MPI and 32-bit integers)"))) | |
2965 | ||
aa75ad00 EB |
2966 | (define-public metis |
2967 | (package | |
2968 | (name "metis") | |
2969 | (version "5.1.0") | |
2970 | (source | |
2971 | (origin | |
2972 | (method url-fetch) | |
2973 | (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/" | |
2974 | "metis-" version ".tar.gz")) | |
2975 | (sha256 | |
2976 | (base32 | |
2977 | "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn")))) | |
2978 | (build-system cmake-build-system) | |
2979 | (inputs | |
2980 | `(("blas" ,openblas))) | |
2981 | (arguments | |
2982 | `(#:tests? #f ;no tests | |
2983 | #:configure-flags `("-DSHARED=ON" | |
2984 | ,(string-append "-DGKLIB_PATH=" (getcwd) | |
2985 | "/metis-" ,version "/GKlib")))) | |
2986 | (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview") | |
2987 | (synopsis "Graph partitioning and fill-reducing matrix ordering library") | |
2988 | (description | |
2989 | "METIS is a set of serial programs for partitioning graphs, partitioning | |
2990 | finite element meshes, and producing fill-reducing orderings for sparse | |
2991 | matrices. The algorithms implemented in METIS are based on the multilevel | |
2992 | recursive-bisection, multilevel k-way, and multi-constraint partitioning | |
2993 | schemes.") | |
2994 | (license license:asl2.0))) ;As of version 5.0.3 | |
2995 | ||
700ff222 EB |
2996 | (define-public p4est |
2997 | (package | |
2998 | (name "p4est") | |
4150da63 | 2999 | (version "2.0") |
700ff222 EB |
3000 | (source |
3001 | (origin | |
3002 | (method url-fetch) | |
3003 | (uri (string-append "http://p4est.github.io/release/p4est-" | |
3004 | version ".tar.gz")) | |
3005 | (sha256 | |
3006 | (base32 | |
4150da63 | 3007 | "16h267z256kxcxfjs390qqzv19hr58vrj4x8lndb7alnk2vca8n5")))) |
700ff222 EB |
3008 | (build-system gnu-build-system) |
3009 | (inputs | |
3010 | `(("fortran" ,gfortran) | |
3011 | ("blas" ,openblas) | |
3012 | ("lapack" ,lapack) | |
3013 | ("zlib" ,zlib))) | |
3014 | (arguments | |
3015 | `(#:configure-flags `(,(string-append "BLAS_LIBS=-L" | |
3016 | (assoc-ref %build-inputs "blas") | |
3017 | " -lopenblas") | |
3018 | ,(string-append "LAPACK_LIBS=-L" | |
3019 | (assoc-ref %build-inputs "lapack") | |
6df2a50a LC |
3020 | " -llapack")) |
3021 | #:phases (modify-phases %standard-phases | |
bbe46a4a EB |
3022 | (add-before 'check 'mpi-setup |
3023 | ,%openmpi-setup)))) | |
700ff222 EB |
3024 | (home-page "http://www.p4est.org") |
3025 | (synopsis "Adaptive mesh refinement on forests of octrees") | |
3026 | (description | |
3027 | "The p4est software library enables the dynamic management of a | |
3028 | collection of adaptive octrees, conveniently called a forest of octrees. | |
3029 | p4est is designed to work in parallel and scales to hundreds of thousands of | |
3030 | processor cores.") | |
3031 | (license license:gpl2+))) | |
3032 | ||
3033 | (define-public p4est-openmpi | |
3034 | (package (inherit p4est) | |
3035 | (name "p4est-openmpi") | |
3036 | (inputs | |
3037 | `(("mpi" ,openmpi) | |
3038 | ,@(package-inputs p4est))) | |
3039 | (arguments | |
3040 | (substitute-keyword-arguments (package-arguments p4est) | |
3041 | ((#:configure-flags cf) | |
3042 | ``("--enable-mpi" ,@,cf)))) | |
3043 | (synopsis "Parallel adaptive mesh refinement on forests of octrees"))) | |
3044 | ||
5698b8b8 JD |
3045 | (define-public gsegrafix |
3046 | (package | |
3047 | (name "gsegrafix") | |
3048 | (version "1.0.6") | |
3049 | (source | |
3050 | (origin | |
3051 | (method url-fetch) | |
3052 | (uri (string-append "mirror://gnu/" name "/" name "-" | |
3053 | version ".tar.gz")) | |
3054 | (sha256 | |
3055 | (base32 | |
3056 | "1b13hvx063zv970y750bx41wpx6hwd5ngjhbdrna8w8yy5kmxcda")))) | |
3057 | (build-system gnu-build-system) | |
3058 | (arguments | |
3059 | `(#:configure-flags '("LDFLAGS=-lm"))) | |
3060 | (inputs | |
3061 | `(("libgnomecanvas" ,libgnomecanvas) | |
3062 | ("libbonoboui" ,libbonoboui) | |
3063 | ("libgnomeui" ,libgnomeui) | |
3064 | ("libgnomeprintui" ,libgnomeprintui) | |
3065 | ("popt" ,popt))) | |
3066 | (native-inputs | |
3067 | `(("pkg-config" ,pkg-config))) | |
6fd52309 | 3068 | (home-page "https://www.gnu.org/software/gsegrafix/") |
5698b8b8 JD |
3069 | (synopsis "GNOME application to create scientific and engineering plots") |
3070 | (description "GSEGrafix is an application which produces high-quality graphical | |
3071 | plots for science and engineering. Plots are specified via simple ASCII | |
3072 | parameter files and data files and are presented in an anti-aliased GNOME | |
3073 | canvas. The program supports rectangular two-dimensional plots, histograms, | |
3074 | polar-axis plots and three-dimensional plots. Plots can be printed or saved | |
3075 | to BMP, JPEG or PNG image formats.") | |
3076 | (license license:gpl3+))) | |
8731e527 JD |
3077 | |
3078 | (define-public maxima | |
3079 | (package | |
3080 | (name "maxima") | |
ccc963d5 | 3081 | (version "5.43.0") |
8731e527 JD |
3082 | (source |
3083 | (origin | |
3084 | (method url-fetch) | |
3085 | (uri (string-append "mirror://sourceforge/maxima/Maxima-source/" | |
3086 | version "-source/" name "-" version ".tar.gz")) | |
3087 | (sha256 | |
3088 | (base32 | |
ccc963d5 | 3089 | "0xyahp4c6509haxh4n1swiqm3421gplkdisa0zypclh3252sbzfw")) |
fc1adab1 | 3090 | (patches (search-patches "maxima-defsystem-mkdir.patch")))) |
8731e527 | 3091 | (build-system gnu-build-system) |
df354a77 | 3092 | (inputs |
6b2eafaa | 3093 | `(("gcl" ,gcl) |
df354a77 | 3094 | ("gnuplot" ,gnuplot) ;for plots |
fc9c47bd | 3095 | ("sed" ,sed) |
f36afe4d | 3096 | ("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima' |
df354a77 FB |
3097 | (native-inputs |
3098 | `(("texinfo" ,texinfo) | |
ccbc5758 KK |
3099 | ("perl" ,perl) |
3100 | ("python" ,python))) | |
8731e527 | 3101 | (arguments |
df354a77 FB |
3102 | `(#:configure-flags |
3103 | (list "--enable-gcl" | |
3104 | (string-append "--with-posix-shell=" | |
3105 | (assoc-ref %build-inputs "bash") | |
3106 | "/bin/sh") | |
3107 | (string-append "--with-wish=" | |
3108 | (assoc-ref %build-inputs "tk") | |
3109 | "/bin/wish" | |
3110 | (let ((v ,(package-version tk))) | |
3111 | (string-take v (string-index-right v #\.))))) | |
df354a77 | 3112 | ;; By default Maxima attempts to write temporary files to |
77af7b24 MW |
3113 | ;; '/tmp/nix-build-maxima-*', which won't exist at run time. |
3114 | ;; Work around that. | |
df354a77 | 3115 | #:make-flags (list "TMPDIR=/tmp") |
0093b126 KK |
3116 | #:phases |
3117 | (modify-phases %standard-phases | |
fc9c47bd KK |
3118 | (add-after 'unpack 'patch-paths |
3119 | (lambda* (#:key inputs #:allow-other-keys) | |
3120 | (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed")) | |
3121 | (coreutils (assoc-ref inputs "coreutils")) | |
3122 | (dirname (string-append coreutils "/bin/dirname")) | |
ccc963d5 KK |
3123 | (head (string-append coreutils "/bin/head")) |
3124 | (perl (string-append (assoc-ref inputs "perl") "/bin/perl")) | |
3125 | (python (string-append (assoc-ref inputs "python") | |
3126 | "/bin/python3"))) | |
fc9c47bd KK |
3127 | (substitute* "src/maxima.in" |
3128 | (("sed ") (string-append sed " ")) | |
3129 | (("dirname") dirname) | |
3130 | (("head") head)) | |
ccc963d5 KK |
3131 | (substitute* "doc/info/Makefile.in" |
3132 | (("/usr/bin/env perl") perl)) | |
3133 | (substitute* "doc/info/build_html.sh.in" | |
3134 | (("python") python)) | |
fc9c47bd | 3135 | #t))) |
0093b126 KK |
3136 | (add-before 'check 'pre-check |
3137 | (lambda _ | |
3138 | (chmod "src/maxima" #o555) | |
3139 | #t)) | |
1472d19a KK |
3140 | (replace 'check |
3141 | (lambda _ | |
3142 | ;; This is derived from the testing code in the "debian/rules" file | |
3143 | ;; of Debian's Maxima package. | |
3144 | ;; If Maxima can successfully run this, the binary to be installed | |
3145 | ;; should be fine. | |
df129041 MW |
3146 | (invoke "sh" "-c" |
3147 | (string-append | |
3148 | "./maxima-local " | |
3149 | "--lisp=gcl " | |
3150 | "--batch-string=\"run_testsuite();\" " | |
3151 | "| grep -q \"No unexpected errors found\"")))) | |
0093b126 KK |
3152 | ;; Make sure the doc and emacs files are found in the |
3153 | ;; standard location. Also configure maxima to find gnuplot | |
3154 | ;; without having it on the PATH. | |
3155 | (add-after 'install 'post-install | |
3156 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
3157 | (let* ((gnuplot (assoc-ref inputs "gnuplot")) | |
3158 | (out (assoc-ref outputs "out")) | |
3159 | (datadir (string-append out "/share/maxima/" ,version)) | |
3160 | (binutils (string-append (assoc-ref inputs "binutils") | |
3161 | "/bin"))) | |
3162 | (with-directory-excursion out | |
3163 | (mkdir-p "share/emacs") | |
3164 | (mkdir-p "share/doc") | |
0093b126 KK |
3165 | (symlink |
3166 | (string-append datadir "/doc/") | |
3167 | (string-append out "/share/doc/maxima")) | |
3168 | (with-atomic-file-replacement | |
3169 | (string-append datadir "/share/maxima-init.lisp") | |
3170 | (lambda (in out) | |
3171 | (format out "~a ~s~a~%" | |
3172 | "(setf $gnuplot_command " | |
3173 | (string-append gnuplot "/bin/gnuplot") ")") | |
3174 | (dump-port in out)))) | |
3175 | ;; Ensure that Maxima will have access to the GNU binutils | |
3176 | ;; components at runtime. | |
3177 | (wrap-program (string-append out "/bin/maxima") | |
3178 | `("PATH" prefix (,binutils)))) | |
3179 | #t))))) | |
8731e527 JD |
3180 | (home-page "http://maxima.sourceforge.net") |
3181 | (synopsis "Numeric and symbolic expression manipulation") | |
3182 | (description "Maxima is a system for the manipulation of symbolic and | |
3183 | numerical expressions. It yields high precision numeric results by using | |
3184 | exact fractions, arbitrary precision integers, and variable precision floating | |
e881752c | 3185 | point numbers.") |
8731e527 JD |
3186 | ;; Some files are lgpl2.1+. Some are gpl2+. Some explicitly state gpl1+. |
3187 | ;; Others simply say "GNU General Public License" without stating a | |
3188 | ;; version (which implicitly means gpl1+). | |
3189 | ;; At least one file (src/maxima.asd) says "version 2." | |
3190 | ;; GPLv2 only is therefore the smallest subset. | |
f36afe4d | 3191 | (license license:gpl2))) |
ec322be2 | 3192 | |
9aafbc0c MW |
3193 | (define-public wxmaxima |
3194 | (package | |
3195 | (name "wxmaxima") | |
1bbf7e13 | 3196 | (version "20.04.0") |
9aafbc0c MW |
3197 | (source |
3198 | (origin | |
c93b77ad KK |
3199 | (method git-fetch) |
3200 | (uri (git-reference | |
3201 | (url "https://github.com/wxMaxima-developers/wxmaxima.git") | |
3202 | (commit (string-append "Version-" version)))) | |
3203 | (file-name (git-file-name name version)) | |
9aafbc0c | 3204 | (sha256 |
1bbf7e13 | 3205 | (base32 "0vrjxzfgmjdzm1rgl0crz4b4badl14jwh032y3xkcdvjl5j67lp3")))) |
0181df53 | 3206 | (build-system cmake-build-system) |
5143517c | 3207 | (native-inputs |
1d3c6a31 KK |
3208 | `(("gettext" ,gettext-minimal) |
3209 | ("xorg-server" ,xorg-server-for-tests))) | |
3210 | ;; TODO: Add libomp for multithreading support. | |
3211 | ;; As of right now, enabling libomp causes the imageCells.wxm test to fail. | |
9aafbc0c MW |
3212 | (inputs |
3213 | `(("wxwidgets" ,wxwidgets) | |
de477809 SB |
3214 | ("maxima" ,maxima) |
3215 | ;; Runtime support. | |
3216 | ("adwaita-icon-theme" ,adwaita-icon-theme) | |
3217 | ("gtk+" ,gtk+) | |
3218 | ("shared-mime-info" ,shared-mime-info))) | |
9aafbc0c | 3219 | (arguments |
1d3c6a31 | 3220 | `(#:test-target "test" |
0181df53 | 3221 | #:phases |
ac2ddcc6 | 3222 | (modify-phases %standard-phases |
1d3c6a31 KK |
3223 | (add-before 'check 'pre-check |
3224 | (lambda _ | |
3225 | ;; Tests require a running X server. | |
3226 | (system "Xvfb :1 &") | |
3227 | (setenv "DISPLAY" ":1") | |
3228 | (setenv "HOME" (getcwd)) | |
3229 | #t)) | |
ac2ddcc6 KK |
3230 | (add-after 'install 'wrap-program |
3231 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3232 | (wrap-program (string-append (assoc-ref outputs "out") | |
3233 | "/bin/wxmaxima") | |
3234 | `("PATH" ":" prefix | |
3235 | (,(string-append (assoc-ref inputs "maxima") | |
3236 | "/bin"))) | |
3237 | ;; For GtkFileChooserDialog. | |
3238 | `("GSETTINGS_SCHEMA_DIR" = | |
3239 | (,(string-append (assoc-ref inputs "gtk+") | |
3240 | "/share/glib-2.0/schemas"))) | |
3241 | `("XDG_DATA_DIRS" ":" prefix | |
3242 | (;; Needed by gdk-pixbuf to know supported icon formats. | |
3243 | ,(string-append | |
3244 | (assoc-ref inputs "shared-mime-info") "/share") | |
3245 | ;; The default icon theme of GTK+. | |
3246 | ,(string-append | |
3247 | (assoc-ref inputs "adwaita-icon-theme") "/share")))) | |
3248 | #t))))) | |
48446f0f | 3249 | (home-page "https://wxmaxima-developers.github.io/wxmaxima/") |
9aafbc0c MW |
3250 | (synopsis "Graphical user interface for the Maxima computer algebra system") |
3251 | (description | |
3252 | "wxMaxima is a graphical user interface for the Maxima computer algebra | |
3253 | system. It eases the use of Maxima by making most of its commands available | |
3254 | through a menu system and by providing input dialogs for commands that require | |
3255 | more than one argument. It also implements its own display engine that | |
3256 | outputs mathematical symbols directly instead of depicting them with ASCII | |
3257 | characters. | |
3258 | ||
3259 | wxMaxima also features 2D and 3D inline plots, simple animations, mixing of | |
3260 | text and mathematical calculations to create documents, exporting of input and | |
3261 | output to TeX, and a browser for Maxima's manual including command index and | |
3262 | full text searching.") | |
3263 | (license license:gpl2+))) | |
3264 | ||
b15e47f9 RW |
3265 | (define-public armadillo |
3266 | (package | |
3267 | (name "armadillo") | |
f133e244 | 3268 | (version "9.100.5") |
b15e47f9 RW |
3269 | (source (origin |
3270 | (method url-fetch) | |
3271 | (uri (string-append "mirror://sourceforge/arma/armadillo-" | |
7397cd9e | 3272 | version ".tar.xz")) |
b15e47f9 RW |
3273 | (sha256 |
3274 | (base32 | |
f133e244 | 3275 | "1ka1vd9fcmvp12qkcm4888dkfqwnalvv00x04wy29f3nx3qwczby")))) |
b15e47f9 | 3276 | (build-system cmake-build-system) |
e405c0bc | 3277 | (arguments `(#:tests? #f)) ; no test target |
b15e47f9 RW |
3278 | (inputs |
3279 | `(("openblas" ,openblas) | |
3280 | ("lapack" ,lapack) | |
3281 | ("arpack" ,arpack-ng))) | |
3282 | (home-page "http://arma.sourceforge.net/") | |
3283 | (synopsis "C++ linear algebra library") | |
3284 | (description | |
3285 | "Armadillo is a C++ linear algebra library, aiming towards a good balance | |
3286 | between speed and ease of use. It is useful for algorithm development | |
3287 | directly in C++, or quick conversion of research code into production | |
3288 | environments. It can be used for machine learning, pattern recognition, | |
3289 | signal processing, bioinformatics, statistics, econometrics, etc. The library | |
3290 | provides efficient classes for vectors, matrices and cubes, as well as 150+ | |
255fb17b | 3291 | associated functions (e.g., contiguous and non-contiguous submatrix views).") |
fe418cc5 | 3292 | (license license:asl2.0))) |
b15e47f9 | 3293 | |
279663ef | 3294 | (define-public muparser |
d7cff656 LF |
3295 | ;; When switching download sites, muparser re-issued a 2.2.5 release with a |
3296 | ;; different hash. In order to make `guix package --upgrade` work correctly, | |
3297 | ;; we set a Guix packaging revision. | |
3298 | ;; When the next version of muparser is released, we can remove | |
3299 | ;; UPSTREAM-VERSION and REVISION and use the plain VERSION. | |
3300 | (let ((upstream-version "2.2.5") | |
3301 | (revision "2")) | |
3302 | (package | |
3303 | (name "muparser") | |
3304 | (version (string-append upstream-version "-" revision)) | |
3305 | (source | |
3306 | (origin | |
67f1db38 TGR |
3307 | (method git-fetch) |
3308 | (uri (git-reference | |
3309 | (url "https://github.com/beltoforion/muparser.git") | |
3310 | (commit (string-append "v" upstream-version)))) | |
3311 | (file-name (git-file-name name version)) | |
d7cff656 | 3312 | (sha256 |
67f1db38 | 3313 | (base32 "0f0g4995xngf1pp3zr4p6ai2f8v6f8bxwa0k8ayjjiv1l8h44m24")))) |
d7cff656 LF |
3314 | (build-system gnu-build-system) |
3315 | (arguments | |
3316 | `(#:configure-flags '("--enable-samples=no") | |
3317 | #:tests? #f)) ;no "check" target | |
3318 | (home-page "http://muparser.beltoforion.de/") | |
3319 | (synopsis "Fast parser library for mathematical expressions") | |
3320 | (description | |
3321 | "muParser is an extensible high performance math parser library. It is | |
3322 | based on transforming an expression into a bytecode and precalculating constant | |
3323 | parts of it.") | |
3324 | (license license:expat)))) | |
279663ef | 3325 | |
e73b49fb RW |
3326 | (define-public openblas |
3327 | (package | |
3328 | (name "openblas") | |
df5a2e4f | 3329 | (version "0.3.9") |
e73b49fb RW |
3330 | (source |
3331 | (origin | |
3332 | (method url-fetch) | |
a617fd55 MB |
3333 | (uri (string-append "mirror://sourceforge/openblas/v" version "/OpenBLAS%20" |
3334 | version "%20version.tar.gz")) | |
e73b49fb RW |
3335 | (file-name (string-append name "-" version ".tar.gz")) |
3336 | (sha256 | |
3337 | (base32 | |
df5a2e4f | 3338 | "14iz9xnrb9xiwgj84j94mc74gg0zn2vsy9fmsijxxma1n7dck4w3")))) |
e73b49fb RW |
3339 | (build-system gnu-build-system) |
3340 | (arguments | |
5789566a | 3341 | `(#:test-target "test" |
bd0b4379 RW |
3342 | ;; DYNAMIC_ARCH is only supported on x86. When it is disabled and no |
3343 | ;; TARGET is specified, OpenBLAS will tune itself to the build host, so | |
3344 | ;; we need to disable substitutions. | |
71923a91 AE |
3345 | #:substitutable? |
3346 | ,(let ((system (or (%current-target-system) (%current-system)))) | |
3347 | (or (string-prefix? "x86_64" system) | |
bd0b4379 | 3348 | (string-prefix? "i686" system) |
83a34647 EF |
3349 | (string-prefix? "mips" system) |
3350 | (string-prefix? "aarch64" system))) | |
e73b49fb RW |
3351 | #:make-flags |
3352 | (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
3353 | "SHELL=bash" | |
5855756c | 3354 | "MAKE_NB_JOBS=0" ;use jobserver for submakes |
a4384dc9 MB |
3355 | |
3356 | ;; This is the maximum number of threads OpenBLAS will ever use (that | |
3357 | ;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS | |
3358 | ;; is used.) If we don't set it, the makefile sets it to the number | |
3359 | ;; of cores of the build machine, which is obviously wrong. | |
3360 | "NUM_THREADS=128" | |
3361 | ||
af5b817e RW |
3362 | ;; Build the library for all supported CPUs. This allows |
3363 | ;; switching CPU targets at runtime with the environment variable | |
3364 | ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type. | |
71923a91 AE |
3365 | ;; Unfortunately, this is not supported on non-x86 architectures, |
3366 | ;; where it leads to failed builds. | |
3367 | ,@(let ((system (or (%current-target-system) (%current-system)))) | |
8a637e79 RW |
3368 | (cond |
3369 | ((or (string-prefix? "x86_64" system) | |
71923a91 | 3370 | (string-prefix? "i686" system)) |
8a637e79 RW |
3371 | '("DYNAMIC_ARCH=1")) |
3372 | ;; On MIPS we force the "SICORTEX" TARGET, as for the other | |
3373 | ;; two available MIPS targets special extended instructions | |
3374 | ;; for Loongson cores are used. | |
3375 | ((string-prefix? "mips" system) | |
3376 | '("TARGET=SICORTEX")) | |
83a34647 EF |
3377 | ;; On aarch64 force the generic 'armv8-a' target |
3378 | ((string-prefix? "aarch64" system) | |
3379 | '("TARGET=ARMV8")) | |
8a637e79 | 3380 | (else '())))) |
e73b49fb | 3381 | ;; no configure script |
493937ae DL |
3382 | #:phases |
3383 | (modify-phases %standard-phases | |
3384 | (delete 'configure) | |
3385 | (add-before 'build 'set-extralib | |
3386 | (lambda* (#:key inputs #:allow-other-keys) | |
3387 | ;; Get libgfortran found when building in utest. | |
3388 | (setenv "FEXTRALIB" | |
3389 | (string-append "-L" (assoc-ref inputs "fortran-lib") | |
3390 | "/lib")) | |
3391 | #t))))) | |
e73b49fb | 3392 | (inputs |
493937ae | 3393 | `(("fortran-lib" ,gfortran "lib"))) |
e73b49fb RW |
3394 | (native-inputs |
3395 | `(("cunit" ,cunit) | |
493937ae | 3396 | ("fortran" ,gfortran) |
e73b49fb | 3397 | ("perl" ,perl))) |
59695981 | 3398 | (home-page "https://www.openblas.net/") |
e73b49fb RW |
3399 | (synopsis "Optimized BLAS library based on GotoBLAS") |
3400 | (description | |
3401 | "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.") | |
3402 | (license license:bsd-3))) | |
3403 | ||
daa6036f | 3404 | (define-public openblas-ilp64 |
ba05be22 | 3405 | (package/inherit openblas |
daa6036f EB |
3406 | (name "openblas-ilp64") |
3407 | (supported-systems '("x86_64-linux" "aarch64-linux" "mips64el-linux")) | |
3408 | (arguments | |
3409 | (substitute-keyword-arguments (package-arguments openblas) | |
3410 | ((#:make-flags flags '()) | |
3411 | `(append (list "INTERFACE64=1" "LIBNAMESUFFIX=ilp64") | |
3412 | ,flags)))) | |
3413 | (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)") | |
3414 | (license license:bsd-3))) | |
3415 | ||
5a7deb11 LC |
3416 | (define* (make-blis implementation #:optional substitutable?) |
3417 | "Return a BLIS package with the given IMPLEMENTATION (see config/ in the | |
3418 | source tree for a list of implementations.) | |
3419 | ||
3420 | SUBSTITUTABLE? determines whether the package is made available as a | |
3421 | substitute. | |
3422 | ||
3423 | Currently the specialization must be selected at configure-time, but work is | |
3424 | underway to allow BLIS to select the right optimized kernels at run time: | |
3425 | <https://github.com/flame/blis/issues/129>." | |
3426 | (package | |
3427 | (name (if (string=? implementation "reference") | |
3428 | "blis" | |
3429 | (string-append "blis-" implementation))) | |
3430 | (version "0.2.2") | |
3431 | (home-page "https://github.com/flame/blis") | |
3432 | (source (origin | |
3433 | (method git-fetch) | |
3434 | (uri (git-reference (url home-page) (commit version))) | |
3435 | (sha256 | |
3436 | (base32 | |
3437 | "1wr79a50nm4abhw8w3sn96nmwp5mrzifcigk7khw9qcgyyyqayfh")) | |
3438 | (file-name (git-file-name "blis" version)))) | |
3439 | (build-system gnu-build-system) | |
3440 | (arguments | |
3441 | `(#:test-target "test" | |
3442 | ||
3443 | #:substitutable? ,substitutable? | |
3444 | ||
3445 | #:phases (modify-phases %standard-phases | |
3446 | (replace 'configure | |
3447 | (lambda* (#:key outputs #:allow-other-keys) | |
3448 | ;; This is a home-made 'configure' script. | |
3449 | (let ((out (assoc-ref outputs "out"))) | |
1ec17821 RW |
3450 | (invoke "./configure" "-p" out |
3451 | "-d" "opt" | |
3452 | "--disable-static" | |
3453 | "--enable-shared" | |
3454 | "--enable-threading=openmp" | |
5a7deb11 | 3455 | |
1ec17821 | 3456 | ,implementation)))) |
5a7deb11 LC |
3457 | (add-before 'check 'show-test-output |
3458 | (lambda _ | |
3459 | ;; By default "make check" is silent. Make it verbose. | |
3460 | (system "tail -F output.testsuite &") | |
3461 | #t))))) | |
3462 | (synopsis "High-performance basic linear algebra (BLAS) routines") | |
3463 | (description | |
3464 | "BLIS is a portable software framework for instantiating high-performance | |
3465 | BLAS-like dense linear algebra libraries. The framework was designed to | |
3466 | isolate essential kernels of computation that, when optimized, immediately | |
3467 | enable optimized implementations of most of its commonly used and | |
3468 | computationally intensive operations. While BLIS exports a new BLAS-like API, | |
3469 | it also includes a BLAS compatibility layer which gives application developers | |
3470 | access to BLIS implementations via traditional BLAS routine calls.") | |
3471 | (license license:bsd-3))) | |
3472 | ||
3473 | (define-public blis | |
3474 | ;; This is the "reference" implementation, which is the non-optimized but | |
3475 | ;; portable variant (no assembly). | |
3476 | (make-blis "reference" #t)) | |
3477 | ||
3478 | (define ignorance blis) | |
3479 | ||
3480 | (define-syntax-rule (blis/x86_64 processor) | |
3481 | "Expand to a package specialized for PROCESSOR." | |
3482 | (package | |
3483 | (inherit (make-blis processor)) | |
3484 | (supported-systems '("x86_64-linux")))) | |
3485 | ||
3486 | (define-public blis-sandybridge | |
3487 | ;; BLIS specialized for Sandy Bridge processors (launched 2011): | |
3488 | ;; <http://ark.intel.com/products/codename/29900/Sandy-Bridge>. | |
3489 | (blis/x86_64 "sandybridge")) | |
3490 | ||
3491 | (define-public blis-haswell | |
3492 | ;; BLIS specialized for Haswell processors (launched 2013): | |
3493 | ;; <http://ark.intel.com/products/codename/42174/Haswell>. | |
3494 | (blis/x86_64 "haswell")) | |
3495 | ||
3496 | (define-public blis-knl | |
3497 | ;; BLIS specialized for Knights Landing processor (launched 2016): | |
3498 | ;; <http://ark.intel.com/products/series/92650/Intel-Xeon-Phi-x200-Product-Family>. | |
3499 | (blis/x86_64 "knl")) | |
3500 | ||
3501 | ||
e1605e36 RW |
3502 | (define-public openlibm |
3503 | (package | |
3504 | (name "openlibm") | |
48d7ac17 | 3505 | (version "0.6.0") |
e1605e36 RW |
3506 | (source |
3507 | (origin | |
ca72dd2c TGR |
3508 | (method git-fetch) |
3509 | (uri (git-reference | |
3510 | (url "https://github.com/JuliaLang/openlibm.git") | |
3511 | (commit (string-append "v" version)))) | |
3512 | (file-name (git-file-name name version)) | |
e1605e36 | 3513 | (sha256 |
ca72dd2c | 3514 | (base32 "08wfchmmr5200fvmn1kwq9byc1fhsq46hn0y5k8scdl74771c7gh")))) |
e1605e36 RW |
3515 | (build-system gnu-build-system) |
3516 | (arguments | |
3517 | `(#:make-flags | |
3518 | (list (string-append "prefix=" (assoc-ref %outputs "out"))) | |
3519 | #:phases | |
3520 | ;; no configure script | |
dc1d3cde | 3521 | (modify-phases %standard-phases (delete 'configure)) |
e1605e36 | 3522 | #:tests? #f)) ;the tests are part of the default target |
d3be5220 | 3523 | (home-page "https://openlibm.org/") |
e1605e36 RW |
3524 | (synopsis "Portable C mathematical library (libm)") |
3525 | (description | |
3526 | "OpenLibm is an effort to have a high quality, portable, standalone C | |
3527 | mathematical library (libm). It can be used standalone in applications and | |
3528 | programming language implementations. The project was born out of a need to | |
e881752c | 3529 | have a good libm for the Julia programming language that worked consistently |
e1605e36 RW |
3530 | across compilers and operating systems, and in 32-bit and 64-bit |
3531 | environments.") | |
538c0e3b EF |
3532 | ;; Each architecture has its own make target, and there is none for mips. |
3533 | (supported-systems (delete "mips64el-linux" %supported-systems)) | |
e1605e36 RW |
3534 | ;; See LICENSE.md for details. |
3535 | (license (list license:expat | |
3536 | license:isc | |
3537 | license:bsd-2 | |
3538 | license:public-domain | |
3539 | license:lgpl2.1+)))) | |
3540 | ||
e62be58f RW |
3541 | (define-public openspecfun |
3542 | (package | |
3543 | (name "openspecfun") | |
59cd0ba4 | 3544 | (version "0.5.3") |
e62be58f RW |
3545 | (source |
3546 | (origin | |
90cea671 TGR |
3547 | (method git-fetch) |
3548 | (uri (git-reference | |
3549 | (url "https://github.com/JuliaLang/openspecfun.git") | |
3550 | (commit (string-append "v" version)))) | |
3551 | (file-name (git-file-name name version)) | |
e62be58f | 3552 | (sha256 |
90cea671 | 3553 | (base32 "0pfw6l3ch7isz403llx7inxlvavqh01jh1hb9dpidi86sjjx9kfh")))) |
e62be58f RW |
3554 | (build-system gnu-build-system) |
3555 | (arguments | |
59cd0ba4 | 3556 | '(#:tests? #f ; no "check" target |
e62be58f RW |
3557 | #:make-flags |
3558 | (list (string-append "prefix=" (assoc-ref %outputs "out"))) | |
59cd0ba4 TGR |
3559 | #:phases |
3560 | (modify-phases %standard-phases | |
3561 | (delete 'configure)))) ; no configure script | |
e62be58f | 3562 | (inputs |
19afbea1 | 3563 | `(("fortran" ,gfortran))) |
e62be58f RW |
3564 | (home-page "https://github.com/JuliaLang/openspecfun") |
3565 | (synopsis "Collection of special mathematical functions") | |
3566 | (description | |
3567 | "Openspecfun provides AMOS and Faddeeva. AMOS (from Netlib) is a | |
3568 | portable package for Bessel Functions of a Complex Argument and Nonnegative | |
3569 | Order; it contains subroutines for computing Bessel functions and Airy | |
3570 | functions. Faddeeva allows computing the various error functions of arbitrary | |
3571 | complex arguments (Faddeeva function, error function, complementary error | |
3572 | function, scaled complementary error function, imaginary error function, and | |
3573 | Dawson function); given these, one can also easily compute Voigt functions, | |
3574 | Fresnel integrals, and similar related functions as well.") | |
3575 | ;; Faddeeva is released under the Expat license; AMOS is included as | |
3576 | ;; public domain software. | |
3577 | (license (list license:expat license:public-domain)))) | |
3578 | ||
2742f87e RW |
3579 | (define-public suitesparse |
3580 | (package | |
3581 | (name "suitesparse") | |
aac148a8 | 3582 | (version "5.7.1") |
2742f87e RW |
3583 | (source |
3584 | (origin | |
aac148a8 FG |
3585 | (method git-fetch) |
3586 | (uri (git-reference | |
3587 | (url "https://github.com/DrTimothyAldenDavis/SuiteSparse.git") | |
3588 | (commit (string-append "v" version)))) | |
3589 | (file-name (git-file-name name version)) | |
2742f87e RW |
3590 | (sha256 |
3591 | (base32 | |
aac148a8 FG |
3592 | "174p3l78kv9gaa0i5hflyai2ydwnjzh34k9938sl4aa3li0543s8")) |
3593 | (patches (search-patches "suitesparse-mongoose-cmake.patch")) | |
bd5b5ac0 EB |
3594 | (modules '((guix build utils))) |
3595 | (snippet | |
3596 | ;; Remove bundled metis source | |
6cbee49d MW |
3597 | '(begin |
3598 | (delete-file-recursively "metis-5.1.0") | |
3599 | #t)))) | |
2742f87e RW |
3600 | (build-system gnu-build-system) |
3601 | (arguments | |
bd5b5ac0 | 3602 | '(#:tests? #f ;no "check" target |
2742f87e RW |
3603 | #:make-flags |
3604 | (list "CC=gcc" | |
3605 | "BLAS=-lblas" | |
3606 | "TBB=-ltbb" | |
bd5b5ac0 | 3607 | "MY_METIS_LIB=-lmetis" |
aac148a8 FG |
3608 | ;; Flags for cmake (required to build GraphBLAS and Mongoose) |
3609 | (string-append "CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX=" | |
3610 | (assoc-ref %outputs "out") | |
3611 | " -DCMAKE_VERBOSE_MAKEFILE=ON" | |
3612 | " -DCMAKE_C_FLAGS_RELEASE=\"$(CFLAGS) $(CPPFLAGS)\"" | |
3613 | " -DCMAKE_CXX_FLAGS_RELEASE=\"$(CXXFLAGS) $(CPPFLAGS)\"" | |
3614 | " -DCMAKE_SKIP_RPATH=TRUE" | |
3615 | " -DCMAKE_BUILD_TYPE=Release") | |
2742f87e RW |
3616 | (string-append "INSTALL_LIB=" |
3617 | (assoc-ref %outputs "out") "/lib") | |
3618 | (string-append "INSTALL_INCLUDE=" | |
bd5b5ac0 EB |
3619 | (assoc-ref %outputs "out") "/include") |
3620 | "library") | |
2742f87e | 3621 | #:phases |
2509522c | 3622 | (modify-phases %standard-phases |
bd5b5ac0 | 3623 | (delete 'configure)))) ;no configure script |
2742f87e RW |
3624 | (inputs |
3625 | `(("tbb" ,tbb) | |
bd5b5ac0 EB |
3626 | ("lapack" ,lapack) |
3627 | ("metis" ,metis))) | |
aac148a8 | 3628 | (native-inputs |
b471337d | 3629 | `(("cmake" ,cmake-minimal) |
aac148a8 | 3630 | ("m4" ,m4))) |
2742f87e RW |
3631 | (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html") |
3632 | (synopsis "Suite of sparse matrix software") | |
3633 | (description | |
3634 | "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK, | |
3635 | multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR, | |
3636 | multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit | |
3637 | simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and | |
3638 | CXSparse, a concise sparse Cholesky factorization package; and many other | |
3639 | packages.") | |
3640 | ;; LGPLv2.1+: | |
3641 | ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL | |
3642 | ;; GPLv2+: | |
3643 | ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK | |
3644 | (license (list license:gpl2+ license:lgpl2.1+)))) | |
3645 | ||
ec322be2 FB |
3646 | (define-public atlas |
3647 | (package | |
3648 | (name "atlas") | |
3c98ac02 | 3649 | (version "3.10.3") |
ec322be2 FB |
3650 | (source (origin |
3651 | (method url-fetch) | |
de67e922 LF |
3652 | (uri (string-append "mirror://sourceforge/math-atlas/Stable/" |
3653 | version "/atlas" version ".tar.bz2")) | |
ec322be2 FB |
3654 | (sha256 |
3655 | (base32 | |
3c98ac02 | 3656 | "1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216")))) |
ec322be2 FB |
3657 | (build-system gnu-build-system) |
3658 | (home-page "http://math-atlas.sourceforge.net/") | |
19afbea1 | 3659 | (inputs `(("gfortran" ,gfortran) |
ec322be2 FB |
3660 | ("lapack-tar" ,(package-source lapack)))) |
3661 | (outputs '("out" "doc")) | |
01480b9e FB |
3662 | ;; For the moment we drop support for MIPS at it fails to compile. See |
3663 | ;; https://lists.gnu.org/archive/html/guix-devel/2014-11/msg00516.html | |
3664 | (supported-systems (delete "mips64el-linux" %supported-systems)) | |
ec322be2 FB |
3665 | (arguments |
3666 | `(#:parallel-build? #f | |
3667 | #:parallel-tests? #f | |
f15615b1 LC |
3668 | |
3669 | ;; ATLAS tunes itself for the machine it is built on, as explained at | |
3670 | ;; <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00305.html>. | |
3671 | ;; For this reason, we want users to build it locally instead of using | |
3672 | ;; substitutes. | |
3673 | #:substitutable? #f | |
3674 | ||
ec322be2 | 3675 | #:modules ((srfi srfi-26) |
ec322be2 FB |
3676 | (guix build gnu-build-system) |
3677 | (guix build utils)) | |
40029cbe | 3678 | #:configure-flags |
ec322be2 FB |
3679 | `(;; Generate position independent code suitable for dynamic libraries |
3680 | ;; and use WALL timer to get more accurate timing. | |
3681 | "-Fa" "alg" "-fPIC" "-D" "c" "-DWALL" | |
3682 | ;; Set word width. | |
3683 | "-b" | |
3684 | ,,(if (string-match "64" (%current-system)) | |
3685 | "64" | |
3686 | "32") | |
3687 | ;; Disable parallel build as it gives errors: atlas_pthread.h is | |
3688 | ;; needed to compile C files before it is generated. | |
3689 | "-Ss" "pmake" "make -j 1" | |
af89a667 FB |
3690 | ;; Probe is failing for MIPS. We therefore define the system |
3691 | ;; architecture explicitly by setting (-A) MACHINETYPE = 49 | |
3692 | ;; 'MIPSR1xK' and (-V) ISA = 1 'none'. | |
3693 | ,,@(if (string-prefix? "mips" (%current-system)) | |
3694 | (list "-A" "49" "-V" "1") | |
3695 | (list)) | |
ec322be2 FB |
3696 | ;; Generate shared libraries. |
3697 | "--shared" | |
3698 | ;; Build a full LAPACK library. | |
3699 | ,(string-append "--with-netlib-lapack-tarfile=" | |
3700 | (assoc-ref %build-inputs "lapack-tar"))) | |
3701 | #:phases | |
e5b4b96b EF |
3702 | (modify-phases %standard-phases |
3703 | (add-after 'install 'install-doc | |
3704 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
3705 | (let ((doc (string-append (assoc-ref outputs "doc") | |
3706 | "/share/doc/atlas"))) | |
3707 | (mkdir-p doc) | |
cb6f44d4 RW |
3708 | (for-each (cut install-file <> doc) |
3709 | (find-files "../ATLAS/doc" ".*")) | |
3710 | #t))) | |
e5b4b96b | 3711 | (add-after 'check 'check-pt |
cb6f44d4 | 3712 | (lambda _ (invoke "make" "ptcheck"))) |
e5b4b96b EF |
3713 | ;; Fix files required to run configure. |
3714 | (add-before 'configure 'fix-/bin/sh | |
ec322be2 FB |
3715 | (lambda _ |
3716 | ;; Use `sh', not `/bin/sh'. | |
3717 | (substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c") | |
3718 | (("/bin/sh") | |
5b786db8 EF |
3719 | "sh")) |
3720 | #t)) | |
e5b4b96b EF |
3721 | ;; Fix /bin/sh in generated make files. |
3722 | (add-after 'configure 'fix-/bin/sh-in-generated-files | |
3723 | (lambda _ | |
3724 | (substitute* (find-files "." "^[Mm]ake\\.inc.*") | |
3725 | (("/bin/sh") | |
5b786db8 EF |
3726 | "sh")) |
3727 | #t)) | |
e5b4b96b EF |
3728 | ;; ATLAS configure program does not accepts the default flags |
3729 | ;; passed by the 'gnu-build-system'. | |
3730 | (replace 'configure | |
3731 | (lambda* (#:key native-inputs inputs outputs | |
3732 | (configure-flags '()) | |
3733 | #:allow-other-keys #:rest args) | |
3734 | (let* ((prefix (assoc-ref outputs "out")) | |
3735 | (bash (or (and=> (assoc-ref | |
3736 | (or native-inputs inputs) "bash") | |
3737 | (cut string-append <> "/bin/bash")) | |
3738 | "/bin/sh")) | |
3739 | (flags `(,(string-append "--prefix=" prefix) | |
3740 | ,@configure-flags)) | |
3741 | (abs-srcdir (getcwd)) | |
3742 | (srcdir (string-append "../" (basename abs-srcdir)))) | |
3743 | (format #t "source directory: ~s (relative from build: ~s)~%" | |
3744 | abs-srcdir srcdir) | |
3745 | (mkdir "../build") | |
3746 | (chdir "../build") | |
3747 | (format #t "build directory: ~s~%" (getcwd)) | |
3748 | (format #t "configure flags: ~s~%" flags) | |
cb6f44d4 RW |
3749 | (apply invoke bash |
3750 | (string-append srcdir "/configure") | |
3751 | flags))))))) | |
ec322be2 FB |
3752 | (synopsis "Automatically Tuned Linear Algebra Software") |
3753 | (description | |
3754 | "ATLAS is an automatically tuned linear algebra software library | |
3755 | providing C and Fortran77 interfaces to a portably efficient BLAS | |
3756 | implementation, as well as a few routines from LAPACK. | |
3757 | ||
f15615b1 LC |
3758 | Optimization occurs at build time. For this reason, the library is built on |
3759 | the machine where it is installed, without resorting to pre-built substitutes. | |
ec322be2 | 3760 | |
f15615b1 | 3761 | Before building the library, CPU throttling should be disabled. This can be |
d97c429a | 3762 | done in the BIOS, or, on GNU/Linux, with the following command: |
ec322be2 | 3763 | |
8e9ba611 | 3764 | @example |
d97c429a | 3765 | # cpupower --governor performance |
8e9ba611 | 3766 | @end example |
ec322be2 | 3767 | |
d97c429a | 3768 | Failure to do so will result in a library with poor performance.") |
ec322be2 | 3769 | (license license:bsd-3))) |
c12efc72 AE |
3770 | |
3771 | (define-public glm | |
3772 | (package | |
3773 | (name "glm") | |
1a75fc84 | 3774 | (version "0.9.9.8") |
c12efc72 AE |
3775 | (source |
3776 | (origin | |
3777 | (method url-fetch) | |
5ea4b594 MB |
3778 | (uri (string-append "https://github.com/g-truc/glm/releases/download/" |
3779 | version "/glm-" version ".zip")) | |
c12efc72 | 3780 | (sha256 |
1a75fc84 | 3781 | (base32 "0k6yk9v46h690rshdx49x98y5qspkzibld1wb51jwcm35vba7qip")))) |
c12efc72 | 3782 | (build-system cmake-build-system) |
1a75fc84 MB |
3783 | (arguments |
3784 | `(#:phases (modify-phases %standard-phases | |
3785 | (replace 'install | |
3786 | (lambda* (#:key outputs #:allow-other-keys) | |
3787 | ;; Since version 0.9.9.6, 'make install' is not supported | |
3788 | ;; and we have to do it "manually". Upstream discussion: | |
3789 | ;; <https://github.com/g-truc/glm/pull/968>. | |
3790 | (let* ((source (string-append "../glm")) | |
3791 | (out (assoc-ref outputs "out")) | |
3792 | (inc (string-append out "/include")) | |
3793 | (lib (string-append out "/lib")) | |
3794 | (pkgconfig (string-append lib "/pkgconfig"))) | |
3795 | (with-directory-excursion source | |
3796 | (mkdir-p inc) | |
3797 | (mkdir-p pkgconfig) | |
3798 | (copy-recursively "glm" (string-append inc "/glm")) | |
3799 | (copy-recursively "cmake" (string-append lib "/cmake")) | |
3800 | (call-with-output-file (string-append pkgconfig "/glm.pc") | |
3801 | (lambda (port) | |
3802 | (format port | |
3803 | "prefix=~a | |
3804 | includedir=${prefix}/include | |
3805 | ||
3806 | Name: GLM | |
3807 | Description: OpenGL Mathematics | |
3808 | Version: ~a | |
3809 | Cflags: -I${includedir}~%" out ,(version-prefix version 3))))) | |
3810 | #t)))))) | |
c12efc72 AE |
3811 | (native-inputs |
3812 | `(("unzip" ,unzip))) | |
46bda5eb | 3813 | (home-page "https://glm.g-truc.net/") |
c12efc72 AE |
3814 | (synopsis "OpenGL Mathematics library") |
3815 | (description "OpenGL Mathematics (GLM) is a header-only C++ mathematics | |
3816 | library for graphics software based on the OpenGL Shading Language (GLSL) | |
3817 | specifications.") | |
3818 | (license license:expat))) | |
7f18257b AE |
3819 | |
3820 | (define-public lpsolve | |
3821 | (package | |
3822 | (name "lpsolve") | |
a89e0cf5 | 3823 | (version "5.5.2.5") |
7f18257b AE |
3824 | (source |
3825 | (origin | |
3826 | (method url-fetch) | |
3827 | (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version | |
3828 | "/lp_solve_" version "_source.tar.gz")) | |
3829 | (sha256 | |
3830 | (base32 | |
a89e0cf5 | 3831 | "12pj1idjz31r7c2mb5w03vy1cmvycvbkx9z29s40qdmkp1i7q6i0")) |
7f18257b AE |
3832 | (modules '((guix build utils))) |
3833 | (snippet | |
6cbee49d MW |
3834 | '(begin |
3835 | (substitute* (list "lp_solve/ccc" "lpsolve55/ccc") | |
3836 | (("^c=cc") "c=gcc") | |
3837 | ;; Pretend to be on a 64 bit platform to obtain a common directory | |
3838 | ;; name for the build results on all architectures; nothing else | |
3839 | ;; seems to depend on it. | |
3840 | (("^PLATFORM=.*$") "PLATFORM=ux64\n") | |
3841 | ||
3842 | ;; The check for 'isnan' as it is written fails with | |
3843 | ;; "non-floating-point argument in call to function | |
3844 | ;; ‘__builtin_isnan’", which leads to the 'NOISNAN' cpp macro | |
3845 | ;; definition, which in turn leads to bad things. Fix the feature | |
3846 | ;; test. | |
3847 | (("isnan\\(0\\)") "isnan(0.)")) | |
3848 | #t)))) | |
7f18257b AE |
3849 | (build-system gnu-build-system) |
3850 | (arguments | |
6c96b545 | 3851 | `(#:tests? #f ; no check target |
7f18257b AE |
3852 | #:phases |
3853 | (modify-phases %standard-phases | |
6c96b545 | 3854 | (delete 'configure) ; no configure script |
7f18257b AE |
3855 | (replace 'build |
3856 | (lambda _ | |
6c96b545 TGR |
3857 | (with-directory-excursion "lpsolve55" |
3858 | (invoke "bash" "ccc")) | |
3859 | (with-directory-excursion "lp_solve" | |
3860 | (invoke "bash" "ccc")) | |
3861 | #t)) | |
7f18257b AE |
3862 | (replace 'install |
3863 | (lambda* (#:key outputs #:allow-other-keys) | |
3864 | (let* ((out (assoc-ref outputs "out")) | |
3865 | (bin (string-append out "/bin")) | |
3866 | (lib (string-append out "/lib")) | |
3867 | ;; This is where LibreOffice expects to find the header | |
3868 | ;; files, and where they are installed by Debian. | |
3869 | (include (string-append out "/include/lpsolve"))) | |
6c96b545 TGR |
3870 | (install-file "lpsolve55/bin/ux64/liblpsolve55.a" lib) |
3871 | (install-file "lpsolve55/bin/ux64/liblpsolve55.so" lib) | |
96c46210 LC |
3872 | (install-file "lp_solve/bin/ux64/lp_solve" bin) |
3873 | ||
7f18257b AE |
3874 | ;; Install a subset of the header files as on Debian |
3875 | ;; (plus lp_bit.h, which matches the regular expression). | |
96c46210 LC |
3876 | (for-each (lambda (name) |
3877 | (install-file name include)) | |
3878 | (find-files "." "lp_[HMSa-z].*\\.h$")) | |
7f18257b | 3879 | (with-directory-excursion "shared" |
96c46210 LC |
3880 | (for-each (lambda (name) |
3881 | (install-file name include)) | |
3882 | (find-files "." "\\.h$"))) | |
7f18257b AE |
3883 | #t)))))) |
3884 | (home-page "http://lpsolve.sourceforge.net/") | |
3885 | (synopsis "Mixed integer linear programming (MILP) solver") | |
3886 | (description | |
3887 | "lp_solve is a mixed integer linear programming solver based on the | |
3888 | revised simplex and the branch-and-bound methods.") | |
3889 | (license license:lgpl2.1+))) | |
a17d4564 EB |
3890 | |
3891 | (define-public dealii | |
3892 | (package | |
3893 | (name "dealii") | |
ba567cae | 3894 | (version "9.1.1") |
a17d4564 EB |
3895 | (source |
3896 | (origin | |
3897 | (method url-fetch) | |
3898 | (uri (string-append "https://github.com/dealii/dealii/releases/" | |
3899 | "download/v" version "/dealii-" version ".tar.gz")) | |
3900 | (sha256 | |
3901 | (base32 | |
ba567cae | 3902 | "0xhjv0gzswpjbc43xbrpwfc5848g508l01855nszx3g5gwzlhnzw")) |
a17d4564 EB |
3903 | (modules '((guix build utils))) |
3904 | (snippet | |
3905 | ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost | |
6cbee49d MW |
3906 | '(begin |
3907 | (delete-file-recursively "bundled") | |
3908 | #t)))) | |
a17d4564 EB |
3909 | (build-system cmake-build-system) |
3910 | (inputs | |
3911 | `(("tbb" ,tbb) | |
3912 | ("zlib" ,zlib) | |
3913 | ("boost" ,boost) | |
3914 | ("p4est" ,p4est) | |
3915 | ("blas" ,openblas) | |
3916 | ("lapack" ,lapack) | |
3917 | ("arpack" ,arpack-ng) | |
3918 | ("muparser" ,muparser) | |
3919 | ("gfortran" ,gfortran) | |
3920 | ("suitesparse" ,suitesparse))) ;for UMFPACK | |
3921 | (arguments | |
3922 | `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease | |
d84b09e9 EB |
3923 | #:configure-flags |
3924 | ;; Work around a bug in libsuitesparseconfig linking | |
3925 | ;; see https://github.com/dealii/dealii/issues/4745 | |
3926 | '("-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON"))) | |
a17d4564 EB |
3927 | (home-page "https://www.dealii.org") |
3928 | (synopsis "Finite element library") | |
3929 | (description | |
3930 | "Deal.II is a C++ program library targeted at the computational solution | |
3931 | of partial differential equations using adaptive finite elements. The main | |
3932 | aim of deal.II is to enable rapid development of modern finite element codes, | |
3933 | using among other aspects adaptive meshes and a wide array of tools often used | |
3934 | in finite element programs.") | |
3935 | (license license:lgpl2.1+))) | |
3936 | ||
3937 | (define-public dealii-openmpi | |
3938 | (package (inherit dealii) | |
3939 | (name "dealii-openmpi") | |
3940 | (inputs | |
3941 | `(("mpi" ,openmpi) | |
3942 | ;;Supported only with MPI: | |
4d44bcad | 3943 | ("hdf5" ,hdf5-parallel-openmpi) ;TODO: have petsc-openmpi propagate? |
a17d4564 EB |
3944 | ("p4est" ,p4est-openmpi) |
3945 | ("petsc" ,petsc-openmpi) | |
3946 | ("slepc" ,slepc-openmpi) | |
3947 | ("metis" ,metis) ;for MUMPS | |
3948 | ("scalapack" ,scalapack) ;for MUMPS | |
3949 | ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings | |
3950 | ("arpack" ,arpack-ng-openmpi) | |
3951 | ,@(fold alist-delete (package-inputs dealii) | |
3952 | '("p4est" "arpack")))) | |
3953 | (arguments | |
3954 | (substitute-keyword-arguments (package-arguments dealii) | |
3955 | ((#:configure-flags cf) | |
40b114c0 EB |
3956 | `(cons "-DDEAL_II_WITH_MPI:BOOL=ON" |
3957 | ,cf)) | |
7e309e8a EB |
3958 | ((#:phases phases '%standard-phases) |
3959 | `(modify-phases ,phases | |
3960 | (add-before 'check 'mpi-setup | |
3961 | ,%openmpi-setup))))) | |
a17d4564 | 3962 | (synopsis "Finite element library (with MPI support)"))) |
194c7f95 AE |
3963 | |
3964 | (define-public flann | |
3965 | (package | |
3966 | (name "flann") | |
ba40ce5b LC |
3967 | (version "1.9.1") |
3968 | (home-page "https://github.com/mariusmuja/flann/") | |
194c7f95 AE |
3969 | (source |
3970 | (origin | |
ba40ce5b LC |
3971 | (method git-fetch) |
3972 | (uri (git-reference (url home-page) (commit version))) | |
3973 | (file-name (git-file-name name version)) | |
194c7f95 AE |
3974 | (sha256 |
3975 | (base32 | |
ba40ce5b | 3976 | "0p56fl2yx1r86ds1mgjq40926jdcgq3hka7p3l1hv2acv9jxp15x")) |
b5edc479 | 3977 | (patches (search-patches "flann-cmake-3.11.patch")))) |
194c7f95 | 3978 | (build-system cmake-build-system) |
f8bb53ca | 3979 | (outputs '("out")) |
194c7f95 AE |
3980 | (native-inputs |
3981 | `(("unzip" ,unzip))) | |
3982 | (inputs | |
3983 | `(("hdf5" ,hdf5) | |
f8bb53ca LC |
3984 | ;; FIXME: 'mkoctfile' fails with a linker error: |
3985 | ;; ld: cannot find -loctinterp | |
3986 | ;; ld: cannot find -loctave | |
3987 | ;; Disable it for now. | |
3988 | ;;("octave" ,octave-cli) | |
194c7f95 AE |
3989 | ("python" ,python-2) ; print syntax |
3990 | ;; ("python2-numpy" ,python2-numpy) ; only required for the tests | |
3991 | ("zlib" ,zlib))) | |
3992 | (arguments | |
39b30337 LC |
3993 | `(;; The 'share/flann/octave' contains a .mex file, which is an ELF file |
3994 | ;; taken 46 MiB unstripped, and 6 MiB stripped. | |
3995 | #:strip-directories '("lib" "lib64" "libexec" | |
3996 | "bin" "sbin" "share/flann/octave") | |
3997 | ||
9684e30b LC |
3998 | ;; Save 12 MiB by not installing .a files. Passing |
3999 | ;; '-DBUILD_STATIC_LIBS=OFF' has no effect. | |
4000 | #:phases (modify-phases %standard-phases | |
4001 | (add-after 'install 'remove-static-libraries | |
4002 | (lambda* (#:key outputs #:allow-other-keys) | |
4003 | (let* ((out (assoc-ref outputs "out")) | |
4004 | (lib (string-append out "/lib"))) | |
4005 | (for-each delete-file | |
4006 | (find-files lib "\\.a$")) | |
4007 | #t)))) | |
4008 | ||
39b30337 | 4009 | #:tests? #f)) ; The test data are downloaded from the Internet. |
194c7f95 AE |
4010 | (synopsis "Library for approximate nearest neighbors computation") |
4011 | (description "FLANN is a library for performing fast approximate | |
4012 | nearest neighbor searches in high dimensional spaces. It implements a | |
4013 | collection of algorithms and a system for automatically choosing the best | |
4014 | algorithm and optimum parameters depending on the dataset. | |
4015 | ||
4016 | FLANN is written in C++ and contains bindings for C, Octave and Python.") | |
4017 | (license (license:non-copyleft "file://COPYING" | |
4018 | "See COPYING in the distribution.")))) | |
d8c97beb EF |
4019 | |
4020 | (define-public wcalc | |
4021 | (package | |
4022 | (name "wcalc") | |
4023 | (version "2.5") | |
4024 | (source | |
4025 | (origin | |
4026 | (method url-fetch) | |
de67e922 LF |
4027 | (uri (string-append "mirror://sourceforge/w-calc/Wcalc/" version "/" |
4028 | "wcalc-" version ".tar.bz2")) | |
d8c97beb EF |
4029 | (sha256 |
4030 | (base32 | |
4031 | "1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f")))) | |
4032 | (build-system gnu-build-system) | |
4033 | (inputs | |
4034 | `(("mpfr" ,mpfr) | |
4035 | ("readline" ,readline))) | |
4036 | (home-page "http://w-calc.sourceforge.net/index.php") | |
4037 | (synopsis "Flexible command-line scientific calculator") | |
4038 | (description "Wcalc is a very capable calculator. It has standard functions | |
4039 | (sin, asin, and sinh for example, in either radians or degrees), many | |
4040 | pre-defined constants (pi, e, c, etc.), support for using variables, \"active\" | |
4041 | variables, a command history, hex/octal/binary input and output, unit | |
4042 | conversions, embedded comments, and an expandable expression entry field. It | |
4043 | evaluates expressions using the standard order of operations.") | |
4044 | (license license:gpl2+))) | |
45147b0c FH |
4045 | |
4046 | (define-public xaos | |
4047 | (package | |
4048 | (name "xaos") | |
49de3274 | 4049 | (version "4.0") |
45147b0c | 4050 | (source (origin |
49de3274 KK |
4051 | (method git-fetch) |
4052 | (uri (git-reference | |
4053 | (url "https://github.com/xaos-project/XaoS") | |
4054 | (commit (string-append "release-" version)))) | |
45147b0c FH |
4055 | (sha256 |
4056 | (base32 | |
49de3274 | 4057 | "00110p5xscjsmn7avfqgydn656zbmdj3l3y2fpv9b4ihzpid8n7a")))) |
45147b0c | 4058 | (build-system gnu-build-system) |
49de3274 KK |
4059 | (native-inputs `(("gettext" ,gettext-minimal) |
4060 | ("qtbase" ,qtbase) | |
4061 | ("qttools" ,qttools))) | |
45147b0c FH |
4062 | (inputs `(("libx11" ,libx11) |
4063 | ("zlib" ,zlib) | |
4064 | ("libpng" ,libpng) | |
4065 | ("gsl" ,gsl))) | |
49de3274 KK |
4066 | ;; The upstream project file ("XaoS.pro") and the Makefile it generates are |
4067 | ;; not enough for this package to install properly. These phases fix that. | |
45147b0c FH |
4068 | (arguments |
4069 | `(#:tests? #f ;no "check" target | |
49de3274 KK |
4070 | #:phases |
4071 | (modify-phases %standard-phases | |
4072 | (add-before 'configure 'make-qt-deterministic | |
4073 | (lambda _ | |
4074 | ;; Make Qt deterministic. | |
4075 | (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") | |
4076 | #t)) | |
4077 | (replace 'configure | |
4078 | (lambda* (#:key outputs #:allow-other-keys) | |
4079 | (let ((out (assoc-ref outputs "out"))) | |
4080 | ;; The DESTDIR is originally set to install the xaos binary to | |
4081 | ;; the "bin" folder inside the build directory. Setting make | |
4082 | ;; flags doesn't seem to change this. | |
4083 | (substitute* "XaoS.pro" | |
4084 | (("DESTDIR.*$") | |
4085 | (string-append "DESTDIR=" out "/bin"))) | |
4086 | (substitute* "src/include/config.h" | |
4087 | (("/usr/share/XaoS") | |
4088 | (string-append out "/share/XaoS"))) | |
4089 | (invoke "qmake")))) | |
4090 | (add-after 'install 'install-data | |
4091 | (lambda* (#:key outputs #:allow-other-keys) | |
4092 | (let* ((out (assoc-ref outputs "out")) | |
4093 | (share (string-append out "/share"))) | |
4094 | (mkdir-p share) | |
4095 | (for-each | |
4096 | (lambda (folder) | |
4097 | (copy-recursively folder | |
4098 | (string-append share "/XaoS/" folder))) | |
4099 | '("catalogs" "examples" "tutorial")) | |
4100 | (install-file "xdg/xaos.png" | |
4101 | (string-append share "/pixmaps")) | |
4102 | (install-file "xdg/xaos.desktop" | |
4103 | (string-append share "/applications"))) | |
4104 | #t))))) | |
45147b0c FH |
4105 | (synopsis "Real-time fractal zoomer") |
4106 | (description "GNU XaoS is a graphical program that generates fractal | |
4107 | patterns and allows you to zoom in and out of them infinitely in a fluid, | |
4108 | continuous manner. It also includes tutorials that help to explain how fractals | |
4109 | are built. It can generate many different fractal types such as the Mandelbrot | |
4110 | set.") | |
49de3274 | 4111 | (home-page "https://xaos-project.github.io/") |
45147b0c | 4112 | (license license:gpl2+))) |
528bb464 EB |
4113 | |
4114 | (define-public hypre | |
4115 | (package | |
4116 | (name "hypre") | |
be099727 | 4117 | (version "2.15.1") |
fabcbf32 TGR |
4118 | (source |
4119 | (origin | |
4120 | (method git-fetch) | |
4121 | (uri (git-reference | |
4122 | (url "https://github.com/LLNL/hypre.git") | |
4123 | (commit (string-append "v" version)))) | |
4124 | (file-name (git-file-name name version)) | |
4125 | (sha256 | |
be099727 | 4126 | (base32 "1lvh4ybqkriyqfg2zmic6mrg1981qv1i9vry1fdgsabn81hb71g4")) |
fabcbf32 TGR |
4127 | (modules '((guix build utils))) |
4128 | (snippet | |
4129 | '(begin | |
4130 | ;; Remove use of __DATE__ and __TIME__ for reproducibility; | |
be099727 | 4131 | ;; substitute the release date. |
fabcbf32 TGR |
4132 | (substitute* "src/utilities/HYPRE_utilities.h" |
4133 | (("Date Compiled: .*$") | |
be099727 | 4134 | "Date Compiled: Oct 19 2018 15:23:00 +0000\"\n")) |
fabcbf32 | 4135 | #t)))) |
528bb464 | 4136 | (build-system gnu-build-system) |
be099727 TGR |
4137 | (outputs '("out" ; 6.1 MiB of headers and libraries |
4138 | "doc")) ; 4.8 MiB of documentation | |
528bb464 EB |
4139 | (native-inputs |
4140 | `(("doc++" ,doc++) | |
4141 | ("netpbm" ,netpbm) | |
be099727 | 4142 | ("perl" ,perl) ; needed to run 'ppmquant' during tests |
8b35c8cd RW |
4143 | ("texlive" ,(texlive-union (list texlive-xypic |
4144 | texlive-cm | |
9b405aea | 4145 | texlive-latex-hyperref |
9b405aea | 4146 | texlive-bibtex))) |
528bb464 EB |
4147 | ("ghostscript" ,ghostscript))) |
4148 | (inputs | |
4149 | `(("blas" ,openblas) | |
4150 | ("lapack" ,lapack))) | |
4151 | (arguments | |
4152 | `(#:modules ((srfi srfi-1) | |
4153 | ,@%gnu-build-system-modules) | |
4154 | #:configure-flags '("--enable-shared" | |
4155 | "--disable-fortran" | |
4156 | "--without-MPI" | |
4157 | "--with-openmp" | |
4158 | "--with-fei" | |
4159 | "--with-lapack" | |
4160 | "--with-blas") | |
4161 | #:phases | |
4162 | (modify-phases %standard-phases | |
9b405aea PN |
4163 | (add-before 'build 'set-HOME |
4164 | (lambda _ | |
4165 | ;; FIXME: texlive-union does not find the built | |
4166 | ;; metafonts, so it tries to generate them in HOME. | |
4167 | (setenv "HOME" "/tmp") | |
4168 | #t)) | |
528bb464 EB |
4169 | (add-before 'configure 'chdir-src |
4170 | (lambda _ (chdir "src"))) | |
4171 | (replace 'configure | |
4172 | (lambda* (#:key build target configure-flags | |
4173 | #:allow-other-keys #:rest args) | |
4174 | (let* ((configure (assoc-ref %standard-phases 'configure))) | |
4175 | (apply configure | |
4176 | (append args | |
4177 | (list #:configure-flags | |
4178 | (cons (string-append | |
4179 | "--host=" (or target build)) | |
4180 | configure-flags))))))) | |
4181 | (add-after 'build 'build-docs | |
4182 | (lambda _ | |
9b405aea | 4183 | (invoke "make" "-Cdocs" "pdf" "html"))) |
528bb464 EB |
4184 | (replace 'check |
4185 | (lambda _ | |
4186 | (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib")) | |
4187 | (setenv "PATH" (string-append "." ":" (getenv "PATH"))) | |
6b1c7ac8 RW |
4188 | (invoke "make" "check" "CHECKRUN=") |
4189 | (for-each (lambda (filename) | |
4190 | (let ((size (stat:size (stat filename)))) | |
4191 | (when (positive? size) | |
4192 | (error (format #f "~a size ~d; error indication~%" | |
4193 | filename size))))) | |
4194 | (find-files "test" ".*\\.err$")) | |
4195 | #t)) | |
528bb464 EB |
4196 | (add-after 'install 'install-docs |
4197 | (lambda* (#:key outputs #:allow-other-keys) | |
4198 | ;; Custom install because docs/Makefile doesn't honor ${docdir}. | |
4199 | (let* ((doc (assoc-ref outputs "doc")) | |
4200 | (docdir (string-append doc "/share/doc/hypre-" ,version))) | |
528bb464 EB |
4201 | (with-directory-excursion "docs" |
4202 | (for-each (lambda (base) | |
4203 | (install-file (string-append base ".pdf") docdir) | |
be099727 | 4204 | (copy-recursively base docdir)) ; html docs |
528bb464 EB |
4205 | '("HYPRE_usr_manual" |
4206 | "HYPRE_ref_manual"))) | |
4207 | #t)))))) | |
4208 | (home-page "http://www.llnl.gov/casc/hypre/") | |
4209 | (synopsis "Library of solvers and preconditioners for linear equations") | |
4210 | (description | |
4211 | "HYPRE is a software library of high performance preconditioners and | |
4212 | solvers for the solution of large, sparse linear systems of equations. It | |
4213 | features multigrid solvers for both structured and unstructured grid | |
4214 | problems.") | |
4215 | (license license:lgpl2.1))) | |
4216 | ||
4217 | (define-public hypre-openmpi | |
4218 | (package (inherit hypre) | |
4219 | (name "hypre-openmpi") | |
4220 | (inputs | |
4221 | `(("mpi" ,openmpi) | |
4222 | ,@(package-inputs hypre))) | |
4223 | (arguments | |
4224 | (substitute-keyword-arguments (package-arguments hypre) | |
4225 | ((#:configure-flags flags) | |
4226 | ``("--with-MPI" | |
6df2a50a LC |
4227 | ,@(delete "--without-MPI" ,flags))) |
4228 | ((#:phases phases) | |
4229 | `(modify-phases ,phases | |
bbe46a4a EB |
4230 | (add-before 'check 'mpi-setup |
4231 | ,%openmpi-setup))))) | |
528bb464 EB |
4232 | (synopsis "Parallel solvers and preconditioners for linear equations") |
4233 | (description | |
4234 | "HYPRE is a software library of high performance preconditioners and | |
4235 | solvers for the solution of large, sparse linear systems of equations on | |
4236 | parallel computers. It features parallel multigrid solvers for both | |
4237 | structured and unstructured grid problems."))) | |
6c90e183 EB |
4238 | |
4239 | (define-public matio | |
4240 | (package | |
4241 | (name "matio") | |
4242 | (version "1.5.6") | |
4243 | (source | |
4244 | (origin | |
4245 | (method url-fetch) | |
de67e922 | 4246 | (uri (string-append "mirror://sourceforge/matio/matio/" version "/" |
6c90e183 EB |
4247 | "matio-" version ".tar.gz")) |
4248 | (sha256 | |
4249 | (base32 | |
4250 | "0y2qymgxank8wdiwc68ap8bxdzrhvyw86i29yh3xgn4z1njfd9ir")))) | |
4251 | (build-system gnu-build-system) | |
4252 | (inputs | |
4253 | `(("zlib" ,zlib) | |
4254 | ("hdf5" ,hdf5))) | |
4255 | (home-page "http://matio.sourceforge.net/") | |
4256 | (synopsis "Library for reading and writing MAT files") | |
4257 | (description "Matio is a library for reading and writing MAT files. It | |
4258 | supports compressed MAT files, as well as newer (version 7.3) MAT files.") | |
4259 | (license license:bsd-2))) | |
d721c83a | 4260 | |
517318ad LF |
4261 | (define-public vc |
4262 | (package | |
4263 | (name "vc") | |
9d731fb6 | 4264 | (version "1.4.1") |
517318ad LF |
4265 | (source |
4266 | (origin (method url-fetch) | |
4267 | (uri (string-append "https://github.com/VcDevel/Vc/releases/" | |
4268 | "download/" version "/Vc-" version ".tar.gz")) | |
4269 | (sha256 | |
4270 | (base32 | |
9d731fb6 | 4271 | "17qili8bf8r78cng65yf4qmgna8kiqjqbgcqbric6v9j6nkhkrk8")))) |
517318ad LF |
4272 | (build-system cmake-build-system) |
4273 | (arguments | |
4274 | '(#:configure-flags | |
33d82486 MB |
4275 | '("-DBUILD_TESTING=ON" |
4276 | ;; By default, Vc will optimize for the CPU of the build machine. | |
4277 | ;; Setting this to "none" makes it create portable binaries. See | |
4278 | ;; "cmake/OptimizeForArchitecture.cmake". | |
9d731fb6 MB |
4279 | "-DTARGET_ARCHITECTURE=none") |
4280 | #:phases (modify-phases %standard-phases | |
4281 | (add-after 'unpack 'copy-testdata | |
4282 | (lambda* (#:key inputs native-inputs #:allow-other-keys) | |
4283 | (let ((testdata (assoc-ref (or native-inputs inputs) | |
4284 | "testdata"))) | |
4285 | (copy-recursively testdata "tests/testdata") | |
4286 | #t)))))) | |
4287 | (native-inputs | |
4288 | `(("virtest" ,virtest) | |
4289 | ||
4290 | ;; This is a submodule in the git project, but not part of the | |
4291 | ;; released sources. See the git branch for the commit to take. | |
4292 | ("testdata" ,(let ((commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3")) | |
4293 | (origin | |
4294 | (method git-fetch) | |
4295 | (uri (git-reference | |
4296 | (url "https://github.com/VcDevel/vc-testdata") | |
4297 | (commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3"))) | |
4298 | (file-name (git-file-name "vc-testdata" | |
4299 | (string-take commit 7))) | |
4300 | (sha256 | |
4301 | (base32 | |
4302 | "1hkhqib03qlcq412ym2dciynfxcdr2ygqhnplz4l1vissr1wnqn2"))))))) | |
517318ad LF |
4303 | (synopsis "SIMD vector classes for C++") |
4304 | (description "Vc provides portable, zero-overhead C++ types for explicitly | |
4305 | data-parallel programming. It is a library designed to ease explicit | |
4306 | vectorization of C++ code. Its types enable explicitly stating data-parallel | |
4307 | operations on multiple values. The parallelism is therefore added via the type | |
4308 | system. Vc has an intuitive API and provides portability between different | |
4309 | compilers and compiler versions as well as portability between different vector | |
4310 | instruction sets. Thus, an application written with Vc can be compiled for: | |
4311 | @enumerate | |
4312 | @item AVX and AVX2 | |
d1e4ad1b | 4313 | @item SSE2 up to SSE4.2 or SSE4a |
517318ad LF |
4314 | @item Scalar |
4315 | @item MIC | |
4316 | @item NEON (in development) | |
4317 | @item NVIDIA GPUs / CUDA (in development) | |
4318 | @end enumerate\n") | |
4319 | (home-page "https://github.com/VcDevel/Vc") | |
a8ead6f9 EF |
4320 | ;; "No support_???.cpp file exists for this architecture." |
4321 | (supported-systems '("x86_64-linux" "i686-linux")) | |
517318ad | 4322 | (license license:bsd-3))) |
54052a54 | 4323 | |
4324 | (define-public reducelcs | |
4325 | ;; This is the last commit which is available upstream, no | |
4326 | ;; release happened since 2010. | |
4327 | (let ((commit "474f88deb968061abe8cf11c959e02319b8ae5c0") | |
4328 | (revision "1")) | |
4329 | (package | |
4330 | (name "reducelcs") | |
4331 | (version (string-append "1.0-" revision "." (string-take commit 7))) | |
4332 | (source | |
4333 | (origin | |
4334 | (method git-fetch) | |
4335 | (uri (git-reference | |
4336 | (url "https://github.com/gdv/Reduce-Expand-for-LCS") | |
4337 | (commit commit))) | |
4338 | (file-name (string-append name "-" version "-checkout")) | |
4339 | (sha256 | |
4340 | (base32 | |
4341 | "1rllzcfwc042c336mhq262a8ha90x6afq30kvk60r7i4761j4yjm")))) | |
4342 | (build-system gnu-build-system) | |
4343 | (inputs | |
4344 | `(("openlibm" ,openlibm))) | |
4345 | (arguments | |
4346 | `(#:tests? #f ; no tests | |
4347 | #:phases | |
4348 | (modify-phases %standard-phases | |
4349 | (delete 'configure) ; No configure script exists. | |
4350 | (replace 'install ; No install phase exists. | |
4351 | (lambda* (#:key outputs #:allow-other-keys) | |
4352 | (let* ((out (assoc-ref outputs "out")) | |
4353 | (bin (string-append out "/bin"))) | |
4354 | (install-file "Approximation" bin) | |
4355 | (install-file "CollectResults" bin) | |
4356 | (install-file "GenerateInstances" bin) | |
4357 | #t)))))) | |
4358 | (synopsis "Approximate Longest Commons Subsequence computation tool") | |
4359 | (description | |
4360 | "@code{reduceLCS} is an implementation of the Reduce-Expand | |
4361 | algorithm for LCS. It is a fast program to compute the approximate | |
4362 | Longest Commons Subsequence of a set of strings.") | |
4363 | (home-page "https://github.com/gdv/Reduce-Expand-for-LCS") | |
c000b6b1 | 4364 | (license license:gpl3+)))) |
479c4273 JD |
4365 | |
4366 | (define-public jacal | |
4367 | (package | |
4368 | (name "jacal") | |
4369 | (version "1c4") | |
4370 | (source (origin | |
4371 | (method url-fetch) | |
4372 | (uri (string-append | |
4373 | "http://groups.csail.mit.edu/mac/ftpdir/scm/jacal-" | |
4374 | version ".zip")) | |
4375 | (sha256 (base32 | |
4376 | "055zrn12a1dmy0dqkwrkq3fklbhg3yir6vn0lacp4mvbg8573a3q")) | |
4377 | (patches (search-patches "jacal-fix-texinfo.patch")))) | |
4378 | (build-system gnu-build-system) | |
4379 | (arguments | |
4380 | `(#:phases | |
4381 | (modify-phases %standard-phases | |
4382 | (add-before 'build 'pre-build | |
4383 | ;; Don't use upstream's script - it really doesn't fit into | |
4384 | ;; Guix's functional paradigm. | |
4385 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4386 | (substitute* "Makefile" | |
4387 | (("^install: install-script") "install: ")))) | |
4388 | (add-after 'install 'post-install | |
4389 | ;; Instead, we provide our own simplified script. | |
4390 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4391 | (let ((wrapper (string-append (assoc-ref outputs "out") | |
4392 | "/bin/jacal"))) | |
4393 | (format (open wrapper (logior O_WRONLY O_CREAT)) | |
4394 | (string-append "#!~a\nexec ~a/bin/scm -ip1 " | |
4395 | "-e '(slib:load \"~a/lib/jacal/math\") " | |
4396 | "(math)' \"$@\"\n") | |
4397 | (which "bash") | |
4398 | (assoc-ref inputs "scm") | |
4399 | (assoc-ref outputs "out")) | |
4400 | (chmod wrapper #o555)))) | |
4401 | (replace 'configure | |
9cd82b1c RW |
4402 | (lambda* (#:key outputs #:allow-other-keys) |
4403 | (invoke "./configure" | |
4404 | (string-append "--prefix=" | |
4405 | (assoc-ref outputs "out")))))))) | |
479c4273 JD |
4406 | (inputs `(("scm" ,scm))) |
4407 | (native-inputs `(("unzip" ,unzip) | |
4408 | ("texinfo" ,texinfo))) | |
4409 | (synopsis "Symbolic mathematics system") | |
4410 | (description "GNU JACAL is an interactive symbolic mathematics program based on | |
4411 | Scheme. It manipulate and simplify a range of mathematical expressions such | |
4412 | as equations, scalars, vectors, and matrices.") | |
6fd52309 | 4413 | (home-page "https://www.gnu.org/software/jacal/") |
479c4273 JD |
4414 | (license license:gpl3+))) |
4415 | ||
313844d9 TF |
4416 | (define-public z3 |
4417 | (package | |
4418 | (name "z3") | |
0fe654eb | 4419 | (version "4.8.8") |
fb525bfd | 4420 | (home-page "https://github.com/Z3Prover/z3") |
313844d9 | 4421 | (source (origin |
fb525bfd MB |
4422 | (method git-fetch) |
4423 | (uri (git-reference (url home-page) | |
4424 | (commit (string-append "z3-" version)))) | |
2d7b99b3 | 4425 | (file-name (git-file-name name version)) |
313844d9 TF |
4426 | (sha256 |
4427 | (base32 | |
0fe654eb | 4428 | "1rn538ghqwxq0v8i6578j8mflk6fyv0cp4hjfqynzvinjbps56da")))) |
fa574a6d | 4429 | (build-system gnu-build-system) |
313844d9 | 4430 | (arguments |
f6b4d395 JK |
4431 | `(#:imported-modules ((guix build python-build-system) |
4432 | ,@%gnu-build-system-modules) | |
4433 | #:modules (((guix build python-build-system) #:select (site-packages)) | |
4434 | (guix build gnu-build-system) | |
4435 | (guix build utils)) | |
4436 | #:phases | |
313844d9 | 4437 | (modify-phases %standard-phases |
8b87d095 JK |
4438 | (add-after 'unpack 'enable-bytecode-determinism |
4439 | (lambda _ | |
4440 | (setenv "PYTHONHASHSEED" "0") | |
4441 | #t)) | |
ad6c6a5b EF |
4442 | (add-after 'unpack 'fix-compatability |
4443 | ;; Versions after 4.8.3 have immintrin.h IFDEFed for Windows only. | |
4444 | (lambda _ | |
4445 | (substitute* "src/util/mpz.cpp" | |
4446 | (("#include <immintrin.h>") "")) | |
4447 | #t)) | |
cf684d87 TF |
4448 | (add-before 'configure 'bootstrap |
4449 | (lambda _ | |
32d5360f | 4450 | (invoke "python" "scripts/mk_make.py"))) |
fa574a6d AB |
4451 | ;; work around gnu-build-system's setting --enable-fast-install |
4452 | ;; (z3's `configure' is a wrapper around the above python file, | |
4453 | ;; which fails when passed --enable-fast-install) | |
4454 | (replace 'configure | |
4455 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4456 | (invoke "./configure" | |
f6b4d395 JK |
4457 | "--python" |
4458 | (string-append "--prefix=" (assoc-ref outputs "out")) | |
4459 | (string-append "--pypkgdir=" (site-packages inputs outputs))))) | |
fa574a6d AB |
4460 | (add-after 'configure 'change-directory |
4461 | (lambda _ | |
4462 | (chdir "build") | |
4463 | #t)) | |
cf684d87 | 4464 | (add-before 'check 'make-test-z3 |
313844d9 | 4465 | (lambda _ |
cf684d87 | 4466 | ;; Build the test suite executable. |
32d5360f RW |
4467 | (invoke "make" "test-z3" "-j" |
4468 | (number->string (parallel-job-count))))) | |
cf684d87 TF |
4469 | (replace 'check |
4470 | (lambda _ | |
4471 | ;; Run all the tests that don't require arguments. | |
32d5360f | 4472 | (invoke "./test-z3" "/a")))))) |
313844d9 | 4473 | (native-inputs |
fa574a6d AB |
4474 | `(("which" ,which) |
4475 | ("python" ,python-wrapper))) | |
313844d9 TF |
4476 | (synopsis "Theorem prover") |
4477 | (description "Z3 is a theorem prover and @dfn{satisfiability modulo | |
cf684d87 | 4478 | theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.") |
313844d9 | 4479 | (license license:expat))) |
3d5d87a3 | 4480 | |
6d433d6e EB |
4481 | (define-public elpa |
4482 | (package | |
4483 | (name "elpa") | |
4484 | (version "2018.11.001") | |
4485 | (source (origin | |
4486 | (method url-fetch) | |
4487 | (uri (string-append "http://elpa.mpcdf.mpg.de/html/Releases/" | |
4488 | version "/elpa-" version ".tar.gz")) | |
4489 | (sha256 | |
4490 | (base32 | |
4491 | "05hv3v5i6xmziaizw350ff72y1c3k662r85fm3xfdrkclj5zw9yc")))) | |
4492 | (build-system gnu-build-system) | |
4493 | (native-inputs | |
4494 | `(("fortran" ,gfortran) | |
4495 | ("perl" ,perl))) ;for configure and deps | |
4496 | (inputs | |
4497 | `(("blas" ,openblas))) | |
4498 | (arguments | |
4499 | `(#:configure-flags | |
4500 | `("--enable-openmp" | |
4501 | "--with-mpi=no" | |
4502 | ;; ELPA unfortunately does not support runtime dispatch, so we can | |
4503 | ;; only enable the "generic" kernels. See the "Cross compilation" | |
4504 | ;; section of INSTALL.md. | |
4505 | "--enable-generic" | |
4506 | "--disable-sse" "--disable-sse-assembly" ;Require SSE3 | |
4507 | "--disable-avx" "--disable-avx2" "--disable-avx512" | |
4508 | ,(string-append "CFLAGS=-O3 " | |
4509 | "-funsafe-loop-optimizations -funsafe-math-optimizations " | |
4510 | "-ftree-vect-loop-version -ftree-vectorize " | |
4511 | ,(let ((system (or (%current-target-system) | |
4512 | (%current-system)))) | |
4513 | (cond | |
4514 | ((or (string-prefix? "x86_64" system) | |
4515 | (string-prefix? "i686" system)) | |
4516 | "-msse2") | |
4517 | (else ""))))) | |
4518 | #:parallel-tests? #f ;tests are multi-threaded, via BLAS | |
4519 | #:phases | |
4520 | (modify-phases %standard-phases | |
4521 | (add-before 'configure 'patch-header-generation | |
4522 | (lambda _ | |
4523 | (substitute* "configure" | |
4524 | (("^ *make.*top_srcdir=\"\\$srcdir\"" &) | |
4525 | (string-append & " CPP=\"$CPP\""))) | |
4526 | #t)) | |
4527 | (add-before 'check 'setup-tests | |
4528 | (lambda _ | |
4529 | ;; Decrease test time and RAM use by computing fewer eigenvalues. | |
4530 | ;; The flags are (MATRIX-SIZE, EIGENVALUES, BLOCK-SIZE), where | |
4531 | ;; the default is (500, 250, 16) for C tests and (5000, 150, 16) | |
4532 | ;; for Fortran. This also causes several tests to pass that | |
4533 | ;; otherwise would otherwise fail with matrix size 5000; possibly | |
4534 | ;; due to floating point tolerances that are too tight. | |
4535 | (setenv "TEST_FLAGS" "1500 50 16") ;from elpa.spec | |
4536 | (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count))) | |
4537 | (substitute* "Makefile" | |
4538 | ;; Test scripts are generated, patch the shebang | |
4539 | (("#!/bin/bash") (string-append "#!" (which "sh")))) | |
4540 | #t))))) | |
4541 | (home-page "http://elpa.mpcdf.mpg.de") | |
4542 | (synopsis "Eigenvalue solvers for symmetric matrices") | |
4543 | (description | |
4544 | "The ELPA library provides efficient and scalable direct eigensolvers for | |
4545 | symmetric matrices.") | |
4546 | (license license:lgpl3))) | |
4547 | ||
4548 | (define-public elpa-openmpi | |
4549 | (package (inherit elpa) | |
4550 | (name "elpa-openmpi") | |
4551 | (inputs | |
4552 | `(("mpi" ,openmpi) | |
4553 | ("scalapack" ,scalapack) | |
4554 | ,@(package-inputs elpa))) | |
4555 | (arguments | |
4556 | (substitute-keyword-arguments (package-arguments elpa) | |
4557 | ((#:configure-flags cf '()) | |
4558 | `(cons "--with-mpi=yes" (delete "--with-mpi=no" ,cf))) | |
4559 | ((#:phases phases '%standard-phases) | |
4560 | `(modify-phases ,phases | |
4561 | (add-before 'check 'mpi-setup | |
4562 | (lambda _ | |
4563 | ;; Tests use 2 mpi tasks by default, use our remaining build | |
4564 | ;; cores as OpenMP threads. | |
4565 | (setenv "OMP_NUM_THREADS" (number->string | |
4566 | (max (quotient (parallel-job-count) 2) | |
4567 | 1))) | |
4568 | (,%openmpi-setup))))))) | |
4569 | (synopsis "Eigenvalue solvers for symmetric matrices (with MPI support)"))) | |
4570 | ||
e01397b4 EB |
4571 | (define-public elemental |
4572 | (package | |
4573 | (name "elemental") | |
4574 | (version "0.87.7") | |
4575 | (source (origin | |
5c0b6d1b EF |
4576 | (method git-fetch) |
4577 | (uri (git-reference | |
4578 | (url "https://github.com/elemental/Elemental.git") | |
4579 | (commit (string-append "v" version)))) | |
4580 | (file-name (git-file-name name version)) | |
e01397b4 EB |
4581 | (sha256 |
4582 | (base32 | |
5c0b6d1b | 4583 | "1687xpjjzig27y2pnqv7hv09smpijyfdpz7qjgmcxf4shfajlfkc")))) |
e01397b4 | 4584 | (build-system cmake-build-system) |
1e05e837 | 4585 | (home-page "https://github.com/elemental/Elemental") |
e01397b4 EB |
4586 | (native-inputs |
4587 | `(("gfortran" ,gfortran))) | |
4588 | (inputs | |
4589 | `(("blas" ,openblas) | |
4590 | ("gfortran:lib" ,gfortran "lib") | |
4591 | ("gmp" ,gmp) | |
4592 | ("lapack" ,lapack) | |
4593 | ("metis" ,metis) | |
4594 | ("mpc" ,mpc) | |
4595 | ("mpfr" ,mpfr) | |
4596 | ("mpi" ,openmpi) | |
4597 | ("qd" ,qd))) | |
4598 | (arguments | |
4599 | `(#:build-type "Release" ;default RelWithDebInfo not supported | |
4600 | #:configure-flags `("-DEL_DISABLE_PARMETIS:BOOL=YES" | |
4601 | "-DEL_AVOID_COMPLEX_MPI:BOOL=NO" | |
4602 | "-DEL_CACHE_WARNINGS:BOOL=YES" | |
4603 | "-DEL_TESTS:BOOL=YES" | |
4604 | "-DCMAKE_INSTALL_LIBDIR=lib" | |
4605 | "-DGFORTRAN_LIB=gfortran") | |
4606 | #:phases (modify-phases %standard-phases | |
3b42e2be EF |
4607 | (add-before 'check 'mpi-setup |
4608 | ,%openmpi-setup) | |
e01397b4 EB |
4609 | (add-before 'check 'setup-tests |
4610 | (lambda _ | |
4611 | ;; Parallelism is done at the MPI layer. | |
4612 | (setenv "OMP_NUM_THREADS" "1") | |
4613 | #t)) | |
4614 | (add-after 'install 'remove-tests | |
4615 | (lambda* (#:key outputs #:allow-other-keys) | |
4616 | ;; Tests are installed, with no easy configuration | |
4617 | ;; switch to prevent this, so delete them. | |
4618 | (delete-file-recursively | |
3b42e2be | 4619 | (string-append (assoc-ref outputs "out") "/bin")) |
e01397b4 EB |
4620 | #t))))) |
4621 | (synopsis "Dense and sparse-direct linear algebra and optimization") | |
4622 | (description "Elemental is a modern C++ library for distributed-memory | |
4623 | dense and sparse-direct linear algebra, conic optimization, and lattice | |
4624 | reduction.") | |
4625 | (license license:bsd-2))) | |
5b05dce7 JN |
4626 | |
4627 | (define-public mcrl2 | |
4628 | (package | |
4629 | (name "mcrl2") | |
3bc74090 | 4630 | (version "201908.0") |
5b05dce7 JN |
4631 | (source (origin |
4632 | (method url-fetch) | |
185152e3 JN |
4633 | (uri (string-append |
4634 | "https://www.mcrl2.org/download/release/mcrl2-" | |
4635 | version ".tar.gz")) | |
5b05dce7 JN |
4636 | (sha256 |
4637 | (base32 | |
3bc74090 | 4638 | "1i4xgl2d5fgiz1mwi50cyfkrrcpm8nxfayfjgmhq7chs58wlhfsz")))) |
5b05dce7 JN |
4639 | (inputs |
4640 | `(("boost" ,boost) | |
4641 | ("glu" ,glu) | |
4642 | ("mesa" ,mesa) | |
077d66ed | 4643 | ("qtbase" ,qtbase))) |
5b05dce7 | 4644 | (build-system cmake-build-system) |
ed0c5d3c | 4645 | (synopsis "Toolset for the mCRL2 formal specification language") |
5b05dce7 | 4646 | (description |
ed0c5d3c TGR |
4647 | "@dfn{mCRL2} (micro Common Representation Language 2) is a formal |
4648 | specification language for describing concurrent discrete event systems. Its | |
4649 | toolset supports analysis and automatic verification, linearisation, simulation, | |
4650 | state-space exploration and generation, and tools to optimise and analyse | |
5b05dce7 JN |
4651 | specifications. Also, state spaces can be manipulated, visualised and |
4652 | analysed.") | |
b3882709 | 4653 | (home-page "https://mcrl2.org") |
5b05dce7 | 4654 | (license license:boost1.0))) |
41835f94 | 4655 | |
e03b9126 JN |
4656 | (define-public mcrl2-minimal |
4657 | (package | |
4658 | (inherit mcrl2) | |
4659 | (name "mcrl2-minimal") | |
4660 | (inputs | |
4661 | `(("boost" ,boost))) | |
4662 | (arguments | |
4663 | '(#:configure-flags '("-DMCRL2_ENABLE_GUI_TOOLS=OFF"))))) | |
4664 | ||
910deec6 NV |
4665 | (define-public tcalc |
4666 | (package | |
4667 | (name "tcalc") | |
4668 | (version "2.0") | |
4669 | (source | |
4670 | (origin | |
4671 | (method url-fetch) | |
4672 | (uri (string-append "https://sites.google.com/site/mohammedisam2000/tcalc/tcalc-" | |
4673 | version ".tar.gz")) | |
4674 | (sha256 | |
4675 | (base32 | |
4676 | "0jq806m4dqfia85nppfm75mml9w57g0cgv4cdw9bp3zymda83s0m")))) | |
4677 | (build-system gnu-build-system) | |
4678 | (synopsis "The terminal calculator") | |
4679 | (description | |
4680 | "The terminal calculator is a small program to help users of the GNU/Linux | |
4681 | terminal do calculations simply and quickly. The formula to be calculated can | |
4682 | be fed to @command{tcalc} through the command line.") | |
4683 | (home-page "https://sites.google.com/site/mohammedisam2000/tcalc") | |
4684 | (license license:gpl3+))) | |
b26e4f26 EB |
4685 | |
4686 | (define-public sundials | |
4687 | (package | |
4688 | (name "sundials") | |
4689 | (version "3.1.1") | |
4690 | (source | |
4691 | (origin | |
4692 | (method url-fetch) | |
4693 | (uri (string-append "https://computation.llnl.gov/projects/sundials/download/" | |
4694 | "sundials-" version ".tar.gz")) | |
4695 | (sha256 | |
4696 | (base32 | |
4697 | "090s8ymhd0g1s1d44fa73r5yi32hb4biwahhbfi327zd64yn8kd2")))) | |
4698 | (build-system cmake-build-system) | |
4699 | (native-inputs | |
4700 | `(("python" ,python-2))) ;for tests; syntax incompatible with python 3 | |
4701 | (inputs | |
4702 | `(("fortran" ,gfortran) ;for fcmix | |
4703 | ("blas" ,openblas) | |
4704 | ("suitesparse" ,suitesparse))) ;TODO: Add hypre | |
4705 | (arguments | |
4706 | `(#:configure-flags `("-DEXAMPLES_ENABLE_C:BOOL=ON" | |
4707 | "-DEXAMPLES_ENABLE_CXX:BOOL=ON" | |
4708 | "-DEXAMPLES_ENABLE_F77:BOOL=ON" | |
4709 | "-DEXAMPLES_ENABLE_F90:BOOL=ON" | |
4710 | "-DEXAMPLES_INSTALL:BOOL=OFF" | |
4711 | ||
4712 | "-DFCMIX_ENABLE:BOOL=ON" | |
4713 | ||
4714 | "-DKLU_ENABLE:BOOL=ON" | |
4715 | ,(string-append "-DKLU_INCLUDE_DIR=" | |
4716 | (assoc-ref %build-inputs "suitesparse") | |
4717 | "/include") | |
4718 | ,(string-append "-DKLU_LIBRARY_DIR=" | |
4719 | (assoc-ref %build-inputs "suitesparse") | |
4720 | "/lib")))) | |
4721 | (home-page "https://computation.llnl.gov/projects/sundials") | |
4722 | (synopsis "Suite of nonlinear and differential/algebraic equation solvers") | |
4723 | (description "SUNDIALS is a family of software packages implemented with | |
4724 | the goal of providing robust time integrators and nonlinear solvers that can | |
4725 | easily be incorporated into existing simulation codes.") | |
4726 | (license license:bsd-3))) | |
4727 | ||
4728 | (define-public sundials-openmpi | |
4729 | (package (inherit sundials) | |
4730 | (name "sundials-openmpi") | |
4731 | (inputs | |
4732 | `(("mpi" ,openmpi) | |
4733 | ("petsc" ,petsc-openmpi) ;support in SUNDIALS requires MPI | |
4734 | ,@(package-inputs sundials))) | |
4735 | (arguments | |
4736 | (substitute-keyword-arguments (package-arguments sundials) | |
4737 | ((#:configure-flags flags '()) | |
4738 | `(cons* "-DMPI_ENABLE:BOOL=ON" | |
4739 | "-DPETSC_ENABLE:BOOL=ON" | |
4740 | (string-append "-DPETSC_INCLUDE_DIR=" | |
4741 | (assoc-ref %build-inputs "petsc") | |
4742 | "/include") | |
4743 | (string-append "-DPETSC_LIBRARY_DIR=" | |
4744 | (assoc-ref %build-inputs "petsc") | |
4745 | "/lib") | |
4746 | ,flags)) | |
4747 | ((#:phases phases '%standard-phases) | |
4748 | `(modify-phases ,phases | |
bbe46a4a EB |
4749 | (add-before 'check 'mpi-setup |
4750 | ,%openmpi-setup))))) | |
b26e4f26 | 4751 | (synopsis "SUNDIALS with OpenMPI support"))) |
a6b9ebc2 EB |
4752 | |
4753 | (define-public combinatorial-blas | |
4754 | (package | |
4755 | (name "combinatorial-blas") | |
4756 | (version "1.6.2") | |
4757 | (source | |
4758 | (origin | |
4759 | (method url-fetch) | |
4760 | (uri (string-append "http://eecs.berkeley.edu/~aydin/CombBLAS_FILES/" | |
4761 | "CombBLAS_beta_" | |
4762 | (match (string-split version #\.) | |
4763 | ((major minor patch) | |
4764 | (string-append major minor "_" patch))) ;e.g. "16_2" | |
4765 | ".tgz")) | |
4766 | (sha256 | |
4767 | (base32 | |
4768 | "1a9wbgdqyy1whhfc0yl0yqkax3amnqa6iihhq48d063gc0jwfd9a")) | |
4769 | (patches (search-patches "combinatorial-blas-awpm.patch" | |
4770 | "combinatorial-blas-io-fix.patch")))) | |
4771 | (build-system cmake-build-system) | |
4772 | (inputs | |
4773 | `(("mpi" ,openmpi) | |
4774 | ("test-data" ,(origin | |
4775 | (method url-fetch) | |
4776 | (uri (string-append "https://people.eecs.berkeley.edu/~aydin/" | |
4777 | "CombBLAS_FILES/testdata_combblas1.6.1.tgz")) | |
4778 | (sha256 | |
4779 | (base32 | |
4780 | "01y2781cy3fww7znmidrp85mf8zx0c905w5vzvk1mgrmhhynim87")))))) | |
4781 | (arguments | |
4782 | `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES" | |
4783 | "-DCMAKE_CXX_FLAGS=-DUSE_FUNNEL") | |
4784 | #:parallel-tests? #f ;tests use 'mpiexec -n4' | |
4785 | #:phases | |
4786 | (modify-phases %standard-phases | |
4787 | (add-before 'check 'mpi-setup | |
4788 | ,%openmpi-setup) | |
4789 | (add-before 'check 'test-setup | |
4790 | (lambda* (#:key inputs #:allow-other-keys) | |
4791 | (setenv "OMP_NUM_THREADS" "2") | |
4792 | (invoke "tar" "xf" (assoc-ref inputs "test-data"))))))) | |
4793 | (home-page "https://people.eecs.berkeley.edu/~aydin/CombBLAS/html/") | |
4794 | (synopsis "Linear algebra primitives for graph analytics") | |
4795 | (description "The Combinatorial BLAS (CombBLAS) is an extensible | |
4796 | distributed-memory parallel graph library offering a small but powerful set of | |
4797 | linear algebra primitives specifically targeting graph analytics.") | |
4798 | (license (list | |
4799 | license:gpl2+ ;include/psort/(funnel|sort)*.h | |
4800 | license:x11 ;usort and psort | |
4801 | license:bsd-3)))) ;CombBLAS and MersenneTwister.h | |
3847d1f2 RW |
4802 | |
4803 | (define-public dune-common | |
4804 | (package | |
4805 | (name "dune-common") | |
6ca2d7da | 4806 | (version "2.7.0") |
3847d1f2 RW |
4807 | (source |
4808 | (origin | |
4809 | (method url-fetch) | |
4810 | (uri (string-append "https://dune-project.org/download/" | |
4811 | version "/dune-common-" version ".tar.gz")) | |
4812 | (sha256 | |
4813 | (base32 | |
6ca2d7da | 4814 | "140q1zh44cr5yrjwg4b5ga803rkqv55vk30l2cqm29aklj1wb0rw")))) |
3847d1f2 RW |
4815 | (build-system cmake-build-system) |
4816 | (arguments | |
4817 | `(#:phases | |
4818 | (modify-phases %standard-phases | |
4819 | (add-after 'build 'build-tests | |
4820 | (lambda* (#:key make-flags #:allow-other-keys) | |
393dc1cc | 4821 | (apply invoke "make" "build_tests" make-flags)))))) |
3847d1f2 RW |
4822 | (inputs |
4823 | `(("gmp" ,gmp) | |
4824 | ("metis" ,metis) | |
3847d1f2 RW |
4825 | ("openblas" ,openblas) |
4826 | ("python" ,python) | |
4827 | ("superlu" ,superlu))) | |
4828 | (native-inputs | |
4829 | `(("gfortran" ,gfortran) | |
4830 | ("pkg-config" ,pkg-config))) | |
4831 | (home-page "https://dune-project.org/") | |
4832 | (synopsis "Distributed and Unified Numerics Environment") | |
4833 | (description "DUNE, the Distributed and Unified Numerics Environment is a | |
4834 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with | |
4835 | grid-based methods. It supports the easy implementation of methods like | |
4836 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite | |
4837 | Differences} (FD).") | |
4838 | ;; GPL version 2 with "runtime exception" to make it behave like LGPLv2. | |
4839 | (license license:gpl2))) | |
242dbd8e RW |
4840 | |
4841 | (define-public dune-geometry | |
4842 | (package | |
4843 | (name "dune-geometry") | |
6ca2d7da | 4844 | (version "2.7.0") |
242dbd8e RW |
4845 | (source |
4846 | (origin | |
4847 | (method url-fetch) | |
4848 | (uri (string-append "https://dune-project.org/download/" | |
4849 | version "/dune-geometry-" version ".tar.gz")) | |
4850 | (sha256 | |
4851 | (base32 | |
6ca2d7da | 4852 | "1cicvlwbyyw76npicnblxckyvhbfn3ip8isydiv3hlrlz8zcg5nr")))) |
242dbd8e RW |
4853 | (build-system cmake-build-system) |
4854 | (arguments | |
4855 | `(#:phases | |
4856 | (modify-phases %standard-phases | |
4857 | (add-after 'build 'build-tests | |
4858 | (lambda* (#:key make-flags #:allow-other-keys) | |
4859 | (apply invoke "make" "build_tests" make-flags)))))) | |
4860 | (inputs | |
4861 | `(("dune-common" ,dune-common) | |
242dbd8e RW |
4862 | ;; Optional |
4863 | ("openblas" ,openblas) | |
4864 | ("gmp" ,gmp) | |
4865 | ("python" ,python))) | |
4866 | (native-inputs | |
4867 | `(("gfortran" ,gfortran) | |
4868 | ("pkg-config" ,pkg-config))) | |
4869 | (home-page "https://dune-project.org/") | |
4870 | (synopsis "Distributed and Unified Numerics Environment") | |
4871 | (description "DUNE, the Distributed and Unified Numerics Environment is a | |
4872 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with | |
4873 | grid-based methods. It supports the easy implementation of methods like | |
4874 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite | |
4875 | Differences} (FD). | |
4876 | ||
4877 | This package contains the basic DUNE geometry classes.") | |
4878 | ;; GPL version 2 with "runtime exception" | |
4879 | (license license:gpl2))) | |
ef6e69fd | 4880 | |
07ebb75d FG |
4881 | (define-public dune-uggrid |
4882 | (package | |
4883 | (name "dune-uggrid") | |
6ca2d7da | 4884 | (version "2.7.0") |
07ebb75d FG |
4885 | (source |
4886 | (origin | |
6ca2d7da FG |
4887 | (method git-fetch) |
4888 | (uri (git-reference | |
4889 | (url "https://gitlab.dune-project.org/staging/dune-uggrid.git") | |
4890 | (commit (string-append "v" version)))) | |
4891 | (file-name (git-file-name name version)) | |
07ebb75d FG |
4892 | (sha256 |
4893 | (base32 | |
6ca2d7da | 4894 | "192miqgmfj6jwk969gydzpbv9ki7jg5nky3ydnrwa2nq29b5xkh0")))) |
07ebb75d FG |
4895 | (build-system cmake-build-system) |
4896 | (arguments | |
4897 | `(#:phases | |
4898 | (modify-phases %standard-phases | |
4899 | (add-after 'build 'build-tests | |
4900 | (lambda* (#:key make-flags #:allow-other-keys) | |
4901 | (apply invoke "make" "build_tests" make-flags)))))) | |
4902 | (inputs | |
393dc1cc | 4903 | `(("dune-common" ,dune-common))) |
07ebb75d FG |
4904 | (native-inputs |
4905 | `(("gfortran" ,gfortran) | |
4906 | ("pkg-config" ,pkg-config))) | |
4907 | (home-page "https://dune-project.org/") | |
4908 | (synopsis "Distributed and Unified Numerics Environment") | |
4909 | (description "DUNE, the Distributed and Unified Numerics Environment is a | |
4910 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with | |
4911 | grid-based methods. It supports the easy implementation of methods like | |
4912 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite | |
4913 | Differences} (FD). | |
4914 | ||
4915 | This package contains the DUNE UG grid classes.") | |
4916 | (license license:lgpl2.1))) | |
4917 | ||
ef6e69fd RW |
4918 | (define-public dune-grid |
4919 | (package | |
4920 | (name "dune-grid") | |
6ca2d7da | 4921 | (version "2.7.0") |
ef6e69fd RW |
4922 | (source |
4923 | (origin | |
4924 | (method url-fetch) | |
4925 | (uri (string-append "https://dune-project.org/download/" | |
4926 | version "/dune-grid-" version ".tar.gz")) | |
4927 | (sha256 | |
4928 | (base32 | |
6ca2d7da | 4929 | "17fjz30qazjgl11sryyxnw9klai4yz1ji4bs68013xcxc5hdv27s")))) |
ef6e69fd RW |
4930 | (build-system cmake-build-system) |
4931 | (arguments | |
4932 | `(#:phases | |
4933 | (modify-phases %standard-phases | |
4934 | (add-after 'build 'build-tests | |
4935 | (lambda* (#:key make-flags #:allow-other-keys) | |
393dc1cc | 4936 | (apply invoke "make" "build_tests" make-flags)))))) |
ef6e69fd RW |
4937 | (inputs |
4938 | `(("dune-common" ,dune-common) | |
4939 | ("dune-geometry" ,dune-geometry) | |
4940 | ("gmp" ,gmp) | |
4941 | ("metis" ,metis) | |
4942 | ("openblas" ,openblas) | |
ef6e69fd | 4943 | ("python" ,python))) |
07ebb75d FG |
4944 | (propagated-inputs |
4945 | `(("dune-uggrid" ,dune-uggrid))) | |
ef6e69fd RW |
4946 | (native-inputs |
4947 | `(("gfortran" ,gfortran) | |
4948 | ("pkg-config" ,pkg-config))) | |
4949 | (home-page "https://dune-project.org/") | |
4950 | (synopsis "Distributed and Unified Numerics Environment") | |
4951 | (description "DUNE, the Distributed and Unified Numerics Environment is a | |
4952 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with | |
4953 | grid-based methods. It supports the easy implementation of methods like | |
4954 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite | |
4955 | Differences} (FD). | |
4956 | ||
4957 | This package contains the basic DUNE grid classes.") | |
4958 | ;; GPL version 2 with "runtime exception" | |
4959 | (license license:gpl2))) | |
ea51d357 RW |
4960 | |
4961 | (define-public dune-istl | |
4962 | (package | |
4963 | (name "dune-istl") | |
6ca2d7da | 4964 | (version "2.7.0") |
ea51d357 RW |
4965 | (source |
4966 | (origin | |
4967 | (method url-fetch) | |
4968 | (uri (string-append "https://dune-project.org/download/" | |
4969 | version "/dune-istl-" version ".tar.gz")) | |
4970 | (sha256 | |
4971 | (base32 | |
6ca2d7da FG |
4972 | "0gl3wgz5rs6sb4m83440ny45sbx7z7lnbi3gx6r9nm3rvy5j33f9")) |
4973 | (patches (search-patches "dune-istl-2.7-fix-non-mpi-tests.patch")))) | |
ea51d357 RW |
4974 | (build-system cmake-build-system) |
4975 | (arguments | |
4976 | `(#:phases | |
4977 | (modify-phases %standard-phases | |
f7cbf403 MB |
4978 | ;; XXX: istl/test/matrixtest.cc includes <fenv.h> and fails to find |
4979 | ;; the stdlib types when the gfortran header is used. Remove gfortran | |
4980 | ;; from CPLUS_INCLUDE_PATH as a workaround. | |
4981 | (add-after 'set-paths 'hide-gfortran | |
4982 | (lambda* (#:key inputs #:allow-other-keys) | |
4983 | (let ((gfortran (assoc-ref inputs "gfortran"))) | |
4984 | (setenv "CPLUS_INCLUDE_PATH" | |
4985 | (string-join | |
4986 | (delete (string-append gfortran "/include/c++") | |
4987 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) | |
4988 | ":")) | |
4989 | #t))) | |
ea51d357 RW |
4990 | (add-after 'build 'build-tests |
4991 | (lambda* (#:key make-flags #:allow-other-keys) | |
393dc1cc | 4992 | (apply invoke "make" "build_tests" make-flags)))))) |
ea51d357 RW |
4993 | (inputs |
4994 | `(("dune-common" ,dune-common) | |
ea51d357 RW |
4995 | ;; Optional |
4996 | ("metis" ,metis) | |
0a703c04 | 4997 | ("suitesparse" ,suitesparse) |
ea51d357 RW |
4998 | ("superlu" ,superlu) |
4999 | ("openblas" ,openblas) | |
5000 | ("gmp" ,gmp) | |
5001 | ("python" ,python))) | |
5002 | (native-inputs | |
5003 | `(("gfortran" ,gfortran) | |
5004 | ("pkg-config" ,pkg-config))) | |
5005 | (home-page "https://dune-project.org/") | |
5006 | (synopsis "Distributed and Unified Numerics Environment") | |
5007 | (description "DUNE, the Distributed and Unified Numerics Environment is a | |
5008 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with | |
5009 | grid-based methods. | |
5010 | ||
5011 | This is the iterative solver template library which provides generic sparse | |
5012 | matrix/vector classes and a variety of solvers based on these classes. A | |
5013 | special feature is the use of templates to exploit the recursive block | |
5014 | structure of finite element matrices at compile time. Available solvers | |
5015 | include Krylov methods, (block-) incomplete decompositions and | |
5016 | aggregation-based algebraic multigrid.") | |
5017 | ;; GPL version 2 with "runtime exception" | |
5018 | (license license:gpl2))) | |
5a70aa7d RW |
5019 | |
5020 | (define-public dune-localfunctions | |
5021 | (package | |
5022 | (name "dune-localfunctions") | |
6ca2d7da | 5023 | (version "2.7.0") |
5a70aa7d RW |
5024 | (source |
5025 | (origin | |
5026 | (method url-fetch) | |
5027 | (uri (string-append "https://dune-project.org/download/" | |
5028 | version "/dune-localfunctions-" version ".tar.gz")) | |
5029 | (sha256 | |
5030 | (base32 | |
6ca2d7da | 5031 | "1yih59h6vngii696bx1c2vil02lriij4kz0nc583mjn9kiaqxfqd")))) |
5a70aa7d RW |
5032 | (build-system cmake-build-system) |
5033 | (arguments | |
5034 | `(#:phases | |
5035 | (modify-phases %standard-phases | |
109bf6a0 MB |
5036 | ;; XXX: localfunctions/test/lagrangeshapefunctiontest.cc includes <fenv.h> |
5037 | ;; and fails to find the stdlib types when the gfortran header is used. | |
5038 | ;; Hide gfortran from CPLUS_INCLUDE_PATH to ensure we get the GCC header. | |
5039 | (add-after 'set-paths 'hide-gfortran | |
5040 | (lambda* (#:key inputs #:allow-other-keys) | |
5041 | (let ((gfortran (assoc-ref inputs "gfortran"))) | |
5042 | (setenv "CPLUS_INCLUDE_PATH" | |
5043 | (string-join | |
5044 | (delete (string-append gfortran "/include/c++") | |
5045 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) | |
5046 | ":")) | |
5047 | #t))) | |
5a70aa7d RW |
5048 | (add-after 'build 'build-tests |
5049 | (lambda* (#:key make-flags #:allow-other-keys) | |
5050 | (apply invoke "make" "build_tests" make-flags)))))) | |
5051 | (inputs | |
5052 | `(("dune-common" ,dune-common) | |
5053 | ("dune-geometry" ,dune-geometry) | |
5a70aa7d RW |
5054 | ;; Optional |
5055 | ("metis" ,metis) | |
5056 | ("superlu" ,superlu) | |
5057 | ("gmp" ,gmp))) | |
5058 | (native-inputs | |
5059 | `(("gfortran" ,gfortran) | |
5060 | ("pkg-config" ,pkg-config))) | |
5061 | (home-page "https://dune-project.org/") | |
5062 | (synopsis "Distributed and Unified Numerics Environment") ; TODO | |
5063 | (description "This DUNE module provides interface and implementation for | |
5064 | shape functions defined on the DUNE reference elements. In addition to the | |
5065 | shape function, interpolation operators and special keys are provided which | |
5066 | can be used to assemble global function spaces on finite-element grids. | |
5067 | ||
5068 | This package provides an interface and implementation for shape functions | |
5069 | defined on the DUNE reference elements. In addition to the shape function, | |
5070 | interpolation operators and special keys are provided which can be used to | |
5071 | assemble global function spaces on finite-element grids.") | |
5072 | ;; GPL version 2 with "runtime exception" | |
5073 | (license license:gpl2))) | |
ab03d899 RW |
5074 | |
5075 | (define-public dune-alugrid | |
5076 | (package | |
5077 | (name "dune-alugrid") | |
6ca2d7da | 5078 | (version "2.7.0-git-81d35682") |
ab03d899 RW |
5079 | (source |
5080 | (origin | |
6ca2d7da FG |
5081 | (method git-fetch) |
5082 | (uri (git-reference | |
5083 | (url "https://gitlab.dune-project.org/extensions/dune-alugrid.git") | |
5084 | (commit "81d356827c84454b971937db02c02b90bbcd7fe5"))) | |
5085 | (file-name (git-file-name name version)) | |
ab03d899 RW |
5086 | (sha256 |
5087 | (base32 | |
6ca2d7da | 5088 | "0z54lwfp53prcrs94k8gwh047l9z642jll3l56xlyfr69z0b2zz1")))) |
ab03d899 RW |
5089 | (build-system cmake-build-system) |
5090 | (arguments | |
a669f6e2 | 5091 | `(#:phases |
ab03d899 RW |
5092 | (modify-phases %standard-phases |
5093 | (add-after 'unpack 'patch-include | |
5094 | (lambda _ | |
5095 | (substitute* "dune/alugrid/test/test-alugrid.cc" | |
5096 | (("doc/grids/gridfactory/testgrids") | |
5097 | "doc/dune-grid/grids/gridfactory/testgrids")) | |
5098 | #t)) | |
5099 | (add-after 'build 'build-tests | |
5100 | (lambda* (#:key inputs make-flags #:allow-other-keys) | |
5101 | (setenv "CPLUS_INCLUDE_PATH" | |
97149c57 | 5102 | (string-append (assoc-ref inputs "dune-grid") "/share")) |
393dc1cc | 5103 | (apply invoke "make" "build_tests" make-flags)))))) |
ab03d899 RW |
5104 | (inputs |
5105 | `(("dune-common" ,dune-common) | |
5106 | ("dune-geometry" ,dune-geometry) | |
5107 | ("dune-grid" ,dune-grid) | |
ab03d899 RW |
5108 | ;; Optional |
5109 | ("metis" ,metis) | |
5110 | ("openblas" ,openblas) | |
5111 | ("python" ,python) | |
5112 | ("superlu" ,superlu) | |
5113 | ("gmp" ,gmp) | |
5114 | ("zlib" ,zlib))) | |
5115 | (native-inputs | |
5116 | `(("gfortran" ,gfortran) | |
5117 | ("pkg-config" ,pkg-config))) | |
5118 | (home-page "https://dune-project.org/") | |
5119 | (synopsis "Distributed and Unified Numerics Environment") | |
5120 | (description "ALUGrid is an adaptive, loadbalancing, unstructured | |
5121 | implementation of the DUNE grid interface supporting either simplices or | |
5122 | cubes.") | |
5123 | (license license:gpl2+))) | |
0e50630f | 5124 | |
f1f9466e FG |
5125 | (define-public dune-subgrid |
5126 | (package | |
5127 | (name "dune-subgrid") | |
6ca2d7da | 5128 | (version "2.7.0-git-2103a363") |
f1f9466e FG |
5129 | (source |
5130 | (origin | |
5131 | (method git-fetch) | |
5132 | (uri (git-reference | |
5133 | (url "https://git.imp.fu-berlin.de/agnumpde/dune-subgrid") | |
6ca2d7da | 5134 | (commit "2103a363f32e8d7b60e66eee7ddecf969f6cf762"))) |
f1f9466e FG |
5135 | (file-name (git-file-name name version)) |
5136 | (sha256 | |
5137 | (base32 | |
6ca2d7da | 5138 | "1wsjlypd3835c3arqjkw836cxx5q67zy447wa65q634lf6f6v9ia")))) |
f1f9466e FG |
5139 | (build-system cmake-build-system) |
5140 | (arguments | |
5141 | `(#:phases | |
5142 | (modify-phases %standard-phases | |
5143 | (add-after 'build 'build-tests | |
5144 | (lambda* (#:key make-flags #:allow-other-keys) | |
393dc1cc | 5145 | (apply invoke "make" "build_tests" make-flags)))))) |
f1f9466e FG |
5146 | (inputs |
5147 | `(("dune-common" ,dune-common) | |
5148 | ("dune-geometry" ,dune-geometry) | |
5149 | ("dune-grid" ,dune-grid) | |
f1f9466e FG |
5150 | ;; Optional |
5151 | ("metis" ,metis) | |
5152 | ("openblas" ,openblas) | |
5153 | ("gmp" ,gmp))) | |
5154 | (native-inputs | |
5155 | `(("gfortran" ,gfortran) | |
5156 | ("pkg-config" ,pkg-config))) | |
5157 | (home-page "http://numerik.mi.fu-berlin.de/dune-subgrid/index.php") | |
5158 | (synopsis "Distributed and Unified Numerics Environment") | |
48b0d9c0 | 5159 | (description "The dune-subgrid module marks elements of |
f1f9466e FG |
5160 | another hierarchical dune grid. The set of marked elements can then be |
5161 | accessed as a hierarchical dune grid in its own right. Dune-Subgrid | |
5162 | provides the full grid interface including adaptive mesh refinement.") | |
5163 | (license license:gpl2+))) | |
5164 | ||
0e50630f RW |
5165 | (define-public dune-typetree |
5166 | (package | |
5167 | (name "dune-typetree") | |
6ca2d7da | 5168 | (version "2.7.0") |
0e50630f RW |
5169 | (source |
5170 | (origin | |
5171 | (method git-fetch) | |
5172 | (uri (git-reference | |
5173 | (url "https://gitlab.dune-project.org/staging/dune-typetree.git") | |
5174 | (commit (string-append "v" version)))) | |
5175 | (file-name (git-file-name name version)) | |
5176 | (sha256 | |
5177 | (base32 | |
6ca2d7da | 5178 | "1rhv25yg0q1hw50c8wlfqhgwrjl4mh62zq9v14ilwgzbfgxmpiy7")))) |
0e50630f RW |
5179 | (build-system cmake-build-system) |
5180 | (arguments | |
5181 | `(#:phases | |
5182 | (modify-phases %standard-phases | |
5183 | (add-after 'build 'build-tests | |
5184 | (lambda* (#:key make-flags #:allow-other-keys) | |
5185 | (apply invoke "make" "build_tests" make-flags)))))) | |
5186 | (inputs | |
5187 | `(("dune-common" ,dune-common) | |
0e50630f RW |
5188 | ;; Optional |
5189 | ("openblas" ,openblas) | |
5190 | ("python" ,python) | |
5191 | ("metis" ,metis) | |
5192 | ("superlu" ,superlu) | |
5193 | ("gmp" ,gmp))) | |
5194 | (native-inputs | |
5195 | `(("gfortran" ,gfortran) | |
5196 | ("pkg-config" ,pkg-config))) | |
5197 | (home-page "https://dune-project.org/") | |
5198 | (synopsis "Distributed and Unified Numerics Environment") | |
5199 | (description "TypeTree is a template library for constructing and | |
5200 | operating on statically typed trees of objects.") | |
5201 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. | |
5202 | (license (list license:lgpl3+ license:gpl2)))) | |
85b9371c RW |
5203 | |
5204 | (define-public dune-functions | |
5205 | (package | |
5206 | (name "dune-functions") | |
6ca2d7da | 5207 | (version "2.7.0") |
85b9371c RW |
5208 | (source |
5209 | (origin | |
5210 | (method git-fetch) | |
5211 | (uri (git-reference | |
5212 | (url "https://gitlab.dune-project.org/staging/dune-functions.git") | |
5213 | (commit (string-append "v" version)))) | |
5214 | (file-name (git-file-name name version)) | |
5215 | (sha256 | |
5216 | (base32 | |
6ca2d7da | 5217 | "1na4gcih0kin37ksj2xj07ds04v7zx53pjdhm1hzy55jjfqdjk8h")))) |
85b9371c | 5218 | (build-system cmake-build-system) |
07ebb75d FG |
5219 | (arguments |
5220 | `(#:phases | |
5221 | (modify-phases %standard-phases | |
5222 | (add-after 'unpack 'disable-failing-tests | |
5223 | (lambda _ | |
5224 | (setenv "ARGS" | |
5225 | ;; unable to load GMSH file in this test | |
5226 | "--exclude-regex gridviewfunctionspacebasistest") | |
5227 | #t)) | |
5228 | (add-after 'build 'build-tests | |
5229 | (lambda* (#:key make-flags #:allow-other-keys) | |
393dc1cc | 5230 | (apply invoke "make" "build_tests" make-flags)))))) |
85b9371c RW |
5231 | (inputs |
5232 | `(("dune-common" ,dune-common) | |
5233 | ("dune-istl" ,dune-istl) | |
5234 | ("dune-localfunctions" ,dune-localfunctions) | |
5235 | ("dune-grid" ,dune-grid) | |
5236 | ("dune-geometry" ,dune-geometry) | |
5237 | ("dune-typetree" ,dune-typetree) | |
85b9371c RW |
5238 | ("openblas" ,openblas) |
5239 | ("metis" ,metis) | |
5240 | ("python" ,python) | |
5241 | ("superlu" ,superlu) | |
5242 | ("gmp" ,gmp))) | |
5243 | (native-inputs | |
5244 | `(("gfortran" ,gfortran) | |
5245 | ("pkg-config" ,pkg-config))) | |
5246 | (home-page "https://dune-project.org/") | |
5247 | (synopsis "Distributed and Unified Numerics Environment") | |
5248 | (description "The dune-functions module provides an abstraction layer for | |
5249 | global finite element functions. Its two main concepts are functions | |
5250 | implemented as callable objects, and bases of finite element spaces.") | |
5251 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. | |
5252 | (license (list license:lgpl3+ license:gpl2)))) | |
4714b00e RW |
5253 | |
5254 | (define-public dune-pdelab | |
5255 | (package | |
5256 | (name "dune-pdelab") | |
6ca2d7da | 5257 | (version "2.7.0-git-476fe437") |
4714b00e RW |
5258 | (source |
5259 | (origin | |
5260 | (method git-fetch) | |
5261 | (uri (git-reference | |
5262 | (url "https://gitlab.dune-project.org/pdelab/dune-pdelab") | |
6ca2d7da | 5263 | (commit "476fe43763fa6f459c5e4658e2a2b4b5582db834"))) |
4714b00e RW |
5264 | (file-name (git-file-name name version)) |
5265 | (sha256 | |
5266 | (base32 | |
6ca2d7da | 5267 | "0cs36piqzn6rq0j2ih3ab3q3q9yg199wk72k5qi86pkzh7i7fdn1")))) |
4714b00e RW |
5268 | (build-system cmake-build-system) |
5269 | (arguments '(#:tests? #f)) ; XXX: the tests cannot be compiled | |
5270 | (inputs | |
5271 | `(("dune-common" ,dune-common) | |
5272 | ("dune-istl" ,dune-istl) | |
5273 | ("dune-localfunctions" ,dune-localfunctions) | |
5274 | ("dune-geometry" ,dune-geometry) | |
5275 | ("dune-grid" ,dune-grid) | |
5276 | ("dune-typetree" ,dune-typetree) | |
5277 | ("dune-functions" ,dune-functions) | |
4714b00e RW |
5278 | ;; Optional |
5279 | ("openblas" ,openblas) | |
5280 | ("eigen" ,eigen) | |
5281 | ("metis" ,metis) | |
5282 | ("python" ,python) | |
5283 | ("superlu" ,superlu) | |
5284 | ("gmp" ,gmp))) | |
5285 | (native-inputs | |
5286 | `(("gfortran" ,gfortran) | |
5287 | ("pkg-config" ,pkg-config))) | |
5288 | (home-page "https://dune-project.org/") | |
5289 | (synopsis "Differential equations solver toolbox") | |
5290 | (description "PDELab is a partial differential equations solver toolbox | |
5291 | built on top of DUNE, the Distributed and Unified Numerics Environment.") | |
5292 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. | |
5293 | (license (list license:lgpl3+ license:gpl2)))) | |
413f6126 | 5294 | |
6ceb7716 FG |
5295 | (define add-openmpi-to-dune-package |
5296 | (let ((dune-package? | |
5297 | (lambda (p) (string-prefix? "dune-" (package-name p))))) | |
5298 | (package-mapping | |
5299 | (lambda (p) | |
5300 | (if (dune-package? p) | |
5301 | (package (inherit p) | |
5302 | (name (string-append (package-name p) "-openmpi")) | |
5303 | (inputs `(,@(package-inputs p) | |
5304 | ("openmpi" ,openmpi))) | |
5305 | (arguments | |
5306 | (substitute-keyword-arguments (package-arguments p) | |
5307 | ((#:phases phases '%standard-phases) | |
5308 | `(modify-phases ,phases | |
5309 | (add-before 'check 'mpi-setup | |
5310 | ,%openmpi-setup))))) | |
5311 | (synopsis (string-append (package-synopsis p) " (with MPI support)"))) | |
5312 | p)) | |
5313 | (negate dune-package?)))) | |
5314 | ||
5315 | (define-public dune-common-openmpi | |
5316 | (add-openmpi-to-dune-package dune-common)) | |
5317 | ||
5318 | (define-public dune-geometry-openmpi | |
5319 | (add-openmpi-to-dune-package dune-geometry)) | |
5320 | ||
5321 | (define-public dune-istl-openmpi | |
5322 | (add-openmpi-to-dune-package dune-istl)) | |
5323 | ||
5324 | (define-public dune-typetree-openmpi | |
5325 | (add-openmpi-to-dune-package dune-typetree)) | |
5326 | ||
5327 | (define-public dune-uggrid-openmpi | |
5328 | (add-openmpi-to-dune-package dune-uggrid)) | |
5329 | ||
5330 | (define-public dune-grid-openmpi | |
5331 | (add-openmpi-to-dune-package dune-grid)) | |
5332 | ||
5333 | (define-public dune-alugrid-openmpi | |
5334 | (add-openmpi-to-dune-package dune-alugrid)) | |
5335 | ||
5336 | (define-public dune-subgrid-openmpi | |
5337 | (add-openmpi-to-dune-package dune-subgrid)) | |
5338 | ||
5339 | (define-public dune-localfunctions-openmpi | |
5340 | (add-openmpi-to-dune-package dune-localfunctions)) | |
5341 | ||
5342 | (define-public dune-functions-openmpi | |
5343 | (add-openmpi-to-dune-package dune-functions)) | |
5344 | ||
5345 | (define-public dune-pdelab-openmpi | |
5346 | (add-openmpi-to-dune-package dune-pdelab)) | |
5347 | ||
413f6126 AI |
5348 | (define-public mlucas |
5349 | (package | |
5350 | (name "mlucas") | |
5351 | (version "18") | |
5352 | (source | |
5353 | (origin | |
5354 | (method url-fetch) | |
5355 | (uri (string-append | |
5356 | "https://mersenneforum.org/mayer/src/C/mlucas_v" version ".txz")) | |
5357 | (sha256 | |
a36efdbc | 5358 | (base32 "0h4xj6pyyac79ka5ibqjilfa3s9j3yxnzgpwc57b54kfh2bj3447")))) |
413f6126 AI |
5359 | (build-system gnu-build-system) |
5360 | (inputs | |
5361 | `(("python2" ,python-2))) | |
5362 | (arguments | |
a36efdbc | 5363 | `(#:tests? #f ; no tests |
413f6126 AI |
5364 | #:phases |
5365 | (modify-phases %standard-phases | |
5366 | (replace 'configure | |
5367 | (lambda _ | |
5368 | (chdir "src") | |
5369 | (call-with-output-file "Makefile" | |
5370 | (lambda (port) | |
5371 | (format port "CC = gcc | |
5372 | CFLAGS = -O3 ~a -DUSE_THREADS | |
5373 | LDLIBS = -lm -lpthread -lrt | |
5374 | Mlucas: $(addsuffix .o,$(basename $(wildcard *.c))) | |
5375 | " | |
5376 | ,(let ((system (or (%current-target-system) | |
5377 | (%current-system)))) | |
5378 | (cond | |
5379 | ((string-prefix? "x86_64" system) "-DUSE_SSE2") | |
5380 | (else "")))))) | |
5381 | #t)) | |
5382 | (replace 'install | |
5383 | (lambda* (#:key outputs #:allow-other-keys) | |
5384 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
5385 | (install-file "Mlucas" bin) | |
5386 | (install-file "primenet.py" bin)) | |
5387 | #t))))) | |
5388 | (home-page "https://www.mersenne.org") | |
5389 | (synopsis "Great Internet Mersenne Prime Search (GIMPS) distributed computing client") | |
5390 | (description "Mlucas performs Lucas-Lehmer primality testing of Mersenne | |
5391 | numbers in search of a world-record prime. You may use it to test any | |
5392 | suitable number as you wish, but it is preferable that you do so in a | |
5393 | coordinated fashion, as part of the Great Internet Mersenne Prime | |
5394 | Search (GIMPS). Mlucas also includes a simple Python script for assignment | |
5395 | management via the GIMPS project's Primenet server.") | |
5396 | (license license:gpl2+))) | |
6f8c4195 NG |
5397 | |
5398 | (define-public nauty | |
5399 | (package | |
5400 | (name "nauty") | |
4b01930f NG |
5401 | (version "2.7r1") |
5402 | (source | |
5403 | (origin | |
5404 | (method url-fetch) | |
5405 | (uri (string-append | |
5406 | "https://pallini.di.uniroma1.it/" | |
5407 | "nauty" (string-join (string-split version #\.) "") ".tar.gz")) | |
5408 | (sha256 | |
5409 | (base32 "0xsfqfcknbd6g6wzpa5l7crmmk3bf3zjh37rhylq6b20dqcmvjkn")))) | |
6f8c4195 NG |
5410 | (build-system gnu-build-system) |
5411 | (outputs '("out" "lib")) | |
5412 | (arguments | |
5413 | `(#:test-target "checks" | |
4b01930f | 5414 | #:configure-flags '("--enable-generic") ;prevent -march-native |
6f8c4195 NG |
5415 | #:phases |
5416 | (modify-phases %standard-phases | |
5417 | ;; Default make target does not build all available | |
5418 | ;; executables. Create them now. | |
5419 | (add-after 'build 'build-extra-programs | |
5420 | (lambda _ | |
5421 | (for-each (lambda (target) (invoke "make" target)) | |
5422 | '("blisstog" "bliss2dre" "checks6" "sumlines")) | |
5423 | #t)) | |
5424 | ;; Upstream does not provide any install target. | |
5425 | (replace 'install | |
5426 | (lambda* (#:key outputs #:allow-other-keys) | |
5427 | (let* ((out (assoc-ref outputs "out")) | |
5428 | (lib-output (assoc-ref outputs "lib")) | |
5429 | (bin (string-append out "/bin")) | |
5430 | (doc (string-append out "/share/doc/nauty/")) | |
5431 | (include (string-append lib-output "/include/nauty")) | |
5432 | (lib (string-append lib-output "/lib/nauty"))) | |
5433 | (for-each (lambda (f) (install-file f bin)) | |
4b01930f NG |
5434 | '("addedgeg" "amtog" "assembleg" "biplabg" "blisstog" |
5435 | "bliss2dre" "catg" "checks6" "complg" "converseg" | |
5436 | "copyg" "countg" "cubhamg" "deledgeg" "delptg" | |
5437 | "directg" "dreadnaut" "dretodot" "dretog" "genbg" | |
6f8c4195 NG |
5438 | "genbgL" "geng" "genquarticg" "genrang" "genspecialg" |
5439 | "gentourng" "gentreeg" "hamheuristic" "labelg" | |
5440 | "linegraphg" "listg" "multig" "newedgeg" "pickg" | |
5441 | "planarg" "ranlabg" "shortg" "showg" "subdivideg" | |
4b01930f NG |
5442 | "sumlines" "twohamg" "underlyingg" "vcolg" |
5443 | "watercluster2" "NRswitchg")) | |
6f8c4195 NG |
5444 | (for-each (lambda (f) (install-file f include)) |
5445 | (find-files "." "\\.h$")) | |
5446 | (for-each (lambda (f) (install-file f lib)) | |
5447 | (find-files "." "\\.a$")) | |
5448 | (for-each (lambda (f) (install-file f doc)) | |
5449 | (append '("formats.txt" "README" "schreier.txt") | |
5450 | (find-files "." "\\.pdf$"))))))))) | |
5451 | (inputs | |
5452 | `(("gmp" ,gmp))) ;for sumlines | |
5453 | (home-page "https://pallini.di.uniroma1.it/") | |
5454 | (synopsis "Library for graph automorphisms") | |
5455 | (description "@code{nauty} (No AUTomorphisms, Yes?) is a set of | |
5456 | procedures for computing automorphism groups of graphs and digraphs. | |
5457 | ||
5458 | @code{nauty} computes graph information in the form of a set of | |
5459 | generators, the size of the group, and the orbits of the group; it can | |
5460 | also produce a canonical label. The @code{nauty} suite is written in | |
5461 | C and comes with a command-line interface, a collection of | |
5462 | command-line tools, and an Application Programming Interface (API). | |
5463 | ||
5464 | This package provides the static libraries required to run programs | |
5465 | compiled against the nauty library.") | |
5466 | (license license:asl2.0))) | |
26433471 AE |
5467 | |
5468 | (define-public ppl | |
5469 | (package | |
5470 | (name "ppl") | |
5471 | (version "1.2") | |
5472 | (source | |
5473 | (origin | |
5474 | (method url-fetch) | |
5475 | (uri (string-append "https://www.bugseng.com/products/ppl/download/" | |
5476 | "ftp/releases/" version | |
5477 | "/ppl-" version ".tar.gz")) | |
5478 | (sha256 | |
5479 | (base32 | |
5480 | "1j5aji1g2vmdvc0gqz45n2ll2l2f6czca04wiyfl5g3sm3a6vhvb")))) | |
5481 | (build-system gnu-build-system) | |
5482 | (native-inputs | |
5483 | `(("m4", m4))) | |
5484 | (inputs | |
5485 | `(("glpk" ,glpk) | |
5486 | ("gmp", gmp))) | |
5487 | (home-page "https://www.bugseng.com/parma-polyhedra-library") | |
5488 | (synopsis | |
5489 | "Parma Polyhedra Library for computations with polyhedra") | |
5490 | (description | |
5491 | "The Parma Polyhedra Library (PPL) provides numerical abstractions | |
5492 | especially targeted at applications in the field of analysis and | |
5493 | verification of complex systems. These abstractions include convex | |
5494 | polyhedra, defined as the intersection of a finite number of (open or | |
5495 | closed) halfspaces, each described by a linear inequality (strict or | |
5496 | non-strict) with rational coefficients; some special classes of polyhedra | |
5497 | shapes that offer interesting complexity/precision tradeoffs; and grids | |
5498 | which represent regularly spaced points that satisfy a set of linear | |
5499 | congruence relations. The library also supports finite powersets and | |
5500 | products of (any kind of) polyhedra and grids, a mixed integer linear | |
5501 | programming problem solver using an exact-arithmetic version of the simplex | |
5502 | algorithm, a parametric integer programming solver, and primitives for | |
5503 | termination analysis via the automatic synthesis of linear ranking | |
5504 | functions.") | |
5505 | (license license:gpl3+))) | |
4cb5d251 SS |
5506 | |
5507 | (define-public speedcrunch | |
5508 | (package | |
5509 | (name "speedcrunch") | |
5510 | (version "0.12.0") | |
5511 | (source | |
5512 | (origin | |
5513 | (method git-fetch) | |
5514 | (uri (git-reference | |
5515 | (url "https://bitbucket.org/heldercorreia/speedcrunch.git") | |
5516 | (commit (string-append "release-" version)))) | |
5517 | (file-name (git-file-name name version)) | |
5518 | (sha256 | |
5519 | (base32 | |
5520 | "0vh7cd1915bjqzkdp3sk25ngy8cq624mkh8c53c5bnzk357kb0fk")))) | |
5521 | (build-system cmake-build-system) | |
5522 | (inputs `(("qtbase" ,qtbase))) | |
5523 | (native-inputs `(("qttools" ,qttools))) | |
5524 | (arguments | |
5525 | `(#:phases | |
5526 | (modify-phases %standard-phases | |
5527 | (add-after 'unpack 'chdir-to-src | |
5528 | (lambda _ (chdir "src") #t))))) | |
5529 | (synopsis "High-precision scientific calculator") | |
5530 | (description | |
5531 | "SpeedCrunch is a high-precision scientific calculator. It features a | |
5532 | syntax-highlighted scrollable display and is designed to be fully used via | |
5533 | keyboard. Some distinctive features are auto-completion of functions and | |
5534 | variables, a formula book, and quick insertion of constants from various | |
5535 | fields of knowledge.") | |
80fafdba | 5536 | (home-page "https://speedcrunch.org/") |
4cb5d251 SS |
5537 | (license license:gpl2+))) |
5538 | ||
3b7828cc RS |
5539 | (define-public minisat |
5540 | ;; This is the last commit which is available upstream, no | |
5541 | ;; release happened since 2010. | |
5542 | (let ((commit "37dc6c67e2af26379d88ce349eb9c4c6160e8543") | |
5543 | (revision "1")) | |
5544 | (package | |
5545 | (name "minisat") | |
5546 | (version (string-append "2.2.0-" revision "." (string-take commit 7))) | |
5547 | (source | |
5548 | (origin | |
5549 | (method git-fetch) | |
5550 | (uri (git-reference | |
5551 | (url "https://github.com/niklasso/minisat.git") | |
5552 | (commit commit))) | |
5553 | (file-name (string-append name "-" version "-checkout")) | |
5554 | (sha256 | |
5555 | (base32 | |
5556 | "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq")) | |
5557 | (patches | |
5558 | (search-patches "minisat-friend-declaration.patch" | |
5559 | "minisat-install.patch")))) | |
5560 | (build-system gnu-build-system) | |
5561 | (arguments | |
5562 | '(#:make-flags (list (string-append "prefix=" %output)) | |
5563 | #:tests? #f ;no check target | |
5564 | #:phases | |
5565 | (modify-phases %standard-phases | |
5566 | (delete 'configure)))) | |
5567 | (inputs | |
5568 | `(("zlib:static" ,zlib "static") | |
5569 | ("zlib" ,zlib))) | |
5570 | (synopsis | |
5571 | "Small, yet efficient, SAT solver") | |
5572 | (description | |
5573 | "MiniSat is a minimalistic, open-source SAT solver, developed to help | |
5574 | researchers and developers alike to get started on SAT.") | |
5575 | (home-page | |
5576 | "http://minisat.se/MiniSat.html") | |
5577 | (license license:expat)))) | |
70c98efa VK |
5578 | |
5579 | (define-public libqalculate | |
5580 | (package | |
5581 | (name "libqalculate") | |
5582 | (version "3.8.0") | |
5583 | (source | |
5584 | (origin | |
5585 | (method git-fetch) | |
5586 | (uri (git-reference | |
5587 | (url "https://github.com/Qalculate/libqalculate/") | |
5588 | (commit (string-append "v" version)))) | |
5589 | (file-name (git-file-name name version)) | |
5590 | (sha256 | |
9b3c231e VK |
5591 | (base32 "1vbaza9c7159xf2ym90l0xkyj2mp6c3hbghhsqn29yvz08fda9df")) |
5592 | (patches | |
5593 | (search-patches "libqalculate-3.8.0-libcurl-ssl-fix.patch")))) | |
70c98efa VK |
5594 | (build-system gnu-build-system) |
5595 | (native-inputs | |
5596 | `(("pkg-config" ,pkg-config) | |
5597 | ("gettext" ,gettext-minimal) | |
5598 | ("intltool" ,intltool) | |
5599 | ("automake" ,automake) | |
5600 | ("autoconf" ,autoconf) | |
5601 | ("libtool" ,libtool) | |
5602 | ("doxygen" ,doxygen) | |
5603 | ("file" ,file))) | |
5604 | (inputs | |
5605 | `(("gmp" ,gmp) | |
5606 | ("mpfr" ,mpfr) | |
5607 | ("libxml2" ,libxml2) | |
5608 | ("curl" ,curl) | |
5609 | ("icu4c" ,icu4c) | |
5610 | ("gnuplot" ,gnuplot) | |
5611 | ("readline" ,readline) | |
5612 | ("libiconv" ,libiconv))) | |
5613 | (arguments | |
5614 | `(#:phases | |
5615 | (modify-phases %standard-phases | |
5616 | (add-before 'bootstrap 'setenv | |
5617 | ;; Prevent the autogen.sh script to carry out the configure | |
5618 | ;; script, which has not yet been patched to replace /bin/sh. | |
5619 | (lambda _ | |
5620 | (setenv "NOCONFIGURE" "TRUE") | |
5621 | #t))))) | |
5622 | (home-page "https://qalculate.github.io/") | |
5623 | (synopsis "Multi-purpose cli desktop calculator and library") | |
5624 | (description | |
5625 | "Libqalculate is a multi-purpose cli desktop calculator and library. | |
5626 | It provides basic and advanced functionality. Features include customizable | |
5627 | functions, unit calculations, and conversions, physical constants, symbolic | |
5628 | calculations (including integrals and equations), arbitrary precision, | |
67e2e171 | 5629 | uncertainty propagation, interval arithmetic, plotting and a user-friendly |
70c98efa VK |
5630 | cli.") |
5631 | (license license:gpl2+))) | |
72c71d24 VK |
5632 | |
5633 | (define-public qalculate-gtk | |
5634 | (package | |
5635 | (name "qalculate-gtk") | |
5636 | (version "3.8.0") | |
5637 | (source | |
5638 | (origin | |
5639 | (method git-fetch) | |
5640 | (uri (git-reference | |
5641 | (url "https://github.com/Qalculate/qalculate-gtk/") | |
5642 | (commit (string-append "v" version)))) | |
5643 | (file-name (git-file-name name version)) | |
5644 | (sha256 | |
5645 | (base32 "0nsg6dzg5r7rzqr671nvrf1c50rjwpz7bxv5f20i4s7agizgv840")))) | |
5646 | (build-system glib-or-gtk-build-system) | |
5647 | (native-inputs | |
5648 | `(("pkg-config" ,pkg-config) | |
5649 | ("intltool" ,intltool) | |
5650 | ("automake" ,automake) | |
5651 | ("autoconf" ,autoconf) | |
5652 | ("libtool" ,libtool) | |
5653 | ("file" ,file))) | |
5654 | (inputs | |
5655 | `(("gmp" ,gmp) | |
5656 | ("mpfr" ,mpfr) | |
5657 | ("libqalculate" ,libqalculate) | |
5658 | ("libxml2" ,libxml2) | |
5659 | ("glib" ,glib) | |
5660 | ("gtk+" ,gtk+))) | |
5661 | (arguments | |
5662 | `(#:phases | |
5663 | (modify-phases %standard-phases | |
5664 | (add-before 'bootstrap 'setenv | |
5665 | ;; Prevent the autogen.sh script to carry out the configure | |
5666 | ;; script, which has not yet been patched to replace /bin/sh. | |
5667 | (lambda _ | |
5668 | (setenv "NOCONFIGURE" "TRUE") | |
5669 | #t)) | |
5670 | (add-before 'check 'add-pot-file | |
5671 | ;; the file contains translations and are currently not in use | |
5672 | ;; left out on purpose so add it to POTFILES.skip | |
5673 | (lambda _ | |
5674 | (with-output-to-file "po/POTFILES.skip" | |
5675 | (lambda _ | |
5676 | (format #t "data/shortcuts.ui~%") | |
5677 | #t)) | |
5678 | #t))))) | |
5679 | (home-page "https://qalculate.github.io/") | |
5680 | (synopsis "Multi-purpose graphical desktop calculator") | |
5681 | (description | |
5682 | "Qalculate-gtk is the GTK frontend for libqalculate. It is a | |
5683 | multi-purpose GUI desktop calculator. It provides basic and advanced | |
5684 | functionality. Features include customizable functions, unit calculations, | |
5685 | and conversions, physical constants, symbolic calculations (including | |
5686 | integrals and equations), arbitrary precision, uncertainity propagation, | |
5687 | interval arithmetic, plotting.") | |
5688 | (license license:gpl2+))) |