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