| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr> |
| 3 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> |
| 4 | ;;; Copyright © 2014, 2016, 2017 John Darrington <jmd@gnu.org> |
| 5 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Eric Bavier <bavier@member.fsf.org> |
| 6 | ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch> |
| 7 | ;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org> |
| 8 | ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> |
| 9 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
| 10 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
| 11 | ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> |
| 12 | ;;; Copyright © 2015 Fabian Harfert <fhmgufs@web.de> |
| 13 | ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> |
| 14 | ;;; Copyright © 2016, 2018 Kei Kebreau <kkebreau@posteo.net> |
| 15 | ;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> |
| 16 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> |
| 17 | ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be> |
| 18 | ;;; Copyright © 2017 Paul Garlick <pgarlick@tourbillion-technology.com> |
| 19 | ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is> |
| 20 | ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com> |
| 21 | ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org> |
| 22 | ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net> |
| 23 | ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
| 24 | ;;; Copyright © 2017 Dave Love <me@fx@gnu.org> |
| 25 | ;;; Copyright © 2018 Jan Nieuwenhuizen <janneke@gnu.org> |
| 26 | ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> |
| 27 | ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com> |
| 28 | ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com> |
| 29 | ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> |
| 30 | ;;; |
| 31 | ;;; This file is part of GNU Guix. |
| 32 | ;;; |
| 33 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 34 | ;;; under the terms of the GNU General Public License as published by |
| 35 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 36 | ;;; your option) any later version. |
| 37 | ;;; |
| 38 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 39 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 40 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 41 | ;;; GNU General Public License for more details. |
| 42 | ;;; |
| 43 | ;;; You should have received a copy of the GNU General Public License |
| 44 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 45 | |
| 46 | (define-module (gnu packages maths) |
| 47 | #:use-module (ice-9 regex) |
| 48 | #:use-module (gnu packages) |
| 49 | #:use-module ((guix licenses) #:prefix license:) |
| 50 | #:use-module (guix packages) |
| 51 | #:use-module (guix download) |
| 52 | #:use-module (guix git-download) |
| 53 | #:use-module (guix utils) |
| 54 | #:use-module (guix build utils) |
| 55 | #:use-module (guix build-system cmake) |
| 56 | #:use-module (guix build-system gnu) |
| 57 | #:use-module (guix build-system ocaml) |
| 58 | #:use-module (guix build-system python) |
| 59 | #:use-module (guix build-system r) |
| 60 | #:use-module (guix build-system ruby) |
| 61 | #:use-module (gnu packages algebra) |
| 62 | #:use-module (gnu packages audio) |
| 63 | #:use-module (gnu packages autotools) |
| 64 | #:use-module (gnu packages bison) |
| 65 | #:use-module (gnu packages boost) |
| 66 | #:use-module (gnu packages check) |
| 67 | #:use-module (gnu packages cmake) |
| 68 | #:use-module (gnu packages compression) |
| 69 | #:use-module (gnu packages curl) |
| 70 | #:use-module (gnu packages cyrus-sasl) |
| 71 | #:use-module (gnu packages documentation) |
| 72 | #:use-module (gnu packages elf) |
| 73 | #:use-module (gnu packages flex) |
| 74 | #:use-module (gnu packages fltk) |
| 75 | #:use-module (gnu packages fontutils) |
| 76 | #:use-module (gnu packages gettext) |
| 77 | #:use-module (gnu packages gcc) |
| 78 | #:use-module (gnu packages gd) |
| 79 | #:use-module (gnu packages ghostscript) |
| 80 | #:use-module (gnu packages graphviz) |
| 81 | #:use-module (gnu packages gtk) |
| 82 | #:use-module (gnu packages image) |
| 83 | #:use-module (gnu packages java) |
| 84 | #:use-module (gnu packages less) |
| 85 | #:use-module (gnu packages lisp) |
| 86 | #:use-module (gnu packages linux) |
| 87 | #:use-module (gnu packages logging) |
| 88 | #:use-module (gnu packages lua) |
| 89 | #:use-module (gnu packages gnome) |
| 90 | #:use-module (gnu packages guile) |
| 91 | #:use-module (gnu packages xorg) |
| 92 | #:use-module (gnu packages gl) |
| 93 | #:use-module (gnu packages imagemagick) |
| 94 | #:use-module (gnu packages m4) |
| 95 | #:use-module (gnu packages mpi) |
| 96 | #:use-module (gnu packages multiprecision) |
| 97 | #:use-module (gnu packages netpbm) |
| 98 | #:use-module (gnu packages ocaml) |
| 99 | #:use-module (gnu packages pcre) |
| 100 | #:use-module (gnu packages popt) |
| 101 | #:use-module (gnu packages perl) |
| 102 | #:use-module (gnu packages pkg-config) |
| 103 | #:use-module (gnu packages pulseaudio) |
| 104 | #:use-module (gnu packages python) |
| 105 | #:use-module (gnu packages python-web) |
| 106 | #:use-module (gnu packages qt) |
| 107 | #:use-module (gnu packages readline) |
| 108 | #:use-module (gnu packages ruby) |
| 109 | #:use-module (gnu packages tbb) |
| 110 | #:use-module (gnu packages scheme) |
| 111 | #:use-module (gnu packages shells) |
| 112 | #:use-module (gnu packages tcl) |
| 113 | #:use-module (gnu packages texinfo) |
| 114 | #:use-module (gnu packages tex) |
| 115 | #:use-module (gnu packages tls) |
| 116 | #:use-module (gnu packages version-control) |
| 117 | #:use-module (gnu packages wxwidgets) |
| 118 | #:use-module (gnu packages xml) |
| 119 | #:use-module (srfi srfi-1)) |
| 120 | |
| 121 | (define-public aris |
| 122 | (package |
| 123 | (name "aris") |
| 124 | (version "2.2") |
| 125 | (source (origin |
| 126 | (method url-fetch) |
| 127 | (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz")) |
| 128 | (sha256 (base32 |
| 129 | "1q1887ryqdr9sn0522hc7p16kqwlxxyz5dkmma8ar2nxplhgll7q")))) |
| 130 | (build-system gnu-build-system) |
| 131 | (inputs `(("gtk+" ,gtk+) |
| 132 | ("libxml2" ,libxml2))) |
| 133 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 134 | (synopsis "Natural deduction first-order logic interface") |
| 135 | (description "Aris is a program for performing logical proofs. It supports |
| 136 | propositional and predicate logic, as well as Boolean algebra and |
| 137 | arithmetical logic. In addition to its predefined inference and equivalence |
| 138 | rules, Aris also supports references to older proofs. Its use of standard |
| 139 | logical symbols and its natural deduction interface make it easy to use for |
| 140 | beginners.") |
| 141 | (license license:gpl3+) |
| 142 | (home-page "https://www.gnu.org/software/aris/"))) |
| 143 | |
| 144 | (define-public c-graph |
| 145 | (package |
| 146 | (name "c-graph") |
| 147 | (version "2.0") |
| 148 | (source (origin |
| 149 | (method url-fetch) |
| 150 | (uri (string-append "mirror://gnu/c-graph/c-graph-" version |
| 151 | ".tar.gz")) |
| 152 | (sha256 (base32 |
| 153 | "1hlvpzrh7hzzf533diyfiabzskddi8zx92av9hwkjw3l46z7qv01")))) |
| 154 | (build-system gnu-build-system) |
| 155 | (inputs |
| 156 | `(("fortran" ,gfortran))) |
| 157 | (synopsis "Visualizing and demonstrating convolution") |
| 158 | (description |
| 159 | "GNU C-Graph is a tool for demonstrating the theory of convolution. |
| 160 | Thus, it can serve as an excellent aid to students of signal and systems |
| 161 | theory in visualizing the convolution process. Rather than forcing the |
| 162 | student to write code, the program offers an intuitive interface with |
| 163 | interactive dialogs to guide them.") |
| 164 | (license license:gpl3+) |
| 165 | (home-page "https://www.gnu.org/software/c-graph/"))) |
| 166 | |
| 167 | (define-public coda |
| 168 | (package |
| 169 | (name "coda") |
| 170 | (version "2.18.3") |
| 171 | (source |
| 172 | (origin |
| 173 | (method url-fetch) |
| 174 | (uri (string-append "https://github.com/stcorp/coda/releases/download/" |
| 175 | version "/coda-" version ".tar.gz")) |
| 176 | (sha256 |
| 177 | (base32 "1zlzgcvwmmjm8mw8w4rg2rqy0pjilz7kyyxm0y4p8cbljbbjxxz0")) |
| 178 | (patches (search-patches "coda-use-system-libs.patch")) |
| 179 | (modules '((guix build utils))) |
| 180 | (snippet |
| 181 | ;; Make sure we don't use the bundled software. |
| 182 | '(begin |
| 183 | (for-each (lambda (d) |
| 184 | (delete-file-recursively (string-append "libcoda/" d))) |
| 185 | '("zlib" "pcre" "expat")) |
| 186 | #t)))) |
| 187 | (native-inputs |
| 188 | `(("fortran" ,gfortran) |
| 189 | ("python" ,python) |
| 190 | ("python-numpy" ,python-numpy))) |
| 191 | (inputs |
| 192 | `(("zlib" ,zlib) |
| 193 | ("pcre" ,pcre) |
| 194 | ("expat" ,expat) |
| 195 | ("hdf4" ,hdf4-alt) |
| 196 | ("hdf5" ,hdf5))) |
| 197 | (build-system gnu-build-system) |
| 198 | (arguments |
| 199 | '(#:configure-flags '("--with-hdf4" "--with-hdf5" "--enable-python" |
| 200 | "LIBS= -lz -lpcre -lexpat"))) |
| 201 | (synopsis "A common interface to various earth observation data formats") |
| 202 | (description |
| 203 | "The Common Data Access toolbox (CODA) provides a set of interfaces for |
| 204 | reading remote sensing data from earth observation data files. It consists of |
| 205 | command line applications and interfaces to the C, Fortran, Python, and Java |
| 206 | programming languages.") |
| 207 | (home-page "https://stcorp.nl/coda") |
| 208 | (license license:gpl2+))) |
| 209 | |
| 210 | (define-public qhull |
| 211 | (package |
| 212 | (name "qhull") |
| 213 | (version "2015.2") |
| 214 | (source (origin |
| 215 | (method url-fetch) |
| 216 | (uri (string-append "http://www.qhull.org/download/qhull-" |
| 217 | (car (string-split version #\.)) |
| 218 | "-src-7.2.0.tgz")) |
| 219 | (sha256 |
| 220 | (base32 |
| 221 | "0dm4b2xr3asy6w74khq2zg4gf26zsy3qf9sq7pf7lmrvbj911c3q")))) |
| 222 | (build-system cmake-build-system) |
| 223 | (synopsis "Calculate convex hulls and related structures") |
| 224 | (description |
| 225 | "@code{Qhull} computes the convex hull, Delaunay triangulation, Voronoi |
| 226 | diagram, halfspace intersection about a point, furthest-site Delaunay |
| 227 | triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, |
| 228 | 3-d, 4-d, and higher dimensions. @code{Qhull} implements the Quickhull |
| 229 | algorithm for computing the convex hull. It handles roundoff errors from |
| 230 | floating point arithmetic. It computes volumes, surface areas, and |
| 231 | approximations to the convex hull. |
| 232 | |
| 233 | @code{Qhull} does not support triangulation of non-convex surfaces, mesh |
| 234 | generation of non-convex objects, medium-sized inputs in 9-D and higher, alpha |
| 235 | shapes, weighted Voronoi diagrams, Voronoi volumes, or constrained Delaunay |
| 236 | triangulations.") |
| 237 | (home-page "http://qhull.org") |
| 238 | (license (license:non-copyleft "file://COPYING.txt" |
| 239 | "See COPYING in the distribution.")))) |
| 240 | |
| 241 | (define-public units |
| 242 | (package |
| 243 | (name "units") |
| 244 | (version "2.17") |
| 245 | (source (origin |
| 246 | (method url-fetch) |
| 247 | (uri (string-append "mirror://gnu/units/units-" version |
| 248 | ".tar.gz")) |
| 249 | (sha256 (base32 |
| 250 | "1n2xzpnxfn475zkd8rzs5gg58xszjbr4bdbgvk6hryzimvwwj0qz")))) |
| 251 | (build-system gnu-build-system) |
| 252 | (inputs |
| 253 | `(("readline" ,readline) |
| 254 | ("python" ,python-wrapper) ;for 'units_cur' script |
| 255 | ("python-requests" ,python-requests))) |
| 256 | (arguments |
| 257 | `(#:phases (modify-phases %standard-phases |
| 258 | (add-after 'install 'wrap-units_cur |
| 259 | (lambda* (#:key outputs #:allow-other-keys) |
| 260 | (let* ((out (assoc-ref outputs "out")) |
| 261 | (bin (string-append out "/bin"))) |
| 262 | (wrap-program (string-append bin "/units_cur") |
| 263 | `("PYTHONPATH" ":" prefix |
| 264 | ,(search-path-as-string->list (getenv "PYTHONPATH")))) |
| 265 | #t)))))) |
| 266 | (synopsis "Conversion between thousands of scales") |
| 267 | (description |
| 268 | "GNU Units converts numeric quantities between units of measure. It |
| 269 | can handle scale changes through adaptive usage of standard scale |
| 270 | prefixes (micro-, kilo-, etc.). It can also handle nonlinear |
| 271 | conversions such as Fahrenheit to Celsius. Its interpreter is powerful |
| 272 | enough to be used effectively as a scientific calculator.") |
| 273 | (license license:gpl3+) |
| 274 | (home-page "https://www.gnu.org/software/units/"))) |
| 275 | |
| 276 | (define-public double-conversion |
| 277 | (package |
| 278 | (name "double-conversion") |
| 279 | (version "1.1.5") |
| 280 | (source (origin |
| 281 | (method url-fetch) |
| 282 | (uri (string-append |
| 283 | "https://github.com/floitsch/double-conversion/archive/v" |
| 284 | version ".tar.gz")) |
| 285 | (file-name (string-append name "-" version ".tar.gz")) |
| 286 | (sha256 |
| 287 | (base32 |
| 288 | "0cnr8xhyjfxijay8ymkqcph3672wp2lj23qhdmr3m4kia5kpdf83")))) |
| 289 | (build-system cmake-build-system) |
| 290 | (arguments |
| 291 | '(#:test-target "test" |
| 292 | #:configure-flags '("-DBUILD_SHARED_LIBS=ON" |
| 293 | "-DBUILD_TESTING=ON"))) |
| 294 | (home-page "https://github.com/floitsch/double-conversion") |
| 295 | (synopsis "Conversion routines for IEEE doubles") |
| 296 | (description |
| 297 | "The double-conversion library provides binary-decimal and decimal-binary |
| 298 | routines for IEEE doubles. The library consists of efficient conversion |
| 299 | routines that have been extracted from the V8 JavaScript engine.") |
| 300 | (license license:bsd-3))) |
| 301 | |
| 302 | (define-public dionysus |
| 303 | (package |
| 304 | (name "dionysus") |
| 305 | (version "1.4.0") |
| 306 | (source (origin |
| 307 | (method url-fetch) |
| 308 | (uri (string-append "mirror://gnu/dionysus/dionysus-" version |
| 309 | ".tar.xz")) |
| 310 | (sha256 |
| 311 | (base32 |
| 312 | "194pzs1mlsj4ww6v37qq3961h5hckm5h805cv0r14xj3g9wfx2sk")))) |
| 313 | (build-system gnu-build-system) |
| 314 | (inputs `(("tcl" ,tcl))) ;for 'tclsh' |
| 315 | (synopsis "Local search for universal constants and scientific values") |
| 316 | (description |
| 317 | "GNU Dionysus is a convenient system for quickly retrieving the values of |
| 318 | mathematical constants used in science and engineering. Values can be |
| 319 | searched using a simple command-line tool, choosing from three databases: |
| 320 | universal constants, atomic numbers, and constants related to |
| 321 | semiconductors.") |
| 322 | (license license:gpl3+) |
| 323 | (home-page "https://www.gnu.org/software/dionysus/"))) |
| 324 | |
| 325 | (define-public gsl |
| 326 | (package |
| 327 | (name "gsl") |
| 328 | (version "2.5") |
| 329 | (source (origin |
| 330 | (method url-fetch) |
| 331 | (uri (string-append "mirror://gnu/gsl/gsl-" |
| 332 | version ".tar.gz")) |
| 333 | (sha256 |
| 334 | (base32 |
| 335 | "1395y9hlhqadn5g9j8q22224fds5sd92jxi9czfavjj24myasq04")) |
| 336 | (patches (search-patches "gsl-test-i686.patch")))) |
| 337 | (build-system gnu-build-system) |
| 338 | (arguments |
| 339 | `(;; Currently there are numerous tests that fail on "exotic" |
| 340 | ;; architectures such as aarch64 and ppc64le. |
| 341 | ,@(if (string-prefix? "aarch64-linux" |
| 342 | (or (%current-target-system) (%current-system))) |
| 343 | '(#:tests? #f) |
| 344 | '()))) |
| 345 | (home-page "https://www.gnu.org/software/gsl/") |
| 346 | (synopsis "Numerical library for C and C++") |
| 347 | (description |
| 348 | "The GNU Scientific Library is a library for numerical analysis in C |
| 349 | and C++. It includes a wide range of mathematical routines, with over 1000 |
| 350 | functions in total. Subject areas covered by the library include: |
| 351 | differential equations, linear algebra, Fast Fourier Transforms and random |
| 352 | numbers.") |
| 353 | (license license:gpl3+))) |
| 354 | |
| 355 | (define-public ocaml-gsl |
| 356 | (package |
| 357 | (name "ocaml-gsl") |
| 358 | (version "1.19.3") |
| 359 | (source |
| 360 | (origin |
| 361 | (method url-fetch) |
| 362 | (uri |
| 363 | (string-append |
| 364 | "https://github.com/mmottl/gsl-ocaml/releases/download/v" |
| 365 | version"/gsl-ocaml-" version ".tar.gz")) |
| 366 | (sha256 |
| 367 | (base32 |
| 368 | "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh")))) |
| 369 | (build-system ocaml-build-system) |
| 370 | (inputs |
| 371 | `(("gsl" ,gsl))) |
| 372 | (home-page "https://mmottl.github.io/gsl-ocaml") |
| 373 | (synopsis "Bindings to the GNU Scientific Library") |
| 374 | (description |
| 375 | "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for |
| 376 | the OCaml language.") |
| 377 | (license license:gpl3+))) |
| 378 | |
| 379 | (define-public ocaml4.01-gsl |
| 380 | (package-with-ocaml4.01 ocaml-gsl)) |
| 381 | |
| 382 | (define-public glpk |
| 383 | (package |
| 384 | (name "glpk") |
| 385 | (version "4.65") |
| 386 | (source |
| 387 | (origin |
| 388 | (method url-fetch) |
| 389 | (uri (string-append "mirror://gnu/glpk/glpk-" |
| 390 | version ".tar.gz")) |
| 391 | (sha256 |
| 392 | (base32 |
| 393 | "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2")))) |
| 394 | (build-system gnu-build-system) |
| 395 | (inputs |
| 396 | `(("gmp" ,gmp))) |
| 397 | (arguments |
| 398 | `(#:configure-flags '("--with-gmp"))) |
| 399 | (home-page "https://www.gnu.org/software/glpk/") |
| 400 | (synopsis "GNU Linear Programming Kit, supporting the MathProg language") |
| 401 | (description |
| 402 | "GLPK is a C library for solving large-scale linear programming (LP), |
| 403 | mixed integer programming (MIP), and other related problems. It supports the |
| 404 | GNU MathProg modeling language, a subset of the AMPL language, and features a |
| 405 | translator for the language. In addition to the C library, a stand-alone |
| 406 | LP/MIP solver is included in the package.") |
| 407 | (license license:gpl3+))) |
| 408 | |
| 409 | (define-public 4ti2 |
| 410 | (package |
| 411 | (name "4ti2") |
| 412 | (version "1.6.7") |
| 413 | (source |
| 414 | (origin |
| 415 | (method url-fetch) |
| 416 | (uri (string-append "http://www.4ti2.de/version_" version |
| 417 | "/4ti2-" version ".tar.gz")) |
| 418 | (sha256 |
| 419 | (base32 |
| 420 | "1frix3rnm9ffr93alqzw4cavxbfpf524l8rfbmcpyhwd3n1km0yl")))) |
| 421 | (build-system gnu-build-system) |
| 422 | (native-inputs |
| 423 | `(("which" ,(@ (gnu packages base) which)))) ; for the tests |
| 424 | (inputs |
| 425 | `(("glpk" ,glpk) |
| 426 | ("gmp" ,gmp))) |
| 427 | (home-page "http://www.4ti2.de/") |
| 428 | (synopsis "Mathematical tool suite for problems on linear spaces") |
| 429 | (description |
| 430 | "4ti2 implements algorithms for solving algebraic, geometric and |
| 431 | combinatorial problems on linear spaces. Among others, it solves systems |
| 432 | of linear equations, computes extreme rays of polyhedral cones, solves |
| 433 | integer programming problems and computes Markov bases for statistics.") |
| 434 | (license license:gpl2+))) |
| 435 | |
| 436 | (define-public cddlib |
| 437 | (package |
| 438 | (name "cddlib") |
| 439 | (version "0.94h") |
| 440 | (source |
| 441 | (origin |
| 442 | (method url-fetch) |
| 443 | (uri (string-append "ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-" |
| 444 | (string-delete #\. version) ".tar.gz")) |
| 445 | (sha256 |
| 446 | (base32 |
| 447 | "1dasasscwfg793q8fwzgwf64xwj7w62yfvszpr8x8g38jka08vgy")))) |
| 448 | (build-system gnu-build-system) |
| 449 | (inputs |
| 450 | `(("gmp" ,gmp))) |
| 451 | (home-page "https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html") |
| 452 | (synopsis "Library for convex hulls and extreme rays of polyhedra") |
| 453 | (description |
| 454 | "The C-library cddlib implements the Double Description Method of |
| 455 | Motzkin et al. for generating all vertices (i.e. extreme points) and extreme |
| 456 | rays of a general convex polyhedron given by a system of linear inequalities |
| 457 | in arbitrary dimension. It can also be used for the converse operation of |
| 458 | computing convex hulls.") |
| 459 | (license license:gpl2+))) |
| 460 | |
| 461 | (define-public arpack-ng |
| 462 | (package |
| 463 | (name "arpack-ng") |
| 464 | (version "3.5.0") |
| 465 | (home-page "https://github.com/opencollab/arpack-ng") |
| 466 | (source |
| 467 | (origin |
| 468 | (method url-fetch) |
| 469 | (uri (string-append home-page "/archive/" version ".tar.gz")) |
| 470 | (file-name (string-append name "-" version ".tar.gz")) |
| 471 | (sha256 |
| 472 | (base32 |
| 473 | "0f8jx3fifmj9qdp289zr7r651y1q48k1jya859rqxq62mvis7xsh")))) |
| 474 | (build-system gnu-build-system) |
| 475 | (arguments |
| 476 | '(#:phases (modify-phases %standard-phases |
| 477 | (add-after 'unpack 'autoreconf |
| 478 | (lambda _ |
| 479 | (invoke "autoreconf" "-vfi")))))) |
| 480 | (native-inputs |
| 481 | `(("autoconf" ,autoconf) |
| 482 | ("automake" ,automake) |
| 483 | ("libtool" ,libtool))) |
| 484 | (inputs |
| 485 | `(("lapack" ,lapack) |
| 486 | ("fortran" ,gfortran))) |
| 487 | (synopsis "Fortran subroutines for solving eigenvalue problems") |
| 488 | (description |
| 489 | "ARPACK-NG is a collection of Fortran77 subroutines designed to solve |
| 490 | large scale eigenvalue problems.") |
| 491 | (license (license:non-copyleft "file://COPYING" |
| 492 | "See COPYING in the distribution.")))) |
| 493 | |
| 494 | (define-public arpack-ng-3.3.0 |
| 495 | (package |
| 496 | (inherit arpack-ng) |
| 497 | (version "3.3.0") |
| 498 | (name (package-name arpack-ng)) |
| 499 | (home-page (package-home-page arpack-ng)) |
| 500 | (source |
| 501 | (origin |
| 502 | (method url-fetch) |
| 503 | (uri (string-append home-page "/archive/" version ".tar.gz")) |
| 504 | (file-name (string-append name "-" version ".tar.gz")) |
| 505 | (sha256 |
| 506 | (base32 |
| 507 | "1cz53wqzcf6czmcpfb3vb61xi0rn5bwhinczl65hpmbrglg82ndd")))))) |
| 508 | |
| 509 | (define-public arpack-ng-openmpi |
| 510 | (package (inherit arpack-ng) |
| 511 | (name "arpack-ng-openmpi") |
| 512 | (inputs |
| 513 | `(("mpi" ,openmpi) |
| 514 | ,@(package-inputs arpack-ng))) |
| 515 | (arguments |
| 516 | (substitute-keyword-arguments (package-arguments arpack-ng) |
| 517 | ((#:configure-flags _ '()) |
| 518 | ''("--enable-mpi")))) |
| 519 | (synopsis "Fortran subroutines for solving eigenvalue problems with MPI"))) |
| 520 | |
| 521 | (define-public lapack |
| 522 | (package |
| 523 | (name "lapack") |
| 524 | (version "3.7.1") |
| 525 | (source |
| 526 | (origin |
| 527 | (method url-fetch) |
| 528 | (uri (string-append "http://www.netlib.org/lapack/lapack-" |
| 529 | version ".tgz")) |
| 530 | (sha256 |
| 531 | (base32 |
| 532 | "1j51r7n5w4k7r3lrvy7710xrpkg40wf4rqnmngfz6ck9ypckzign")))) |
| 533 | (build-system cmake-build-system) |
| 534 | (home-page "http://www.netlib.org/lapack/") |
| 535 | (inputs `(("fortran" ,gfortran) |
| 536 | ("python" ,python-2))) |
| 537 | (arguments |
| 538 | `(#:configure-flags (list |
| 539 | "-DBUILD_SHARED_LIBS:BOOL=YES" |
| 540 | "-DLAPACKE=ON" |
| 541 | |
| 542 | ;; Build the 'LAPACKE_clatms' functions. |
| 543 | "-DLAPACKE_WITH_TMG=ON") |
| 544 | #:phases |
| 545 | (modify-phases %standard-phases |
| 546 | (add-before 'check 'patch-python |
| 547 | (lambda* (#:key inputs #:allow-other-keys) |
| 548 | (let ((python (assoc-ref inputs "python"))) |
| 549 | (substitute* "lapack_testing.py" |
| 550 | (("/usr/bin/env python") python))) |
| 551 | #t))))) |
| 552 | (synopsis "Library for numerical linear algebra") |
| 553 | (description |
| 554 | "LAPACK is a Fortran 90 library for solving the most commonly occurring |
| 555 | problems in numerical linear algebra.") |
| 556 | (license (license:non-copyleft "file://LICENSE" |
| 557 | "See LICENSE in the distribution.")))) |
| 558 | |
| 559 | (define-public scalapack |
| 560 | (package |
| 561 | (name "scalapack") |
| 562 | (version "2.0.2") |
| 563 | (source |
| 564 | (origin |
| 565 | (method url-fetch) |
| 566 | (uri (string-append "http://www.netlib.org/scalapack/scalapack-" |
| 567 | version ".tgz")) |
| 568 | (sha256 |
| 569 | (base32 |
| 570 | "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c")))) |
| 571 | (build-system cmake-build-system) |
| 572 | (inputs |
| 573 | `(("mpi" ,openmpi) |
| 574 | ("fortran" ,gfortran) |
| 575 | ("lapack" ,lapack))) ;for testing only |
| 576 | (arguments |
| 577 | `(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES") |
| 578 | #:phases (modify-phases %standard-phases |
| 579 | (add-before 'check 'set-test-environment |
| 580 | (lambda _ |
| 581 | ;; By default, running the test suite would fail because |
| 582 | ;; 'ssh' could not be found in $PATH. Define this |
| 583 | ;; variable to placate Open MPI without adding a |
| 584 | ;; dependency on OpenSSH (the agent isn't used anyway.) |
| 585 | (setenv "OMPI_MCA_plm_rsh_agent" (which "cat")) |
| 586 | #t))))) |
| 587 | (home-page "http://www.netlib.org/scalapack/") |
| 588 | (synopsis "Library for scalable numerical linear algebra") |
| 589 | (description |
| 590 | "ScaLAPACK is a Fortran 90 library of high-performance linear algebra |
| 591 | routines on parallel distributed memory machines. ScaLAPACK solves dense and |
| 592 | banded linear systems, least squares problems, eigenvalue problems, and |
| 593 | singular value problems.") |
| 594 | (license (license:bsd-style "file://LICENSE" |
| 595 | "See LICENSE in the distribution.")))) |
| 596 | |
| 597 | (define-public gnuplot |
| 598 | (package |
| 599 | (name "gnuplot") |
| 600 | (version "5.2.2") |
| 601 | (source (origin |
| 602 | (method url-fetch) |
| 603 | (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/" |
| 604 | version "/gnuplot-" |
| 605 | version ".tar.gz")) |
| 606 | (sha256 |
| 607 | (base32 |
| 608 | "18diyy7aib9mn098x07g25c7jij1x7wbfpicz0z8gwxx08px45m4")))) |
| 609 | (build-system gnu-build-system) |
| 610 | (inputs `(("readline" ,readline) |
| 611 | ("cairo" ,cairo) |
| 612 | ("pango" ,pango) |
| 613 | ("gd" ,gd) |
| 614 | ("lua" ,lua))) |
| 615 | (native-inputs |
| 616 | `(("pkg-config" ,pkg-config) |
| 617 | ("texlive" ,texlive-tiny))) |
| 618 | (arguments `(#:configure-flags (list (string-append |
| 619 | "--with-texdir=" %output |
| 620 | "/texmf-local/tex/latex/gnuplot")))) |
| 621 | (home-page "http://www.gnuplot.info") |
| 622 | (synopsis "Command-line driven graphing utility") |
| 623 | (description "Gnuplot is a portable command-line driven graphing |
| 624 | utility. It was originally created to allow scientists and students to |
| 625 | visualize mathematical functions and data interactively, but has grown to |
| 626 | support many non-interactive uses such as web scripting. It is also used as a |
| 627 | plotting engine by third-party applications like Octave.") |
| 628 | ;; X11 Style with the additional restriction that derived works may only be |
| 629 | ;; distributed as patches to the original. |
| 630 | (license (license:fsf-free |
| 631 | "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright")))) |
| 632 | |
| 633 | (define-public gctp |
| 634 | (package |
| 635 | (name "gctp") |
| 636 | (version "2.0.0") |
| 637 | (source |
| 638 | (origin |
| 639 | (method url-fetch) |
| 640 | (uri (string-append "https://github.com/OkoSanto/GCTP/archive/v" |
| 641 | version ".tar.gz")) |
| 642 | (file-name (string-append name "-" version ".tar.gz")) |
| 643 | (sha256 |
| 644 | (base32 |
| 645 | "0l9aqnqynh9laicn5dxf3rsb1n14xiks79wbyqccirzmjqd1c1x4")))) |
| 646 | (native-inputs |
| 647 | `(("fortran" ,gfortran))) |
| 648 | (build-system gnu-build-system) |
| 649 | (synopsis "General Cartographic Transformation Package (GCTP)") |
| 650 | (description |
| 651 | "The General Cartographic Transformation Package (GCTP) is a system of |
| 652 | software routines designed to permit the transformation of coordinate pairs |
| 653 | from one map projection to another. The GCTP is the standard computer |
| 654 | software used by the National Mapping Division for map projection |
| 655 | computations.") |
| 656 | (home-page "https://github.com/OkoSanto/GCTP") |
| 657 | (license license:public-domain))) ;https://www2.usgs.gov/laws/info_policies.html |
| 658 | |
| 659 | (define-public hdf4 |
| 660 | (package |
| 661 | (name "hdf4") |
| 662 | (version "4.2.13") |
| 663 | (source |
| 664 | (origin |
| 665 | (method url-fetch) |
| 666 | (uri (string-append "https://support.hdfgroup.org/ftp/HDF/releases/HDF" |
| 667 | version "/src/hdf-" version ".tar.bz2")) |
| 668 | (sha256 |
| 669 | (base32 "1wz0586zh91pqb95wvr0pbh71a8rz358fdj6n2ksp85x2cis9lsm")) |
| 670 | (patches (search-patches "hdf4-architectures.patch" |
| 671 | "hdf4-reproducibility.patch" |
| 672 | "hdf4-shared-fortran.patch")))) |
| 673 | (build-system gnu-build-system) |
| 674 | (native-inputs |
| 675 | `(("gfortran" ,gfortran) |
| 676 | ("bison" ,bison) |
| 677 | ("flex" ,flex))) |
| 678 | (inputs |
| 679 | `(("zlib" ,zlib) |
| 680 | ("libjpeg" ,libjpeg))) |
| 681 | (arguments |
| 682 | `(#:parallel-tests? #f |
| 683 | #:configure-flags '("--enable-shared") |
| 684 | #:phases |
| 685 | (modify-phases %standard-phases |
| 686 | ;; This is inspired by two of Debian's patches. |
| 687 | (add-before 'configure 'add-more-aarch64-support |
| 688 | (lambda _ |
| 689 | (substitute* '("mfhdf/ncgen/ncgen.l" |
| 690 | "mfhdf/ncgen/ncgenyy.c" |
| 691 | "mfhdf/libsrc/netcdf.h.in") |
| 692 | (("AIX5L64") "__aarch64__")) |
| 693 | #t)) |
| 694 | (add-before 'configure 'patchbuild |
| 695 | (lambda _ |
| 696 | (substitute* |
| 697 | '("mfhdf/hdfimport/testutil.sh.in" "hdf/util/testutil.sh.in") |
| 698 | (("/bin/rm") "rm") |
| 699 | (("/bin/mkdir") "mkdir")) |
| 700 | (substitute* (find-files "." "^Makefile\\.in$") |
| 701 | (("@HDF_BUILD_XDR_TRUE@XDR_ADD = \ |
| 702 | -R\\$\\(abs_top_builddir\\)/mfhdf/xdr/\\.libs") "") |
| 703 | (("@HDF_BUILD_SHARED_TRUE@AM_LDFLAGS = \ |
| 704 | -R\\$\\(abs_top_builddir\\)/mfhdf/libsrc/\\.libs \ |
| 705 | -R\\$\\(abs_top_builddir\\)/hdf/src/\\.libs \\$\\(XDR_ADD\\)") "")) |
| 706 | #t)) |
| 707 | (add-after 'configure 'patch-settings |
| 708 | (lambda _ |
| 709 | ;; libhdf4.settings contains the full path of the |
| 710 | ;; compilers used, and its contents are included in |
| 711 | ;; .so-files. We truncate the hashes to avoid |
| 712 | ;; unnecessary store references to those compilers: |
| 713 | (substitute* "libhdf4.settings" |
| 714 | (("(/gnu/store/)([a-Z0-9]*)" all prefix hash) |
| 715 | (string-append prefix (string-take hash 10) "..."))) |
| 716 | #t)) |
| 717 | ))) |
| 718 | (home-page "https://www.hdfgroup.org/products/hdf4/") |
| 719 | (synopsis |
| 720 | "Library and multi-object file format for storing and managing data") |
| 721 | (description "HDF4 is a library and multi-object file format for storing |
| 722 | and managing data between machines. HDF4 is an older hierarchical data format, |
| 723 | incompatible with HDF5.") |
| 724 | (license |
| 725 | (license:non-copyleft |
| 726 | "https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/COPYING")))) |
| 727 | |
| 728 | (define-public hdf4-alt |
| 729 | (package |
| 730 | (inherit hdf4) |
| 731 | (name "hdf4-alt") |
| 732 | (arguments |
| 733 | (substitute-keyword-arguments (package-arguments hdf4) |
| 734 | ((#:configure-flags flags) `(cons* "--disable-netcdf" ,flags)))) |
| 735 | (synopsis |
| 736 | "HDF4 without netCDF API, can be combined with the regular netCDF library"))) |
| 737 | |
| 738 | (define-public hdf5 |
| 739 | (package |
| 740 | (name "hdf5") |
| 741 | (version "1.8.19") |
| 742 | (source |
| 743 | (origin |
| 744 | (method url-fetch) |
| 745 | (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" |
| 746 | "hdf5-" (version-major+minor version) |
| 747 | "/hdf5-" version "/src/hdf5-" |
| 748 | version ".tar.bz2") |
| 749 | (string-append "https://support.hdfgroup.org/ftp/HDF5/" |
| 750 | "current" |
| 751 | (apply string-append |
| 752 | (take (string-split version #\.) 2)) |
| 753 | "/src/hdf5-" version ".tar.bz2"))) |
| 754 | (sha256 |
| 755 | (base32 "0f3jfbqpaaq21ighi40qzs52nb52kc2d2yjk541rjmsx20b3ih2r")) |
| 756 | (patches (list (search-patch "hdf5-config-date.patch"))))) |
| 757 | (build-system gnu-build-system) |
| 758 | (inputs |
| 759 | `(("zlib" ,zlib))) |
| 760 | (native-inputs |
| 761 | `(("gfortran" ,gfortran))) |
| 762 | (outputs '("out" ; core library |
| 763 | "fortran")) ; fortran interface |
| 764 | (arguments |
| 765 | `(;; Some of the users, notably Flann, need the C++ interface. |
| 766 | #:configure-flags '("--enable-cxx" |
| 767 | "--enable-fortran" |
| 768 | "--enable-fortran2003") |
| 769 | ;; Use -fPIC to allow the R bindings to link with the static libraries |
| 770 | #:make-flags (list "CFLAGS=-fPIC" |
| 771 | "CXXFLAGS=-fPIC") |
| 772 | #:phases |
| 773 | (modify-phases %standard-phases |
| 774 | (add-before 'configure 'patch-configure |
| 775 | (lambda* (#:key outputs #:allow-other-keys) |
| 776 | (substitute* "configure" |
| 777 | (("/bin/mv") "mv")) |
| 778 | (substitute* "fortran/src/Makefile.in" |
| 779 | (("libhdf5_fortran_la_LDFLAGS =") |
| 780 | (string-append "libhdf5_fortran_la_LDFLAGS = -Wl-rpath=" |
| 781 | (assoc-ref outputs "fortran") "/lib"))) |
| 782 | (substitute* "hl/fortran/src/Makefile.in" |
| 783 | (("libhdf5hl_fortran_la_LDFLAGS =") |
| 784 | (string-append "libhdf5hl_fortran_la_LDFLAGS = -Wl,-rpath=" |
| 785 | (assoc-ref outputs "fortran") "/lib"))) |
| 786 | #t)) |
| 787 | (add-after 'configure 'patch-settings |
| 788 | (lambda _ |
| 789 | ;; libhdf5.settings contains the full path of the |
| 790 | ;; compilers used, and its contents are included in |
| 791 | ;; libhdf5.so. We truncate the hashes to avoid |
| 792 | ;; unnecessary store references to those compilers: |
| 793 | (substitute* "src/libhdf5.settings" |
| 794 | (("(/gnu/store/)([a-Z0-9]*)" all prefix hash) |
| 795 | (string-append prefix (string-take hash 10) "...")) |
| 796 | ;; Don't record the build-time kernel version to make the |
| 797 | ;; settings file reproducible. |
| 798 | (("Uname information:.*") |
| 799 | "Uname information: Linux\n")) |
| 800 | #t)) |
| 801 | (add-after 'install 'patch-references |
| 802 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 803 | (let ((bin (string-append (assoc-ref outputs "out") "/bin")) |
| 804 | (zlib (assoc-ref inputs "zlib"))) |
| 805 | (substitute* (find-files bin "h5p?cc") |
| 806 | (("-lz" lib) |
| 807 | (string-append "-L" zlib "/lib " lib))) |
| 808 | #t))) |
| 809 | (add-after 'install 'split |
| 810 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 811 | ;; Move all fortran-related files |
| 812 | (let* ((out (assoc-ref outputs "out")) |
| 813 | (bin (string-append out "/bin")) |
| 814 | (lib (string-append out "/lib")) |
| 815 | (inc (string-append out "/include")) |
| 816 | (ex (string-append out "/share/hdf5_examples/fortran")) |
| 817 | (fort (assoc-ref outputs "fortran")) |
| 818 | (fbin (string-append fort "/bin")) |
| 819 | (flib (string-append fort "/lib")) |
| 820 | (finc (string-append fort "/include")) |
| 821 | (fex (string-append fort "/share/hdf5_examples/fortran"))) |
| 822 | (mkdir-p fbin) |
| 823 | (mkdir-p flib) |
| 824 | (mkdir-p finc) |
| 825 | (mkdir-p fex) |
| 826 | (rename-file (string-append bin "/h5fc") |
| 827 | (string-append fbin "/h5fc")) |
| 828 | (for-each (lambda (file) |
| 829 | (rename-file file |
| 830 | (string-append flib "/" (basename file)))) |
| 831 | (find-files lib ".*fortran.*")) |
| 832 | (for-each (lambda (file) |
| 833 | (rename-file file |
| 834 | (string-append finc "/" (basename file)))) |
| 835 | (find-files inc ".*mod")) |
| 836 | (for-each (lambda (file) |
| 837 | (rename-file file |
| 838 | (string-append fex "/" (basename file)))) |
| 839 | (find-files ex ".*")) |
| 840 | (delete-file-recursively ex)) |
| 841 | #t))))) |
| 842 | (home-page "http://www.hdfgroup.org") |
| 843 | (synopsis "Management suite for extremely large and complex data") |
| 844 | (description "HDF5 is a suite that makes possible the management of |
| 845 | extremely large and complex data collections.") |
| 846 | (license (license:x11-style |
| 847 | "http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING")))) |
| 848 | |
| 849 | (define-public hdf-java |
| 850 | (package |
| 851 | (name "hdf-java") |
| 852 | (version "3.3.2") |
| 853 | (source |
| 854 | (origin |
| 855 | (method url-fetch) |
| 856 | (uri (string-append |
| 857 | "http://www.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfjni-" |
| 858 | version "/src/CMake-hdfjava-" version ".tar.gz")) |
| 859 | (sha256 |
| 860 | (base32 "0m1gp2aspcblqzmpqbdpfp6giskws85ds6p5gz8sx7asyp7wznpr")) |
| 861 | (modules '((guix build utils))) |
| 862 | (snippet ; Make sure we don't use the bundled sources and binaries. |
| 863 | `(begin |
| 864 | (for-each delete-file |
| 865 | (list "SZip.tar.gz" "ZLib.tar.gz" "JPEG8d.tar.gz" |
| 866 | "HDF4.tar.gz" "HDF5.tar.gz")) |
| 867 | (delete-file-recursively ,(string-append "hdfjava-" version "/lib")) |
| 868 | #t)))) |
| 869 | (build-system gnu-build-system) |
| 870 | (native-inputs |
| 871 | `(("jdk" ,icedtea "jdk") |
| 872 | ("automake" ,automake) ; For up to date 'config.guess' and 'config.sub'. |
| 873 | ;; For tests: |
| 874 | ("hamcrest-core" ,java-hamcrest-core) |
| 875 | ("junit" ,java-junit) |
| 876 | ("slf4j-simple" ,java-slf4j-simple))) |
| 877 | (inputs |
| 878 | `(("hdf4" ,hdf4) |
| 879 | ("hdf5" ,hdf5) |
| 880 | ("zlib" ,zlib) |
| 881 | ("libjpeg" ,libjpeg) |
| 882 | ("slf4j-api" ,java-slf4j-api))) |
| 883 | (arguments |
| 884 | `(#:configure-flags |
| 885 | (list (string-append "--target=" ,(or (%current-target-system) (%current-system))) |
| 886 | (string-append "--with-jdk=" (assoc-ref %build-inputs "jdk") "/include," |
| 887 | (assoc-ref %build-inputs "jdk") "/lib" ) |
| 888 | (string-append "--with-hdf4=" (assoc-ref %build-inputs "hdf4") "/lib") |
| 889 | (string-append "--with-hdf5=" (assoc-ref %build-inputs "hdf5") "/lib")) |
| 890 | |
| 891 | #:make-flags |
| 892 | (list (string-append "HDFLIB=" (assoc-ref %build-inputs "hdf4") "/lib") |
| 893 | (string-append "HDF5LIB=" (assoc-ref %build-inputs "hdf5") "/lib") |
| 894 | (string-append "ZLIB=" (assoc-ref %build-inputs "zlib") "/lib/libz.so") |
| 895 | (string-append "JPEGLIB=" |
| 896 | (assoc-ref %build-inputs "libjpeg") "/lib/libjpeg.so") |
| 897 | "LLEXT=so") |
| 898 | |
| 899 | #:phases |
| 900 | (modify-phases %standard-phases |
| 901 | (add-before 'configure 'chdir-to-source |
| 902 | (lambda _ (chdir ,(string-append "hdfjava-" version)))) |
| 903 | (add-before 'configure 'patch-build |
| 904 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 905 | (substitute* "configure" |
| 906 | (("COPT=\"") "COPT=\"-O2 ") ; CFLAGS is ignored in Makefiles |
| 907 | (("/bin/cat") (which "cat"))) |
| 908 | ;; Set classpath for compilation |
| 909 | (substitute* '("hdf/hdf5lib/Makefile.in" |
| 910 | "hdf/hdf5lib/exceptions/Makefile.in" |
| 911 | "hdf/hdflib/Makefile.in") |
| 912 | (("\\$\\(TOP\\)/lib/slf4j-api-1\\.7\\.5\\.jar") |
| 913 | (string-append (assoc-ref inputs "slf4j-api") |
| 914 | "/share/java/slf4j-api.jar"))) |
| 915 | ;; Replace outdated config.sub and config.guess: |
| 916 | (with-directory-excursion "config" |
| 917 | (for-each (lambda (file) |
| 918 | (copy-file |
| 919 | (string-append (assoc-ref inputs "automake") |
| 920 | "/share/automake-1.15/" file) file)) |
| 921 | '("config.sub" "config.guess"))) |
| 922 | (mkdir-p (string-append (assoc-ref outputs "out"))) |
| 923 | ;; Set classpath for tests |
| 924 | (let* ((build-dir (getcwd)) |
| 925 | (lib (string-append build-dir "/lib")) |
| 926 | (jhdf (string-append lib "/jhdf.jar")) |
| 927 | (jhdf5 (string-append lib "/jhdf5.jar")) |
| 928 | (testjars |
| 929 | (map (lambda (i) |
| 930 | (string-append (assoc-ref inputs i) |
| 931 | "/share/java/" i ".jar")) |
| 932 | '("junit" "hamcrest-core" "slf4j-api" "slf4j-simple"))) |
| 933 | (class-path |
| 934 | (string-join `("." ,build-dir ,jhdf ,jhdf5 ,@testjars) ":"))) |
| 935 | |
| 936 | (substitute* '("test/hdf5lib/Makefile.in" |
| 937 | "test/hdf5lib/junit.sh.in" |
| 938 | "examples/runExample.sh.in") |
| 939 | (("/usr/bin/test") |
| 940 | (string-append (assoc-ref inputs "coreutils") |
| 941 | "/bin/test")) |
| 942 | (("/usr/bin/uname") |
| 943 | (string-append (assoc-ref inputs "coreutils") |
| 944 | "/bin/uname")) |
| 945 | (("CLASSPATH=[^\n]*") |
| 946 | (string-append "CLASSPATH=" class-path))) |
| 947 | (setenv "CLASSPATH" class-path)) |
| 948 | #t)) |
| 949 | (add-before 'check 'build-examples |
| 950 | (lambda _ |
| 951 | (zero? (apply system* `("javac" |
| 952 | ,@(find-files "examples" ".*\\.java"))))))) |
| 953 | |
| 954 | #:parallel-build? #f |
| 955 | |
| 956 | #:parallel-tests? #f )) |
| 957 | (home-page "https://support.hdfgroup.org/products/java") |
| 958 | (synopsis "Java interface for the HDF4 and HDF5 libraries") |
| 959 | (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use |
| 960 | the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are |
| 961 | implemented in C.") |
| 962 | |
| 963 | ;; BSD-style license: |
| 964 | (license (license:x11-style |
| 965 | "https://support.hdfgroup.org/ftp/HDF5/hdf-java\ |
| 966 | /current/src/unpacked/COPYING")))) |
| 967 | |
| 968 | (define-public hdf-eos2 |
| 969 | (package |
| 970 | (name "hdf-eos2") |
| 971 | (version "19.1.0") |
| 972 | (source |
| 973 | (origin |
| 974 | (method url-fetch) |
| 975 | (uri "ftp://edhs1.gsfc.nasa.gov\ |
| 976 | /edhs/hdfeos/latest_release/HDF-EOS2.19v1.00.tar.Z") |
| 977 | (sha256 |
| 978 | (base32 "0c9fcz25s292ldap12wxmlrvnyz99z24p63d8fwx51bf8s0s1zrz")) |
| 979 | (patches (search-patches "hdf-eos2-remove-gctp.patch" |
| 980 | "hdf-eos2-build-shared.patch" |
| 981 | "hdf-eos2-fortrantests.patch")))) |
| 982 | (build-system gnu-build-system) |
| 983 | (native-inputs |
| 984 | `(("gfortran" ,gfortran))) |
| 985 | (inputs |
| 986 | `(("hdf4" ,hdf4-alt) ; assume most HDF-EOS2 users won't use the HDF4 netCDF API |
| 987 | ("zlib" ,zlib) |
| 988 | ("libjpeg" ,libjpeg) |
| 989 | ("gctp" ,gctp))) |
| 990 | (arguments |
| 991 | `( #:configure-flags '("--enable-install-include" "--enable-shared" |
| 992 | "CC=h4cc -Df2cFortran" "LIBS=-lgctp") |
| 993 | #:parallel-tests? #f)) |
| 994 | (home-page "http://hdfeos.org/software/library.php#HDF-EOS2") |
| 995 | (synopsis "HDF4-based data format for NASA's Earth Observing System") |
| 996 | (description "HDF-EOS2 is a software library built on HDF4 which supports |
| 997 | the construction of data structures used in NASA's Earth Observing |
| 998 | System (Grid, Point and Swath).") |
| 999 | |
| 1000 | ;; Source files carry a permissive license header. |
| 1001 | (license (license:non-copyleft home-page)))) |
| 1002 | |
| 1003 | (define-public hdf-eos5 |
| 1004 | (package |
| 1005 | (name "hdf-eos5") |
| 1006 | (version "1.15") |
| 1007 | (source (origin |
| 1008 | (method url-fetch) |
| 1009 | (uri (string-append "ftp://edhs1.gsfc.nasa.gov\ |
| 1010 | /edhs/hdfeos5/latest_release/HDF-EOS5." version ".tar.Z")) |
| 1011 | (sha256 |
| 1012 | (base32 |
| 1013 | "1p83333nzzy8rn5chxlm0hrkjjnhh2w1ji8ac0f9q4xzg838i58i")) |
| 1014 | (patches (search-patches "hdf-eos5-build-shared.patch" |
| 1015 | "hdf-eos5-remove-gctp.patch" |
| 1016 | "hdf-eos5-fix-szip.patch" |
| 1017 | "hdf-eos5-fortrantests.patch")))) |
| 1018 | (native-inputs |
| 1019 | `(("gfortran" ,gfortran))) |
| 1020 | (build-system gnu-build-system) |
| 1021 | (inputs |
| 1022 | `(("hdf5" ,hdf5) |
| 1023 | ("zlib" ,zlib) |
| 1024 | ("gctp" ,gctp))) |
| 1025 | (arguments |
| 1026 | `(#:configure-flags '("--enable-install-include" "--enable-shared" |
| 1027 | "CC=h5cc -Df2cFortran" "LIBS=-lgctp") |
| 1028 | #:parallel-tests? #f)) |
| 1029 | (synopsis "HDF5-based data format for NASA's Earth Observing System") |
| 1030 | (description |
| 1031 | "HDF-EOS5 is a software library built on HDF5 to support the construction |
| 1032 | of data structures used in NASA's Earth Observing System (Grid, Point and |
| 1033 | Swath).") |
| 1034 | (home-page "http://www.hdfeos.org/software/library.php#HDF-EOS5") |
| 1035 | |
| 1036 | ;; Source files carry a permissive license header. |
| 1037 | (license (license:non-copyleft home-page)))) |
| 1038 | |
| 1039 | (define-public hdf5-parallel-openmpi |
| 1040 | (package (inherit hdf5) |
| 1041 | (name "hdf5-parallel-openmpi") |
| 1042 | (inputs |
| 1043 | `(("mpi" ,openmpi) |
| 1044 | ,@(package-inputs hdf5))) |
| 1045 | (arguments |
| 1046 | (substitute-keyword-arguments `(#:configure-flags '("--enable-parallel") |
| 1047 | ,@(package-arguments hdf5)) |
| 1048 | ((#:phases phases) |
| 1049 | `(modify-phases ,phases |
| 1050 | (add-before 'check 'patch-tests |
| 1051 | (lambda _ |
| 1052 | ;; OpenMPI's mpirun will exit with non-zero status if it |
| 1053 | ;; detects an "abnormal termination", i.e. any process not |
| 1054 | ;; calling MPI_Finalize(). Since the test is explicitely |
| 1055 | ;; avoiding MPI_Finalize so as not to have at_exit and thus |
| 1056 | ;; H5C_flush_cache from being called, mpirun will always |
| 1057 | ;; complain, so turn this test off. |
| 1058 | (substitute* "testpar/Makefile" |
| 1059 | (("(^TEST_PROG_PARA.*)t_pflush1(.*)" front back) |
| 1060 | (string-append front back "\n"))) |
| 1061 | (substitute* "tools/h5diff/testph5diff.sh" |
| 1062 | (("/bin/sh") (which "sh"))) |
| 1063 | #t)))))) |
| 1064 | (synopsis "Management suite for data with parallel IO support"))) |
| 1065 | |
| 1066 | (define-public h5check |
| 1067 | (package |
| 1068 | (name "h5check") |
| 1069 | (version "2.0.1") |
| 1070 | (source |
| 1071 | (origin |
| 1072 | (method url-fetch) |
| 1073 | (uri (string-append "http://www.hdfgroup.org/ftp/HDF5/tools/" |
| 1074 | "h5check/src/h5check-" version ".tar.gz")) |
| 1075 | (sha256 |
| 1076 | (base32 |
| 1077 | "1gm76jbwhz9adbxgn14zx8cj33dmjdr2g5xcy0m9c2gakp8w59kj")))) |
| 1078 | (build-system gnu-build-system) |
| 1079 | (inputs `(("hdf5" ,hdf5))) ;h5cc for tests |
| 1080 | (home-page "https://www.hdfgroup.org/products/hdf5_tools/h5check.html") |
| 1081 | (synopsis "HDF5 format checker") |
| 1082 | (description "@code{h5check} is a validation tool for verifying that an |
| 1083 | HDF5 file is encoded according to the HDF File Format Specification.") |
| 1084 | (license (license:x11-style "file://COPYING")))) |
| 1085 | |
| 1086 | (define-public itpp |
| 1087 | (package |
| 1088 | (name "itpp") |
| 1089 | (version "4.3.1") |
| 1090 | (source (origin |
| 1091 | (method url-fetch) |
| 1092 | (uri (string-append "mirror://sourceforge/itpp/itpp/" |
| 1093 | version "/itpp-" |
| 1094 | version ".tar.gz")) |
| 1095 | (sha256 |
| 1096 | (base32 |
| 1097 | "14ddy2xnb6sgp4hiax9v5sv4pr4l4dd4ps76nfha3nrpr1ikhcqm")))) |
| 1098 | (build-system cmake-build-system) |
| 1099 | (arguments `(#:tests? #f)) ; Tests require googletest *sources* |
| 1100 | (inputs `(("lapack" ,lapack) |
| 1101 | ("fftw" ,fftw))) |
| 1102 | ;; FIXME: Even though the fonts are available dvips complains: |
| 1103 | ;; "Font cmmi10 not found; characters will be left blank." |
| 1104 | (native-inputs |
| 1105 | `(("texlive" ,texlive-tiny) |
| 1106 | ("ghostscript" ,ghostscript) |
| 1107 | ("doxygen" ,doxygen))) |
| 1108 | (home-page "http://itpp.sourceforge.net") |
| 1109 | (synopsis "C++ library of maths, signal processing and communication classes") |
| 1110 | (description "IT++ is a C++ library of mathematical, signal processing and |
| 1111 | communication classes and functions. Its main use is in simulation of |
| 1112 | communication systems and for performing research in the area of |
| 1113 | communications. The kernel of the library consists of generic vector and |
| 1114 | matrix classes, and a set of accompanying routines. Such a kernel makes IT++ |
| 1115 | similar to MATLAB, GNU Octave or SciPy.") |
| 1116 | (license license:gpl3+))) |
| 1117 | |
| 1118 | (define-public netcdf |
| 1119 | (package |
| 1120 | (name "netcdf") |
| 1121 | (version "4.4.1.1") |
| 1122 | (source |
| 1123 | (origin |
| 1124 | (method url-fetch) |
| 1125 | (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/netcdf/" |
| 1126 | "netcdf-" version ".tar.gz")) |
| 1127 | (sha256 |
| 1128 | (base32 |
| 1129 | "1blc7ik5yin7i0ls2kag0a9xjk12m0dzx6v1x88az3ras3scci2d")) |
| 1130 | (patches (search-patches "netcdf-date-time.patch" |
| 1131 | "netcdf-tst_h_par.patch")))) |
| 1132 | (build-system gnu-build-system) |
| 1133 | (native-inputs |
| 1134 | `(("m4" ,m4) |
| 1135 | ("doxygen" ,doxygen) |
| 1136 | ("graphviz" ,graphviz))) |
| 1137 | (inputs |
| 1138 | `(("hdf4" ,hdf4-alt) |
| 1139 | ("hdf5" ,hdf5) |
| 1140 | ("zlib" ,zlib) |
| 1141 | ("libjpeg" ,libjpeg))) |
| 1142 | (arguments |
| 1143 | `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4") |
| 1144 | |
| 1145 | #:phases (modify-phases %standard-phases |
| 1146 | (add-before 'configure 'fix-source-date |
| 1147 | (lambda _ |
| 1148 | ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build |
| 1149 | ;; environment, `date -u -d ${SOURCE_DATE_EPOCH}` will evaluate |
| 1150 | ;; to '1st hour of the current day', and therefore makes the |
| 1151 | ;; package not reproducible. |
| 1152 | (substitute* "./configure" |
| 1153 | (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"") |
| 1154 | "date --date='@0'")) |
| 1155 | #t)) |
| 1156 | (add-after 'configure 'patch-settings |
| 1157 | (lambda _ |
| 1158 | ;; libnetcdf.settings contains the full filename of the compilers |
| 1159 | ;; used to build the library. We truncate the hashes of those |
| 1160 | ;; filenames to avoid unnecessary references to the corresponding |
| 1161 | ;; store items. |
| 1162 | (substitute* "libnetcdf.settings" |
| 1163 | (("(/gnu/store/)([a-Z0-9]*)" all prefix hash) |
| 1164 | (string-append prefix (string-take hash 10) "..."))) |
| 1165 | #t))) |
| 1166 | |
| 1167 | #:parallel-tests? #f)) ;various race conditions |
| 1168 | (home-page "http://www.unidata.ucar.edu/software/netcdf/") |
| 1169 | (synopsis "Library for scientific data") |
| 1170 | (description "NetCDF is an interface for scientific data access and a |
| 1171 | software library that provides an implementation of the interface. The netCDF |
| 1172 | library defines a machine-independent format for representing scientific data. |
| 1173 | Together, the interface, library, and format support the creation, access, and |
| 1174 | sharing of scientific data.") |
| 1175 | (license (license:x11-style "file://COPYRIGHT")))) |
| 1176 | |
| 1177 | (define-public netcdf-parallel-openmpi |
| 1178 | (package (inherit netcdf) |
| 1179 | (name "netcdf-parallel-openmpi") |
| 1180 | (inputs |
| 1181 | `(("mpi" ,openmpi) |
| 1182 | ,@(alist-replace "hdf5" (list hdf5-parallel-openmpi) |
| 1183 | (package-inputs netcdf)))) |
| 1184 | ;; TODO: Replace pkg-config references in nc-config with absolute references |
| 1185 | (arguments |
| 1186 | (substitute-keyword-arguments (package-arguments netcdf) |
| 1187 | ((#:configure-flags flags) |
| 1188 | `(cons* "CC=mpicc" "CXX=mpicxx" |
| 1189 | "--enable-parallel-tests" |
| 1190 | ;; Shared libraries not supported with parallel IO. |
| 1191 | "--disable-shared" "--with-pic" |
| 1192 | ,flags)))))) |
| 1193 | |
| 1194 | (define-public netcdf-fortran |
| 1195 | (package |
| 1196 | (name "netcdf-fortran") |
| 1197 | (version "4.4.4") |
| 1198 | (source (origin |
| 1199 | (method url-fetch) |
| 1200 | (uri (string-append |
| 1201 | "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-" |
| 1202 | version ".tar.gz")) |
| 1203 | (sha256 |
| 1204 | (base32 |
| 1205 | "0xaxdcg1p83zmypwml3swsnr3ccn38inwldyr1l3wa4dbwbrblxj")))) |
| 1206 | (build-system gnu-build-system) |
| 1207 | (arguments |
| 1208 | `(#:parallel-tests? #f)) |
| 1209 | (inputs |
| 1210 | `(("netcdf" ,netcdf))) |
| 1211 | (native-inputs |
| 1212 | `(("gfortran" ,gfortran))) |
| 1213 | (synopsis "Fortran interface for the netCDF library") |
| 1214 | (description (package-description netcdf)) |
| 1215 | (home-page (package-home-page netcdf)) |
| 1216 | (license (package-license netcdf)))) |
| 1217 | |
| 1218 | (define-public nlopt |
| 1219 | (package |
| 1220 | (name "nlopt") |
| 1221 | (version "2.4.2") |
| 1222 | (source (origin |
| 1223 | (method url-fetch) |
| 1224 | (uri (string-append "http://ab-initio.mit.edu/nlopt/nlopt-" |
| 1225 | version ".tar.gz")) |
| 1226 | (sha256 |
| 1227 | (base32 "12cfkkhcdf4zmb6h7y6qvvdvqjs2xf9sjpa3rl3bq76px4yn76c0")))) |
| 1228 | (build-system gnu-build-system) |
| 1229 | (arguments |
| 1230 | `(;; Shared libraries are not built by default. They are required to |
| 1231 | ;; build the Guile, Octave, and Python bindings. |
| 1232 | #:configure-flags '("--enable-shared") |
| 1233 | |
| 1234 | #:phases |
| 1235 | (modify-phases %standard-phases |
| 1236 | (add-before 'configure 'set-libnlopt-file-name |
| 1237 | (lambda* (#:key outputs #:allow-other-keys) |
| 1238 | ;; Make sure the Scheme module refers to the library by its |
| 1239 | ;; absolute file name (we cannot do that from a snippet |
| 1240 | ;; because the expansion of @libdir@ contains |
| 1241 | ;; ${exec_prefix}.) |
| 1242 | (let ((out (assoc-ref outputs "out"))) |
| 1243 | (substitute* "swig/nlopt.scm.in" |
| 1244 | (("libnlopt") |
| 1245 | (string-append out "/lib/libnlopt"))) |
| 1246 | #t)))))) |
| 1247 | (inputs `(("guile" ,guile-2.0))) |
| 1248 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 1249 | (home-page "http://ab-initio.mit.edu/wiki/") |
| 1250 | (synopsis "Library for nonlinear optimization") |
| 1251 | (description "NLopt is a library for nonlinear optimization, providing a |
| 1252 | common interface for a number of different free optimization routines available |
| 1253 | online as well as original implementations of various other algorithms.") |
| 1254 | (license license:lgpl2.1+))) |
| 1255 | |
| 1256 | (define-public ipopt |
| 1257 | (package |
| 1258 | (name "ipopt") |
| 1259 | (version "3.12.5") |
| 1260 | (source (origin |
| 1261 | (method url-fetch) |
| 1262 | (uri (string-append |
| 1263 | "http://www.coin-or.org/download/source/Ipopt/Ipopt-" |
| 1264 | version".tgz")) |
| 1265 | (sha256 |
| 1266 | (base32 |
| 1267 | "09bk2hqy2vgi4yi76xng9zxakddwqy3wij9nx7wf2vfbxxpazrsk")) |
| 1268 | (modules '((guix build utils))) |
| 1269 | (snippet |
| 1270 | ;; Make sure we don't use the bundled software. |
| 1271 | '(begin |
| 1272 | (delete-file-recursively "ThirdParty") |
| 1273 | #t)))) |
| 1274 | (build-system gnu-build-system) |
| 1275 | (arguments |
| 1276 | '(#:phases (modify-phases %standard-phases |
| 1277 | (add-after 'install 'add--L-flags-in-ipopt.pc |
| 1278 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1279 | ;; The '.pc' file lists '-llapack -lblas' in "Libs"; |
| 1280 | ;; move it to "Libs.private" where it belongs, and add a |
| 1281 | ;; '-L' flag for LAPACK. |
| 1282 | (let ((out (assoc-ref outputs "out")) |
| 1283 | (lapack (assoc-ref inputs "lapack"))) |
| 1284 | (substitute* (string-append out "/lib/pkgconfig/" |
| 1285 | "ipopt.pc") |
| 1286 | (("Libs: (.*)-llapack -lblas(.*)$" _ before after) |
| 1287 | (string-append "Libs: " before " " after "\n" |
| 1288 | "Libs.private: " before |
| 1289 | "-L" lapack "/lib -llapack -lblas " |
| 1290 | after "\n"))) |
| 1291 | #t)))))) |
| 1292 | (native-inputs |
| 1293 | `(("gfortran" ,gfortran))) |
| 1294 | (inputs |
| 1295 | ;; TODO: Maybe add dependency on COIN-MUMPS, ASL, and HSL. |
| 1296 | `(("lapack" ,lapack))) ;for both libblas and liblapack |
| 1297 | (home-page "http://www.coin-or.org") |
| 1298 | (synopsis "Large-scale nonlinear optimizer") |
| 1299 | (description |
| 1300 | "The Interior Point Optimizer (IPOPT) is a software package for |
| 1301 | large-scale nonlinear optimization. It provides C++, C, and Fortran |
| 1302 | interfaces.") |
| 1303 | (license license:epl1.0))) |
| 1304 | |
| 1305 | (define-public ceres |
| 1306 | (package |
| 1307 | (name "ceres-solver") |
| 1308 | (version "1.14.0") |
| 1309 | (home-page "http://ceres-solver.org/") |
| 1310 | (source (origin |
| 1311 | (method url-fetch) |
| 1312 | (uri (string-append home-page "ceres-solver-" |
| 1313 | version ".tar.gz")) |
| 1314 | (sha256 |
| 1315 | (base32 |
| 1316 | "13lfxy8x58w8vprr0nkbzziaijlh0vvqshgahvcgw0mrqdgh0i27")))) |
| 1317 | (build-system cmake-build-system) |
| 1318 | (arguments |
| 1319 | ;; TODO: Build HTML user documentation and install separately. |
| 1320 | '(#:configure-flags '("-DBUILD_EXAMPLES=OFF" |
| 1321 | "-DBUILD_SHARED_LIBS=ON") |
| 1322 | |
| 1323 | #:phases (modify-phases %standard-phases |
| 1324 | (add-before 'configure 'set-library-directory |
| 1325 | (lambda _ |
| 1326 | ;; Install libraries to lib/, not lib64/. |
| 1327 | (substitute* "internal/ceres/CMakeLists.txt" |
| 1328 | (("set\\(LIB_SUFFIX \"64\"\\)") |
| 1329 | "set(LIB_SUFFIX \"\")")) |
| 1330 | #t))))) |
| 1331 | (native-inputs |
| 1332 | `(("pkg-config" ,pkg-config))) |
| 1333 | (propagated-inputs |
| 1334 | `(("glog" ,glog))) ;for #include <glog/glog.h> |
| 1335 | (inputs |
| 1336 | `(("eigen" ,eigen) |
| 1337 | ("blas" ,openblas) |
| 1338 | ("lapack" ,lapack) |
| 1339 | ("suitesparse" ,suitesparse) |
| 1340 | ("gflags" ,gflags))) |
| 1341 | (synopsis "C++ library for solving large optimization problems") |
| 1342 | (description |
| 1343 | "Ceres Solver is a C++ library for modeling and solving large, |
| 1344 | complicated optimization problems. It is a feature rich, mature and |
| 1345 | performant library which has been used in production since 2010. Ceres Solver |
| 1346 | can solve two kinds of problems: |
| 1347 | @enumerate |
| 1348 | @item non-linear least squares problems with bounds constraints; |
| 1349 | @item general unconstrained optimization problems. |
| 1350 | @end enumerate\n") |
| 1351 | (license license:bsd-3))) |
| 1352 | |
| 1353 | ;; For a fully featured Octave, users are strongly recommended also to install |
| 1354 | ;; the following packages: less, ghostscript, gnuplot. |
| 1355 | (define-public octave |
| 1356 | (package |
| 1357 | (name "octave") |
| 1358 | (version "4.4.0") |
| 1359 | (source |
| 1360 | (origin |
| 1361 | (method url-fetch) |
| 1362 | (uri (string-append "mirror://gnu/octave/octave-" |
| 1363 | version ".tar.lz")) |
| 1364 | (sha256 |
| 1365 | (base32 |
| 1366 | "0nm766737gbkq9wqry54a026k3dg7rb1065kngfpwgjz8b544xbp")))) |
| 1367 | (build-system gnu-build-system) |
| 1368 | (inputs |
| 1369 | `(("lapack" ,lapack) |
| 1370 | ("qhull" ,qhull) |
| 1371 | ("readline" ,readline) |
| 1372 | ("gl2ps" ,gl2ps) |
| 1373 | ("glpk" ,glpk) |
| 1374 | ("fftw" ,fftw) |
| 1375 | ("fftwf" ,fftwf) |
| 1376 | ("arpack" ,arpack-ng) |
| 1377 | ("pcre" ,pcre) |
| 1378 | ("fltk" ,fltk) |
| 1379 | ("fontconfig" ,fontconfig) |
| 1380 | ("freetype" ,freetype) |
| 1381 | ("hdf5" ,hdf5) |
| 1382 | ("libxft" ,libxft) |
| 1383 | ("mesa" ,mesa) |
| 1384 | ("glu" ,glu) |
| 1385 | ("zlib" ,zlib) |
| 1386 | ("curl" ,curl) |
| 1387 | ("texinfo" ,texinfo) |
| 1388 | ("graphicsmagick" ,graphicsmagick) |
| 1389 | ("suitesparse" ,suitesparse) |
| 1390 | ("libsndfile" ,libsndfile) |
| 1391 | ("portaudio" ,portaudio) |
| 1392 | ("alsa-lib" ,alsa-lib))) |
| 1393 | (native-inputs |
| 1394 | `(("lzip" ,lzip) |
| 1395 | ("gfortran" ,gfortran) |
| 1396 | ("pkg-config" ,pkg-config) |
| 1397 | ("perl" ,perl) |
| 1398 | ;; The following inputs are not actually used in the build process. |
| 1399 | ;; However, the ./configure gratuitously tests for their existence and |
| 1400 | ;; assumes that programs not present at build time are also not, and |
| 1401 | ;; can never be, available at run time! If these inputs are therefore |
| 1402 | ;; not present, support for them will be built out. However, Octave |
| 1403 | ;; will still run without them, albeit without the features they |
| 1404 | ;; provide. |
| 1405 | ("less" ,less) |
| 1406 | ("ghostscript" ,ghostscript) |
| 1407 | ("gnuplot" ,gnuplot))) |
| 1408 | (arguments |
| 1409 | `(#:configure-flags |
| 1410 | (list (string-append "--with-shell=" |
| 1411 | (assoc-ref %build-inputs "bash") |
| 1412 | "/bin/sh")) |
| 1413 | #:phases |
| 1414 | (modify-phases %standard-phases |
| 1415 | (add-after 'configure 'configure-makeinfo |
| 1416 | (lambda* (#:key inputs #:allow-other-keys) |
| 1417 | (substitute* "libinterp/corefcn/help.cc" |
| 1418 | (("Vmakeinfo_program = \"makeinfo\"") |
| 1419 | (string-append "Vmakeinfo_program = \"" |
| 1420 | (assoc-ref inputs "texinfo") |
| 1421 | "/bin/makeinfo\""))) |
| 1422 | #t))))) |
| 1423 | (home-page "https://www.gnu.org/software/octave/") |
| 1424 | (synopsis "High-level language for numerical computation") |
| 1425 | (description "GNU Octave is a high-level interpreted language that is |
| 1426 | specialized for numerical computations. It can be used for both linear and |
| 1427 | non-linear applications and it provides great support for visualizing results. |
| 1428 | Work may be performed both at the interactive command-line as well as via |
| 1429 | script files.") |
| 1430 | (license license:gpl3+))) |
| 1431 | |
| 1432 | (define-public qtoctave |
| 1433 | (package (inherit octave) |
| 1434 | (name "qtoctave") |
| 1435 | (source (origin |
| 1436 | (inherit (package-source octave)) |
| 1437 | (patches (append (origin-patches (package-source octave)) |
| 1438 | (search-patches |
| 1439 | "qtoctave-qt-5.11-fix.patch"))))) |
| 1440 | (inputs |
| 1441 | `(("qscintilla" ,qscintilla) |
| 1442 | ("qt" ,qtbase) |
| 1443 | ,@(package-inputs octave))) |
| 1444 | (native-inputs |
| 1445 | `(("qttools" , qttools) ;for lrelease |
| 1446 | ("texlive" ,texlive) ;for texi2dvi |
| 1447 | ,@(package-native-inputs octave))) |
| 1448 | (arguments |
| 1449 | (substitute-keyword-arguments (package-arguments octave) |
| 1450 | ((#:phases phases) |
| 1451 | `(modify-phases ,phases |
| 1452 | (add-before 'configure 'patch-qscintilla-library-name |
| 1453 | (lambda* (#:key inputs #:allow-other-keys) |
| 1454 | ;; The QScintilla library that the Octave configure script tries |
| 1455 | ;; to link with should be named libqscintilla-qt5.so, but the |
| 1456 | ;; QScintilla input provides the shared library as |
| 1457 | ;; libqscintilla2_qt5.so. |
| 1458 | (substitute* "configure" |
| 1459 | (("qscintilla2-qt5") |
| 1460 | "qscintilla2_qt5")) |
| 1461 | #t)))))))) |
| 1462 | |
| 1463 | (define-public opencascade-oce |
| 1464 | (package |
| 1465 | (name "opencascade-oce") |
| 1466 | (version "0.17.2") |
| 1467 | (source |
| 1468 | (origin |
| 1469 | (method url-fetch) |
| 1470 | (uri (string-append |
| 1471 | "https://github.com/tpaviot/oce/archive/OCE-" |
| 1472 | version |
| 1473 | ".tar.gz")) |
| 1474 | (patches (search-patches "opencascade-oce-glibc-2.26.patch")) |
| 1475 | (sha256 |
| 1476 | (base32 |
| 1477 | "0vpmnb0k5y2f7lpmwx9pg9yfq24zjvnsak5alzacncfm1hv9b6cd")))) |
| 1478 | (build-system cmake-build-system) |
| 1479 | (arguments |
| 1480 | '(#:configure-flags |
| 1481 | (list "-DOCE_TESTING:BOOL=ON" |
| 1482 | "-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=ON" |
| 1483 | "-DOCE_DRAW:BOOL=ON" |
| 1484 | (string-append "-DOCE_INSTALL_PREFIX:PATH=" |
| 1485 | (assoc-ref %outputs "out")) |
| 1486 | "-UCMAKE_INSTALL_RPATH"))) |
| 1487 | (inputs |
| 1488 | `(("freetype" ,freetype) |
| 1489 | ("glu" ,glu) |
| 1490 | ("libxmu" ,libxmu) |
| 1491 | ("mesa" ,mesa) |
| 1492 | ("tcl" ,tcl) |
| 1493 | ("tk" ,tk))) |
| 1494 | (native-inputs |
| 1495 | `(("python" ,python-wrapper))) |
| 1496 | (home-page "https://github.com/tpaviot/oce") |
| 1497 | (synopsis "Libraries for 3D modeling and numerical simulation") |
| 1498 | (description |
| 1499 | "Open CASCADE is a set of libraries for the development of applications |
| 1500 | dealing with 3D CAD data or requiring industrial 3D capabilities. It includes |
| 1501 | C++ class libraries providing services for 3D surface and solid modeling, CAD |
| 1502 | data exchange, and visualization. It is used for development of specialized |
| 1503 | software dealing with 3D models in design (CAD), manufacturing (CAM), |
| 1504 | numerical simulation (CAE), measurement equipment (CMM), and quality |
| 1505 | control (CAQ) domains. |
| 1506 | |
| 1507 | This is the ``Community Edition'' (OCE) of Open CASCADE, which gathers |
| 1508 | patches, improvements, and experiments contributed by users over the official |
| 1509 | Open CASCADE library.") |
| 1510 | (license (list license:lgpl2.1; OCE libraries, with an exception for the |
| 1511 | ; use of header files; see |
| 1512 | ; OCCT_LGPL_EXCEPTION.txt |
| 1513 | license:public-domain; files |
| 1514 | ; src/Standard/Standard_StdAllocator.hxx and |
| 1515 | ; src/NCollection/NCollection_StdAllocator.hxx |
| 1516 | license:expat; file src/OpenGl/OpenGl_glext.h |
| 1517 | license:bsd-3)))); test framework gtest |
| 1518 | |
| 1519 | (define-public gmsh |
| 1520 | (package |
| 1521 | (name "gmsh") |
| 1522 | (version "2.16.0") |
| 1523 | (source |
| 1524 | (origin |
| 1525 | (method url-fetch) |
| 1526 | (uri (string-append "http://gmsh.info/src/gmsh-" |
| 1527 | version "-source.tgz")) |
| 1528 | (sha256 |
| 1529 | (base32 "1slf0bfkwrcgn6296wb4qhbk4ahz6i4wfb10hnim08x05vrylag8")) |
| 1530 | (modules '((guix build utils))) |
| 1531 | (snippet |
| 1532 | ;; Remove non-free METIS code |
| 1533 | '(begin |
| 1534 | (delete-file-recursively "contrib/Metis") |
| 1535 | #t)))) |
| 1536 | (build-system cmake-build-system) |
| 1537 | (propagated-inputs |
| 1538 | `(("fltk" ,fltk) |
| 1539 | ("gfortran" ,gfortran) |
| 1540 | ("gmp" ,gmp) |
| 1541 | ("hdf5" ,hdf5) |
| 1542 | ("lapack" ,lapack) |
| 1543 | ("mesa" ,mesa) |
| 1544 | ("glu" ,glu) |
| 1545 | ("opencascade-oce" ,opencascade-oce) |
| 1546 | ("libx11" ,libx11) |
| 1547 | ("libxext" ,libxext))) |
| 1548 | (inputs |
| 1549 | `(("fontconfig" ,fontconfig) |
| 1550 | ("libxft" ,libxft))) |
| 1551 | (arguments |
| 1552 | `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF" |
| 1553 | "-DENABLE_BUILD_SHARED:BOOL=ON" |
| 1554 | "-DENABLE_BUILD_DYNAMIC:BOOL=ON"))) |
| 1555 | (home-page "http://www.geuz.org/gmsh/") |
| 1556 | (synopsis "3D finite element grid generator") |
| 1557 | (description "Gmsh is a 3D finite element grid generator with a built-in |
| 1558 | CAD engine and post-processor. Its design goal is to provide a fast, light |
| 1559 | and user-friendly meshing tool with parametric input and advanced |
| 1560 | visualization capabilities. Gmsh is built around four modules: geometry, |
| 1561 | mesh, solver and post-processing. The specification of any input to these |
| 1562 | modules is done either interactively using the graphical user interface or in |
| 1563 | ASCII text files using Gmsh's own scripting language.") |
| 1564 | (license license:gpl2+))) |
| 1565 | |
| 1566 | (define-public maxflow |
| 1567 | (package |
| 1568 | (name "maxflow") |
| 1569 | (version "3.04") |
| 1570 | (source (origin |
| 1571 | (method git-fetch) |
| 1572 | (uri (git-reference |
| 1573 | (url "https://github.com/gerddie/maxflow.git") |
| 1574 | (commit "42401fa54823d16b9da47716f04e5d9ef1605875"))) |
| 1575 | (file-name (string-append name "-" version "-checkout")) |
| 1576 | (sha256 |
| 1577 | (base32 |
| 1578 | "0rll38whw55h0vcjrrwdnh9ascvxby0ph7n1l0d12z17cg215kkb")))) |
| 1579 | (build-system cmake-build-system) |
| 1580 | (home-page "http://pub.ist.ac.at/~vnk/software.html") |
| 1581 | (synopsis "Library implementing Maxflow algorithm") |
| 1582 | (description "An implementation of the maxflow algorithm described in |
| 1583 | @cite{An Experimental Comparison of Min-Cut/Max-Flow Algorithms for |
| 1584 | Energy Minimization in Computer Vision.\n |
| 1585 | Yuri Boykov and Vladimir Kolmogorov.\n |
| 1586 | In IEEE Transactions on Pattern Analysis and Machine Intelligence,\n |
| 1587 | September 2004}") |
| 1588 | (license license:gpl3+))) |
| 1589 | |
| 1590 | (define-public petsc |
| 1591 | (package |
| 1592 | (name "petsc") |
| 1593 | (version "3.8.0") |
| 1594 | (source |
| 1595 | (origin |
| 1596 | (method url-fetch) |
| 1597 | ;; The *-lite-* tarball does not contain the *large* documentation |
| 1598 | (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/" |
| 1599 | "petsc-lite-" version ".tar.gz")) |
| 1600 | (sha256 |
| 1601 | (base32 "1lajbk3c29hnh83v6cbmm3a8wv6bdykh0p70kwrr4vrnizalk88s")))) |
| 1602 | (build-system gnu-build-system) |
| 1603 | (native-inputs |
| 1604 | `(("python" ,python-2))) |
| 1605 | (inputs |
| 1606 | `(("gfortran" ,gfortran) |
| 1607 | ("lapack" ,lapack) |
| 1608 | ("superlu" ,superlu) |
| 1609 | ;; leaving out hdf5 and fftw, as petsc expects them to be built with mpi |
| 1610 | ;; leaving out opengl, as configuration seems to only be for mac |
| 1611 | )) |
| 1612 | (arguments |
| 1613 | `(#:test-target "test" |
| 1614 | #:parallel-build? #f ;build is parallel by default |
| 1615 | #:configure-flags |
| 1616 | `("--with-mpi=0" |
| 1617 | "--with-openmp=1" |
| 1618 | "--with-superlu=1" |
| 1619 | ,(string-append "--with-superlu-include=" |
| 1620 | (assoc-ref %build-inputs "superlu") "/include") |
| 1621 | ,(string-append "--with-superlu-lib=" |
| 1622 | (assoc-ref %build-inputs "superlu") "/lib/libsuperlu.a")) |
| 1623 | #:make-flags |
| 1624 | ;; Honor (parallel-job-count) for build. Do not use --with-make-np, |
| 1625 | ;; whose value is dumped to $out/lib/petsc/conf/petscvariables. |
| 1626 | (list (format #f "MAKE_NP=~a" (parallel-job-count))) |
| 1627 | #:phases |
| 1628 | (modify-phases %standard-phases |
| 1629 | (replace 'configure |
| 1630 | ;; PETSc's configure script is actually a python script, so we can't |
| 1631 | ;; run it with bash. |
| 1632 | (lambda* (#:key outputs (configure-flags '()) |
| 1633 | #:allow-other-keys) |
| 1634 | (let* ((prefix (assoc-ref outputs "out")) |
| 1635 | (flags `(,(string-append "--prefix=" prefix) |
| 1636 | ,@configure-flags))) |
| 1637 | (format #t "build directory: ~s~%" (getcwd)) |
| 1638 | (format #t "configure flags: ~s~%" flags) |
| 1639 | (apply invoke "./configure" flags)))) |
| 1640 | (add-after 'configure 'clean-local-references |
| 1641 | (lambda* (#:key outputs #:allow-other-keys) |
| 1642 | (let ((out (assoc-ref outputs "out"))) |
| 1643 | (substitute* (find-files "." "^petsc(conf|machineinfo).h$") |
| 1644 | ;; Prevent build directory from leaking into compiled code |
| 1645 | (((getcwd)) out) |
| 1646 | ;; Scrub timestamp for reproducibility |
| 1647 | ((".*Libraries compiled on.*") "")) |
| 1648 | (substitute* (find-files "." "petscvariables") |
| 1649 | ;; Do not expose build machine characteristics, set to defaults. |
| 1650 | (("MAKE_NP = [:digit:]+") "MAKE_NP = 2") |
| 1651 | (("NPMAX = [:digit:]+") "NPMAX = 2")) |
| 1652 | #t))) |
| 1653 | (add-after 'install 'clean-install |
| 1654 | ;; Try to keep installed files from leaking build directory names. |
| 1655 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1656 | (let ((out (assoc-ref outputs "out"))) |
| 1657 | (substitute* (map (lambda (file) |
| 1658 | (string-append out "/lib/petsc/conf/" file)) |
| 1659 | '("petscvariables")) |
| 1660 | (((getcwd)) out)) |
| 1661 | ;; Make compiler references point to the store |
| 1662 | (substitute* (string-append out "/lib/petsc/conf/petscvariables") |
| 1663 | (("= (gcc|g\\+\\+|gfortran)" _ compiler) |
| 1664 | (string-append "= " (which compiler)))) |
| 1665 | ;; PETSc installs some build logs, which aren't necessary. |
| 1666 | (for-each (lambda (file) |
| 1667 | (let ((f (string-append out "/lib/petsc/conf/" file))) |
| 1668 | (when (file-exists? f) |
| 1669 | (delete-file f)))) |
| 1670 | '("configure.log" "make.log" "gmake.log" |
| 1671 | "test.log" "error.log" "RDict.db" |
| 1672 | "PETScBuildInternal.cmake" |
| 1673 | ;; Once installed, should uninstall with Guix |
| 1674 | "uninstall.py")) |
| 1675 | #t)))))) |
| 1676 | (home-page "http://www.mcs.anl.gov/petsc") |
| 1677 | (synopsis "Library to solve PDEs") |
| 1678 | (description "PETSc, pronounced PET-see (the S is silent), is a suite of |
| 1679 | data structures and routines for the scalable (parallel) solution of |
| 1680 | scientific applications modeled by partial differential equations.") |
| 1681 | (license (license:non-copyleft |
| 1682 | "http://www.mcs.anl.gov/petsc/documentation/copyright.html")))) |
| 1683 | |
| 1684 | (define-public petsc-complex |
| 1685 | (package (inherit petsc) |
| 1686 | (name "petsc-complex") |
| 1687 | (arguments |
| 1688 | (substitute-keyword-arguments (package-arguments petsc) |
| 1689 | ((#:configure-flags cf) |
| 1690 | `(cons "--with-scalar-type=complex" ,cf)))) |
| 1691 | (synopsis "Library to solve PDEs (with complex scalars)"))) |
| 1692 | |
| 1693 | (define-public petsc-openmpi |
| 1694 | (package (inherit petsc) |
| 1695 | (name "petsc-openmpi") |
| 1696 | (inputs |
| 1697 | `(("openmpi" ,openmpi) |
| 1698 | ,@(package-inputs petsc))) |
| 1699 | (arguments |
| 1700 | (substitute-keyword-arguments (package-arguments petsc) |
| 1701 | ((#:configure-flags cf) |
| 1702 | ``("--with-mpiexec=mpirun" |
| 1703 | ,(string-append "--with-mpi-dir=" |
| 1704 | (assoc-ref %build-inputs "openmpi")) |
| 1705 | ,@(delete "--with-mpi=0" ,cf))))) |
| 1706 | (synopsis "Library to solve PDEs (with MPI support)"))) |
| 1707 | |
| 1708 | (define-public petsc-complex-openmpi |
| 1709 | (package (inherit petsc-complex) |
| 1710 | (name "petsc-complex-openmpi") |
| 1711 | (inputs |
| 1712 | `(("openmpi" ,openmpi) |
| 1713 | ,@(package-inputs petsc-complex))) |
| 1714 | (arguments |
| 1715 | (substitute-keyword-arguments (package-arguments petsc-complex) |
| 1716 | ((#:configure-flags cf) |
| 1717 | ``("--with-mpiexec=mpirun" |
| 1718 | ,(string-append "--with-mpi-dir=" |
| 1719 | (assoc-ref %build-inputs "openmpi")) |
| 1720 | ,@(delete "--with-mpi=0" ,cf))))) |
| 1721 | (synopsis "Library to solve PDEs (with complex scalars and MPI support)"))) |
| 1722 | |
| 1723 | |
| 1724 | (define-public python-kiwisolver |
| 1725 | (package |
| 1726 | (name "python-kiwisolver") |
| 1727 | (version "1.0.1") |
| 1728 | (source (origin |
| 1729 | (method url-fetch) |
| 1730 | (uri (pypi-uri "kiwisolver" version)) |
| 1731 | (sha256 |
| 1732 | (base32 |
| 1733 | "0y22ci86znwwwfhbmvbgdfnbi6lv5gv2xkdlxvjw7lml43ayafyf")))) |
| 1734 | (build-system python-build-system) |
| 1735 | (home-page "https://github.com/nucleic/kiwi") |
| 1736 | (synopsis "Fast implementation of the Cassowary constraint solver") |
| 1737 | (description |
| 1738 | "Kiwi is an efficient C++ implementation of the Cassowary constraint |
| 1739 | solving algorithm. Kiwi has been designed from the ground up to be |
| 1740 | lightweight and fast. Kiwi ranges from 10x to 500x faster than the original |
| 1741 | Cassowary solver with typical use cases gaining a 40x improvement. Memory |
| 1742 | savings are consistently > 5x.") |
| 1743 | (license license:bsd-3))) |
| 1744 | |
| 1745 | (define-public python2-kiwisolver |
| 1746 | (package-with-python2 python-kiwisolver)) |
| 1747 | |
| 1748 | (define-public slepc |
| 1749 | (package |
| 1750 | (name "slepc") |
| 1751 | (version "3.8.2") |
| 1752 | (source |
| 1753 | (origin |
| 1754 | (method url-fetch) |
| 1755 | (uri (string-append "http://slepc.upv.es/download/distrib/slepc-" |
| 1756 | version ".tar.gz")) |
| 1757 | (sha256 |
| 1758 | (base32 |
| 1759 | "04zd48p43rnvg68p6cp28zll0px5whglc5v0sc3s6vdj1v920z8y")))) |
| 1760 | (build-system gnu-build-system) |
| 1761 | (native-inputs |
| 1762 | `(("python" ,python-2))) |
| 1763 | (inputs |
| 1764 | `(("arpack" ,arpack-ng) |
| 1765 | ("gfortran" ,gfortran))) |
| 1766 | (propagated-inputs |
| 1767 | `(("petsc" ,petsc))) |
| 1768 | (arguments |
| 1769 | `(#:parallel-build? #f ;build is parallel by default |
| 1770 | #:configure-flags |
| 1771 | `(,(string-append "--with-arpack-dir=" |
| 1772 | (assoc-ref %build-inputs "arpack") "/lib")) |
| 1773 | #:make-flags ;honor (parallel-job-count) |
| 1774 | `(,(format #f "MAKE_NP=~a" (parallel-job-count))) |
| 1775 | #:phases |
| 1776 | (modify-phases %standard-phases |
| 1777 | (replace 'configure |
| 1778 | ;; configure is a python script, so we can't run it with bash. |
| 1779 | (lambda* (#:key inputs outputs (configure-flags '()) |
| 1780 | #:allow-other-keys) |
| 1781 | (let* ((prefix (assoc-ref outputs "out")) |
| 1782 | (flags `(,(string-append "--prefix=" prefix) |
| 1783 | ,@configure-flags))) |
| 1784 | (format #t "build directory: ~s~%" (getcwd)) |
| 1785 | (format #t "configure flags: ~s~%" flags) |
| 1786 | (setenv "SLEPC_DIR" (getcwd)) |
| 1787 | (setenv "PETSC_DIR" (assoc-ref inputs "petsc")) |
| 1788 | (apply invoke "./configure" flags)))) |
| 1789 | (add-after 'install 'delete-doc |
| 1790 | ;; TODO: SLEPc installs HTML documentation alongside headers in |
| 1791 | ;; $out/include. We'd like to move them to share/doc, but delete |
| 1792 | ;; them for now, as they are incomplete and installing the complete |
| 1793 | ;; documentation is difficult. |
| 1794 | (lambda* (#:key outputs #:allow-other-keys) |
| 1795 | (let* ((out (assoc-ref outputs "out"))) |
| 1796 | (for-each delete-file (find-files out "\\.html$")) |
| 1797 | #t))) |
| 1798 | (add-after 'install 'clean-install |
| 1799 | ;; Clean up unnecessary build logs from installation. |
| 1800 | (lambda* (#:key outputs #:allow-other-keys) |
| 1801 | (let ((out (assoc-ref outputs "out"))) |
| 1802 | (for-each (lambda (file) |
| 1803 | (let ((f (string-append out "/lib/slepc/conf/" file))) |
| 1804 | (when (file-exists? f) |
| 1805 | (delete-file f)))) |
| 1806 | '("configure.log" "make.log" "gmake.log" |
| 1807 | "test.log" "error.log" "RDict.db" |
| 1808 | "uninstall.py")) |
| 1809 | #t)))))) |
| 1810 | (home-page "http://slepc.upv.es") |
| 1811 | (synopsis "Scalable library for eigenproblems") |
| 1812 | (description "SLEPc is a software library for the solution of large sparse |
| 1813 | eigenproblems on parallel computers. It can be used for the solution of |
| 1814 | linear eigenvalue problems formulated in either standard or generalized form, |
| 1815 | as well as other related problems such as the singular value decomposition. |
| 1816 | The emphasis of the software is on methods and techniques appropriate for |
| 1817 | problems in which the associated matrices are sparse, for example, those |
| 1818 | arising after the discretization of partial differential equations.") |
| 1819 | (license license:bsd-2))) |
| 1820 | |
| 1821 | (define-public slepc-complex |
| 1822 | (package (inherit slepc) |
| 1823 | (name "slepc-complex") |
| 1824 | (propagated-inputs |
| 1825 | `(("petsc" ,petsc-complex) |
| 1826 | ,@(alist-delete "petsc" (package-propagated-inputs slepc)))) |
| 1827 | (synopsis "Scalable library for eigenproblems (with complex scalars)"))) |
| 1828 | |
| 1829 | (define-public slepc-openmpi |
| 1830 | (package (inherit slepc) |
| 1831 | (name "slepc-openmpi") |
| 1832 | (arguments |
| 1833 | (substitute-keyword-arguments (package-arguments slepc) |
| 1834 | ((#:phases phases '%standard-phases) |
| 1835 | `(modify-phases ,phases |
| 1836 | (add-before 'check 'set-test-environment |
| 1837 | (lambda _ |
| 1838 | ;; By default, running the test suite would fail because 'ssh' |
| 1839 | ;; could not be found in $PATH. Define this variable to |
| 1840 | ;; placate Open MPI without adding a dependency on OpenSSH (the |
| 1841 | ;; agent isn't used anyway.) |
| 1842 | (setenv "OMPI_MCA_plm_rsh_agent" (which "cat")) |
| 1843 | #t)))))) |
| 1844 | (inputs |
| 1845 | `(("mpi" ,openmpi) |
| 1846 | ("arpack" ,arpack-ng-openmpi) |
| 1847 | ,@(alist-delete "arpack" (package-inputs slepc)))) |
| 1848 | (propagated-inputs |
| 1849 | `(("petsc" ,petsc-openmpi) |
| 1850 | ,@(alist-delete "petsc" (package-propagated-inputs slepc)))) |
| 1851 | (synopsis "Scalable library for eigenproblems (with MPI support)"))) |
| 1852 | |
| 1853 | (define-public slepc-complex-openmpi |
| 1854 | (package (inherit slepc-openmpi) |
| 1855 | (name "slepc-complex-openmpi") |
| 1856 | (propagated-inputs |
| 1857 | `(("petsc" ,petsc-complex-openmpi) |
| 1858 | ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi)))) |
| 1859 | (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)"))) |
| 1860 | |
| 1861 | (define-public mumps |
| 1862 | (package |
| 1863 | (name "mumps") |
| 1864 | (version "5.1.2") |
| 1865 | (source |
| 1866 | (origin |
| 1867 | (method url-fetch) |
| 1868 | (uri (string-append "http://mumps.enseeiht.fr/MUMPS_" |
| 1869 | version ".tar.gz")) |
| 1870 | (sha256 |
| 1871 | (base32 |
| 1872 | "1s9asin08zqzmh08257sdghhivvy9vjif7c53fhaxaax2kd5qd7b")) |
| 1873 | (patches (search-patches "mumps-build-parallelism.patch")))) |
| 1874 | (build-system gnu-build-system) |
| 1875 | (inputs |
| 1876 | `(("fortran" ,gfortran) |
| 1877 | ;; These are required for linking against mumps, but we let the user |
| 1878 | ;; declare the dependency. |
| 1879 | ("blas" ,openblas) |
| 1880 | ("metis" ,metis) |
| 1881 | ("scotch" ,scotch))) |
| 1882 | (arguments |
| 1883 | `(#:modules ((ice-9 match) |
| 1884 | (ice-9 popen) |
| 1885 | (srfi srfi-1) |
| 1886 | ,@%gnu-build-system-modules) |
| 1887 | #:phases |
| 1888 | (modify-phases %standard-phases |
| 1889 | (replace 'configure |
| 1890 | (lambda* (#:key inputs #:allow-other-keys) |
| 1891 | (call-with-output-file "Makefile.inc" |
| 1892 | (lambda (port) |
| 1893 | (format port " |
| 1894 | PLAT = |
| 1895 | LIBEXT = .a |
| 1896 | OUTC = -o |
| 1897 | OUTF = -o |
| 1898 | RM = rm -f~:[ |
| 1899 | CC = gcc |
| 1900 | FC = gfortran |
| 1901 | FL = gfortran |
| 1902 | INCSEQ = -I$(topdir)/libseq |
| 1903 | LIBSEQ = -L$(topdir)/libseq -lmpiseq |
| 1904 | LIBSEQNEEDED = libseqneeded~; |
| 1905 | CC = mpicc |
| 1906 | FC = mpifort |
| 1907 | FL = mpifort~] |
| 1908 | AR = ar vr # rules require trailing space, ugh... |
| 1909 | RANLIB = ranlib |
| 1910 | LIBBLAS = -L~a -lopenblas~@[ |
| 1911 | SCALAP = -L~a -lscalapack~] |
| 1912 | LIBOTHERS = -pthread |
| 1913 | CDEFS = -DAdd_ |
| 1914 | PIC = -fPIC |
| 1915 | OPTF = -O2 -DALLOW_NON_INIT $(PIC) |
| 1916 | OPTL = -O2 $(PIC) |
| 1917 | OPTC = -O2 $(PIC) |
| 1918 | INCS = $(INCSEQ) |
| 1919 | LIBS = $(SCALAP) $(LIBSEQ) |
| 1920 | LPORDDIR = $(topdir)/PORD/lib |
| 1921 | IPORD = -I$(topdir)/PORD/include |
| 1922 | LPORD = -L$(LPORDDIR) -lpord |
| 1923 | ORDERINGSF = -Dpord~@[ |
| 1924 | METISDIR = ~a |
| 1925 | IMETIS = -I$(METISDIR)/include |
| 1926 | LMETIS = -L$(METISDIR)/lib -lmetis |
| 1927 | ORDERINGSF += -Dmetis~]~@[~:{ |
| 1928 | SCOTCHDIR = ~a |
| 1929 | ISCOTCH = -I$(SCOTCHDIR)/include |
| 1930 | LSCOTCH = -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr |
| 1931 | ORDERINGSF += ~a~}~] |
| 1932 | ORDERINGSC = $(ORDERINGSF) |
| 1933 | LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) |
| 1934 | IORDERINGSF = $(ISCOTCH) |
| 1935 | IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)" |
| 1936 | (assoc-ref inputs "mpi") |
| 1937 | (assoc-ref inputs "blas") |
| 1938 | (assoc-ref inputs "scalapack") |
| 1939 | (assoc-ref inputs "metis") |
| 1940 | (match (list (assoc-ref inputs "pt-scotch") |
| 1941 | (assoc-ref inputs "scotch")) |
| 1942 | ((#f #f) |
| 1943 | #f) |
| 1944 | ((#f scotch) |
| 1945 | `((,scotch "" "-Dscotch"))) |
| 1946 | ((ptscotch _) |
| 1947 | `((,ptscotch |
| 1948 | "-lptesmumps -lptscotch -lptscotcherr " |
| 1949 | "-Dptscotch"))))))))) |
| 1950 | (replace 'build |
| 1951 | ;; By default only the d-precision library is built. Make with "all" |
| 1952 | ;; target so that all precision libraries and examples are built. |
| 1953 | (lambda _ |
| 1954 | (invoke "make" "all" |
| 1955 | (format #f "-j~a" (parallel-job-count))))) |
| 1956 | (replace 'check |
| 1957 | ;; Run the simple test drivers, which read test input from stdin: |
| 1958 | ;; from the "real" input for the single- and double-precision |
| 1959 | ;; testers, and from the "cmplx" input for complex-precision |
| 1960 | ;; testers. The EXEC-PREFIX key is used by the mumps-openmpi |
| 1961 | ;; package to prefix execution with "mpirun". |
| 1962 | (lambda* (#:key (exec-prefix '()) #:allow-other-keys) |
| 1963 | (with-directory-excursion "examples" |
| 1964 | (every |
| 1965 | (lambda (prec type) |
| 1966 | (let ((tester (apply open-pipe* |
| 1967 | `(,OPEN_WRITE |
| 1968 | ,@exec-prefix |
| 1969 | ,(string-append "./" prec |
| 1970 | "simpletest")))) |
| 1971 | (input (open-input-file |
| 1972 | (string-append "input_simpletest_" type)))) |
| 1973 | (begin |
| 1974 | (dump-port input tester) |
| 1975 | (close-port input) |
| 1976 | (zero? (close-pipe tester))))) |
| 1977 | '("s" "d" "c" "z") |
| 1978 | '("real" "real" "cmplx" "cmplx"))))) |
| 1979 | (replace 'install |
| 1980 | (lambda* (#:key outputs #:allow-other-keys) |
| 1981 | (let* ((out (assoc-ref outputs "out")) |
| 1982 | (libdir (string-append out "/lib"))) |
| 1983 | (copy-recursively "lib" libdir) |
| 1984 | (copy-recursively "include" (string-append out "/include")) |
| 1985 | (when (file-exists? "libseq/libmpiseq.a") |
| 1986 | (install-file "libseq/libmpiseq.a" libdir)) |
| 1987 | #t)))))) |
| 1988 | (home-page "http://mumps.enseeiht.fr") |
| 1989 | (synopsis "Multifrontal sparse direct solver") |
| 1990 | (description |
| 1991 | "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a |
| 1992 | sparse system of linear equations A x = b using Guassian elimination.") |
| 1993 | (license license:cecill-c))) |
| 1994 | |
| 1995 | (define-public mumps-metis |
| 1996 | (package (inherit mumps) |
| 1997 | (name "mumps-metis") |
| 1998 | (inputs |
| 1999 | (alist-delete "scotch" (package-inputs mumps))))) |
| 2000 | |
| 2001 | (define-public mumps-openmpi |
| 2002 | (package (inherit mumps) |
| 2003 | (name "mumps-openmpi") |
| 2004 | (inputs |
| 2005 | `(("mpi" ,openmpi) |
| 2006 | ("scalapack" ,scalapack) |
| 2007 | ("pt-scotch" ,pt-scotch) |
| 2008 | ,@(alist-delete "scotch" (package-inputs mumps)))) |
| 2009 | (arguments |
| 2010 | (substitute-keyword-arguments (package-arguments mumps) |
| 2011 | ((#:phases phases) |
| 2012 | `(modify-phases ,phases |
| 2013 | (add-before 'check 'set-test-environment |
| 2014 | (lambda _ |
| 2015 | ;; By default, running the test suite would fail because 'ssh' |
| 2016 | ;; could not be found in $PATH. Define this variable to |
| 2017 | ;; placate Open MPI without adding a dependency on OpenSSH (the |
| 2018 | ;; agent isn't used anyway.) |
| 2019 | (setenv "OMPI_MCA_plm_rsh_agent" (which "cat")) |
| 2020 | #t)) |
| 2021 | (replace 'check |
| 2022 | (lambda _ |
| 2023 | ((assoc-ref ,phases 'check) |
| 2024 | #:exec-prefix '("mpirun" "-n" "2")))))))) |
| 2025 | (synopsis "Multifrontal sparse direct solver (with MPI)"))) |
| 2026 | |
| 2027 | (define-public mumps-metis-openmpi |
| 2028 | (package (inherit mumps-openmpi) |
| 2029 | (name "mumps-metis-openmpi") |
| 2030 | (inputs |
| 2031 | (alist-delete "pt-scotch" (package-inputs mumps-openmpi))))) |
| 2032 | |
| 2033 | (define-public r-quadprog |
| 2034 | (package |
| 2035 | (name "r-quadprog") |
| 2036 | (version "1.5-5") |
| 2037 | (source |
| 2038 | (origin |
| 2039 | (method url-fetch) |
| 2040 | (uri (cran-uri "quadprog" version)) |
| 2041 | (sha256 |
| 2042 | (base32 |
| 2043 | "0jg3r6abmhp8r9vkbhpx9ldjfw6vyl1m4c5vwlyjhk1mi03656fr")))) |
| 2044 | (build-system r-build-system) |
| 2045 | (native-inputs |
| 2046 | `(("gfortran" ,gfortran))) |
| 2047 | (home-page "https://cran.r-project.org/web/packages/quadprog") |
| 2048 | (synopsis "Functions to solve quadratic programming problems") |
| 2049 | (description |
| 2050 | "This package contains routines and documentation for solving quadratic |
| 2051 | programming problems.") |
| 2052 | (license license:gpl3+))) |
| 2053 | |
| 2054 | (define-public r-pracma |
| 2055 | (package |
| 2056 | (name "r-pracma") |
| 2057 | (version "2.1.4") |
| 2058 | (source (origin |
| 2059 | (method url-fetch) |
| 2060 | (uri (cran-uri "pracma" version)) |
| 2061 | (sha256 |
| 2062 | (base32 "1ygm81i7mqvh229dp9935djjyb120p3bqvaf4k572sa4q63fzjhc")))) |
| 2063 | (build-system r-build-system) |
| 2064 | (propagated-inputs |
| 2065 | `(("r-quadprog" ,r-quadprog))) |
| 2066 | (home-page "https://cran.r-project.org/web/packages/pracma") |
| 2067 | (synopsis "Practical numerical math functions") |
| 2068 | (description "This package provides functions for numerical analysis and |
| 2069 | linear algebra, numerical optimization, differential equations, plus some |
| 2070 | special functions. It uses Matlab function names where appropriate to simplify |
| 2071 | porting.") |
| 2072 | (license license:gpl3+))) |
| 2073 | |
| 2074 | (define-public ruby-asciimath |
| 2075 | (package |
| 2076 | (name "ruby-asciimath") |
| 2077 | (version "1.0.4") |
| 2078 | (source |
| 2079 | (origin |
| 2080 | (method url-fetch) |
| 2081 | (uri (rubygems-uri "asciimath" version)) |
| 2082 | (sha256 |
| 2083 | (base32 |
| 2084 | "1d80kiph5mc78zps7si1hv48kv4k12mzaq8jk5kb3pqpjdr72qmc")))) |
| 2085 | (build-system ruby-build-system) |
| 2086 | (arguments |
| 2087 | '(#:phases |
| 2088 | (modify-phases %standard-phases |
| 2089 | ;; Apply this patch |
| 2090 | ;; https://github.com/asciidoctor/asciimath/commit/1c06fdc8086077f4785479f78b0823a4a72d7948 |
| 2091 | (add-after 'unpack 'patch-remove-spurious-backslashes |
| 2092 | (lambda _ |
| 2093 | (substitute* "spec/parser_spec.rb" |
| 2094 | (("\\\\\"") |
| 2095 | "\""))))))) |
| 2096 | (native-inputs |
| 2097 | `(("bundler" ,bundler) |
| 2098 | ("ruby-rspec" ,ruby-rspec))) |
| 2099 | (synopsis "AsciiMath parsing and conversion library") |
| 2100 | (description |
| 2101 | "A pure Ruby AsciiMath parsing and conversion library. AsciiMath is an |
| 2102 | easy-to-write markup language for mathematics.") |
| 2103 | (home-page "https://github.com/asciidoctor/asciimath") |
| 2104 | (license license:expat))) |
| 2105 | |
| 2106 | (define-public superlu |
| 2107 | (package |
| 2108 | (name "superlu") |
| 2109 | (version "5.2.1") |
| 2110 | (source |
| 2111 | (origin |
| 2112 | (method url-fetch) |
| 2113 | (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/" |
| 2114 | "superlu_" version ".tar.gz")) |
| 2115 | (sha256 |
| 2116 | (base32 "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8")) |
| 2117 | (modules '((guix build utils))) |
| 2118 | (snippet |
| 2119 | ;; Replace the non-free implementation of MC64 with a stub adapted |
| 2120 | ;; from Debian |
| 2121 | '(begin |
| 2122 | (use-modules (ice-9 regex) |
| 2123 | (ice-9 rdelim)) |
| 2124 | (call-with-output-file "SRC/mc64ad.c" |
| 2125 | (lambda (port) |
| 2126 | (display " |
| 2127 | #include <stdio.h> |
| 2128 | #include <stdlib.h> |
| 2129 | void mc64id_(int *a) { |
| 2130 | fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\"); |
| 2131 | abort (); |
| 2132 | } |
| 2133 | void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g, |
| 2134 | int *h, int *i, int *j, int *k, double *l, int *m, int *n) { |
| 2135 | fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\"); |
| 2136 | abort (); |
| 2137 | }\n" port))) |
| 2138 | ;; Remove the corresponding license verbiage. MC64 license follows |
| 2139 | ;; a "------" line separator. |
| 2140 | (with-atomic-file-replacement "License.txt" |
| 2141 | (let ((rx (make-regexp "-{8}"))) |
| 2142 | (lambda (in out) |
| 2143 | (let loop () |
| 2144 | (let ((line (read-line in 'concat))) |
| 2145 | (unless (regexp-exec rx line) |
| 2146 | (display line out) |
| 2147 | (loop)))) |
| 2148 | #t))))))) |
| 2149 | (build-system cmake-build-system) |
| 2150 | (native-inputs |
| 2151 | `(("tcsh" ,tcsh))) |
| 2152 | (inputs |
| 2153 | `(("blas" ,openblas) |
| 2154 | ("gfortran" ,gfortran))) |
| 2155 | (arguments |
| 2156 | `(#:configure-flags '("-Denable_blaslib:BOOL=NO" ;do not use internal cblas |
| 2157 | "-DTPL_BLAS_LIBRARIES=openblas" |
| 2158 | "-DBUILD_SHARED_LIBS:BOOL=YES"))) |
| 2159 | (home-page "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/") |
| 2160 | (synopsis "Supernodal direct solver for sparse linear systems") |
| 2161 | (description |
| 2162 | "SuperLU is a general purpose library for the direct solution of large, |
| 2163 | sparse, nonsymmetric systems of linear equations on high performance machines. |
| 2164 | The library is written in C and is callable from either C or Fortran. The |
| 2165 | library routines perform an LU decomposition with partial pivoting and |
| 2166 | triangular system solves through forward and back substitution. The library |
| 2167 | also provides threshold-based ILU factorization preconditioners.") |
| 2168 | (license (list license:bsd-3 |
| 2169 | license:gpl2+ ;EXAMPLE/*fgmr.c |
| 2170 | (license:fsf-free "file://SRC/colamd.h"))))) |
| 2171 | |
| 2172 | (define-public superlu-dist |
| 2173 | (package |
| 2174 | (name "superlu-dist") |
| 2175 | (version "5.3.0") |
| 2176 | (source |
| 2177 | (origin |
| 2178 | (method url-fetch) |
| 2179 | (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/" |
| 2180 | "superlu_dist_" version ".tar.gz")) |
| 2181 | (sha256 |
| 2182 | (base32 "0ja5ihqivkda1wd58y4lmzvmwssm9g91f70c5q0fzwhng6580h6y")) |
| 2183 | (modules '((guix build utils))) |
| 2184 | (snippet |
| 2185 | ;; Replace the non-free implementation of MC64 with a stub |
| 2186 | '(begin |
| 2187 | (use-modules (ice-9 regex) |
| 2188 | (ice-9 rdelim)) |
| 2189 | (call-with-output-file "SRC/mc64ad_dist.c" |
| 2190 | (lambda (port) |
| 2191 | (display " |
| 2192 | #include <stdio.h> |
| 2193 | #include <stdlib.h> |
| 2194 | void mc64id_dist(int *a) { |
| 2195 | fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\"); |
| 2196 | abort (); |
| 2197 | } |
| 2198 | void mc64ad_dist (int *a, int *b, int *c, int *d, int *e, double *f, int *g, |
| 2199 | int *h, int *i, int *j, int *k, double *l, int *m, int *n) { |
| 2200 | fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\"); |
| 2201 | abort (); |
| 2202 | }\n" port))) |
| 2203 | (substitute* "SRC/util.c" ;adjust default algorithm |
| 2204 | (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag") |
| 2205 | "RowPerm = NOROWPERM")) |
| 2206 | #t)) |
| 2207 | (patches (search-patches "superlu-dist-scotchmetis.patch")))) |
| 2208 | (build-system gnu-build-system) |
| 2209 | (native-inputs |
| 2210 | `(("tcsh" ,tcsh))) |
| 2211 | (inputs |
| 2212 | `(("gfortran" ,gfortran))) |
| 2213 | (propagated-inputs |
| 2214 | `(("openmpi" ,openmpi) ;headers include MPI heades |
| 2215 | ("lapack" ,lapack) ;required to link with output library |
| 2216 | ("pt-scotch" ,pt-scotch))) ;same |
| 2217 | (arguments |
| 2218 | `(#:parallel-build? #f ;race conditions using ar |
| 2219 | #:phases |
| 2220 | (modify-phases %standard-phases |
| 2221 | (replace 'configure |
| 2222 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2223 | (call-with-output-file "make.inc" |
| 2224 | (lambda (port) |
| 2225 | (format port " |
| 2226 | PLAT = |
| 2227 | DSuperLUroot = ~a |
| 2228 | DSUPERLULIB = ~a/lib/libsuperlu_dist.a |
| 2229 | BLASDEF = -DUSE_VENDOR_BLAS |
| 2230 | BLASLIB = -L~a/lib -lblas |
| 2231 | PARMETISLIB = -L~a/lib \ |
| 2232 | -lptscotchparmetis -lptscotch -lptscotcherr -lptscotcherrexit \ |
| 2233 | -lscotch -lscotcherr -lscotcherrexit |
| 2234 | METISLIB = -L~:*~a/lib \ |
| 2235 | -lscotchmetis -lscotch -lscotcherr -lscotcherrexit |
| 2236 | LIBS = $(DSUPERLULIB) $(PARMETISLIB) $(METISLIB) $(BLASLIB) |
| 2237 | ARCH = ar |
| 2238 | ARCHFLAGS = cr |
| 2239 | RANLIB = ranlib |
| 2240 | CC = mpicc |
| 2241 | PIC = -fPIC |
| 2242 | CFLAGS = -O3 -g -DPRNTlevel=0 $(PIC) |
| 2243 | NOOPTS = -O0 -g $(PIC) |
| 2244 | FORTRAN = mpifort |
| 2245 | FFLAGS = -O2 -g $(PIC) |
| 2246 | LOADER = $(CC) |
| 2247 | CDEFS = -DAdd_" |
| 2248 | (getcwd) |
| 2249 | (assoc-ref outputs "out") |
| 2250 | (assoc-ref inputs "lapack") |
| 2251 | (assoc-ref inputs "pt-scotch")))) |
| 2252 | #t)) |
| 2253 | (add-after 'unpack 'remove-broken-symlinks |
| 2254 | (lambda _ |
| 2255 | (for-each delete-file |
| 2256 | (find-files "MAKE_INC" "\\.#make\\..*")) |
| 2257 | #t)) |
| 2258 | (add-before 'build 'create-install-directories |
| 2259 | (lambda* (#:key outputs #:allow-other-keys) |
| 2260 | (for-each |
| 2261 | (lambda (dir) |
| 2262 | (mkdir-p (string-append (assoc-ref outputs "out") |
| 2263 | "/" dir))) |
| 2264 | '("lib" "include")) |
| 2265 | #t)) |
| 2266 | (replace 'check |
| 2267 | (lambda _ |
| 2268 | ;; By default, running the test suite would fail because 'ssh' |
| 2269 | ;; could not be found in $PATH. Define this variable to placate |
| 2270 | ;; Open MPI without adding a dependency on OpenSSH (the agent |
| 2271 | ;; isn't used anyway.) |
| 2272 | (setenv "OMPI_MCA_plm_rsh_agent" (which "cat")) |
| 2273 | (with-directory-excursion "EXAMPLE" |
| 2274 | (invoke "mpirun" "-n" "2" |
| 2275 | "./pddrive" "-r" "1" "-c" "2" "g20.rua") |
| 2276 | (invoke "mpirun" "-n" "2" |
| 2277 | "./pzdrive" "-r" "1" "-c" "2" "cg20.cua")) |
| 2278 | #t)) |
| 2279 | (replace 'install |
| 2280 | (lambda* (#:key outputs #:allow-other-keys) |
| 2281 | ;; Library is placed in lib during the build phase. Copy over |
| 2282 | ;; headers to include. |
| 2283 | (let* ((out (assoc-ref outputs "out")) |
| 2284 | (incdir (string-append out "/include"))) |
| 2285 | (for-each (lambda (file) |
| 2286 | (let ((base (basename file))) |
| 2287 | (format #t "installing `~a' to `~a'~%" |
| 2288 | base incdir) |
| 2289 | (copy-file file |
| 2290 | (string-append incdir "/" base)))) |
| 2291 | (find-files "SRC" ".*\\.h$"))) |
| 2292 | #t))))) |
| 2293 | (home-page (package-home-page superlu)) |
| 2294 | (synopsis "Parallel supernodal direct solver") |
| 2295 | (description |
| 2296 | "SuperLU_DIST is a parallel extension to the serial SuperLU library. |
| 2297 | It is targeted for distributed memory parallel machines. SuperLU_DIST is |
| 2298 | implemented in ANSI C, and MPI for communications.") |
| 2299 | (license license:bsd-3))) |
| 2300 | |
| 2301 | (define-public scotch |
| 2302 | (package |
| 2303 | (name "scotch") |
| 2304 | (version "6.0.5a") |
| 2305 | (source |
| 2306 | (origin |
| 2307 | (method url-fetch) |
| 2308 | (uri (string-append "https://gforge.inria.fr/frs/download.php/" |
| 2309 | "latestfile/298/scotch_" version ".tar.gz")) |
| 2310 | (sha256 |
| 2311 | (base32 "0vsmgjz8qv80di3ljmc7hbdsizxxxwy2b9rgd2fl1mdc6dgbj8av")) |
| 2312 | (patches (search-patches "scotch-test-threading.patch" |
| 2313 | "scotch-build-parallelism.patch" |
| 2314 | "scotch-graph-induce-type-64.patch" |
| 2315 | "scotch-graph-diam-64.patch")))) |
| 2316 | (build-system gnu-build-system) |
| 2317 | (inputs |
| 2318 | `(("zlib" ,zlib) |
| 2319 | ("flex" ,flex) |
| 2320 | ("bison" ,bison))) |
| 2321 | (arguments |
| 2322 | `(#:phases |
| 2323 | (modify-phases %standard-phases |
| 2324 | (add-after |
| 2325 | 'unpack 'chdir-to-src |
| 2326 | (lambda _ (chdir "src") #t)) |
| 2327 | (replace |
| 2328 | 'configure |
| 2329 | (lambda _ |
| 2330 | (call-with-output-file "Makefile.inc" |
| 2331 | (lambda (port) |
| 2332 | (format port " |
| 2333 | EXE = |
| 2334 | LIB = .a |
| 2335 | OBJ = .o |
| 2336 | MAKE = make |
| 2337 | AR = ar |
| 2338 | ARFLAGS = -ruv |
| 2339 | CAT = cat |
| 2340 | CCS = gcc |
| 2341 | CCP = mpicc |
| 2342 | CCD = gcc |
| 2343 | CPPFLAGS =~{ -D~a~} |
| 2344 | CFLAGS = -O2 -g -fPIC $(CPPFLAGS) |
| 2345 | LDFLAGS = -lz -lm -lrt -lpthread |
| 2346 | CP = cp |
| 2347 | LEX = flex -Pscotchyy -olex.yy.c |
| 2348 | LN = ln |
| 2349 | MKDIR = mkdir |
| 2350 | MV = mv |
| 2351 | RANLIB = ranlib |
| 2352 | YACC = bison -pscotchyy -y -b y |
| 2353 | " |
| 2354 | '("COMMON_FILE_COMPRESS_GZ" |
| 2355 | "COMMON_PTHREAD" |
| 2356 | "COMMON_RANDOM_FIXED_SEED" |
| 2357 | "INTSIZE64" ;use 'long' instead of 'int' |
| 2358 | ;; Prevents symbolc clashes with libesmumps |
| 2359 | "SCOTCH_RENAME" |
| 2360 | ;; XXX: Causes invalid frees in superlu-dist tests |
| 2361 | ;; "SCOTCH_PTHREAD" |
| 2362 | ;; "SCOTCH_PTHREAD_NUMBER=2" |
| 2363 | "restrict=__restrict")))) |
| 2364 | #t)) |
| 2365 | (add-after |
| 2366 | 'build 'build-esmumps |
| 2367 | (lambda _ |
| 2368 | ;; By default, running the test suite would fail because 'ssh' |
| 2369 | ;; could not be found in $PATH. Define this variable to placate |
| 2370 | ;; Open MPI without adding a dependency on OpenSSH (the agent |
| 2371 | ;; isn't used anyway.) |
| 2372 | (setenv "OMPI_MCA_plm_rsh_agent" (which "cat")) |
| 2373 | |
| 2374 | (invoke "make" |
| 2375 | (format #f "-j~a" (parallel-job-count)) |
| 2376 | "esmumps"))) |
| 2377 | (replace |
| 2378 | 'install |
| 2379 | (lambda* (#:key outputs #:allow-other-keys) |
| 2380 | (let ((out (assoc-ref outputs "out"))) |
| 2381 | (mkdir out) |
| 2382 | (invoke "make" |
| 2383 | (string-append "prefix=" out) |
| 2384 | "install") |
| 2385 | ;; esmumps files are not installed with the above |
| 2386 | (for-each (lambda (f) |
| 2387 | (copy-file f (string-append out "/include/" f))) |
| 2388 | (find-files "../include" ".*esmumps.h$")) |
| 2389 | (for-each (lambda (f) |
| 2390 | (copy-file f (string-append out "/lib/" f))) |
| 2391 | (find-files "../lib" "^lib.*esmumps.*")) |
| 2392 | #t)))))) |
| 2393 | (home-page "http://www.labri.fr/perso/pelegrin/scotch/") |
| 2394 | (synopsis "Programs and libraries for graph algorithms") |
| 2395 | (description "SCOTCH is a set of programs and libraries which implement |
| 2396 | the static mapping and sparse matrix reordering algorithms developed within |
| 2397 | the SCOTCH project. Its purpose is to apply graph theory, with a divide and |
| 2398 | conquer approach, to scientific computing problems such as graph and mesh |
| 2399 | partitioning, static mapping, and sparse matrix ordering, in application |
| 2400 | domains ranging from structural mechanics to operating systems or |
| 2401 | bio-chemistry.") |
| 2402 | ;; See LICENSE_en.txt |
| 2403 | (license license:cecill-c))) |
| 2404 | |
| 2405 | (define-public scotch32 |
| 2406 | ;; This is the 'INTSIZE32' variant, which uses 32-bit integers, as needed by |
| 2407 | ;; some applications. |
| 2408 | (package (inherit scotch) |
| 2409 | (name "scotch32") |
| 2410 | (arguments |
| 2411 | (substitute-keyword-arguments (package-arguments scotch) |
| 2412 | ((#:phases scotch-phases) |
| 2413 | `(modify-phases ,scotch-phases |
| 2414 | (replace |
| 2415 | 'configure |
| 2416 | (lambda _ |
| 2417 | (call-with-output-file "Makefile.inc" |
| 2418 | (lambda (port) |
| 2419 | (format port " |
| 2420 | EXE = |
| 2421 | LIB = .a |
| 2422 | OBJ = .o |
| 2423 | MAKE = make |
| 2424 | AR = ar |
| 2425 | ARFLAGS = -ruv |
| 2426 | CAT = cat |
| 2427 | CCS = gcc |
| 2428 | CCP = mpicc |
| 2429 | CCD = gcc |
| 2430 | CPPFLAGS =~{ -D~a~} |
| 2431 | CFLAGS = -O2 -g -fPIC $(CPPFLAGS) |
| 2432 | LDFLAGS = -lz -lm -lrt -lpthread |
| 2433 | CP = cp |
| 2434 | LEX = flex -Pscotchyy -olex.yy.c |
| 2435 | LN = ln |
| 2436 | MKDIR = mkdir |
| 2437 | MV = mv |
| 2438 | RANLIB = ranlib |
| 2439 | YACC = bison -pscotchyy -y -b y |
| 2440 | " |
| 2441 | '("COMMON_FILE_COMPRESS_GZ" |
| 2442 | "COMMON_PTHREAD" |
| 2443 | "COMMON_RANDOM_FIXED_SEED" |
| 2444 | "INTSIZE32" ;use 32-bit integers. See INSTALL.txt |
| 2445 | ;; Prevents symbolc clashes with libesmumps |
| 2446 | "SCOTCH_RENAME" |
| 2447 | ;; XXX: Causes invalid frees in superlu-dist tests |
| 2448 | ;; "SCOTCH_PTHREAD" |
| 2449 | ;; "SCOTCH_PTHREAD_NUMBER=2" |
| 2450 | "restrict=__restrict")))))))))) |
| 2451 | (synopsis |
| 2452 | "Programs and libraries for graph algorithms (32-bit integers)"))) |
| 2453 | |
| 2454 | (define-public pt-scotch |
| 2455 | (package (inherit scotch) |
| 2456 | (name "pt-scotch") |
| 2457 | (propagated-inputs |
| 2458 | `(("openmpi" ,openmpi))) ;Headers include MPI headers |
| 2459 | (arguments |
| 2460 | (substitute-keyword-arguments (package-arguments scotch) |
| 2461 | ((#:phases scotch-phases) |
| 2462 | `(modify-phases ,scotch-phases |
| 2463 | (replace |
| 2464 | 'build |
| 2465 | (lambda _ |
| 2466 | (and |
| 2467 | (zero? (system* "make" |
| 2468 | (format #f "-j~a" (parallel-job-count)) |
| 2469 | "ptscotch" "ptesmumps")) |
| 2470 | ;; Install the serial metis compatibility library |
| 2471 | (zero? (system* "make" "-C" "libscotchmetis" "install"))))) |
| 2472 | (replace |
| 2473 | 'check |
| 2474 | (lambda _ (zero? (system* "make" "ptcheck")))))))) |
| 2475 | (synopsis "Programs and libraries for graph algorithms (with MPI)"))) |
| 2476 | |
| 2477 | (define-public pt-scotch32 |
| 2478 | (package (inherit scotch32) |
| 2479 | (name "pt-scotch32") |
| 2480 | (propagated-inputs |
| 2481 | `(("openmpi" ,openmpi))) ;headers include MPI headers |
| 2482 | (arguments |
| 2483 | (substitute-keyword-arguments (package-arguments scotch32) |
| 2484 | ((#:phases scotch32-phases) |
| 2485 | `(modify-phases ,scotch32-phases |
| 2486 | (replace 'build |
| 2487 | (lambda _ |
| 2488 | (and |
| 2489 | (zero? (system* "make" |
| 2490 | (format #f "-j~a" (parallel-job-count)) |
| 2491 | "ptscotch" "ptesmumps")) |
| 2492 | ;; Install the serial metis compatibility library |
| 2493 | (zero? (system* "make" "-C" "libscotchmetis" "install"))))) |
| 2494 | (replace 'check |
| 2495 | (lambda _ |
| 2496 | (zero? (system* "make" "ptcheck")))))))) |
| 2497 | (synopsis |
| 2498 | "Programs and libraries for graph algorithms (with MPI and 32-bit integers)"))) |
| 2499 | |
| 2500 | (define-public metis |
| 2501 | (package |
| 2502 | (name "metis") |
| 2503 | (version "5.1.0") |
| 2504 | (source |
| 2505 | (origin |
| 2506 | (method url-fetch) |
| 2507 | (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/" |
| 2508 | "metis-" version ".tar.gz")) |
| 2509 | (sha256 |
| 2510 | (base32 |
| 2511 | "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn")))) |
| 2512 | (build-system cmake-build-system) |
| 2513 | (inputs |
| 2514 | `(("blas" ,openblas))) |
| 2515 | (arguments |
| 2516 | `(#:tests? #f ;no tests |
| 2517 | #:configure-flags `("-DSHARED=ON" |
| 2518 | ,(string-append "-DGKLIB_PATH=" (getcwd) |
| 2519 | "/metis-" ,version "/GKlib")))) |
| 2520 | (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview") |
| 2521 | (synopsis "Graph partitioning and fill-reducing matrix ordering library") |
| 2522 | (description |
| 2523 | "METIS is a set of serial programs for partitioning graphs, partitioning |
| 2524 | finite element meshes, and producing fill-reducing orderings for sparse |
| 2525 | matrices. The algorithms implemented in METIS are based on the multilevel |
| 2526 | recursive-bisection, multilevel k-way, and multi-constraint partitioning |
| 2527 | schemes.") |
| 2528 | (license license:asl2.0))) ;As of version 5.0.3 |
| 2529 | |
| 2530 | (define-public p4est |
| 2531 | (package |
| 2532 | (name "p4est") |
| 2533 | (version "2.0") |
| 2534 | (source |
| 2535 | (origin |
| 2536 | (method url-fetch) |
| 2537 | (uri (string-append "http://p4est.github.io/release/p4est-" |
| 2538 | version ".tar.gz")) |
| 2539 | (sha256 |
| 2540 | (base32 |
| 2541 | "16h267z256kxcxfjs390qqzv19hr58vrj4x8lndb7alnk2vca8n5")))) |
| 2542 | (build-system gnu-build-system) |
| 2543 | (inputs |
| 2544 | `(("fortran" ,gfortran) |
| 2545 | ("blas" ,openblas) |
| 2546 | ("lapack" ,lapack) |
| 2547 | ("zlib" ,zlib))) |
| 2548 | (arguments |
| 2549 | `(#:configure-flags `(,(string-append "BLAS_LIBS=-L" |
| 2550 | (assoc-ref %build-inputs "blas") |
| 2551 | " -lopenblas") |
| 2552 | ,(string-append "LAPACK_LIBS=-L" |
| 2553 | (assoc-ref %build-inputs "lapack") |
| 2554 | " -llapack")) |
| 2555 | #:phases (modify-phases %standard-phases |
| 2556 | (add-before 'check 'set-test-environment |
| 2557 | (lambda _ |
| 2558 | ;; By default, running the test suite would fail because |
| 2559 | ;; 'ssh' could not be found in $PATH. Define this |
| 2560 | ;; variable to placate Open MPI without adding a |
| 2561 | ;; dependency on OpenSSH (the agent isn't used anyway.) |
| 2562 | (setenv "OMPI_MCA_plm_rsh_agent" (which "cat")) |
| 2563 | #t))))) |
| 2564 | (home-page "http://www.p4est.org") |
| 2565 | (synopsis "Adaptive mesh refinement on forests of octrees") |
| 2566 | (description |
| 2567 | "The p4est software library enables the dynamic management of a |
| 2568 | collection of adaptive octrees, conveniently called a forest of octrees. |
| 2569 | p4est is designed to work in parallel and scales to hundreds of thousands of |
| 2570 | processor cores.") |
| 2571 | (license license:gpl2+))) |
| 2572 | |
| 2573 | (define-public p4est-openmpi |
| 2574 | (package (inherit p4est) |
| 2575 | (name "p4est-openmpi") |
| 2576 | (inputs |
| 2577 | `(("mpi" ,openmpi) |
| 2578 | ,@(package-inputs p4est))) |
| 2579 | (arguments |
| 2580 | (substitute-keyword-arguments (package-arguments p4est) |
| 2581 | ((#:configure-flags cf) |
| 2582 | ``("--enable-mpi" ,@,cf)))) |
| 2583 | (synopsis "Parallel adaptive mesh refinement on forests of octrees"))) |
| 2584 | |
| 2585 | (define-public gsegrafix |
| 2586 | (package |
| 2587 | (name "gsegrafix") |
| 2588 | (version "1.0.6") |
| 2589 | (source |
| 2590 | (origin |
| 2591 | (method url-fetch) |
| 2592 | (uri (string-append "mirror://gnu/" name "/" name "-" |
| 2593 | version ".tar.gz")) |
| 2594 | (sha256 |
| 2595 | (base32 |
| 2596 | "1b13hvx063zv970y750bx41wpx6hwd5ngjhbdrna8w8yy5kmxcda")))) |
| 2597 | (build-system gnu-build-system) |
| 2598 | (arguments |
| 2599 | `(#:configure-flags '("LDFLAGS=-lm"))) |
| 2600 | (inputs |
| 2601 | `(("libgnomecanvas" ,libgnomecanvas) |
| 2602 | ("libbonoboui" ,libbonoboui) |
| 2603 | ("libgnomeui" ,libgnomeui) |
| 2604 | ("libgnomeprintui" ,libgnomeprintui) |
| 2605 | ("popt" ,popt))) |
| 2606 | (native-inputs |
| 2607 | `(("pkg-config" ,pkg-config))) |
| 2608 | (home-page "https://www.gnu.org/software/gsegrafix/") |
| 2609 | (synopsis "GNOME application to create scientific and engineering plots") |
| 2610 | (description "GSEGrafix is an application which produces high-quality graphical |
| 2611 | plots for science and engineering. Plots are specified via simple ASCII |
| 2612 | parameter files and data files and are presented in an anti-aliased GNOME |
| 2613 | canvas. The program supports rectangular two-dimensional plots, histograms, |
| 2614 | polar-axis plots and three-dimensional plots. Plots can be printed or saved |
| 2615 | to BMP, JPEG or PNG image formats.") |
| 2616 | (license license:gpl3+))) |
| 2617 | |
| 2618 | (define-public maxima |
| 2619 | (package |
| 2620 | (name "maxima") |
| 2621 | (version "5.41.0") |
| 2622 | (source |
| 2623 | (origin |
| 2624 | (method url-fetch) |
| 2625 | (uri (string-append "mirror://sourceforge/maxima/Maxima-source/" |
| 2626 | version "-source/" name "-" version ".tar.gz")) |
| 2627 | (sha256 |
| 2628 | (base32 |
| 2629 | "0x0n81z0s4pl8nwpf7ivlsbvsdphm9w42250g7qdkizl0132by6s")) |
| 2630 | (patches (search-patches "maxima-defsystem-mkdir.patch")))) |
| 2631 | (build-system gnu-build-system) |
| 2632 | (inputs |
| 2633 | `(("gcl" ,gcl) |
| 2634 | ("gnuplot" ,gnuplot) ;for plots |
| 2635 | ("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima' |
| 2636 | (native-inputs |
| 2637 | `(("texinfo" ,texinfo) |
| 2638 | ("perl" ,perl) |
| 2639 | ("python" ,python))) |
| 2640 | (arguments |
| 2641 | `(#:configure-flags |
| 2642 | (list "--enable-gcl" |
| 2643 | (string-append "--with-posix-shell=" |
| 2644 | (assoc-ref %build-inputs "bash") |
| 2645 | "/bin/sh") |
| 2646 | (string-append "--with-wish=" |
| 2647 | (assoc-ref %build-inputs "tk") |
| 2648 | "/bin/wish" |
| 2649 | (let ((v ,(package-version tk))) |
| 2650 | (string-take v (string-index-right v #\.))))) |
| 2651 | ;; By default Maxima attempts to write temporary files to |
| 2652 | ;; '/tmp/nix-build-maxima-*', which won't exist at run time. |
| 2653 | ;; Work around that. |
| 2654 | #:make-flags (list "TMPDIR=/tmp") |
| 2655 | #:phases |
| 2656 | (modify-phases %standard-phases |
| 2657 | (add-before 'check 'pre-check |
| 2658 | (lambda _ |
| 2659 | (chmod "src/maxima" #o555) |
| 2660 | #t)) |
| 2661 | ;; Make sure the doc and emacs files are found in the |
| 2662 | ;; standard location. Also configure maxima to find gnuplot |
| 2663 | ;; without having it on the PATH. |
| 2664 | (add-after 'install 'post-install |
| 2665 | (lambda* (#:key outputs inputs #:allow-other-keys) |
| 2666 | (let* ((gnuplot (assoc-ref inputs "gnuplot")) |
| 2667 | (out (assoc-ref outputs "out")) |
| 2668 | (datadir (string-append out "/share/maxima/" ,version)) |
| 2669 | (binutils (string-append (assoc-ref inputs "binutils") |
| 2670 | "/bin"))) |
| 2671 | (with-directory-excursion out |
| 2672 | (mkdir-p "share/emacs") |
| 2673 | (mkdir-p "share/doc") |
| 2674 | (symlink |
| 2675 | (string-append datadir "/emacs/") |
| 2676 | (string-append out "/share/emacs/site-lisp")) |
| 2677 | (symlink |
| 2678 | (string-append datadir "/doc/") |
| 2679 | (string-append out "/share/doc/maxima")) |
| 2680 | (with-atomic-file-replacement |
| 2681 | (string-append datadir "/share/maxima-init.lisp") |
| 2682 | (lambda (in out) |
| 2683 | (format out "~a ~s~a~%" |
| 2684 | "(setf $gnuplot_command " |
| 2685 | (string-append gnuplot "/bin/gnuplot") ")") |
| 2686 | (dump-port in out)))) |
| 2687 | ;; Ensure that Maxima will have access to the GNU binutils |
| 2688 | ;; components at runtime. |
| 2689 | (wrap-program (string-append out "/bin/maxima") |
| 2690 | `("PATH" prefix (,binutils)))) |
| 2691 | #t))))) |
| 2692 | (home-page "http://maxima.sourceforge.net") |
| 2693 | (synopsis "Numeric and symbolic expression manipulation") |
| 2694 | (description "Maxima is a system for the manipulation of symbolic and |
| 2695 | numerical expressions. It yields high precision numeric results by using |
| 2696 | exact fractions, arbitrary precision integers, and variable precision floating |
| 2697 | point numbers.") |
| 2698 | ;; Some files are lgpl2.1+. Some are gpl2+. Some explicitly state gpl1+. |
| 2699 | ;; Others simply say "GNU General Public License" without stating a |
| 2700 | ;; version (which implicitly means gpl1+). |
| 2701 | ;; At least one file (src/maxima.asd) says "version 2." |
| 2702 | ;; GPLv2 only is therefore the smallest subset. |
| 2703 | (license license:gpl2))) |
| 2704 | |
| 2705 | (define-public wxmaxima |
| 2706 | (package |
| 2707 | (name "wxmaxima") |
| 2708 | (version "18.02.0") |
| 2709 | (source |
| 2710 | (origin |
| 2711 | (method url-fetch) |
| 2712 | (uri (string-append "https://github.com/andrejv/" name "/archive" |
| 2713 | "/Version-" version ".tar.gz")) |
| 2714 | (file-name (string-append name "-" version ".tar.gz")) |
| 2715 | (sha256 |
| 2716 | (base32 |
| 2717 | "03kr2rgfp4hcf3is8m8d8f9hj660c3xgrc50vrrfpixx4syh6wvj")) |
| 2718 | (patches |
| 2719 | (search-patches "wxmaxima-do-not-use-old-gnuplot-parameters.patch")))) |
| 2720 | (build-system cmake-build-system) |
| 2721 | (native-inputs |
| 2722 | `(("gettext" ,gettext-minimal))) |
| 2723 | (inputs |
| 2724 | `(("wxwidgets" ,wxwidgets) |
| 2725 | ("maxima" ,maxima) |
| 2726 | ;; Runtime support. |
| 2727 | ("adwaita-icon-theme" ,adwaita-icon-theme) |
| 2728 | ("gtk+" ,gtk+) |
| 2729 | ("shared-mime-info" ,shared-mime-info))) |
| 2730 | (arguments |
| 2731 | `(#:tests? #f ; no check target |
| 2732 | #:phases |
| 2733 | (modify-phases %standard-phases |
| 2734 | (add-after 'install 'wrap-program |
| 2735 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2736 | (wrap-program (string-append (assoc-ref outputs "out") |
| 2737 | "/bin/wxmaxima") |
| 2738 | `("PATH" ":" prefix |
| 2739 | (,(string-append (assoc-ref inputs "maxima") |
| 2740 | "/bin"))) |
| 2741 | ;; For GtkFileChooserDialog. |
| 2742 | `("GSETTINGS_SCHEMA_DIR" = |
| 2743 | (,(string-append (assoc-ref inputs "gtk+") |
| 2744 | "/share/glib-2.0/schemas"))) |
| 2745 | `("XDG_DATA_DIRS" ":" prefix |
| 2746 | (;; Needed by gdk-pixbuf to know supported icon formats. |
| 2747 | ,(string-append |
| 2748 | (assoc-ref inputs "shared-mime-info") "/share") |
| 2749 | ;; The default icon theme of GTK+. |
| 2750 | ,(string-append |
| 2751 | (assoc-ref inputs "adwaita-icon-theme") "/share")))) |
| 2752 | #t))))) |
| 2753 | (home-page "https://andrejv.github.io/wxmaxima/") |
| 2754 | (synopsis "Graphical user interface for the Maxima computer algebra system") |
| 2755 | (description |
| 2756 | "wxMaxima is a graphical user interface for the Maxima computer algebra |
| 2757 | system. It eases the use of Maxima by making most of its commands available |
| 2758 | through a menu system and by providing input dialogs for commands that require |
| 2759 | more than one argument. It also implements its own display engine that |
| 2760 | outputs mathematical symbols directly instead of depicting them with ASCII |
| 2761 | characters. |
| 2762 | |
| 2763 | wxMaxima also features 2D and 3D inline plots, simple animations, mixing of |
| 2764 | text and mathematical calculations to create documents, exporting of input and |
| 2765 | output to TeX, and a browser for Maxima's manual including command index and |
| 2766 | full text searching.") |
| 2767 | (license license:gpl2+))) |
| 2768 | |
| 2769 | (define-public armadillo |
| 2770 | (package |
| 2771 | (name "armadillo") |
| 2772 | (version "7.800.2") |
| 2773 | (source (origin |
| 2774 | (method url-fetch) |
| 2775 | (uri (string-append "mirror://sourceforge/arma/armadillo-" |
| 2776 | version ".tar.xz")) |
| 2777 | (sha256 |
| 2778 | (base32 |
| 2779 | "1qqzy7dp891j9v7062mv1599hdwr97vqzrd3j2fl8c3gmc00dmzg")))) |
| 2780 | (build-system cmake-build-system) |
| 2781 | (arguments `(#:tests? #f)) ;no test target |
| 2782 | (inputs |
| 2783 | `(("openblas" ,openblas) |
| 2784 | ("lapack" ,lapack) |
| 2785 | ("arpack" ,arpack-ng))) |
| 2786 | (home-page "http://arma.sourceforge.net/") |
| 2787 | (synopsis "C++ linear algebra library") |
| 2788 | (description |
| 2789 | "Armadillo is a C++ linear algebra library, aiming towards a good balance |
| 2790 | between speed and ease of use. It is useful for algorithm development |
| 2791 | directly in C++, or quick conversion of research code into production |
| 2792 | environments. It can be used for machine learning, pattern recognition, |
| 2793 | signal processing, bioinformatics, statistics, econometrics, etc. The library |
| 2794 | provides efficient classes for vectors, matrices and cubes, as well as 150+ |
| 2795 | associated functions (eg. contiguous and non-contiguous submatrix views).") |
| 2796 | (license license:asl2.0))) |
| 2797 | |
| 2798 | (define-public muparser |
| 2799 | ;; When switching download sites, muparser re-issued a 2.2.5 release with a |
| 2800 | ;; different hash. In order to make `guix package --upgrade` work correctly, |
| 2801 | ;; we set a Guix packaging revision. |
| 2802 | ;; When the next version of muparser is released, we can remove |
| 2803 | ;; UPSTREAM-VERSION and REVISION and use the plain VERSION. |
| 2804 | (let ((upstream-version "2.2.5") |
| 2805 | (revision "2")) |
| 2806 | (package |
| 2807 | (name "muparser") |
| 2808 | (version (string-append upstream-version "-" revision)) |
| 2809 | (source |
| 2810 | (origin |
| 2811 | (method url-fetch) |
| 2812 | (uri (string-append "https://github.com/beltoforion/muparser/archive/v" |
| 2813 | upstream-version ".tar.gz")) |
| 2814 | (file-name (string-append name "-" version ".tar.gz")) |
| 2815 | (sha256 |
| 2816 | (base32 |
| 2817 | "0277qsi5l23jsck1vhn383bmvc2n9l4a1dl5r9bf7hvjv9ayyrh6")))) |
| 2818 | (build-system gnu-build-system) |
| 2819 | (arguments |
| 2820 | `(#:configure-flags '("--enable-samples=no") |
| 2821 | #:tests? #f)) ;no "check" target |
| 2822 | (home-page "http://muparser.beltoforion.de/") |
| 2823 | (synopsis "Fast parser library for mathematical expressions") |
| 2824 | (description |
| 2825 | "muParser is an extensible high performance math parser library. It is |
| 2826 | based on transforming an expression into a bytecode and precalculating constant |
| 2827 | parts of it.") |
| 2828 | (license license:expat)))) |
| 2829 | |
| 2830 | (define-public openblas |
| 2831 | (package |
| 2832 | (name "openblas") |
| 2833 | (version "0.3.0") |
| 2834 | (source |
| 2835 | (origin |
| 2836 | (method url-fetch) |
| 2837 | (uri (string-append "https://github.com/xianyi/OpenBLAS/tarball/v" |
| 2838 | version)) |
| 2839 | (file-name (string-append name "-" version ".tar.gz")) |
| 2840 | (sha256 |
| 2841 | (base32 |
| 2842 | "14a9vyvp2k5zpd0axbnqk0d3khc1v3cck10nb5fj7d2sgn8490ky")))) |
| 2843 | (build-system gnu-build-system) |
| 2844 | (arguments |
| 2845 | `(#:test-target "test" |
| 2846 | ;; DYNAMIC_ARCH is only supported on x86. When it is disabled and no |
| 2847 | ;; TARGET is specified, OpenBLAS will tune itself to the build host, so |
| 2848 | ;; we need to disable substitutions. |
| 2849 | #:substitutable? |
| 2850 | ,(let ((system (or (%current-target-system) (%current-system)))) |
| 2851 | (or (string-prefix? "x86_64" system) |
| 2852 | (string-prefix? "i686" system) |
| 2853 | (string-prefix? "mips" system) |
| 2854 | (string-prefix? "aarch64" system))) |
| 2855 | #:make-flags |
| 2856 | (list (string-append "PREFIX=" (assoc-ref %outputs "out")) |
| 2857 | "SHELL=bash" |
| 2858 | ;; Build the library for all supported CPUs. This allows |
| 2859 | ;; switching CPU targets at runtime with the environment variable |
| 2860 | ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type. |
| 2861 | ;; Unfortunately, this is not supported on non-x86 architectures, |
| 2862 | ;; where it leads to failed builds. |
| 2863 | ,@(let ((system (or (%current-target-system) (%current-system)))) |
| 2864 | (cond |
| 2865 | ((or (string-prefix? "x86_64" system) |
| 2866 | (string-prefix? "i686" system)) |
| 2867 | '("DYNAMIC_ARCH=1")) |
| 2868 | ;; On MIPS we force the "SICORTEX" TARGET, as for the other |
| 2869 | ;; two available MIPS targets special extended instructions |
| 2870 | ;; for Loongson cores are used. |
| 2871 | ((string-prefix? "mips" system) |
| 2872 | '("TARGET=SICORTEX")) |
| 2873 | ;; On aarch64 force the generic 'armv8-a' target |
| 2874 | ((string-prefix? "aarch64" system) |
| 2875 | '("TARGET=ARMV8")) |
| 2876 | (else '())))) |
| 2877 | ;; no configure script |
| 2878 | #:phases |
| 2879 | (modify-phases %standard-phases |
| 2880 | (delete 'configure) |
| 2881 | ;; Conditionally apply a patch on i686 to avoid rebuilding |
| 2882 | ;; all architectures. FIXME: This should be moved to the |
| 2883 | ;; (source (patches ...)) field in the next rebuild cycle. |
| 2884 | ,@(if (string-prefix? "i686" (or (%current-target-system) |
| 2885 | (%current-system))) |
| 2886 | `((add-after 'unpack 'fix-tests |
| 2887 | (lambda* (#:key inputs #:allow-other-keys) |
| 2888 | (invoke "patch" "-p1" |
| 2889 | "--input" (assoc-ref inputs "i686-fix-tests.patch"))))) |
| 2890 | '()) |
| 2891 | (add-before 'build 'set-extralib |
| 2892 | (lambda* (#:key inputs #:allow-other-keys) |
| 2893 | ;; Get libgfortran found when building in utest. |
| 2894 | (setenv "FEXTRALIB" |
| 2895 | (string-append "-L" (assoc-ref inputs "fortran-lib") |
| 2896 | "/lib")) |
| 2897 | #t))))) |
| 2898 | (inputs |
| 2899 | `(("fortran-lib" ,gfortran "lib"))) |
| 2900 | (native-inputs |
| 2901 | `(("cunit" ,cunit) |
| 2902 | ,@(if (string-prefix? "i686" (or (%current-target-system) |
| 2903 | (%current-system))) |
| 2904 | `(("i686-fix-tests.patch" |
| 2905 | ,(search-patch "openblas-fix-tests-i686.patch"))) |
| 2906 | '()) |
| 2907 | ("fortran" ,gfortran) |
| 2908 | ("perl" ,perl))) |
| 2909 | (home-page "http://www.openblas.net/") |
| 2910 | (synopsis "Optimized BLAS library based on GotoBLAS") |
| 2911 | (description |
| 2912 | "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.") |
| 2913 | (license license:bsd-3))) |
| 2914 | |
| 2915 | (define* (make-blis implementation #:optional substitutable?) |
| 2916 | "Return a BLIS package with the given IMPLEMENTATION (see config/ in the |
| 2917 | source tree for a list of implementations.) |
| 2918 | |
| 2919 | SUBSTITUTABLE? determines whether the package is made available as a |
| 2920 | substitute. |
| 2921 | |
| 2922 | Currently the specialization must be selected at configure-time, but work is |
| 2923 | underway to allow BLIS to select the right optimized kernels at run time: |
| 2924 | <https://github.com/flame/blis/issues/129>." |
| 2925 | (package |
| 2926 | (name (if (string=? implementation "reference") |
| 2927 | "blis" |
| 2928 | (string-append "blis-" implementation))) |
| 2929 | (version "0.2.2") |
| 2930 | (home-page "https://github.com/flame/blis") |
| 2931 | (source (origin |
| 2932 | (method git-fetch) |
| 2933 | (uri (git-reference (url home-page) (commit version))) |
| 2934 | (sha256 |
| 2935 | (base32 |
| 2936 | "1wr79a50nm4abhw8w3sn96nmwp5mrzifcigk7khw9qcgyyyqayfh")) |
| 2937 | (file-name (git-file-name "blis" version)))) |
| 2938 | (build-system gnu-build-system) |
| 2939 | (arguments |
| 2940 | `(#:test-target "test" |
| 2941 | |
| 2942 | #:substitutable? ,substitutable? |
| 2943 | |
| 2944 | #:phases (modify-phases %standard-phases |
| 2945 | (replace 'configure |
| 2946 | (lambda* (#:key outputs #:allow-other-keys) |
| 2947 | ;; This is a home-made 'configure' script. |
| 2948 | (let ((out (assoc-ref outputs "out"))) |
| 2949 | (zero? (system* "./configure" "-p" out |
| 2950 | "-d" "opt" |
| 2951 | "--disable-static" |
| 2952 | "--enable-shared" |
| 2953 | "--enable-threading=openmp" |
| 2954 | |
| 2955 | ,implementation))))) |
| 2956 | (add-before 'check 'show-test-output |
| 2957 | (lambda _ |
| 2958 | ;; By default "make check" is silent. Make it verbose. |
| 2959 | (system "tail -F output.testsuite &") |
| 2960 | #t))))) |
| 2961 | (synopsis "High-performance basic linear algebra (BLAS) routines") |
| 2962 | (description |
| 2963 | "BLIS is a portable software framework for instantiating high-performance |
| 2964 | BLAS-like dense linear algebra libraries. The framework was designed to |
| 2965 | isolate essential kernels of computation that, when optimized, immediately |
| 2966 | enable optimized implementations of most of its commonly used and |
| 2967 | computationally intensive operations. While BLIS exports a new BLAS-like API, |
| 2968 | it also includes a BLAS compatibility layer which gives application developers |
| 2969 | access to BLIS implementations via traditional BLAS routine calls.") |
| 2970 | (license license:bsd-3))) |
| 2971 | |
| 2972 | (define-public blis |
| 2973 | ;; This is the "reference" implementation, which is the non-optimized but |
| 2974 | ;; portable variant (no assembly). |
| 2975 | (make-blis "reference" #t)) |
| 2976 | |
| 2977 | (define ignorance blis) |
| 2978 | |
| 2979 | (define-syntax-rule (blis/x86_64 processor) |
| 2980 | "Expand to a package specialized for PROCESSOR." |
| 2981 | (package |
| 2982 | (inherit (make-blis processor)) |
| 2983 | (supported-systems '("x86_64-linux")))) |
| 2984 | |
| 2985 | (define-public blis-sandybridge |
| 2986 | ;; BLIS specialized for Sandy Bridge processors (launched 2011): |
| 2987 | ;; <http://ark.intel.com/products/codename/29900/Sandy-Bridge>. |
| 2988 | (blis/x86_64 "sandybridge")) |
| 2989 | |
| 2990 | (define-public blis-haswell |
| 2991 | ;; BLIS specialized for Haswell processors (launched 2013): |
| 2992 | ;; <http://ark.intel.com/products/codename/42174/Haswell>. |
| 2993 | (blis/x86_64 "haswell")) |
| 2994 | |
| 2995 | (define-public blis-knl |
| 2996 | ;; BLIS specialized for Knights Landing processor (launched 2016): |
| 2997 | ;; <http://ark.intel.com/products/series/92650/Intel-Xeon-Phi-x200-Product-Family>. |
| 2998 | (blis/x86_64 "knl")) |
| 2999 | |
| 3000 | |
| 3001 | (define-public openlibm |
| 3002 | (package |
| 3003 | (name "openlibm") |
| 3004 | (version "0.6.0") |
| 3005 | (source |
| 3006 | (origin |
| 3007 | (method url-fetch) |
| 3008 | (uri (string-append "https://github.com/JuliaLang/openlibm/archive/v" |
| 3009 | version ".tar.gz")) |
| 3010 | (file-name (string-append name "-" version ".tar.gz")) |
| 3011 | (sha256 |
| 3012 | (base32 |
| 3013 | "0a5fpm8nra5ldhjk0cqd2rx1qh32wiarkxmcqcm5xl8z7l4kjm6l")))) |
| 3014 | (build-system gnu-build-system) |
| 3015 | (arguments |
| 3016 | `(#:make-flags |
| 3017 | (list (string-append "prefix=" (assoc-ref %outputs "out"))) |
| 3018 | #:phases |
| 3019 | ;; no configure script |
| 3020 | (modify-phases %standard-phases (delete 'configure)) |
| 3021 | #:tests? #f)) ;the tests are part of the default target |
| 3022 | (home-page "http://openlibm.org/") |
| 3023 | (synopsis "Portable C mathematical library (libm)") |
| 3024 | (description |
| 3025 | "OpenLibm is an effort to have a high quality, portable, standalone C |
| 3026 | mathematical library (libm). It can be used standalone in applications and |
| 3027 | programming language implementations. The project was born out of a need to |
| 3028 | have a good libm for the Julia programming language that worked consistently |
| 3029 | across compilers and operating systems, and in 32-bit and 64-bit |
| 3030 | environments.") |
| 3031 | ;; Each architecture has its own make target, and there is none for mips. |
| 3032 | (supported-systems (delete "mips64el-linux" %supported-systems)) |
| 3033 | ;; See LICENSE.md for details. |
| 3034 | (license (list license:expat |
| 3035 | license:isc |
| 3036 | license:bsd-2 |
| 3037 | license:public-domain |
| 3038 | license:lgpl2.1+)))) |
| 3039 | |
| 3040 | (define-public openspecfun |
| 3041 | (package |
| 3042 | (name "openspecfun") |
| 3043 | (version "0.5.3") |
| 3044 | (source |
| 3045 | (origin |
| 3046 | (method url-fetch) |
| 3047 | (uri (string-append "https://github.com/JuliaLang/openspecfun/archive/v" |
| 3048 | version ".tar.gz")) |
| 3049 | (file-name (string-append name "-" version ".tar.gz")) |
| 3050 | (sha256 |
| 3051 | (base32 |
| 3052 | "1rs1bv8jq751fv9vq79890wqf9xlbjc7lvz3ighzyfczbyjcf18m")))) |
| 3053 | (build-system gnu-build-system) |
| 3054 | (arguments |
| 3055 | '(#:tests? #f ; no "check" target |
| 3056 | #:make-flags |
| 3057 | (list (string-append "prefix=" (assoc-ref %outputs "out"))) |
| 3058 | #:phases |
| 3059 | (modify-phases %standard-phases |
| 3060 | (delete 'configure)))) ; no configure script |
| 3061 | (inputs |
| 3062 | `(("fortran" ,gfortran))) |
| 3063 | (home-page "https://github.com/JuliaLang/openspecfun") |
| 3064 | (synopsis "Collection of special mathematical functions") |
| 3065 | (description |
| 3066 | "Openspecfun provides AMOS and Faddeeva. AMOS (from Netlib) is a |
| 3067 | portable package for Bessel Functions of a Complex Argument and Nonnegative |
| 3068 | Order; it contains subroutines for computing Bessel functions and Airy |
| 3069 | functions. Faddeeva allows computing the various error functions of arbitrary |
| 3070 | complex arguments (Faddeeva function, error function, complementary error |
| 3071 | function, scaled complementary error function, imaginary error function, and |
| 3072 | Dawson function); given these, one can also easily compute Voigt functions, |
| 3073 | Fresnel integrals, and similar related functions as well.") |
| 3074 | ;; Faddeeva is released under the Expat license; AMOS is included as |
| 3075 | ;; public domain software. |
| 3076 | (license (list license:expat license:public-domain)))) |
| 3077 | |
| 3078 | (define-public suitesparse |
| 3079 | (package |
| 3080 | (name "suitesparse") |
| 3081 | (version "4.5.5") |
| 3082 | (source |
| 3083 | (origin |
| 3084 | (method url-fetch) |
| 3085 | (uri (string-append |
| 3086 | "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-" |
| 3087 | version ".tar.gz")) |
| 3088 | (sha256 |
| 3089 | (base32 |
| 3090 | "1dnr6pmjzc2qmbkmb4shigx1l74ilf6abn7svyd6brxgvph8vadr")) |
| 3091 | (modules '((guix build utils))) |
| 3092 | (snippet |
| 3093 | ;; Remove bundled metis source |
| 3094 | '(begin |
| 3095 | (delete-file-recursively "metis-5.1.0") |
| 3096 | #t)))) |
| 3097 | (build-system gnu-build-system) |
| 3098 | (arguments |
| 3099 | '(#:tests? #f ;no "check" target |
| 3100 | #:make-flags |
| 3101 | (list "CC=gcc" |
| 3102 | "BLAS=-lblas" |
| 3103 | "TBB=-ltbb" |
| 3104 | "MY_METIS_LIB=-lmetis" |
| 3105 | (string-append "INSTALL_LIB=" |
| 3106 | (assoc-ref %outputs "out") "/lib") |
| 3107 | (string-append "INSTALL_INCLUDE=" |
| 3108 | (assoc-ref %outputs "out") "/include") |
| 3109 | "library") |
| 3110 | #:phases |
| 3111 | (modify-phases %standard-phases |
| 3112 | (delete 'configure)))) ;no configure script |
| 3113 | (inputs |
| 3114 | `(("tbb" ,tbb) |
| 3115 | ("lapack" ,lapack) |
| 3116 | ("metis" ,metis))) |
| 3117 | (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html") |
| 3118 | (synopsis "Suite of sparse matrix software") |
| 3119 | (description |
| 3120 | "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK, |
| 3121 | multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR, |
| 3122 | multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit |
| 3123 | simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and |
| 3124 | CXSparse, a concise sparse Cholesky factorization package; and many other |
| 3125 | packages.") |
| 3126 | ;; LGPLv2.1+: |
| 3127 | ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL |
| 3128 | ;; GPLv2+: |
| 3129 | ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK |
| 3130 | (license (list license:gpl2+ license:lgpl2.1+)))) |
| 3131 | |
| 3132 | (define-public atlas |
| 3133 | (package |
| 3134 | (name "atlas") |
| 3135 | (version "3.10.3") |
| 3136 | (source (origin |
| 3137 | (method url-fetch) |
| 3138 | (uri (string-append "mirror://sourceforge/math-atlas/Stable/" |
| 3139 | version "/atlas" version ".tar.bz2")) |
| 3140 | (sha256 |
| 3141 | (base32 |
| 3142 | "1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216")))) |
| 3143 | (build-system gnu-build-system) |
| 3144 | (home-page "http://math-atlas.sourceforge.net/") |
| 3145 | (inputs `(("gfortran" ,gfortran) |
| 3146 | ("lapack-tar" ,(package-source lapack)))) |
| 3147 | (outputs '("out" "doc")) |
| 3148 | ;; For the moment we drop support for MIPS at it fails to compile. See |
| 3149 | ;; https://lists.gnu.org/archive/html/guix-devel/2014-11/msg00516.html |
| 3150 | (supported-systems (delete "mips64el-linux" %supported-systems)) |
| 3151 | (arguments |
| 3152 | `(#:parallel-build? #f |
| 3153 | #:parallel-tests? #f |
| 3154 | |
| 3155 | ;; ATLAS tunes itself for the machine it is built on, as explained at |
| 3156 | ;; <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00305.html>. |
| 3157 | ;; For this reason, we want users to build it locally instead of using |
| 3158 | ;; substitutes. |
| 3159 | #:substitutable? #f |
| 3160 | |
| 3161 | #:modules ((srfi srfi-26) |
| 3162 | (srfi srfi-1) |
| 3163 | (guix build gnu-build-system) |
| 3164 | (guix build utils)) |
| 3165 | #:configure-flags |
| 3166 | `(;; Generate position independent code suitable for dynamic libraries |
| 3167 | ;; and use WALL timer to get more accurate timing. |
| 3168 | "-Fa" "alg" "-fPIC" "-D" "c" "-DWALL" |
| 3169 | ;; Set word width. |
| 3170 | "-b" |
| 3171 | ,,(if (string-match "64" (%current-system)) |
| 3172 | "64" |
| 3173 | "32") |
| 3174 | ;; Disable parallel build as it gives errors: atlas_pthread.h is |
| 3175 | ;; needed to compile C files before it is generated. |
| 3176 | "-Ss" "pmake" "make -j 1" |
| 3177 | ;; Probe is failing for MIPS. We therefore define the system |
| 3178 | ;; architecture explicitly by setting (-A) MACHINETYPE = 49 |
| 3179 | ;; 'MIPSR1xK' and (-V) ISA = 1 'none'. |
| 3180 | ,,@(if (string-prefix? "mips" (%current-system)) |
| 3181 | (list "-A" "49" "-V" "1") |
| 3182 | (list)) |
| 3183 | ;; Generate shared libraries. |
| 3184 | "--shared" |
| 3185 | ;; Build a full LAPACK library. |
| 3186 | ,(string-append "--with-netlib-lapack-tarfile=" |
| 3187 | (assoc-ref %build-inputs "lapack-tar"))) |
| 3188 | #:phases |
| 3189 | (modify-phases %standard-phases |
| 3190 | (add-after 'install 'install-doc |
| 3191 | (lambda* (#:key outputs inputs #:allow-other-keys) |
| 3192 | (let ((doc (string-append (assoc-ref outputs "doc") |
| 3193 | "/share/doc/atlas"))) |
| 3194 | (mkdir-p doc) |
| 3195 | (fold (lambda (file previous) |
| 3196 | (and previous (zero? (system* "cp" file doc)))) |
| 3197 | #t (find-files "../ATLAS/doc" ".*"))))) |
| 3198 | (add-after 'check 'check-pt |
| 3199 | (lambda _ (zero? (system* "make" "ptcheck")))) |
| 3200 | ;; Fix files required to run configure. |
| 3201 | (add-before 'configure 'fix-/bin/sh |
| 3202 | (lambda _ |
| 3203 | ;; Use `sh', not `/bin/sh'. |
| 3204 | (substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c") |
| 3205 | (("/bin/sh") |
| 3206 | "sh")))) |
| 3207 | ;; Fix /bin/sh in generated make files. |
| 3208 | (add-after 'configure 'fix-/bin/sh-in-generated-files |
| 3209 | (lambda _ |
| 3210 | (substitute* (find-files "." "^[Mm]ake\\.inc.*") |
| 3211 | (("/bin/sh") |
| 3212 | "sh")))) |
| 3213 | ;; ATLAS configure program does not accepts the default flags |
| 3214 | ;; passed by the 'gnu-build-system'. |
| 3215 | (replace 'configure |
| 3216 | (lambda* (#:key native-inputs inputs outputs |
| 3217 | (configure-flags '()) |
| 3218 | #:allow-other-keys #:rest args) |
| 3219 | (let* ((prefix (assoc-ref outputs "out")) |
| 3220 | (bash (or (and=> (assoc-ref |
| 3221 | (or native-inputs inputs) "bash") |
| 3222 | (cut string-append <> "/bin/bash")) |
| 3223 | "/bin/sh")) |
| 3224 | (flags `(,(string-append "--prefix=" prefix) |
| 3225 | ,@configure-flags)) |
| 3226 | (abs-srcdir (getcwd)) |
| 3227 | (srcdir (string-append "../" (basename abs-srcdir)))) |
| 3228 | (format #t "source directory: ~s (relative from build: ~s)~%" |
| 3229 | abs-srcdir srcdir) |
| 3230 | (mkdir "../build") |
| 3231 | (chdir "../build") |
| 3232 | (format #t "build directory: ~s~%" (getcwd)) |
| 3233 | (format #t "configure flags: ~s~%" flags) |
| 3234 | (zero? (apply system* bash |
| 3235 | (string-append srcdir "/configure") |
| 3236 | flags)))))))) |
| 3237 | (synopsis "Automatically Tuned Linear Algebra Software") |
| 3238 | (description |
| 3239 | "ATLAS is an automatically tuned linear algebra software library |
| 3240 | providing C and Fortran77 interfaces to a portably efficient BLAS |
| 3241 | implementation, as well as a few routines from LAPACK. |
| 3242 | |
| 3243 | Optimization occurs at build time. For this reason, the library is built on |
| 3244 | the machine where it is installed, without resorting to pre-built substitutes. |
| 3245 | |
| 3246 | Before building the library, CPU throttling should be disabled. This can be |
| 3247 | done in the BIOS, or, on GNU/Linux, with the following command: |
| 3248 | |
| 3249 | @example |
| 3250 | # cpupower --governor performance |
| 3251 | @end example |
| 3252 | |
| 3253 | Failure to do so will result in a library with poor performance.") |
| 3254 | (license license:bsd-3))) |
| 3255 | |
| 3256 | (define-public glm |
| 3257 | (package |
| 3258 | (name "glm") |
| 3259 | (version "0.9.9.0") |
| 3260 | (source |
| 3261 | (origin |
| 3262 | (method url-fetch) |
| 3263 | (uri (string-append "https://github.com/g-truc/glm/releases/download/" |
| 3264 | version "/glm-" version ".zip")) |
| 3265 | (sha256 |
| 3266 | (base32 |
| 3267 | "0ihjadp2sb8w312a276skfjsljm3y41bjscbxf79wn23gi00giz1")))) |
| 3268 | (build-system cmake-build-system) |
| 3269 | (native-inputs |
| 3270 | `(("unzip" ,unzip))) |
| 3271 | (home-page "https://glm.g-truc.net/") |
| 3272 | (synopsis "OpenGL Mathematics library") |
| 3273 | (description "OpenGL Mathematics (GLM) is a header-only C++ mathematics |
| 3274 | library for graphics software based on the OpenGL Shading Language (GLSL) |
| 3275 | specifications.") |
| 3276 | (license license:expat))) |
| 3277 | |
| 3278 | (define-public lpsolve |
| 3279 | (package |
| 3280 | (name "lpsolve") |
| 3281 | (version "5.5.2.5") |
| 3282 | (source |
| 3283 | (origin |
| 3284 | (method url-fetch) |
| 3285 | (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version |
| 3286 | "/lp_solve_" version "_source.tar.gz")) |
| 3287 | (sha256 |
| 3288 | (base32 |
| 3289 | "12pj1idjz31r7c2mb5w03vy1cmvycvbkx9z29s40qdmkp1i7q6i0")) |
| 3290 | (modules '((guix build utils))) |
| 3291 | (snippet |
| 3292 | '(begin |
| 3293 | (substitute* (list "lp_solve/ccc" "lpsolve55/ccc") |
| 3294 | (("^c=cc") "c=gcc") |
| 3295 | ;; Pretend to be on a 64 bit platform to obtain a common directory |
| 3296 | ;; name for the build results on all architectures; nothing else |
| 3297 | ;; seems to depend on it. |
| 3298 | (("^PLATFORM=.*$") "PLATFORM=ux64\n") |
| 3299 | |
| 3300 | ;; The check for 'isnan' as it is written fails with |
| 3301 | ;; "non-floating-point argument in call to function |
| 3302 | ;; ‘__builtin_isnan’", which leads to the 'NOISNAN' cpp macro |
| 3303 | ;; definition, which in turn leads to bad things. Fix the feature |
| 3304 | ;; test. |
| 3305 | (("isnan\\(0\\)") "isnan(0.)")) |
| 3306 | #t)))) |
| 3307 | (build-system gnu-build-system) |
| 3308 | (arguments |
| 3309 | `(#:tests? #f ; no check target |
| 3310 | #:phases |
| 3311 | (modify-phases %standard-phases |
| 3312 | (delete 'configure) ; no configure script |
| 3313 | (replace 'build |
| 3314 | (lambda _ |
| 3315 | (with-directory-excursion "lpsolve55" |
| 3316 | (invoke "bash" "ccc")) |
| 3317 | (with-directory-excursion "lp_solve" |
| 3318 | (invoke "bash" "ccc")) |
| 3319 | #t)) |
| 3320 | (replace 'install |
| 3321 | (lambda* (#:key outputs #:allow-other-keys) |
| 3322 | (let* ((out (assoc-ref outputs "out")) |
| 3323 | (bin (string-append out "/bin")) |
| 3324 | (lib (string-append out "/lib")) |
| 3325 | ;; This is where LibreOffice expects to find the header |
| 3326 | ;; files, and where they are installed by Debian. |
| 3327 | (include (string-append out "/include/lpsolve"))) |
| 3328 | (install-file "lpsolve55/bin/ux64/liblpsolve55.a" lib) |
| 3329 | (install-file "lpsolve55/bin/ux64/liblpsolve55.so" lib) |
| 3330 | (install-file "lp_solve/bin/ux64/lp_solve" bin) |
| 3331 | |
| 3332 | ;; Install a subset of the header files as on Debian |
| 3333 | ;; (plus lp_bit.h, which matches the regular expression). |
| 3334 | (for-each (lambda (name) |
| 3335 | (install-file name include)) |
| 3336 | (find-files "." "lp_[HMSa-z].*\\.h$")) |
| 3337 | (with-directory-excursion "shared" |
| 3338 | (for-each (lambda (name) |
| 3339 | (install-file name include)) |
| 3340 | (find-files "." "\\.h$"))) |
| 3341 | #t)))))) |
| 3342 | (home-page "http://lpsolve.sourceforge.net/") |
| 3343 | (synopsis "Mixed integer linear programming (MILP) solver") |
| 3344 | (description |
| 3345 | "lp_solve is a mixed integer linear programming solver based on the |
| 3346 | revised simplex and the branch-and-bound methods.") |
| 3347 | (license license:lgpl2.1+))) |
| 3348 | |
| 3349 | (define-public dealii |
| 3350 | (package |
| 3351 | (name "dealii") |
| 3352 | (version "8.5.1") |
| 3353 | (source |
| 3354 | (origin |
| 3355 | (method url-fetch) |
| 3356 | (uri (string-append "https://github.com/dealii/dealii/releases/" |
| 3357 | "download/v" version "/dealii-" version ".tar.gz")) |
| 3358 | (sha256 |
| 3359 | (base32 |
| 3360 | "1bh9rsmkrg0zi70n27b11djmac9lximghsiy7mg7w7x544n82gnk")) |
| 3361 | (modules '((guix build utils))) |
| 3362 | (snippet |
| 3363 | ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost |
| 3364 | '(begin |
| 3365 | (delete-file-recursively "bundled") |
| 3366 | #t)))) |
| 3367 | (build-system cmake-build-system) |
| 3368 | (inputs |
| 3369 | `(("tbb" ,tbb) |
| 3370 | ("zlib" ,zlib) |
| 3371 | ("boost" ,boost) |
| 3372 | ("p4est" ,p4est) |
| 3373 | ("blas" ,openblas) |
| 3374 | ("lapack" ,lapack) |
| 3375 | ("arpack" ,arpack-ng) |
| 3376 | ("muparser" ,muparser) |
| 3377 | ("gfortran" ,gfortran) |
| 3378 | ("suitesparse" ,suitesparse))) ;for UMFPACK |
| 3379 | (arguments |
| 3380 | `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease |
| 3381 | #:configure-flags |
| 3382 | ;; Work around a bug in libsuitesparseconfig linking |
| 3383 | ;; see https://github.com/dealii/dealii/issues/4745 |
| 3384 | '("-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON"))) |
| 3385 | (home-page "https://www.dealii.org") |
| 3386 | (synopsis "Finite element library") |
| 3387 | (description |
| 3388 | "Deal.II is a C++ program library targeted at the computational solution |
| 3389 | of partial differential equations using adaptive finite elements. The main |
| 3390 | aim of deal.II is to enable rapid development of modern finite element codes, |
| 3391 | using among other aspects adaptive meshes and a wide array of tools often used |
| 3392 | in finite element programs.") |
| 3393 | (license license:lgpl2.1+))) |
| 3394 | |
| 3395 | (define-public dealii-openmpi |
| 3396 | (package (inherit dealii) |
| 3397 | (name "dealii-openmpi") |
| 3398 | (inputs |
| 3399 | `(("mpi" ,openmpi) |
| 3400 | ;;Supported only with MPI: |
| 3401 | ("p4est" ,p4est-openmpi) |
| 3402 | ("petsc" ,petsc-openmpi) |
| 3403 | ("slepc" ,slepc-openmpi) |
| 3404 | ("metis" ,metis) ;for MUMPS |
| 3405 | ("scalapack" ,scalapack) ;for MUMPS |
| 3406 | ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings |
| 3407 | ("arpack" ,arpack-ng-openmpi) |
| 3408 | ,@(fold alist-delete (package-inputs dealii) |
| 3409 | '("p4est" "arpack")))) |
| 3410 | (arguments |
| 3411 | (substitute-keyword-arguments (package-arguments dealii) |
| 3412 | ((#:configure-flags cf) |
| 3413 | ``("-DMPI_C_COMPILER=mpicc" |
| 3414 | "-DMPI_CXX_COMPILER=mpicxx" |
| 3415 | "-DMPI_Fortran_COMPILER=mpifort" |
| 3416 | ,@,cf)))) |
| 3417 | (synopsis "Finite element library (with MPI support)"))) |
| 3418 | |
| 3419 | (define-public flann |
| 3420 | (package |
| 3421 | (name "flann") |
| 3422 | (version "1.8.4") |
| 3423 | (source |
| 3424 | (origin |
| 3425 | (method url-fetch) |
| 3426 | (uri |
| 3427 | (string-append |
| 3428 | "http://www.cs.ubc.ca/research/flann/uploads/FLANN/flann-" |
| 3429 | version "-src.zip")) |
| 3430 | (sha256 |
| 3431 | (base32 |
| 3432 | "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz")) |
| 3433 | (patches (search-patches "flann-cmake-3.11.patch")))) |
| 3434 | (build-system cmake-build-system) |
| 3435 | (outputs '("out" |
| 3436 | "octave")) ;46 MiB .mex file that pulls Octave |
| 3437 | (native-inputs |
| 3438 | `(("unzip" ,unzip))) |
| 3439 | (inputs |
| 3440 | `(("hdf5" ,hdf5) |
| 3441 | ("octave" ,octave) |
| 3442 | ("python" ,python-2) ; print syntax |
| 3443 | ;; ("python2-numpy" ,python2-numpy) ; only required for the tests |
| 3444 | ("zlib" ,zlib))) |
| 3445 | (arguments |
| 3446 | `(;; The 'share/flann/octave' contains a .mex file, which is an ELF file |
| 3447 | ;; taken 46 MiB unstripped, and 6 MiB stripped. |
| 3448 | #:strip-directories '("lib" "lib64" "libexec" |
| 3449 | "bin" "sbin" "share/flann/octave") |
| 3450 | |
| 3451 | ;; Save 12 MiB by not installing .a files. Passing |
| 3452 | ;; '-DBUILD_STATIC_LIBS=OFF' has no effect. |
| 3453 | #:phases (modify-phases %standard-phases |
| 3454 | (add-before 'configure 'set-octave-directory |
| 3455 | (lambda* (#:key outputs #:allow-other-keys) |
| 3456 | ;; Install the .mex file in the "octave" output. |
| 3457 | (let ((out (assoc-ref outputs "octave"))) |
| 3458 | (substitute* "src/matlab/CMakeLists.txt" |
| 3459 | (("share/flann/octave") |
| 3460 | (string-append out "/share/flann/octave"))) |
| 3461 | #t))) |
| 3462 | (add-after 'install 'remove-static-libraries |
| 3463 | (lambda* (#:key outputs #:allow-other-keys) |
| 3464 | (let* ((out (assoc-ref outputs "out")) |
| 3465 | (lib (string-append out "/lib"))) |
| 3466 | (for-each delete-file |
| 3467 | (find-files lib "\\.a$")) |
| 3468 | #t)))) |
| 3469 | |
| 3470 | #:tests? #f)) ; The test data are downloaded from the Internet. |
| 3471 | (home-page "http://www.cs.ubc.ca/research/flann/") |
| 3472 | (synopsis "Library for approximate nearest neighbors computation") |
| 3473 | (description "FLANN is a library for performing fast approximate |
| 3474 | nearest neighbor searches in high dimensional spaces. It implements a |
| 3475 | collection of algorithms and a system for automatically choosing the best |
| 3476 | algorithm and optimum parameters depending on the dataset. |
| 3477 | |
| 3478 | FLANN is written in C++ and contains bindings for C, Octave and Python.") |
| 3479 | (license (license:non-copyleft "file://COPYING" |
| 3480 | "See COPYING in the distribution.")))) |
| 3481 | |
| 3482 | (define-public wcalc |
| 3483 | (package |
| 3484 | (name "wcalc") |
| 3485 | (version "2.5") |
| 3486 | (source |
| 3487 | (origin |
| 3488 | (method url-fetch) |
| 3489 | (uri (string-append "mirror://sourceforge/w-calc/Wcalc/" version "/" |
| 3490 | "wcalc-" version ".tar.bz2")) |
| 3491 | (sha256 |
| 3492 | (base32 |
| 3493 | "1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f")))) |
| 3494 | (build-system gnu-build-system) |
| 3495 | (inputs |
| 3496 | `(("mpfr" ,mpfr) |
| 3497 | ("readline" ,readline))) |
| 3498 | (home-page "http://w-calc.sourceforge.net/index.php") |
| 3499 | (synopsis "Flexible command-line scientific calculator") |
| 3500 | (description "Wcalc is a very capable calculator. It has standard functions |
| 3501 | (sin, asin, and sinh for example, in either radians or degrees), many |
| 3502 | pre-defined constants (pi, e, c, etc.), support for using variables, \"active\" |
| 3503 | variables, a command history, hex/octal/binary input and output, unit |
| 3504 | conversions, embedded comments, and an expandable expression entry field. It |
| 3505 | evaluates expressions using the standard order of operations.") |
| 3506 | (license license:gpl2+))) |
| 3507 | |
| 3508 | (define-public xaos |
| 3509 | (package |
| 3510 | (name "xaos") |
| 3511 | (version "3.6") |
| 3512 | (source (origin |
| 3513 | (method url-fetch) |
| 3514 | (uri (string-append "mirror://sourceforge/xaos/XaoS/" version |
| 3515 | "/xaos-" version ".tar.gz")) |
| 3516 | (sha256 |
| 3517 | (base32 |
| 3518 | "15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq")))) |
| 3519 | (build-system gnu-build-system) |
| 3520 | (native-inputs `(("gettext" ,gettext-minimal))) |
| 3521 | (inputs `(("libx11" ,libx11) |
| 3522 | ("zlib" ,zlib) |
| 3523 | ("libpng" ,libpng) |
| 3524 | ("gsl" ,gsl))) |
| 3525 | (arguments |
| 3526 | `(#:tests? #f ;no "check" target |
| 3527 | #:make-flags '("LOCALEDIR=$DATAROOTDIR/locale"))) |
| 3528 | (synopsis "Real-time fractal zoomer") |
| 3529 | (description "GNU XaoS is a graphical program that generates fractal |
| 3530 | patterns and allows you to zoom in and out of them infinitely in a fluid, |
| 3531 | continuous manner. It also includes tutorials that help to explain how fractals |
| 3532 | are built. It can generate many different fractal types such as the Mandelbrot |
| 3533 | set.") |
| 3534 | (home-page "https://www.gnu.org/software/xaos/") |
| 3535 | (license license:gpl2+))) |
| 3536 | |
| 3537 | (define-public hypre |
| 3538 | (package |
| 3539 | (name "hypre") |
| 3540 | (version "2.11.0") |
| 3541 | (source (origin |
| 3542 | (method url-fetch) |
| 3543 | (uri (string-append "https://github.com/LLNL/hypre/archive/" |
| 3544 | "v" version ".tar.gz")) |
| 3545 | (file-name (string-append name "-" version ".tar.gz")) |
| 3546 | (sha256 |
| 3547 | (base32 |
| 3548 | "0q69ia0jivzcr8p049dn3mg8yjpn6nwq4sw9iqac8vr63vi54l6m")) |
| 3549 | (modules '((guix build utils))) |
| 3550 | (snippet |
| 3551 | '(begin |
| 3552 | ;; Remove use of __DATE__ and __TIME__ for reproducibility; |
| 3553 | ;; substitute the tarball creation time. |
| 3554 | (substitute* "src/utilities/HYPRE_utilities.h" |
| 3555 | (("Date Compiled: .*$") |
| 3556 | "Date Compiled: Mar 28 2016 20:19:59 +0000\"\n")) |
| 3557 | #t)))) |
| 3558 | (build-system gnu-build-system) |
| 3559 | (outputs '("out" ;6.1 MiB of headers and libraries |
| 3560 | "doc")) ;4.8 MiB of documentation |
| 3561 | (native-inputs |
| 3562 | `(("doc++" ,doc++) |
| 3563 | ("netpbm" ,netpbm) |
| 3564 | ("perl" ,perl) ;needed to run 'ppmquant' during tests |
| 3565 | ("texlive" ,texlive) ;full package required for fonts |
| 3566 | ("ghostscript" ,ghostscript))) |
| 3567 | (inputs |
| 3568 | `(("blas" ,openblas) |
| 3569 | ("lapack" ,lapack))) |
| 3570 | (arguments |
| 3571 | `(#:modules ((srfi srfi-1) |
| 3572 | ,@%gnu-build-system-modules) |
| 3573 | #:configure-flags '("--enable-shared" |
| 3574 | "--disable-fortran" |
| 3575 | "--without-MPI" |
| 3576 | "--with-openmp" |
| 3577 | "--with-fei" |
| 3578 | "--with-lapack" |
| 3579 | "--with-blas") |
| 3580 | #:phases |
| 3581 | (modify-phases %standard-phases |
| 3582 | (add-before 'configure 'chdir-src |
| 3583 | (lambda _ (chdir "src"))) |
| 3584 | (replace 'configure |
| 3585 | (lambda* (#:key build target configure-flags |
| 3586 | #:allow-other-keys #:rest args) |
| 3587 | (let* ((configure (assoc-ref %standard-phases 'configure))) |
| 3588 | (apply configure |
| 3589 | (append args |
| 3590 | (list #:configure-flags |
| 3591 | (cons (string-append |
| 3592 | "--host=" (or target build)) |
| 3593 | configure-flags))))))) |
| 3594 | (add-after 'build 'build-docs |
| 3595 | (lambda _ |
| 3596 | (zero? (system* "make" "-Cdocs" "pdf" "html")))) |
| 3597 | (replace 'check |
| 3598 | (lambda _ |
| 3599 | (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib")) |
| 3600 | (setenv "PATH" (string-append "." ":" (getenv "PATH"))) |
| 3601 | (and (system* "make" "check" "CHECKRUN=") |
| 3602 | (fold (lambda (filename result) |
| 3603 | (and result |
| 3604 | (let ((size (stat:size (stat filename)))) |
| 3605 | (when (not (zero? size)) |
| 3606 | (format #t "~a size ~d; error indication~%" |
| 3607 | filename size)) |
| 3608 | (zero? size)))) |
| 3609 | #t |
| 3610 | (find-files "test" ".*\\.err$"))))) |
| 3611 | (add-after 'install 'install-docs |
| 3612 | (lambda* (#:key outputs #:allow-other-keys) |
| 3613 | ;; Custom install because docs/Makefile doesn't honor ${docdir}. |
| 3614 | (let* ((doc (assoc-ref outputs "doc")) |
| 3615 | (docdir (string-append doc "/share/doc/hypre-" ,version))) |
| 3616 | (with-directory-excursion "docs" |
| 3617 | (for-each (lambda (base) |
| 3618 | (install-file (string-append base ".pdf") docdir) |
| 3619 | (copy-recursively base docdir)) ;html docs |
| 3620 | '("HYPRE_usr_manual" |
| 3621 | "HYPRE_ref_manual"))) |
| 3622 | #t)))))) |
| 3623 | (home-page "http://www.llnl.gov/casc/hypre/") |
| 3624 | (synopsis "Library of solvers and preconditioners for linear equations") |
| 3625 | (description |
| 3626 | "HYPRE is a software library of high performance preconditioners and |
| 3627 | solvers for the solution of large, sparse linear systems of equations. It |
| 3628 | features multigrid solvers for both structured and unstructured grid |
| 3629 | problems.") |
| 3630 | (license license:lgpl2.1))) |
| 3631 | |
| 3632 | (define-public hypre-openmpi |
| 3633 | (package (inherit hypre) |
| 3634 | (name "hypre-openmpi") |
| 3635 | (inputs |
| 3636 | `(("mpi" ,openmpi) |
| 3637 | ,@(package-inputs hypre))) |
| 3638 | (arguments |
| 3639 | (substitute-keyword-arguments (package-arguments hypre) |
| 3640 | ((#:configure-flags flags) |
| 3641 | ``("--with-MPI" |
| 3642 | ,@(delete "--without-MPI" ,flags))) |
| 3643 | ((#:phases phases) |
| 3644 | `(modify-phases ,phases |
| 3645 | (add-before 'check 'set-test-environment |
| 3646 | (lambda _ |
| 3647 | ;; By default, running the test suite would fail because 'ssh' |
| 3648 | ;; could not be found in $PATH. Define this variable to |
| 3649 | ;; placate Open MPI without adding a dependency on OpenSSH (the |
| 3650 | ;; agent isn't used anyway.) |
| 3651 | (setenv "OMPI_MCA_plm_rsh_agent" (which "cat")) |
| 3652 | #t)))))) |
| 3653 | (synopsis "Parallel solvers and preconditioners for linear equations") |
| 3654 | (description |
| 3655 | "HYPRE is a software library of high performance preconditioners and |
| 3656 | solvers for the solution of large, sparse linear systems of equations on |
| 3657 | parallel computers. It features parallel multigrid solvers for both |
| 3658 | structured and unstructured grid problems."))) |
| 3659 | |
| 3660 | (define-public matio |
| 3661 | (package |
| 3662 | (name "matio") |
| 3663 | (version "1.5.6") |
| 3664 | (source |
| 3665 | (origin |
| 3666 | (method url-fetch) |
| 3667 | (uri (string-append "mirror://sourceforge/matio/matio/" version "/" |
| 3668 | "matio-" version ".tar.gz")) |
| 3669 | (sha256 |
| 3670 | (base32 |
| 3671 | "0y2qymgxank8wdiwc68ap8bxdzrhvyw86i29yh3xgn4z1njfd9ir")))) |
| 3672 | (build-system gnu-build-system) |
| 3673 | (inputs |
| 3674 | `(("zlib" ,zlib) |
| 3675 | ("hdf5" ,hdf5))) |
| 3676 | (home-page "http://matio.sourceforge.net/") |
| 3677 | (synopsis "Library for reading and writing MAT files") |
| 3678 | (description "Matio is a library for reading and writing MAT files. It |
| 3679 | supports compressed MAT files, as well as newer (version 7.3) MAT files.") |
| 3680 | (license license:bsd-2))) |
| 3681 | |
| 3682 | (define-public vc |
| 3683 | (package |
| 3684 | (name "vc") |
| 3685 | (version "1.3.3") |
| 3686 | (source |
| 3687 | (origin (method url-fetch) |
| 3688 | (uri (string-append "https://github.com/VcDevel/Vc/releases/" |
| 3689 | "download/" version "/Vc-" version ".tar.gz")) |
| 3690 | (sha256 |
| 3691 | (base32 |
| 3692 | "1zmlpn32jzb38smp3j834llmbix3whsrbw0h397qxysbw792kih8")))) |
| 3693 | (build-system cmake-build-system) |
| 3694 | (arguments |
| 3695 | '(#:configure-flags |
| 3696 | '("-DBUILD_TESTING=ON" |
| 3697 | ;; By default, Vc will optimize for the CPU of the build machine. |
| 3698 | ;; Setting this to "none" makes it create portable binaries. See |
| 3699 | ;; "cmake/OptimizeForArchitecture.cmake". |
| 3700 | "-DTARGET_ARCHITECTURE=none"))) |
| 3701 | (synopsis "SIMD vector classes for C++") |
| 3702 | (description "Vc provides portable, zero-overhead C++ types for explicitly |
| 3703 | data-parallel programming. It is a library designed to ease explicit |
| 3704 | vectorization of C++ code. Its types enable explicitly stating data-parallel |
| 3705 | operations on multiple values. The parallelism is therefore added via the type |
| 3706 | system. Vc has an intuitive API and provides portability between different |
| 3707 | compilers and compiler versions as well as portability between different vector |
| 3708 | instruction sets. Thus, an application written with Vc can be compiled for: |
| 3709 | @enumerate |
| 3710 | @item AVX and AVX2 |
| 3711 | @item SSE2 up to SSE4.2 or SSE4a |
| 3712 | @item Scalar |
| 3713 | @item MIC |
| 3714 | @item NEON (in development) |
| 3715 | @item NVIDIA GPUs / CUDA (in development) |
| 3716 | @end enumerate\n") |
| 3717 | (home-page "https://github.com/VcDevel/Vc") |
| 3718 | ;; "No support_???.cpp file exists for this architecture." |
| 3719 | (supported-systems '("x86_64-linux" "i686-linux")) |
| 3720 | (license license:bsd-3))) |
| 3721 | |
| 3722 | (define-public reducelcs |
| 3723 | ;; This is the last commit which is available upstream, no |
| 3724 | ;; release happened since 2010. |
| 3725 | (let ((commit "474f88deb968061abe8cf11c959e02319b8ae5c0") |
| 3726 | (revision "1")) |
| 3727 | (package |
| 3728 | (name "reducelcs") |
| 3729 | (version (string-append "1.0-" revision "." (string-take commit 7))) |
| 3730 | (source |
| 3731 | (origin |
| 3732 | (method git-fetch) |
| 3733 | (uri (git-reference |
| 3734 | (url "https://github.com/gdv/Reduce-Expand-for-LCS") |
| 3735 | (commit commit))) |
| 3736 | (file-name (string-append name "-" version "-checkout")) |
| 3737 | (sha256 |
| 3738 | (base32 |
| 3739 | "1rllzcfwc042c336mhq262a8ha90x6afq30kvk60r7i4761j4yjm")))) |
| 3740 | (build-system gnu-build-system) |
| 3741 | (inputs |
| 3742 | `(("openlibm" ,openlibm))) |
| 3743 | (arguments |
| 3744 | `(#:tests? #f ; no tests |
| 3745 | #:phases |
| 3746 | (modify-phases %standard-phases |
| 3747 | (delete 'configure) ; No configure script exists. |
| 3748 | (replace 'install ; No install phase exists. |
| 3749 | (lambda* (#:key outputs #:allow-other-keys) |
| 3750 | (let* ((out (assoc-ref outputs "out")) |
| 3751 | (bin (string-append out "/bin"))) |
| 3752 | (install-file "Approximation" bin) |
| 3753 | (install-file "CollectResults" bin) |
| 3754 | (install-file "GenerateInstances" bin) |
| 3755 | #t)))))) |
| 3756 | (synopsis "Approximate Longest Commons Subsequence computation tool") |
| 3757 | (description |
| 3758 | "@code{reduceLCS} is an implementation of the Reduce-Expand |
| 3759 | algorithm for LCS. It is a fast program to compute the approximate |
| 3760 | Longest Commons Subsequence of a set of strings.") |
| 3761 | (home-page "https://github.com/gdv/Reduce-Expand-for-LCS") |
| 3762 | (license license:gpl3+)))) |
| 3763 | |
| 3764 | (define-public jacal |
| 3765 | (package |
| 3766 | (name "jacal") |
| 3767 | (version "1c4") |
| 3768 | (source (origin |
| 3769 | (method url-fetch) |
| 3770 | (uri (string-append |
| 3771 | "http://groups.csail.mit.edu/mac/ftpdir/scm/jacal-" |
| 3772 | version ".zip")) |
| 3773 | (sha256 (base32 |
| 3774 | "055zrn12a1dmy0dqkwrkq3fklbhg3yir6vn0lacp4mvbg8573a3q")) |
| 3775 | (patches (search-patches "jacal-fix-texinfo.patch")))) |
| 3776 | (build-system gnu-build-system) |
| 3777 | (arguments |
| 3778 | `(#:phases |
| 3779 | (modify-phases %standard-phases |
| 3780 | (add-before 'build 'pre-build |
| 3781 | ;; Don't use upstream's script - it really doesn't fit into |
| 3782 | ;; Guix's functional paradigm. |
| 3783 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 3784 | (substitute* "Makefile" |
| 3785 | (("^install: install-script") "install: ")))) |
| 3786 | (add-after 'install 'post-install |
| 3787 | ;; Instead, we provide our own simplified script. |
| 3788 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 3789 | (let ((wrapper (string-append (assoc-ref outputs "out") |
| 3790 | "/bin/jacal"))) |
| 3791 | (format (open wrapper (logior O_WRONLY O_CREAT)) |
| 3792 | (string-append "#!~a\nexec ~a/bin/scm -ip1 " |
| 3793 | "-e '(slib:load \"~a/lib/jacal/math\") " |
| 3794 | "(math)' \"$@\"\n") |
| 3795 | (which "bash") |
| 3796 | (assoc-ref inputs "scm") |
| 3797 | (assoc-ref outputs "out")) |
| 3798 | (chmod wrapper #o555)))) |
| 3799 | (replace 'configure |
| 3800 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 3801 | (zero? (system* "./configure" |
| 3802 | (string-append "--prefix=" |
| 3803 | (assoc-ref outputs "out"))))))))) |
| 3804 | (inputs `(("scm" ,scm))) |
| 3805 | (native-inputs `(("unzip" ,unzip) |
| 3806 | ("texinfo" ,texinfo))) |
| 3807 | (synopsis "Symbolic mathematics system") |
| 3808 | (description "GNU JACAL is an interactive symbolic mathematics program based on |
| 3809 | Scheme. It manipulate and simplify a range of mathematical expressions such |
| 3810 | as equations, scalars, vectors, and matrices.") |
| 3811 | (home-page "https://www.gnu.org/software/jacal/") |
| 3812 | (license license:gpl3+))) |
| 3813 | |
| 3814 | (define-public z3 |
| 3815 | (package |
| 3816 | (name "z3") |
| 3817 | (version "4.5.0") |
| 3818 | (source (origin |
| 3819 | (method url-fetch) |
| 3820 | (uri (string-append |
| 3821 | "https://github.com/Z3Prover/z3/archive/z3-" |
| 3822 | version ".tar.gz")) |
| 3823 | (sha256 |
| 3824 | (base32 |
| 3825 | "032a5lvji2liwmc25jv52bdrhimqflvqbpg77ccaq1jykhiivbmf")))) |
| 3826 | (build-system cmake-build-system) |
| 3827 | (arguments |
| 3828 | `(#:configure-flags |
| 3829 | (list "-DBUILD_PYTHON_BINDINGS=true" |
| 3830 | "-DINSTALL_PYTHON_BINDINGS=true" |
| 3831 | (string-append "-DCMAKE_INSTALL_PYTHON_PKG_DIR=" |
| 3832 | %output |
| 3833 | "/lib/python2.7/site-packages")) |
| 3834 | #:phases |
| 3835 | (modify-phases %standard-phases |
| 3836 | (add-before 'configure 'bootstrap |
| 3837 | (lambda _ |
| 3838 | (zero? |
| 3839 | (system* "python" "contrib/cmake/bootstrap.py" "create")))) |
| 3840 | (add-before 'check 'make-test-z3 |
| 3841 | (lambda _ |
| 3842 | ;; Build the test suite executable. |
| 3843 | (zero? (system* "make" "test-z3" "-j" |
| 3844 | (number->string (parallel-job-count)))))) |
| 3845 | (replace 'check |
| 3846 | (lambda _ |
| 3847 | ;; Run all the tests that don't require arguments. |
| 3848 | (zero? (system* "./test-z3" "/a"))))))) |
| 3849 | (native-inputs |
| 3850 | `(("python" ,python-2))) |
| 3851 | (synopsis "Theorem prover") |
| 3852 | (description "Z3 is a theorem prover and @dfn{satisfiability modulo |
| 3853 | theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.") |
| 3854 | (home-page "https://github.com/Z3Prover/z3") |
| 3855 | (license license:expat))) |
| 3856 | |
| 3857 | (define-public cubicle |
| 3858 | (package |
| 3859 | (name "cubicle") |
| 3860 | (version "1.1.1") |
| 3861 | (source (origin |
| 3862 | (method url-fetch) |
| 3863 | (uri (string-append "http://cubicle.lri.fr/cubicle-" |
| 3864 | version ".tar.gz")) |
| 3865 | (sha256 |
| 3866 | (base32 |
| 3867 | "1sny9c4fm14k014pk62ibpwbrjjirkx8xmhs9jg7q1hk7y7x3q2h")))) |
| 3868 | (build-system gnu-build-system) |
| 3869 | (native-inputs |
| 3870 | `(("ocaml" ,ocaml) |
| 3871 | ("which" ,(@@ (gnu packages base) which)))) |
| 3872 | (propagated-inputs |
| 3873 | `(("z3" ,z3))) |
| 3874 | (arguments |
| 3875 | `(#:configure-flags (list "--with-z3") |
| 3876 | #:tests? #f |
| 3877 | #:phases |
| 3878 | (modify-phases %standard-phases |
| 3879 | (add-before 'configure 'configure-for-release |
| 3880 | (lambda _ |
| 3881 | (substitute* "Makefile.in" |
| 3882 | (("SVNREV=") "#SVNREV=")))) |
| 3883 | (add-before 'configure 'fix-/bin/sh |
| 3884 | (lambda _ |
| 3885 | (substitute* "configure" |
| 3886 | (("/bin/sh") (which "sh"))))) |
| 3887 | (add-before 'configure 'fix-smt-z3wrapper.ml |
| 3888 | (lambda _ |
| 3889 | (substitute* "Makefile.in" |
| 3890 | (("\\\\n") ""))))))) |
| 3891 | (home-page "http://cubicle.lri.fr/") |
| 3892 | (synopsis "Model checker for array-based systems") |
| 3893 | (description "Cubicle is a model checker for verifying safety properties |
| 3894 | of array-based systems. This is a syntactically restricted class of |
| 3895 | parametrized transition systems with states represented as arrays indexed by |
| 3896 | an arbitrary number of processes. Cache coherence protocols and mutual |
| 3897 | exclusion algorithms are typical examples of such systems.") |
| 3898 | (license license:asl2.0))) |
| 3899 | |
| 3900 | (define-public elemental |
| 3901 | (package |
| 3902 | (name "elemental") |
| 3903 | (version "0.87.7") |
| 3904 | (source (origin |
| 3905 | (method url-fetch) |
| 3906 | (uri (string-append "https://github.com/elemental/Elemental/" |
| 3907 | "archive/v" version ".tar.gz")) |
| 3908 | (file-name (string-append name "-" version ".tar.gz")) |
| 3909 | (sha256 |
| 3910 | (base32 |
| 3911 | "1nfp82w22pi8x8fg9sc37z8kf84dqi1dhxp8bbk7571y4aygvv3v")))) |
| 3912 | (build-system cmake-build-system) |
| 3913 | (home-page "http://libelemental.org") |
| 3914 | (native-inputs |
| 3915 | `(("gfortran" ,gfortran))) |
| 3916 | (inputs |
| 3917 | `(("blas" ,openblas) |
| 3918 | ("gfortran:lib" ,gfortran "lib") |
| 3919 | ("gmp" ,gmp) |
| 3920 | ("lapack" ,lapack) |
| 3921 | ("metis" ,metis) |
| 3922 | ("mpc" ,mpc) |
| 3923 | ("mpfr" ,mpfr) |
| 3924 | ("mpi" ,openmpi) |
| 3925 | ("qd" ,qd))) |
| 3926 | (arguments |
| 3927 | `(#:build-type "Release" ;default RelWithDebInfo not supported |
| 3928 | #:configure-flags `("-DEL_DISABLE_PARMETIS:BOOL=YES" |
| 3929 | "-DEL_AVOID_COMPLEX_MPI:BOOL=NO" |
| 3930 | "-DEL_CACHE_WARNINGS:BOOL=YES" |
| 3931 | "-DEL_TESTS:BOOL=YES" |
| 3932 | "-DCMAKE_INSTALL_LIBDIR=lib" |
| 3933 | "-DGFORTRAN_LIB=gfortran") |
| 3934 | #:phases (modify-phases %standard-phases |
| 3935 | (add-before 'check 'setup-tests |
| 3936 | (lambda _ |
| 3937 | ;; Parallelism is done at the MPI layer. |
| 3938 | (setenv "OMP_NUM_THREADS" "1") |
| 3939 | #t)) |
| 3940 | (add-after 'install 'remove-tests |
| 3941 | (lambda* (#:key outputs #:allow-other-keys) |
| 3942 | ;; Tests are installed, with no easy configuration |
| 3943 | ;; switch to prevent this, so delete them. |
| 3944 | (delete-file-recursively |
| 3945 | (string-append (assoc-ref outputs "out") "/bin")) |
| 3946 | #t))))) |
| 3947 | (synopsis "Dense and sparse-direct linear algebra and optimization") |
| 3948 | (description "Elemental is a modern C++ library for distributed-memory |
| 3949 | dense and sparse-direct linear algebra, conic optimization, and lattice |
| 3950 | reduction.") |
| 3951 | (license license:bsd-2))) |
| 3952 | |
| 3953 | (define-public mcrl2 |
| 3954 | (package |
| 3955 | (name "mcrl2") |
| 3956 | (version "201707.1.15162") |
| 3957 | (source (origin |
| 3958 | (method url-fetch) |
| 3959 | (uri (string-append "http://www.mcrl2.org/download/devel/mcrl2-" |
| 3960 | version |
| 3961 | ".tar.gz")) |
| 3962 | (sha256 |
| 3963 | (base32 |
| 3964 | "1ziww2fchsklm25hl9p2mngssxfh9w07nc114cncqaxfibqp2p8f")))) |
| 3965 | (native-inputs |
| 3966 | `(("subversion" ,subversion))) |
| 3967 | (inputs |
| 3968 | `(("boost" ,boost) |
| 3969 | ("glu" ,glu) |
| 3970 | ("mesa" ,mesa) |
| 3971 | ("qt" ,qt))) |
| 3972 | (build-system cmake-build-system) |
| 3973 | (synopsis "Toolset for the mCRL2 formal specification language") |
| 3974 | (description |
| 3975 | "@dfn{mCRL2} (micro Common Representation Language 2) is a formal |
| 3976 | specification language for describing concurrent discrete event systems. Its |
| 3977 | toolset supports analysis and automatic verification, linearisation, simulation, |
| 3978 | state-space exploration and generation, and tools to optimise and analyse |
| 3979 | specifications. Also, state spaces can be manipulated, visualised and |
| 3980 | analysed.") |
| 3981 | (home-page "http://mcrl2.org") |
| 3982 | (license license:boost1.0))) |
| 3983 | |
| 3984 | (define-public r-subplex |
| 3985 | (package |
| 3986 | (name "r-subplex") |
| 3987 | (version "1.5-4") |
| 3988 | (source |
| 3989 | (origin |
| 3990 | (method url-fetch) |
| 3991 | (uri (cran-uri "subplex" version)) |
| 3992 | (sha256 |
| 3993 | (base32 |
| 3994 | "10cbgbx1bgsax5z7gz6716g360xpq4mvq19cf4qqrxv02mmwz57z")))) |
| 3995 | (build-system r-build-system) |
| 3996 | (native-inputs |
| 3997 | `(("gfortran" ,gfortran))) |
| 3998 | (home-page "https://cran.r-project.org/web/packages/subplex") |
| 3999 | (synopsis "Unconstrained optimization using the subplex algorithm") |
| 4000 | (description "This package implements the Subplex optimization algorithm. |
| 4001 | It solves unconstrained optimization problems using a simplex method on |
| 4002 | subspaces. The method is well suited for optimizing objective functions that |
| 4003 | are noisy or are discontinuous at the solution.") |
| 4004 | (license license:gpl3+))) |
| 4005 | |
| 4006 | (define-public r-desolve |
| 4007 | (package |
| 4008 | (name "r-desolve") |
| 4009 | (version "1.21") |
| 4010 | (source |
| 4011 | (origin |
| 4012 | (method url-fetch) |
| 4013 | (uri (cran-uri "deSolve" version)) |
| 4014 | (sha256 |
| 4015 | (base32 |
| 4016 | "0qqc4mknw1jblzcmph1dg3k1p6w42yal0k1xjh8pqk7yb3a75hs5")))) |
| 4017 | (properties `((upstream-name . "deSolve"))) |
| 4018 | (build-system r-build-system) |
| 4019 | (native-inputs |
| 4020 | `(("gfortran" ,gfortran))) |
| 4021 | (home-page "https://desolve.r-forge.r-project.org/") |
| 4022 | (synopsis "Solvers for initial value problems of differential equations") |
| 4023 | (description "This package provides functions that solve initial |
| 4024 | value problems of a system of first-order ordinary differential equations (ODE), |
| 4025 | of partial differential equations (PDE), of differential algebraic equations |
| 4026 | (DAE), and of delay differential equations. The functions provide an interface |
| 4027 | to the FORTRAN functions lsoda, lsodar, lsode, lsodes of the ODEPACK collection, |
| 4028 | to the FORTRAN functions dvode and daspk and a C-implementation of solvers of |
| 4029 | the Runge-Kutta family with fixed or variable time steps. The package contains |
| 4030 | routines designed for solving ODEs resulting from 1-D, 2-D and 3-D partial |
| 4031 | differential equations (PDE) that have been converted to ODEs by numerical |
| 4032 | differencing.") |
| 4033 | (license license:gpl2+))) |
| 4034 | |
| 4035 | (define-public tcalc |
| 4036 | (package |
| 4037 | (name "tcalc") |
| 4038 | (version "2.0") |
| 4039 | (source |
| 4040 | (origin |
| 4041 | (method url-fetch) |
| 4042 | (uri (string-append "https://sites.google.com/site/mohammedisam2000/tcalc/tcalc-" |
| 4043 | version ".tar.gz")) |
| 4044 | (sha256 |
| 4045 | (base32 |
| 4046 | "0jq806m4dqfia85nppfm75mml9w57g0cgv4cdw9bp3zymda83s0m")))) |
| 4047 | (build-system gnu-build-system) |
| 4048 | (synopsis "The terminal calculator") |
| 4049 | (description |
| 4050 | "The terminal calculator is a small program to help users of the GNU/Linux |
| 4051 | terminal do calculations simply and quickly. The formula to be calculated can |
| 4052 | be fed to @command{tcalc} through the command line.") |
| 4053 | (home-page "https://sites.google.com/site/mohammedisam2000/tcalc") |
| 4054 | (license license:gpl3+))) |