| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2023, 2024, 2025 Andreas Enge <[email protected]> |
| 3 | ;;; Copyright © 2013 Nikita Karetnikov <[email protected]> |
| 4 | ;;; Copyright © 2014, 2016, 2017 John Darrington <[email protected]> |
| 5 | ;;; Copyright © 2014-2022 Eric Bavier <[email protected]> |
| 6 | ;;; Copyright © 2014 Federico Beffa <[email protected]> |
| 7 | ;;; Copyright © 2014 Mathieu Lirzin <[email protected]> |
| 8 | ;;; Copyright © 2015–2025 Ricardo Wurmus <[email protected]> |
| 9 | ;;; Copyright © 2015 Sou Bunnbu <[email protected]> |
| 10 | ;;; Copyright © 2015, 2018 Mark H Weaver <[email protected]> |
| 11 | ;;; Copyright © 2015-2024 Efraim Flashner <[email protected]> |
| 12 | ;;; Copyright © 2015 Fabian Harfert <[email protected]> |
| 13 | ;;; Copyright © 2016 Roel Janssen <[email protected]> |
| 14 | ;;; Copyright © 2016, 2018, 2020, 2021 Kei Kebreau <[email protected]> |
| 15 | ;;; Copyright © 2016-2026 Ludovic Courtès <[email protected]> |
| 16 | ;;; Copyright © 2016 Leo Famulari <[email protected]> |
| 17 | ;;; Copyright © 2016, 2017 Thomas Danckaert <[email protected]> |
| 18 | ;;; Copyright © 2017, 2018, 2019, 2020, 2021 Paul Garlick <[email protected]> |
| 19 | ;;; Copyright © 2017 Nikita <[email protected]> |
| 20 | ;;; Copyright © 2017 Ben Woodcroft <[email protected]> |
| 21 | ;;; Copyright © 2017 Theodoros Foradis <[email protected]> |
| 22 | ;;; Copyright © 2017, 2019, 2022 Arun Isaac <[email protected]> |
| 23 | ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <[email protected]> |
| 24 | ;;; Copyright © 2017 Dave Love <me@[email protected]> |
| 25 | ;;; Copyright © 2018-2022, 2024-2026 Janneke Nieuwenhuizen <[email protected]> |
| 26 | ;;; Copyright © 2018 Joshua Sierles, Nextjournal <[email protected]> |
| 27 | ;;; Copyright © 2018 Nadya Voronova <[email protected]> |
| 28 | ;;; Copyright © 2018 Adam Massmann <[email protected]> |
| 29 | ;;; Copyright © 2018, 2020-2022 Marius Bakke <[email protected]> |
| 30 | ;;; Copyright © 2018 Eric Brown <[email protected]> |
| 31 | ;;; Copyright © 2018, 2021, 2024 Julien Lepiller <[email protected]> |
| 32 | ;;; Copyright © 2018 Amin Bandali <[email protected]> |
| 33 | ;;; Copyright © 2019, 2021-2026 Nicolas Goaziou <[email protected]> |
| 34 | ;;; Copyright © 2019 Steve Sprang <[email protected]> |
| 35 | ;;; Copyright © 2019 Robert Smith <[email protected]> |
| 36 | ;;; Copyright © 2020 Jakub Kądziołka <[email protected]> |
| 37 | ;;; Copyright © 2020–2023 Felix Gruber <[email protected]> |
| 38 | ;;; Copyright © 2020 R Veera Kumar <[email protected]> |
| 39 | ;;; Copyright © 2020 Vincent Legoll <[email protected]> |
| 40 | ;;; Copyright © 2020 Nicolò Balzarotti <[email protected]> |
| 41 | ;;; Copyright © 2020 B. Wilson <[email protected]> |
| 42 | ;;; Copyright © 2020, 2021, 2025 Vinicius Monego <[email protected]> |
| 43 | ;;; Copyright © 2020 Simon Tournier <[email protected]> |
| 44 | ;;; Copyright © 2020 Martin Becze <[email protected]> |
| 45 | ;;; Copyright © 2021 Gerd Heber <[email protected]> |
| 46 | ;;; Copyright © 2021 Franck Pérignon <[email protected]> |
| 47 | ;;; Copyright © 2021 Philip McGrath <[email protected]> |
| 48 | ;;; Copyright © 2021, 2022 Paul A. Patience <[email protected]> |
| 49 | ;;; Copyright © 2021 Ivan Gankevich <[email protected]> |
| 50 | ;;; Copyright © 2021 Jean-Baptiste Volatier <[email protected]> |
| 51 | ;;; Copyright © 2021, 2023, 2024 Guillaume Le Vaillant <[email protected]> |
| 52 | ;;; Copyright © 2021 Pierre-Antoine Bouttier <[email protected]> |
| 53 | ;;; Copyright © 2022 Zhu Zihao <[email protected]> |
| 54 | ;;; Copyright © 2022-2025 Sharlatan Hellseher <[email protected]> |
| 55 | ;;; Copyright © 2022 Philip McGrath <[email protected]> |
| 56 | ;;; Copyright © 2022 Marek Felšöci <[email protected]> |
| 57 | ;;; Copyright © 2022 vicvbcun <[email protected]> |
| 58 | ;;; Copyright © 2022, 2023 Liliana Marie Prikler <[email protected]> |
| 59 | ;;; Copyright © 2022 Maximilian Heisinger <[email protected]> |
| 60 | ;;; Copyright © 2022 Akira Kyle <[email protected]> |
| 61 | ;;; Copyright © 2022, 2023 Nicolas Graves <[email protected]> |
| 62 | ;;; Copyright © 2022 Roman Scherer <[email protected]> |
| 63 | ;;; Copyright © 2023 Jake Leporte <[email protected]> |
| 64 | ;;; Copyright © 2023, 2025 Camilo Q.S. (Distopico) <[email protected]> |
| 65 | ;;; Copyright © 2023, 2025 David Elsing <[email protected]> |
| 66 | ;;; Copyright © 2024 Herman Rimm <[email protected]> |
| 67 | ;;; Copyright © 2024 Foundation Devices, Inc. <[email protected]> |
| 68 | ;;; Copyright © 2024, 2025 Artyom V. Poptsov <[email protected]> |
| 69 | ;;; Copyright © 2024 Zheng Junjie <[email protected]> |
| 70 | ;;; Copyright © 2025 Luca Cirrottola <[email protected]> |
| 71 | ;;; Copyright © 2025 Maxim Cournoyer <[email protected]> |
| 72 | ;;; Copyright © 2025 Sören Tempel <[email protected]> |
| 73 | ;;; Copyright © 2025 nomike Postmann <[email protected]> |
| 74 | ;;; Copyright © 2025 Reza Housseini <[email protected]> |
| 75 | ;;; Copyright © 2026 Cayetano Santos <[email protected]> |
| 76 | ;;; Copyright © 2026 Peter Polidoro <[email protected]> |
| 77 | ;;; Copyright © 2026 Luca Alloatti <[email protected]> |
| 78 | ;;; Copyright © 2026 Akiyoshi Suda <[email protected]> |
| 79 | ;;; Copyright © 2026 Orahcio Felício de Sousa <[email protected]> |
| 80 | ;;; |
| 81 | ;;; This file is part of GNU Guix. |
| 82 | ;;; |
| 83 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 84 | ;;; under the terms of the GNU General Public License as published by |
| 85 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 86 | ;;; your option) any later version. |
| 87 | ;;; |
| 88 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 89 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 90 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 91 | ;;; GNU General Public License for more details. |
| 92 | ;;; |
| 93 | ;;; You should have received a copy of the GNU General Public License |
| 94 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 95 | |
| 96 | (define-module (gnu packages maths) |
| 97 | #:use-module (ice-9 regex) |
| 98 | #:use-module (ice-9 match) |
| 99 | #:use-module (gnu packages) |
| 100 | #:use-module ((guix licenses) #:prefix license:) |
| 101 | #:use-module (guix packages) |
| 102 | #:use-module (guix download) |
| 103 | #:use-module (guix git-download) |
| 104 | #:use-module (guix gexp) |
| 105 | #:use-module (guix utils) |
| 106 | #:use-module ((guix build utils) #:select (alist-replace)) |
| 107 | #:use-module (guix build-system ant) |
| 108 | #:use-module (guix build-system cmake) |
| 109 | #:use-module (guix build-system copy) |
| 110 | #:use-module (guix build-system dune) |
| 111 | #:use-module (guix build-system glib-or-gtk) |
| 112 | #:use-module (guix build-system go) |
| 113 | #:use-module (guix build-system gnu) |
| 114 | #:use-module (guix build-system meson) |
| 115 | #:use-module (guix build-system ocaml) |
| 116 | #:use-module (guix build-system perl) |
| 117 | #:use-module (guix build-system pyproject) |
| 118 | #:use-module (guix build-system qt) |
| 119 | #:use-module (guix build-system ruby) |
| 120 | #:use-module (gnu packages algebra) |
| 121 | #:use-module (gnu packages astronomy) |
| 122 | #:use-module (gnu packages audio) |
| 123 | #:use-module (gnu packages autotools) |
| 124 | #:use-module (gnu packages backup) |
| 125 | #:use-module (gnu packages base) |
| 126 | #:use-module (gnu packages bash) |
| 127 | #:use-module (gnu packages benchmark) |
| 128 | #:use-module (gnu packages bison) |
| 129 | #:use-module (gnu packages boost) |
| 130 | #:use-module (gnu packages build-tools) |
| 131 | #:use-module (gnu packages calendar) |
| 132 | #:use-module (gnu packages check) |
| 133 | #:use-module (gnu packages cmake) |
| 134 | #:use-module (gnu packages compression) |
| 135 | #:use-module (gnu packages coq) |
| 136 | #:use-module (gnu packages curl) |
| 137 | #:use-module (gnu packages cyrus-sasl) |
| 138 | #:use-module (gnu packages cpp) |
| 139 | #:use-module (gnu packages datamash) |
| 140 | #:use-module (gnu packages dbm) |
| 141 | #:use-module (gnu packages documentation) |
| 142 | #:use-module (gnu packages django) |
| 143 | #:use-module (gnu packages elf) |
| 144 | #:use-module (gnu packages emacs) |
| 145 | #:use-module (gnu packages file) |
| 146 | #:use-module (gnu packages compiler-tools) |
| 147 | #:use-module (gnu packages fltk) |
| 148 | #:use-module (gnu packages fontutils) |
| 149 | #:use-module (gnu packages freedesktop) |
| 150 | #:use-module (gnu packages gettext) |
| 151 | #:use-module (gnu packages gcc) |
| 152 | #:use-module (gnu packages gd) |
| 153 | #:use-module (gnu packages geo) |
| 154 | #:use-module (gnu packages ghostscript) |
| 155 | #:use-module (gnu packages glib) |
| 156 | #:use-module (gnu packages gperf) |
| 157 | #:use-module (gnu packages graphviz) |
| 158 | #:use-module (gnu packages groff) |
| 159 | #:use-module (gnu packages gtk) |
| 160 | #:use-module (gnu packages icu4c) |
| 161 | #:use-module (gnu packages image) |
| 162 | #:use-module (gnu packages image-processing) |
| 163 | #:use-module (gnu packages java) |
| 164 | #:use-module (gnu packages less) |
| 165 | #:use-module (gnu packages libedit) |
| 166 | #:use-module (gnu packages lisp) |
| 167 | #:use-module (gnu packages linux) |
| 168 | #:use-module (gnu packages llvm) |
| 169 | #:use-module (gnu packages logging) |
| 170 | #:use-module (gnu packages lua) |
| 171 | #:use-module (gnu packages gnome) |
| 172 | #:use-module (gnu packages guile) |
| 173 | #:use-module (gnu packages xorg) |
| 174 | #:use-module (gnu packages gl) |
| 175 | #:use-module (gnu packages imagemagick) |
| 176 | #:use-module (gnu packages m4) |
| 177 | #:use-module (gnu packages man) |
| 178 | #:use-module (gnu packages mpi) |
| 179 | #:use-module (gnu packages multiprecision) |
| 180 | #:use-module (gnu packages ncurses) |
| 181 | #:use-module (gnu packages netpbm) |
| 182 | #:use-module (gnu packages ocaml) |
| 183 | #:use-module (gnu packages onc-rpc) |
| 184 | #:use-module (gnu packages oneapi) |
| 185 | #:use-module (gnu packages opencl) |
| 186 | #:use-module (gnu packages parallel) |
| 187 | #:use-module (gnu packages pcre) |
| 188 | #:use-module (gnu packages popt) |
| 189 | #:use-module (gnu packages perl) |
| 190 | #:use-module (gnu packages prolog) |
| 191 | #:use-module (gnu packages pkg-config) |
| 192 | #:use-module (gnu packages protobuf) |
| 193 | #:use-module (gnu packages pulseaudio) |
| 194 | #:use-module (gnu packages python) |
| 195 | #:use-module (gnu packages python-build) |
| 196 | #:use-module (gnu packages python-science) |
| 197 | #:use-module (gnu packages python-web) |
| 198 | #:use-module (gnu packages python-xyz) |
| 199 | #:use-module (gnu packages qt) |
| 200 | #:use-module (gnu packages regex) |
| 201 | #:use-module (gnu packages readline) |
| 202 | #:use-module (gnu packages ruby-check) |
| 203 | #:use-module (gnu packages ruby-xyz) |
| 204 | #:use-module (gnu packages tbb) |
| 205 | #:use-module (gnu packages scheme) |
| 206 | #:use-module (gnu packages serialization) |
| 207 | #:use-module (gnu packages shells) |
| 208 | #:use-module (gnu packages simulation) |
| 209 | #:use-module (gnu packages sphinx) |
| 210 | #:use-module (gnu packages sqlite) |
| 211 | #:use-module (gnu packages swig) |
| 212 | #:use-module (gnu packages tcl) |
| 213 | #:use-module (gnu packages texinfo) |
| 214 | #:use-module (gnu packages tex) |
| 215 | #:use-module (gnu packages time) |
| 216 | #:use-module (gnu packages tls) |
| 217 | #:use-module (gnu packages version-control) |
| 218 | #:use-module (gnu packages web) |
| 219 | #:use-module (gnu packages wxwidgets) |
| 220 | #:use-module (gnu packages xdisorg) |
| 221 | #:use-module (gnu packages xml) |
| 222 | #:use-module ((srfi srfi-1) #:hide (zip)) |
| 223 | #:use-module (srfi srfi-26)) |
| 224 | |
| 225 | (define-public aris |
| 226 | (package |
| 227 | (name "aris") |
| 228 | (version "2.2") |
| 229 | (source (origin |
| 230 | (method url-fetch) |
| 231 | (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz")) |
| 232 | (sha256 (base32 |
| 233 | "1q1887ryqdr9sn0522hc7p16kqwlxxyz5dkmma8ar2nxplhgll7q")))) |
| 234 | (build-system gnu-build-system) |
| 235 | (inputs (list gtk+ libxml2)) |
| 236 | (native-inputs (list pkg-config)) |
| 237 | (arguments |
| 238 | `(#:configure-flags '("CFLAGS=-O2 -g -fcommon"))) |
| 239 | (synopsis "Natural deduction first-order logic interface") |
| 240 | (description "Aris is a program for performing logical proofs. It supports |
| 241 | propositional and predicate logic, as well as Boolean algebra and |
| 242 | arithmetical logic. In addition to its predefined inference and equivalence |
| 243 | rules, Aris also supports references to older proofs. Its use of standard |
| 244 | logical symbols and its natural deduction interface make it easy to use for |
| 245 | beginners.") |
| 246 | (license license:gpl3+) |
| 247 | (home-page "https://www.gnu.org/software/aris/"))) |
| 248 | |
| 249 | (define-public bitwise |
| 250 | (package |
| 251 | (name "bitwise") |
| 252 | (version "0.50") |
| 253 | (source (origin |
| 254 | (method url-fetch) |
| 255 | (uri (string-append "https://github.com/mellowcandle/bitwise" |
| 256 | "/releases/download/v" version |
| 257 | "/bitwise-v" version ".tar.gz")) |
| 258 | (sha256 |
| 259 | (base32 "0zp9rb0qv1m9hk593sc08jajkxd80h075s0m0dhf07gkbgx72ql0")))) |
| 260 | (build-system gnu-build-system) |
| 261 | (inputs |
| 262 | (list ncurses readline)) |
| 263 | (native-inputs |
| 264 | (list cunit pkg-config)) |
| 265 | (synopsis "Terminal based bit manipulator in ncurses") |
| 266 | (description "Bitwise is a multi base interactive calculator supporting |
| 267 | dynamic base conversion and bit manipulation. It's a handy tool for low level |
| 268 | hackers, kernel developers and device drivers developers. |
| 269 | |
| 270 | Some of the features include: |
| 271 | @itemize |
| 272 | @item Interactive ncurses interface. |
| 273 | @item Command line calculator supporting all bitwise operations. |
| 274 | @item Individual bit manipulator. |
| 275 | @item Bitwise operations such as NOT, OR, AND, XOR, and shifts. |
| 276 | @end itemize") |
| 277 | (license license:gpl3+) |
| 278 | (home-page "https://github.com/mellowcandle/bitwise/"))) |
| 279 | |
| 280 | (define-public c-graph |
| 281 | (package |
| 282 | (name "c-graph") |
| 283 | (version "2.0.1") |
| 284 | (source (origin |
| 285 | (method url-fetch) |
| 286 | (uri (string-append "mirror://gnu/c-graph/c-graph-" version |
| 287 | ".tar.gz")) |
| 288 | (sha256 (base32 |
| 289 | "092412jzxy6wdvpk96pfj499hpmaww8xllavbvlqspfpr7ips9id")))) |
| 290 | (build-system gnu-build-system) |
| 291 | (inputs |
| 292 | (list gfortran)) |
| 293 | (synopsis "Visualizing and demonstrating convolution") |
| 294 | (description |
| 295 | "GNU C-Graph is a tool for demonstrating the theory of convolution. |
| 296 | Thus, it can serve as an excellent aid to students of signal and systems |
| 297 | theory in visualizing the convolution process. Rather than forcing the |
| 298 | student to write code, the program offers an intuitive interface with |
| 299 | interactive dialogs to guide them.") |
| 300 | (license license:gpl3+) |
| 301 | (home-page "https://www.gnu.org/software/c-graph/"))) |
| 302 | |
| 303 | (define-public calc |
| 304 | (package |
| 305 | (name "calc") |
| 306 | (version "2.16.1.2") |
| 307 | (source |
| 308 | (origin |
| 309 | (method git-fetch) |
| 310 | (uri (git-reference |
| 311 | (url "https://github.com/lcn2/calc") |
| 312 | (commit (string-append "v" version)))) |
| 313 | (file-name (git-file-name name version)) |
| 314 | (sha256 |
| 315 | (base32 "18vb5gi9mf4c8vmhvimxqdzja8b56glyk23bpb2igwm903x3ciav")))) |
| 316 | (build-system gnu-build-system) |
| 317 | (inputs (list readline)) |
| 318 | (native-inputs (list man-db util-linux)) ;for col |
| 319 | (arguments |
| 320 | (list |
| 321 | #:phases |
| 322 | #~(modify-phases %standard-phases |
| 323 | (delete 'configure) |
| 324 | (add-before 'build 'patch-makefile |
| 325 | (lambda _ |
| 326 | (substitute* "Makefile.config" |
| 327 | (("^PREFIX= /usr/local") |
| 328 | (string-append "PREFIX=" |
| 329 | #$output)) |
| 330 | (("=\\s?/usr") |
| 331 | "= ${PREFIX}")) |
| 332 | (substitute* "Makefile.target" |
| 333 | (("LIBCALC_SHLIB=") |
| 334 | "LIBCALC_SHLIB= -Wl,-rpath='$$ORIGIN'") |
| 335 | (("LIBCUSTCALC_SHLIB=") |
| 336 | "LIBCUSTCALC_SHLIB= -Wl,-rpath='$$ORIGIN'"))))))) |
| 337 | (synopsis "Arbitrary precision console calculator") |
| 338 | (description |
| 339 | "Calc is an arbitrary precision arithmetic system that uses a C-like |
| 340 | language. It can be used as a calculator, an algorithm prototyper and as |
| 341 | a mathematical research tool, and it comes with built in mathematical and |
| 342 | programmatic functions.") |
| 343 | (home-page "http://www.isthe.com/chongo/tech/comp/calc/") |
| 344 | (license license:lgpl2.1))) |
| 345 | |
| 346 | (define-public chuffed |
| 347 | (package |
| 348 | (name "chuffed") |
| 349 | (version "0.13.2") |
| 350 | (source |
| 351 | (origin |
| 352 | (method git-fetch) |
| 353 | (uri (git-reference |
| 354 | (url "https://github.com/chuffed/chuffed") |
| 355 | (commit version))) |
| 356 | (file-name (git-file-name name version)) |
| 357 | (sha256 |
| 358 | (base32 "164brmwn71p9gb2441kh7b1gzmy2sg7bjv5z00wjs9nw41qc908g")))) |
| 359 | (build-system cmake-build-system) |
| 360 | (arguments |
| 361 | (list #:tests? #f ;no 'test' target |
| 362 | #:phases |
| 363 | #~(modify-phases %standard-phases |
| 364 | (add-before 'build 'patch-msc |
| 365 | (lambda* (#:key outputs #:allow-other-keys) |
| 366 | (let ((out (assoc-ref outputs "out"))) |
| 367 | (substitute* "chuffed.msc" |
| 368 | (("\\.\\./../..") out) |
| 369 | (("\\.\\.") |
| 370 | (string-append out "/share/minizinc"))))))))) |
| 371 | (synopsis "Lazy clause generation solver") |
| 372 | (description |
| 373 | "Chuffed is a state of the art lazy clause solver designed from the |
| 374 | ground up with lazy clause generation in mind. Lazy clause generation |
| 375 | is a hybrid approach to constraint solving that combines features of |
| 376 | finite domain propagation and Boolean satisfiability.") |
| 377 | (home-page "https://github.com/chuffed/chuffed") |
| 378 | (license license:expat))) |
| 379 | |
| 380 | (define-public clblast |
| 381 | (package |
| 382 | (name "clblast") |
| 383 | (version "1.6.3") |
| 384 | (source |
| 385 | (origin |
| 386 | (method git-fetch) |
| 387 | (uri (git-reference |
| 388 | (url "https://github.com/CNugteren/CLBlast") |
| 389 | (commit version))) |
| 390 | (file-name (git-file-name name version)) |
| 391 | (sha256 |
| 392 | (base32 "1zp8rfkscnh4l9x71kp39hsg5zxfhkkf88886mv40hw0a1hafdvz")))) |
| 393 | (build-system cmake-build-system) |
| 394 | (arguments (list #:tests? #f)) ;no device available during tests |
| 395 | (inputs |
| 396 | (list opencl-icd-loader opencl-headers)) |
| 397 | (native-inputs |
| 398 | (list python-minimal-wrapper)) |
| 399 | (home-page "https://cnugteren.github.io/clblast/") |
| 400 | (synopsis "Tunable OpenCL BLAS library") |
| 401 | (description |
| 402 | "CLBlast is a lightweight, performant and tunable OpenCL BLAS library |
| 403 | written in C++11. It is designed to leverage the full performance potential |
| 404 | of a wide variety of OpenCL devices from different vendors, including desktop |
| 405 | and laptop GPUs, embedded GPUs, and other accelerators. CLBlast implements |
| 406 | BLAS routines: basic linear algebra subprograms operating on vectors and |
| 407 | matrices.") |
| 408 | (license license:asl2.0))) |
| 409 | |
| 410 | (define-public coda |
| 411 | (package |
| 412 | (name "coda") |
| 413 | (version "2.25.6") |
| 414 | (source |
| 415 | (origin |
| 416 | (method git-fetch) |
| 417 | (uri (git-reference |
| 418 | (url "https://github.com/stcorp/coda") |
| 419 | (commit version))) |
| 420 | (file-name (git-file-name name version)) |
| 421 | (sha256 |
| 422 | (base32 "1876bx0cpxb6di5r08wxwjrxl50zhh5f8d740xgjsfmw9s7kk4j5")) |
| 423 | (modules '((guix build utils))) |
| 424 | (snippet |
| 425 | ;; Make sure we don't use the bundled software. |
| 426 | #~(begin |
| 427 | (substitute* "Makefile.am" |
| 428 | (("libexpat_internal\\.la libpcre2_internal\\.la libz_internal\\.la") |
| 429 | "")) |
| 430 | (with-directory-excursion "libcoda" |
| 431 | (for-each delete-file-recursively '("zlib" "pcre2" "expat"))))))) |
| 432 | (build-system gnu-build-system) |
| 433 | (arguments |
| 434 | (list #:configure-flags #~(list "--with-hdf5" "--enable-python" |
| 435 | "LIBS= -lz -lpcre2-posix -lexpat"))) |
| 436 | (native-inputs |
| 437 | (list autoconf |
| 438 | automake |
| 439 | bison |
| 440 | flex |
| 441 | gfortran |
| 442 | libtool |
| 443 | python |
| 444 | python-numpy)) |
| 445 | (inputs |
| 446 | (list zlib |
| 447 | pcre |
| 448 | pcre2 |
| 449 | expat |
| 450 | hdf5)) |
| 451 | (synopsis "Common interface to various earth observation data formats") |
| 452 | (description |
| 453 | "The Common Data Access toolbox (CODA) provides a set of interfaces for |
| 454 | reading remote sensing data from earth observation data files. It consists of |
| 455 | command line applications and interfaces to the C, Fortran, Python, and Java |
| 456 | programming languages.") |
| 457 | (home-page "https://stcorp.nl/coda") |
| 458 | (license license:gpl2+))) |
| 459 | |
| 460 | (define-public cvc5 |
| 461 | (package |
| 462 | (name "cvc5") |
| 463 | (version "1.4.0") |
| 464 | (source |
| 465 | (origin |
| 466 | (method git-fetch) |
| 467 | (uri (git-reference |
| 468 | (url "https://github.com/cvc5/cvc5/") |
| 469 | (commit (string-append "cvc5-" version)))) |
| 470 | (file-name (git-file-name name version)) |
| 471 | (sha256 |
| 472 | (base32 "0lpma6kfr5x1qk5yc227m98fvabn4c755y28gwd538cgc4cww420")) |
| 473 | (patches |
| 474 | (search-patches "cvc5-fix-test-failure.patch")))) |
| 475 | (build-system cmake-build-system) |
| 476 | (arguments |
| 477 | (list |
| 478 | #:build-type "Production" |
| 479 | #:configure-flags |
| 480 | ;; Keep the flags in sync with the options set by `./configure --best`. |
| 481 | ;; See <https://github.com/cvc5/cvc5/blob/cvc5-1.3.3/configure.sh#L216-L222>. |
| 482 | #~(list "-DBUILD_SHARED_LIBS=1" |
| 483 | "-DENABLE_GPL=ON" |
| 484 | "-DUSE_EDITLINE=ON" |
| 485 | "-DUSE_CLN=ON" |
| 486 | "-DUSE_POLY=ON" |
| 487 | "-DENABLE_IPO=ON" |
| 488 | "-DUSE_CRYPTOMINISAT=ON") |
| 489 | #:phases |
| 490 | #~(modify-phases %standard-phases |
| 491 | ;; Guix's libedit package does not require -ltinfo. |
| 492 | (add-after 'unpack 'remove-tinfo |
| 493 | (lambda _ |
| 494 | (substitute* "cmake/FindEditline.cmake" |
| 495 | ((" tinfo") |
| 496 | "")))) |
| 497 | ;; The 'check phase requires test programs build using 'build-tests'. |
| 498 | (add-before 'check 'build-tests |
| 499 | (lambda* (#:key tests? #:allow-other-keys) |
| 500 | (when tests? |
| 501 | (invoke "cmake" "--build" "." "--target" "build-tests"))))))) |
| 502 | (inputs (list cadical-2.1 |
| 503 | cln |
| 504 | cryptominisat |
| 505 | gmp |
| 506 | libedit |
| 507 | libpoly |
| 508 | symfpu)) |
| 509 | (native-inputs (list pkg-config |
| 510 | python-minimal |
| 511 | python-tomli |
| 512 | python-pyparsing |
| 513 | python-pexpect)) |
| 514 | (home-page "https://cvc5.github.io/") |
| 515 | (synopsis "Satisfiability modulo theories solver") |
| 516 | (description |
| 517 | "cvc5 is a solver for @acronym{SMT, satisfiability modulo theories} |
| 518 | problems. It processes input in the standard SMT-LIB format.") |
| 519 | (license (list license:expat license:bsd-3)))) |
| 520 | |
| 521 | (define-public go-github-com-cpmech-gosl |
| 522 | (package |
| 523 | (name "go-github-com-cpmech-gosl") |
| 524 | (version "1.2.12") |
| 525 | (source |
| 526 | (origin |
| 527 | (method git-fetch) |
| 528 | (uri (git-reference |
| 529 | (url "https://github.com/cpmech/gosl") |
| 530 | (commit (string-append "v" version)))) |
| 531 | (file-name (git-file-name name version)) |
| 532 | (sha256 |
| 533 | (base32 "1gfx8wqfrxsssprdf3ccgm60nv65dgsygwrx0a1ajga3lzp6iw2d")))) |
| 534 | (build-system go-build-system) |
| 535 | (arguments |
| 536 | (list |
| 537 | #:skip-build? #t |
| 538 | #:import-path "github.com/cpmech/gosl" |
| 539 | #:test-flags #~(list "-vet=off") |
| 540 | #:phases |
| 541 | #~(modify-phases %standard-phases |
| 542 | ;; Adapt la flags for Guix libraries. |
| 543 | (add-after 'unpack 'patch-la-flags |
| 544 | (lambda* (#:key import-path #:allow-other-keys) |
| 545 | (substitute* (string-append "src/" import-path "/la/flags.go") |
| 546 | (("_seq") ""))))))) |
| 547 | (propagated-inputs |
| 548 | (list fftw |
| 549 | gfortran |
| 550 | (list gfortran "lib") |
| 551 | lapack |
| 552 | metis |
| 553 | mumps |
| 554 | openblas |
| 555 | suitesparse)) |
| 556 | (home-page "https://github.com/cpmech/gosl") |
| 557 | (synopsis "Go Scientific Library") |
| 558 | (description |
| 559 | "Gosl is a set of tools for developing scientific simulations using the |
| 560 | Go programing language. It provides numerical methods and solvers for |
| 561 | differential equations but also present some functions for @acronym{Fast |
| 562 | Fourier Transforms, FFT}, the generation of random numbers, probability |
| 563 | distributions, and computational geometry. |
| 564 | |
| 565 | Gosl includes the following Go packages: |
| 566 | |
| 567 | @itemize |
| 568 | @item @code{chk} - to check numerical results and for unit testing |
| 569 | @item @code{fun} - special functions, DFT, FFT, Bessel, elliptical integrals, |
| 570 | orthogonal polynomials, interpolators |
| 571 | @item @code{gm} - geometry algorithms and structures |
| 572 | @item @code{hb} - pseudo hierarchical binary (hb) data file format |
| 573 | @item @code{io} - input/output, including printing to the terminal and |
| 574 | handling files |
| 575 | @item @code{la} - linear algebra: vector, matrix, efficient sparse solvers, |
| 576 | eigenvalues, decompositions |
| 577 | @item @code{num} - fundamental numerical methods such as root solvers, |
| 578 | non-linear solvers, numerical derivatives, and quadrature |
| 579 | @item @code{ode} - solvers for ordinary differential equations |
| 580 | @item @code{opt} - numerical optimization: Interior Point, Conjugate |
| 581 | Gradients, Powell, Grad Descent |
| 582 | @item @code{pde} - solvers for partial differential equations (FDM, Spectral, |
| 583 | FEM) |
| 584 | @item @code{rnd} - random numbers and probability distributions |
| 585 | @item @code{utl} - to generate series (e.g., linspace) and other functions as |
| 586 | in pylab/matlab/octave |
| 587 | @end itemize") |
| 588 | (license license:bsd-3))) |
| 589 | |
| 590 | (define-public qdldl |
| 591 | (package |
| 592 | (name "qdldl") |
| 593 | (version "0.1.9") |
| 594 | (source |
| 595 | (origin |
| 596 | (method git-fetch) |
| 597 | (uri (git-reference |
| 598 | (url "https://github.com/osqp/qdldl") |
| 599 | (commit (string-append "v" version)))) |
| 600 | (file-name (git-file-name name version)) |
| 601 | (sha256 |
| 602 | (base32 "0vm9a51ar5kz4lmz01ydkk757ppzjnxy49rjbm56rwj65smp26d5")))) |
| 603 | (build-system cmake-build-system) |
| 604 | (arguments |
| 605 | (list #:configure-flags #~(list "-DQDLDL_UNITTESTS=ON"))) |
| 606 | (home-page "https://github.com/osqp/qdldl") |
| 607 | (synopsis "LDL factorisation routine") |
| 608 | (description |
| 609 | "This package provides a free |
| 610 | @url{https://en.wikipedia.org/wiki/Cholesky_decomposition#LDL_decomposition, |
| 611 | @acronym{LDL, Lower-Diagonal-Lower}} factorisation routine for quasi-definite |
| 612 | linear systems: @code{Ax=b}.") |
| 613 | (license license:asl2.0))) |
| 614 | |
| 615 | (define-public qhull |
| 616 | (package |
| 617 | (name "qhull") |
| 618 | (version "2020.2") |
| 619 | (source (origin |
| 620 | (method url-fetch) |
| 621 | (uri (string-append "http://www.qhull.org/download/qhull-" |
| 622 | (car (string-split version #\.)) |
| 623 | "-src-8.0.2.tgz")) |
| 624 | (sha256 |
| 625 | (base32 |
| 626 | "0zlbhg0lb6j60188c2xhcrvviskr079552icjldqhy1jhgmxghmm")))) |
| 627 | (build-system cmake-build-system) |
| 628 | (arguments |
| 629 | `(#:configure-flags '("-DLINK_APPS_SHARED=ON" |
| 630 | "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"))) |
| 631 | (synopsis "Calculate convex hulls and related structures") |
| 632 | (description |
| 633 | "@code{Qhull} computes the convex hull, Delaunay triangulation, Voronoi |
| 634 | diagram, halfspace intersection about a point, furthest-site Delaunay |
| 635 | triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, |
| 636 | 3-d, 4-d, and higher dimensions. @code{Qhull} implements the Quickhull |
| 637 | algorithm for computing the convex hull. It handles roundoff errors from |
| 638 | floating point arithmetic. It computes volumes, surface areas, and |
| 639 | approximations to the convex hull. |
| 640 | |
| 641 | @code{Qhull} does not support triangulation of non-convex surfaces, mesh |
| 642 | generation of non-convex objects, medium-sized inputs in 9-D and higher, alpha |
| 643 | shapes, weighted Voronoi diagrams, Voronoi volumes, or constrained Delaunay |
| 644 | triangulations.") |
| 645 | (home-page "http://qhull.org") |
| 646 | (license (license:non-copyleft "file://COPYING.txt" |
| 647 | "See COPYING in the distribution.")))) |
| 648 | |
| 649 | (define-public units |
| 650 | (package |
| 651 | (name "units") |
| 652 | (version "2.27") |
| 653 | (source (origin |
| 654 | (method url-fetch) |
| 655 | (uri (string-append "mirror://gnu/units/units-" version |
| 656 | ".tar.gz")) |
| 657 | (sha256 (base32 |
| 658 | "045ymd24906ng4m5l7zlpnk89sr92rx9wx46x7p0hz1fcw4xpfz1")))) |
| 659 | (build-system gnu-build-system) |
| 660 | (inputs |
| 661 | (list bash-minimal ;for wrap-program |
| 662 | readline |
| 663 | python-wrapper ;for 'units_cur' script |
| 664 | python-requests)) |
| 665 | (arguments |
| 666 | `(#:phases (modify-phases %standard-phases |
| 667 | (add-after 'install 'wrap-units_cur |
| 668 | (lambda* (#:key outputs #:allow-other-keys) |
| 669 | (let* ((out (assoc-ref outputs "out")) |
| 670 | (bin (string-append out "/bin"))) |
| 671 | (wrap-program (string-append bin "/units_cur") |
| 672 | `("GUIX_PYTHONPATH" ":" prefix |
| 673 | ,(search-path-as-string->list |
| 674 | (getenv "GUIX_PYTHONPATH")))))))))) |
| 675 | (synopsis "Conversion between thousands of scales") |
| 676 | (description |
| 677 | "GNU Units converts numeric quantities between units of measure. It |
| 678 | can handle scale changes through adaptive usage of standard scale |
| 679 | prefixes (micro-, kilo-, etc.). It can also handle nonlinear |
| 680 | conversions such as Fahrenheit to Celsius. Its interpreter is powerful |
| 681 | enough to be used effectively as a scientific calculator.") |
| 682 | (license license:gpl3+) |
| 683 | (home-page "https://www.gnu.org/software/units/"))) |
| 684 | |
| 685 | (define-public double-conversion |
| 686 | (package |
| 687 | (name "double-conversion") |
| 688 | (version "3.1.5") |
| 689 | (home-page "https://github.com/google/double-conversion") |
| 690 | (source (origin |
| 691 | (method git-fetch) |
| 692 | (uri (git-reference (url home-page) |
| 693 | (commit (string-append "v" version)))) |
| 694 | (file-name (git-file-name name version)) |
| 695 | (sha256 |
| 696 | (base32 |
| 697 | "0csy4pjw1p8rp6g5qxi2h0ychhhp1fldv7gb761627fs2mclw9gv")))) |
| 698 | (build-system cmake-build-system) |
| 699 | (arguments |
| 700 | '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) |
| 701 | (synopsis "Conversion routines for IEEE doubles") |
| 702 | (description |
| 703 | "The double-conversion library provides binary-decimal and decimal-binary |
| 704 | routines for IEEE doubles. The library consists of efficient conversion |
| 705 | routines that have been extracted from the V8 JavaScript engine.") |
| 706 | (license license:bsd-3))) |
| 707 | |
| 708 | (define-public dionysus |
| 709 | (package |
| 710 | (name "dionysus") |
| 711 | (version "1.4.0") |
| 712 | (source (origin |
| 713 | (method url-fetch) |
| 714 | (uri (string-append "mirror://gnu/dionysus/dionysus-" version |
| 715 | ".tar.xz")) |
| 716 | (sha256 |
| 717 | (base32 |
| 718 | "194pzs1mlsj4ww6v37qq3961h5hckm5h805cv0r14xj3g9wfx2sk")))) |
| 719 | (build-system gnu-build-system) |
| 720 | (inputs (list tcl)) ;for 'tclsh' |
| 721 | (synopsis "Local search for universal constants and scientific values") |
| 722 | (description |
| 723 | "GNU Dionysus is a convenient system for quickly retrieving the values of |
| 724 | mathematical constants used in science and engineering. Values can be |
| 725 | searched using a simple command-line tool, choosing from three databases: |
| 726 | universal constants, atomic numbers, and constants related to |
| 727 | semiconductors.") |
| 728 | (license license:gpl3+) |
| 729 | (home-page "https://www.gnu.org/software/dionysus/"))) |
| 730 | |
| 731 | (define-public dozenal |
| 732 | ;; There is no recent release, so use the latest commit. |
| 733 | (let ((revision "1") |
| 734 | (commit "328bc03ad544179f2cccda36763358c4216f188e")) |
| 735 | (package |
| 736 | (name "dozenal") |
| 737 | (version (git-version "12010904-3" revision commit)) |
| 738 | (source |
| 739 | (origin |
| 740 | (method git-fetch) |
| 741 | (uri (git-reference |
| 742 | (url "https://codeberg.org/dgoodmaniii/dozenal") |
| 743 | (commit commit))) |
| 744 | (file-name (git-file-name name version)) |
| 745 | (sha256 |
| 746 | (base32 |
| 747 | "0knwfwjqdv854l5ny7csdpvp7r0md6a2k43a1l2lkyw9k3cglpph")))) |
| 748 | (build-system gnu-build-system) |
| 749 | (arguments |
| 750 | (list |
| 751 | ;; Some test scripts are included, but no makefile-driven |
| 752 | ;; tests, and they are all quite manual to run and check. |
| 753 | #:tests? #f |
| 754 | ;; Running with `make -j' causes the build to fail. This is likely |
| 755 | ;; because this project uses the "recursive make" structure, where |
| 756 | ;; each subdirectory contains its own make file, which is called by |
| 757 | ;; the top-level makefile. |
| 758 | #:parallel-build? #f |
| 759 | #:make-flags |
| 760 | #~(list (string-append "prefix=" #$output)) |
| 761 | #:phases |
| 762 | #~(modify-phases %standard-phases |
| 763 | (add-after 'unpack 'chdir |
| 764 | (lambda _ |
| 765 | (chdir "dozenal"))) |
| 766 | (add-after 'chdir 'patch-lua-references |
| 767 | (lambda _ |
| 768 | (let ((lua-name (strip-store-file-name |
| 769 | #$(this-package-input "lua")))) |
| 770 | (substitute* '("dozcal/Makefile" |
| 771 | "dozlua/Makefile") |
| 772 | (("lua52") |
| 773 | (string-take lua-name |
| 774 | (string-rindex lua-name #\.))))))) |
| 775 | (delete 'configure) |
| 776 | (add-before 'install 'make-bin-dir |
| 777 | (lambda _ |
| 778 | (mkdir-p (string-append #$output "/bin")))) |
| 779 | (add-after 'install 'install-html-docs |
| 780 | (lambda _ |
| 781 | (invoke "make" |
| 782 | (string-append "prefix=" #$output) |
| 783 | "installhtml"))) |
| 784 | (add-after 'install-html-docs 'split-outputs |
| 785 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 786 | (for-each |
| 787 | (lambda (prog) |
| 788 | (let ((orig (string-append #$output "/bin/" prog)) |
| 789 | (dst (string-append #$output:gui "/bin/" prog)) |
| 790 | (man-orig (string-append #$output |
| 791 | "/share/man/man1/" |
| 792 | prog ".1")) |
| 793 | (man-dst (string-append #$output:gui |
| 794 | "/share/man/man1/" |
| 795 | prog ".1"))) |
| 796 | (mkdir-p (dirname dst)) |
| 797 | (rename-file orig dst) |
| 798 | (mkdir-p (dirname man-dst)) |
| 799 | (rename-file man-orig man-dst))) |
| 800 | '("xdozdc" "gdozdc")) |
| 801 | (wrap-program (string-append #$output:gui "/bin/" "gdozdc") |
| 802 | `("PATH" = (,(string-append #$output "/bin"))) |
| 803 | `("PERL5LIB" = (,(getenv "PERL5LIB"))))))))) |
| 804 | (outputs '("out" "gui")) |
| 805 | (native-inputs (list groff pkg-config)) |
| 806 | (inputs (list bash-minimal ;for wrap-program |
| 807 | libhdate |
| 808 | lua |
| 809 | ncurses |
| 810 | perl |
| 811 | perl-tk |
| 812 | perl-par |
| 813 | xforms)) |
| 814 | (synopsis "Suite of dozenal programs") |
| 815 | (description |
| 816 | "The dozenal suite is a set of programs designed to assist with working |
| 817 | in the dozenal (also called \"duodecimal\" or \"base twelve\") system. It |
| 818 | includes number converters (dozenal-to-decimal and decimal-to-dozenal), an RPN |
| 819 | calculator, a graphical calculator, a metric system converter (works with |
| 820 | imperial, U.S. customary, SI metric, and the dozenal TGM), a pretty-printer |
| 821 | for dozenal numbers, a date-and-time program, and a dozenal calendar programs, |
| 822 | complete with events and to-dos.") |
| 823 | (home-page "https://codeberg.org/dgoodmaniii/dozenal") |
| 824 | (license license:gpl3+)))) |
| 825 | |
| 826 | (define-public drat-trim |
| 827 | (package |
| 828 | (name "drat-trim") |
| 829 | (version "05.22.2023") |
| 830 | (source |
| 831 | (origin |
| 832 | (method git-fetch) |
| 833 | (uri (git-reference |
| 834 | (url "https://github.com/marijnheule/drat-trim") |
| 835 | (commit (string-append "v" version)))) |
| 836 | (file-name (git-file-name name version)) |
| 837 | (sha256 |
| 838 | (base32 "084miqj57xr7c74y649acm5xjkddpjn4ybfh469jcbakzp8w0pdi")))) |
| 839 | (build-system gnu-build-system) |
| 840 | (arguments |
| 841 | (list |
| 842 | #:tests? #f ;no tests |
| 843 | #:make-flags |
| 844 | #~(list (string-join |
| 845 | (list "FLAGS=-DLONGTYPE" |
| 846 | ;; _POSIX_C_SOURCE required for getc_unlocked(3). |
| 847 | "-D_POSIX_C_SOURCE=200809") |
| 848 | " ")) |
| 849 | #:phases |
| 850 | #~(modify-phases %standard-phases |
| 851 | (add-after 'unpack 'always-pass-flags |
| 852 | (lambda _ |
| 853 | (substitute* "Makefile" |
| 854 | ;; Ensure that drat-trim and gapless target also respect FLAGS. |
| 855 | (("-std=c99 -O2") |
| 856 | "-std=c99 $(FLAGS) -O2")))) |
| 857 | (delete 'configure) ;no configure script |
| 858 | (replace 'install |
| 859 | (lambda* (#:key outputs #:allow-other-keys) |
| 860 | (let* ((bin (string-append #$output "/bin"))) |
| 861 | (for-each (lambda (exec) |
| 862 | (install-file exec bin)) |
| 863 | '("drat-trim" |
| 864 | "lrat-check")))))))) |
| 865 | (synopsis "Proof checker for unsatisfiability of propositional formulas") |
| 866 | (description |
| 867 | "The proof checker DRAT-trim can be used to check whether a propositional |
| 868 | formula in the DIMACS format is unsatisfiable. Given a propositional formula and |
| 869 | a clausal proof, DRAT-trim validates that the proof is a certificate of |
| 870 | unsatisfiability of the formula.") |
| 871 | (home-page "https://www.cs.utexas.edu/~marijn/drat-trim/") |
| 872 | (license license:expat))) |
| 873 | |
| 874 | (define-public dsfmt |
| 875 | (package |
| 876 | (name "dsfmt") |
| 877 | (version "2.2.3") |
| 878 | (source |
| 879 | (origin |
| 880 | (method url-fetch) |
| 881 | (uri |
| 882 | (string-append |
| 883 | "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/" |
| 884 | "dSFMT-src-" version ".tar.gz")) |
| 885 | (sha256 |
| 886 | (base32 |
| 887 | "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42")) |
| 888 | (modules '((guix build utils))) |
| 889 | ;; Don't distribute html documentation with bundled jquery. |
| 890 | (snippet |
| 891 | '(begin |
| 892 | (delete-file-recursively "html") #t)) |
| 893 | ;; Add patches borrowed from Julia. |
| 894 | (patches |
| 895 | (list |
| 896 | (origin |
| 897 | (method url-fetch) |
| 898 | (uri (string-append |
| 899 | "https://raw.githubusercontent.com/JuliaLang/julia/" |
| 900 | "v1.3.0/deps/patches/dSFMT.c.patch")) |
| 901 | (sha256 (base32 |
| 902 | "09mhv11bms8jsmkmdqvlcgljwhzw3b6n9nncpi2b6dla9798hw2y")) |
| 903 | (file-name "dSFMT.c.patch")) |
| 904 | (origin |
| 905 | (method url-fetch) |
| 906 | (uri (string-append |
| 907 | "https://raw.githubusercontent.com/JuliaLang/julia/" |
| 908 | "v1.3.0/deps/patches/dSFMT.h.patch")) |
| 909 | (sha256 (base32 |
| 910 | "1py5rd0yxic335lzka23f6x2dhncrpizpyrk57gi2f28c0p98y5n")) |
| 911 | (file-name "dSFMT.h.patch")))))) |
| 912 | (build-system gnu-build-system) |
| 913 | (arguments |
| 914 | `(#:phases |
| 915 | (modify-phases %standard-phases |
| 916 | (delete 'configure) ; no configure script |
| 917 | (replace 'build |
| 918 | ;; Upstream Makefile does not build a shared library. Borrow from Julia |
| 919 | ;; https://github.com/JuliaLang/julia/blob/v1.3.0/deps/dsfmt.mk |
| 920 | (lambda _ |
| 921 | (invoke |
| 922 | "gcc" "-DNDEBUG" "-DDSFMT_MEXP=19937" |
| 923 | "-fPIC" "-DDSFMT_DO_NOT_USE_OLD_NAMES" |
| 924 | "-O3" "-finline-functions" "-fomit-frame-pointer" |
| 925 | "-fno-strict-aliasing" "--param" "max-inline-insns-single=1800" |
| 926 | "-Wmissing-prototypes" "-Wall" "-std=c99" "-shared" "dSFMT.c" |
| 927 | "-o" "libdSFMT.so"))) |
| 928 | (replace 'install ; no "install" target |
| 929 | (lambda* (#:key outputs #:allow-other-keys) |
| 930 | (let* ((out (assoc-ref outputs "out")) |
| 931 | (lib (string-append out "/lib")) |
| 932 | (inc (string-append out "/include")) |
| 933 | (doc (string-append out "/share/doc/" ,name "-" ,version))) |
| 934 | (install-file "libdSFMT.so" lib) |
| 935 | (install-file "dSFMT.h" inc) |
| 936 | (install-file "LICENSE.txt" doc) |
| 937 | #t)))))) |
| 938 | (synopsis "Double precision SIMD-oriented Fast Mersenne Twister") |
| 939 | (description |
| 940 | "The dSMFT package speeds up Fast Mersenne Twister generation by avoiding |
| 941 | the expensive conversion of integer to double (floating point). dSFMT directly |
| 942 | generates double precision floating point pseudorandom numbers which have the |
| 943 | IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985) |
| 944 | format. dSFMT is only available on the CPUs which use IEEE 754 format double |
| 945 | precision floating point numbers.") |
| 946 | (home-page "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/") |
| 947 | (license license:bsd-3))) |
| 948 | |
| 949 | (define-public gsl |
| 950 | (package |
| 951 | (name "gsl") |
| 952 | (version "2.8") |
| 953 | (source (origin |
| 954 | (method url-fetch) |
| 955 | (uri (string-append "mirror://gnu/gsl/gsl-" |
| 956 | version ".tar.gz")) |
| 957 | (sha256 |
| 958 | (base32 |
| 959 | "141i8ag2qazyqqk17bfr2l7mr1asxm1da7avi5a66b332pnyx6ba")))) |
| 960 | (outputs '("out" "static" "debug")) |
| 961 | (build-system gnu-build-system) |
| 962 | (arguments |
| 963 | (list #:phases |
| 964 | #~(modify-phases %standard-phases |
| 965 | #$@(cond |
| 966 | ((and (target-riscv64?) |
| 967 | (%current-target-system)) |
| 968 | #~((add-after 'unpack 'force-bootstrap |
| 969 | (lambda _ |
| 970 | ;; gsl ships with an old configure script that does not |
| 971 | ;; support riscv64. Regenerate it. |
| 972 | (delete-file "configure"))))) |
| 973 | |
| 974 | ((or (string-prefix? "aarch64" (%current-system)) |
| 975 | (string-prefix? "powerpc" (%current-system))) |
| 976 | ;; Some sparse matrix tests are failing on AArch64 and PowerPC: |
| 977 | ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html |
| 978 | #~((add-before 'check 'disable-failing-tests |
| 979 | (lambda _ |
| 980 | (substitute* "spmatrix/test.c" |
| 981 | ((".*test_complex.*") |
| 982 | "\n")))))) |
| 983 | |
| 984 | ((string-prefix? "i686" (%current-system)) |
| 985 | ;; There are rounding issues with these tests on i686: |
| 986 | ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html |
| 987 | ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html |
| 988 | ;; https://codeberg.org/guix/guix/issues/1234#issuecomment-5874172 |
| 989 | #~((add-before 'check 'disable-failing-tests |
| 990 | (lambda _ |
| 991 | (substitute* "spmatrix/test.c" |
| 992 | ((".*test_all.*") "\n") |
| 993 | ((".*test_float.*") "\n") |
| 994 | ((".*test_complex.*") "\n")) |
| 995 | |
| 996 | (substitute* "specfunc/test_legendre.c" |
| 997 | ((".*= test_legendre_schmidt.*") "\n")) |
| 998 | |
| 999 | ;; XXX: These tests abort with: |
| 1000 | ;; gsl: cholesky.c:645: ERROR: matrix is not positive definite |
| 1001 | (substitute* '("multifit_nlinear/test.c" |
| 1002 | "multilarge_nlinear/test.c") |
| 1003 | (("gsl_ieee_env_setup.*" all) |
| 1004 | (string-append "exit (77);\n" all))))))) |
| 1005 | |
| 1006 | (else #~())) |
| 1007 | (add-after 'install 'move-static-library |
| 1008 | (lambda* (#:key outputs #:allow-other-keys) |
| 1009 | (let ((static (string-append (assoc-ref outputs |
| 1010 | "static") |
| 1011 | "/lib/")) |
| 1012 | (out (string-append (assoc-ref outputs "out") |
| 1013 | "/lib/"))) |
| 1014 | (mkdir-p static) |
| 1015 | (rename-file (string-append out "libgsl.a") |
| 1016 | (string-append static "libgsl.a")) |
| 1017 | (rename-file (string-append out "libgslcblas.a") |
| 1018 | (string-append static "libgslcblas.a")))))))) |
| 1019 | (native-inputs |
| 1020 | (if (and (target-riscv64?) |
| 1021 | (%current-target-system)) |
| 1022 | (list autoconf automake libtool) |
| 1023 | '())) |
| 1024 | (home-page "https://www.gnu.org/software/gsl/") |
| 1025 | (synopsis "Numerical library for C and C++") |
| 1026 | (description |
| 1027 | "The GNU Scientific Library is a library for numerical analysis in C |
| 1028 | and C++. It includes a wide range of mathematical routines, with over 1000 |
| 1029 | functions in total. Subject areas covered by the library include: |
| 1030 | differential equations, linear algebra, Fast Fourier Transforms and random |
| 1031 | numbers.") |
| 1032 | |
| 1033 | ;; Linear algebra routines should benefit from SIMD optimizations. |
| 1034 | (properties `((tunable? . #t))) |
| 1035 | |
| 1036 | (license license:gpl3+))) |
| 1037 | |
| 1038 | (define-public sleef |
| 1039 | (package |
| 1040 | (name "sleef") |
| 1041 | (version "3.6.1") |
| 1042 | (source |
| 1043 | (origin |
| 1044 | (method git-fetch) |
| 1045 | (uri (git-reference |
| 1046 | (url "https://github.com/shibatch/sleef") |
| 1047 | (commit version))) |
| 1048 | (file-name (git-file-name name version)) |
| 1049 | (sha256 |
| 1050 | (base32 "14y1zf621zp0333vs29pc7pcc31gsrrs3q49b6qmd1kz6c7a7fp2")))) |
| 1051 | (build-system cmake-build-system) |
| 1052 | (arguments |
| 1053 | (list |
| 1054 | #:build-type "Release" |
| 1055 | #:configure-flags |
| 1056 | #~(list "-DSLEEF_BUILD_SHARED_LIBS=ON"))) |
| 1057 | (inputs |
| 1058 | (list fftw gmp mpfr openssl)) |
| 1059 | (home-page "https://sleef.org/") |
| 1060 | (synopsis "SIMD library for evaluating elementary functions and DFT") |
| 1061 | (description |
| 1062 | "SLEEF (SIMD Library for Evaluating Elementary Functions) is a library that |
| 1063 | implements vectorized versions of all C99 real floating point math functions. |
| 1064 | It can utilize SIMD instructions that are available on modern processors.") |
| 1065 | (license (list license:boost1.0 ;sleef |
| 1066 | license:cc-by4.0)))) ;simplex algorithm |
| 1067 | |
| 1068 | (define-public glpk |
| 1069 | (package |
| 1070 | (name "glpk") |
| 1071 | (version "5.0") |
| 1072 | (source |
| 1073 | (origin |
| 1074 | (method url-fetch) |
| 1075 | (uri (string-append "mirror://gnu/glpk/glpk-" |
| 1076 | version ".tar.gz")) |
| 1077 | (sha256 |
| 1078 | (base32 |
| 1079 | "05bgxidxj8d9xdp82niy7cy36w181cxq7p8vc3y2ixshpgp1642a")))) |
| 1080 | (build-system gnu-build-system) |
| 1081 | (inputs |
| 1082 | (list gmp)) |
| 1083 | (arguments |
| 1084 | `(#:configure-flags '("--with-gmp" |
| 1085 | "--disable-static"))) |
| 1086 | (home-page "https://www.gnu.org/software/glpk/") |
| 1087 | (synopsis "GNU Linear Programming Kit, supporting the MathProg language") |
| 1088 | (description |
| 1089 | "GLPK is a C library for solving large-scale linear programming (LP), |
| 1090 | mixed integer programming (MIP), and other related problems. It supports the |
| 1091 | GNU MathProg modeling language, a subset of the AMPL language, and features a |
| 1092 | translator for the language. In addition to the C library, a stand-alone |
| 1093 | LP/MIP solver is included in the package.") |
| 1094 | (license license:gpl3+))) |
| 1095 | |
| 1096 | (define-public linasm |
| 1097 | (package |
| 1098 | (name "linasm") |
| 1099 | (version "1.13") |
| 1100 | (source (origin |
| 1101 | (method git-fetch) |
| 1102 | (uri (git-reference |
| 1103 | (url "https://git.code.sf.net/p/linasm/linasm") |
| 1104 | (commit (string-append "v" version "(stable)")))) |
| 1105 | (file-name (git-file-name name version)) |
| 1106 | (sha256 |
| 1107 | (base32 |
| 1108 | "11095bxjxsq3a9apvyi1kpddwkg9b2hc5ga65qhrdxzvdsrjhaaq")))) |
| 1109 | (build-system gnu-build-system) |
| 1110 | (arguments |
| 1111 | (list |
| 1112 | #:tests? #false ;there are none |
| 1113 | #:make-flags |
| 1114 | #~(list (string-append "prefix=" #$output)) |
| 1115 | #:phases |
| 1116 | '(modify-phases %standard-phases |
| 1117 | (delete 'configure)))) |
| 1118 | (supported-systems '("x86_64-linux")) |
| 1119 | (home-page "https://sourceforge.net/projects/linasm/") |
| 1120 | (synopsis "Collection of fast and optimized assembly libraries for x86-64") |
| 1121 | (description |
| 1122 | "LinAsm is collection of very fast and SIMD optimized assembly written |
| 1123 | libraries for x86-64. |
| 1124 | |
| 1125 | It implements many common and widely used algorithms for array manipulations: |
| 1126 | searching, sorting, arithmetic and vector operations, unit conversions; fast |
| 1127 | mathematical and statistic functions; numbers and time converting algorithms; |
| 1128 | @dfn{finite impulse response} (FIR) digital filters; spectrum analysis |
| 1129 | algorithms, Fast Hartley transformation; CPU cache friendly functions and |
| 1130 | extremely fast @dfn{abstract data types} (ADT) such as hash tables b-trees, |
| 1131 | and much more.") |
| 1132 | (license license:lgpl3+))) |
| 1133 | |
| 1134 | (define-public gfan |
| 1135 | (package |
| 1136 | (name "gfan") |
| 1137 | (version "0.7") |
| 1138 | (source |
| 1139 | (origin |
| 1140 | (method url-fetch) |
| 1141 | (uri (string-append "https://users-math.au.dk/jensen/software" |
| 1142 | "/gfan/gfan" version ".tar.gz")) |
| 1143 | (sha256 |
| 1144 | (base32 "17lqripnsdb5hn7nnhgn4siajgh1jh9nkaplca3akm74w5bkg0xb")))) |
| 1145 | (build-system gnu-build-system) |
| 1146 | (arguments |
| 1147 | (list |
| 1148 | #:make-flags #~(list (string-append "PREFIX=" #$output) |
| 1149 | (string-append "CC=" #$(cc-for-target)) |
| 1150 | (string-append "CXX=" #$(cxx-for-target))) |
| 1151 | #:phases #~(modify-phases %standard-phases |
| 1152 | (delete 'configure) |
| 1153 | ;; cddlib is distributed with the 'cddlib' header name, |
| 1154 | ;; but gfan expects it to be named 'cdd'. Substitute |
| 1155 | ;; the include headers to make gfan find it. |
| 1156 | (add-after 'unpack 'fix-cdd-reference |
| 1157 | (lambda _ |
| 1158 | (substitute* '("src/lp_cdd.cpp" |
| 1159 | "src/gfanlib_zcone.cpp" |
| 1160 | "src/app_librarytest.cpp") |
| 1161 | (("#include \"cdd") "#include \"cddlib"))))))) |
| 1162 | (inputs (list cddlib gmp)) |
| 1163 | (home-page "https://users-math.au.dk/jensen/software/gfan/gfan.html") |
| 1164 | (synopsis "Compute Gröbner fans and tropical varieties") |
| 1165 | (description "Gfan is a software package for computing Gröbner fans and |
| 1166 | tropical varieties.") |
| 1167 | ;; homepage/gfan.html: "Gfan is distributed under the terms of the GPL |
| 1168 | ;; license version 2 or 3 as desired" |
| 1169 | (license license:gpl2))) |
| 1170 | |
| 1171 | (define-public 4ti2 |
| 1172 | (package |
| 1173 | (name "4ti2") |
| 1174 | (version "1.6.12") |
| 1175 | (source |
| 1176 | (origin |
| 1177 | (method url-fetch) |
| 1178 | (uri (string-append "https://github.com/4ti2/4ti2/releases/download/" |
| 1179 | "Release_" |
| 1180 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) |
| 1181 | version) |
| 1182 | "/4ti2-" version ".tar.gz")) |
| 1183 | (sha256 |
| 1184 | (base32 "1p82sjwsbyg418jfb1wzff1x10h4yhxgnqnsvz33k3x121k2cwjw")))) |
| 1185 | (build-system gnu-build-system) |
| 1186 | (native-inputs |
| 1187 | (list (@ (gnu packages base) which))) ; for the tests |
| 1188 | (inputs |
| 1189 | (list glpk gmp)) |
| 1190 | (home-page "https://4ti2.github.io") |
| 1191 | (synopsis "Mathematical tool suite for problems on linear spaces") |
| 1192 | (description |
| 1193 | "4ti2 implements algorithms for solving algebraic, geometric and |
| 1194 | combinatorial problems on linear spaces. Among others, it solves systems |
| 1195 | of linear equations, computes extreme rays of polyhedral cones, solves |
| 1196 | integer programming problems and computes Markov bases for statistics.") |
| 1197 | (license license:gpl2+))) |
| 1198 | |
| 1199 | (define-public sympow |
| 1200 | (package |
| 1201 | (name "sympow") |
| 1202 | (version "2.023.7") |
| 1203 | (source |
| 1204 | (origin |
| 1205 | (method git-fetch) |
| 1206 | (uri (git-reference |
| 1207 | (url "https://gitlab.com/rezozer/forks/sympow") |
| 1208 | (commit (string-append "v" version)))) |
| 1209 | (file-name (git-file-name name version)) |
| 1210 | (sha256 |
| 1211 | (base32 |
| 1212 | "0ilnxygkj4g5arjiyd16k00cvnjlqs0cpc8hk64kbqhl877mm5i9")))) |
| 1213 | (build-system gnu-build-system) |
| 1214 | (arguments |
| 1215 | (list #:tests? #f ; no tests |
| 1216 | #:phases #~(modify-phases %standard-phases |
| 1217 | (replace 'configure |
| 1218 | (lambda* (#:key inputs #:allow-other-keys) |
| 1219 | (substitute* "Configure" |
| 1220 | (("/bin/sh") (search-input-file inputs "/bin/bash"))) |
| 1221 | (setenv "PREFIX" #$output) |
| 1222 | (setenv "VARPREFIX" #$output) |
| 1223 | (invoke "bash" "./Configure")))))) |
| 1224 | (native-inputs (list bash-minimal coreutils help2man pari-gp which)) |
| 1225 | (home-page "https://gitlab.com/rezozer/forks/sympow") |
| 1226 | (synopsis "Symmetric power elliptic curve L-functions") |
| 1227 | (description "SYMPOW is a mathematical program to compute special values |
| 1228 | of symmetric power elliptic curve L-functions; it can compute up to about 64 |
| 1229 | digits of precision.") |
| 1230 | ;; bsd-2 with extra stipulation that users be informed of sympow's |
| 1231 | ;; "less restrictive license" if it's included in a program with a more |
| 1232 | ;; restrictive license. However, since sympow includes fpu.c which is |
| 1233 | ;; gpl2+ the whole package can only be distributed via GPL anyway. |
| 1234 | ;; See also <https://gitlab.com/rezozer/forks/sympow/-/issues/7>. |
| 1235 | (license (license:non-copyleft "file:///COPYING" |
| 1236 | "See COPYING in the distribution.")))) |
| 1237 | |
| 1238 | (define-public cddlib |
| 1239 | (package |
| 1240 | (name "cddlib") |
| 1241 | (version "0.94m") |
| 1242 | (source |
| 1243 | (origin |
| 1244 | (method git-fetch) |
| 1245 | (uri (git-reference |
| 1246 | (url "https://github.com/cddlib/cddlib") |
| 1247 | (commit version))) |
| 1248 | (file-name (git-file-name name version)) |
| 1249 | (sha256 |
| 1250 | (base32 |
| 1251 | "09s8323h5w9j6mpl1yc6lm770dkskfxd2ayyafkcjllmnncxzfa0")))) |
| 1252 | (build-system gnu-build-system) |
| 1253 | (inputs |
| 1254 | (list gmp)) |
| 1255 | (native-inputs |
| 1256 | (list autoconf |
| 1257 | automake |
| 1258 | libtool |
| 1259 | (texlive-local-tree |
| 1260 | (list texlive-amsfonts |
| 1261 | texlive-graphics |
| 1262 | texlive-l3backend |
| 1263 | texlive-l3backend)))) |
| 1264 | (arguments |
| 1265 | (list #:configure-flags |
| 1266 | #~(list (string-append "--docdir=" #$output |
| 1267 | "/share/doc/" #$name "-" #$version)))) |
| 1268 | (home-page "https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html") |
| 1269 | (synopsis "Library for convex hulls and extreme rays of polyhedra") |
| 1270 | (description |
| 1271 | "The C-library cddlib implements the Double Description Method of |
| 1272 | Motzkin et al. for generating all vertices (i.e. extreme points) and extreme |
| 1273 | rays of a general convex polyhedron given by a system of linear inequalities |
| 1274 | in arbitrary dimension. It can also be used for the converse operation of |
| 1275 | computing convex hulls.") |
| 1276 | (license license:gpl2+))) |
| 1277 | |
| 1278 | (define-public lrslib |
| 1279 | (package |
| 1280 | (name "lrslib") |
| 1281 | (version "7.2") |
| 1282 | (source |
| 1283 | (origin |
| 1284 | (method url-fetch) |
| 1285 | (uri (string-append "http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/" |
| 1286 | "lrslib-0" |
| 1287 | (string-delete #\. version) ".tar.gz")) |
| 1288 | (sha256 |
| 1289 | (base32 |
| 1290 | "1w1jsnfgny8cihndr5gfm99pvwp48qsvxkqfsi2q87gd3m57aj7w")))) |
| 1291 | (build-system gnu-build-system) |
| 1292 | (inputs |
| 1293 | (list gmp)) |
| 1294 | (arguments |
| 1295 | `(#:tests? #f ; no check phase |
| 1296 | #:make-flags `("CC=gcc" |
| 1297 | ,(string-append "prefix=" (assoc-ref %outputs "out")) |
| 1298 | "all-shared") |
| 1299 | #:phases |
| 1300 | (modify-phases %standard-phases |
| 1301 | (replace 'configure |
| 1302 | (lambda _ |
| 1303 | (substitute* "makefile" |
| 1304 | (("-L \\.") "-L . -Wl,-rpath='$$ORIGIN/../lib'")) |
| 1305 | #t))))) |
| 1306 | (home-page "http://cgm.cs.mcgill.ca/~avis/C/lrs.html") |
| 1307 | (synopsis "Convex hulls of polyhedra with exact arithmetic") |
| 1308 | (description |
| 1309 | "The C code of lrslib implements the reverse search algorithm for |
| 1310 | vertex enumeration and convex hull problems. Its input file format is |
| 1311 | compatible with cddlib. All computations are done exactly in either |
| 1312 | multiple precision or fixed integer arithmetic. Output is not stored |
| 1313 | in memory, so even problems with very large output sizes can sometimes |
| 1314 | be solved.") |
| 1315 | (license license:gpl2+))) |
| 1316 | |
| 1317 | (define-public libcerf |
| 1318 | (package |
| 1319 | (name "libcerf") |
| 1320 | (version "1.14") |
| 1321 | (source |
| 1322 | (origin |
| 1323 | (method git-fetch) |
| 1324 | (uri (git-reference |
| 1325 | (url "https://jugit.fz-juelich.de/mlz/libcerf") |
| 1326 | (commit (string-append "v" version)))) |
| 1327 | (file-name (git-file-name name version)) |
| 1328 | (sha256 |
| 1329 | (base32 "1ic2q7kvxpqmgxlishygvx8d00i4wn51vkq4fyac44ahhf6c3kwd")))) |
| 1330 | (build-system cmake-build-system) |
| 1331 | (native-inputs |
| 1332 | (list perl)) |
| 1333 | (home-page "https://jugit.fz-juelich.de/mlz/libcerf") |
| 1334 | (synopsis "Library for complex error functions") |
| 1335 | (description |
| 1336 | "@code{libcerf} is a self-contained numeric library that provides an |
| 1337 | efficient and accurate implementation of complex error functions, along with |
| 1338 | Dawson, Faddeeva, and Voigt functions.") |
| 1339 | (license license:expat))) |
| 1340 | |
| 1341 | (define-public vinci |
| 1342 | (package |
| 1343 | (name "vinci") |
| 1344 | (version "1.0.5") |
| 1345 | (source |
| 1346 | (origin |
| 1347 | (method url-fetch) |
| 1348 | (uri (string-append "https://www.math.u-bordeaux.fr/~aenge/software/" |
| 1349 | "vinci/vinci-" version ".tar.gz")) |
| 1350 | (sha256 |
| 1351 | (base32 |
| 1352 | "1aq0qc1y27iw9grhgnyji3290wwfznsrk3sg6ynqpxwjdda53h4m")))) |
| 1353 | (build-system gnu-build-system) |
| 1354 | (inputs |
| 1355 | (list lrslib)) |
| 1356 | (arguments |
| 1357 | `(#:tests? #f ; no check phase |
| 1358 | #:phases |
| 1359 | (modify-phases %standard-phases |
| 1360 | (replace 'configure |
| 1361 | ;; register the lrs location in the config file |
| 1362 | (lambda* (#:key inputs #:allow-other-keys) |
| 1363 | (let* ((lrs (assoc-ref inputs "lrslib")) |
| 1364 | (lrsexec (string-append lrs "/bin/lrs"))) |
| 1365 | (substitute* "vinci.h" |
| 1366 | (("#define LRS_EXEC \"lrs\"") |
| 1367 | (string-append "#define LRS_EXEC \"" lrsexec "\"")))) |
| 1368 | #t)) |
| 1369 | (replace 'install |
| 1370 | (lambda* (#:key outputs #:allow-other-keys) |
| 1371 | (let* ((out (assoc-ref outputs "out")) |
| 1372 | (bin (string-append out "/bin"))) |
| 1373 | (install-file "vinci" bin)) |
| 1374 | #t))))) |
| 1375 | (home-page |
| 1376 | "https://www.math.u-bordeaux.fr/~aenge/?category=software&page=vinci") |
| 1377 | (synopsis "Volume computation for polytopes") |
| 1378 | (description |
| 1379 | "Vinci implements a number of volume computation algorithms for convex |
| 1380 | polytopes in arbitrary dimension. The polytopes can be given by their |
| 1381 | V-representation (as the convex hull of a finite number of vertices), by |
| 1382 | their H-representation (as the bounded intersection of a finite number of |
| 1383 | halfspaces) or by their double description with both representations.") |
| 1384 | (license license:gpl2+))) |
| 1385 | |
| 1386 | (define-public arpack-ng |
| 1387 | (package |
| 1388 | (name "arpack-ng") |
| 1389 | (version "3.9.1") |
| 1390 | (home-page "https://github.com/opencollab/arpack-ng") |
| 1391 | (source (origin |
| 1392 | (method git-fetch) |
| 1393 | (uri (git-reference (url home-page) (commit version))) |
| 1394 | (file-name (git-file-name name version)) |
| 1395 | (sha256 |
| 1396 | (base32 |
| 1397 | "0bbw6a48py9fjlif2n4x75skyjskq2hghffjqzm85wnsnsjdlaqw")))) |
| 1398 | (build-system cmake-build-system) |
| 1399 | (arguments |
| 1400 | '(#:configure-flags '("-DICB=ON"))) |
| 1401 | (native-inputs |
| 1402 | (list pkg-config)) |
| 1403 | (inputs |
| 1404 | (list eigen openblas gfortran)) |
| 1405 | (synopsis "Fortran subroutines for solving eigenvalue problems") |
| 1406 | (description |
| 1407 | "ARPACK-NG is a collection of Fortran77 subroutines designed to solve |
| 1408 | large scale eigenvalue problems.") |
| 1409 | (license (license:non-copyleft "file://COPYING" |
| 1410 | "See COPYING in the distribution.")))) |
| 1411 | |
| 1412 | (define-public arpack-ng-openmpi |
| 1413 | (package (inherit arpack-ng) |
| 1414 | (name "arpack-ng-openmpi") |
| 1415 | (inputs |
| 1416 | (modify-inputs inputs |
| 1417 | (prepend openmpi))) |
| 1418 | (arguments |
| 1419 | (substitute-keyword-arguments arguments |
| 1420 | ((#:configure-flags _ #~()) |
| 1421 | #~'("-DMPI=ON")) |
| 1422 | ((#:phases phases #~%standard-phases) |
| 1423 | #~(modify-phases #$phases |
| 1424 | (add-before 'check 'mpi-setup |
| 1425 | #$%openmpi-setup))))) |
| 1426 | (synopsis "Fortran subroutines for solving eigenvalue problems with MPI"))) |
| 1427 | |
| 1428 | (define-public lapack |
| 1429 | (package |
| 1430 | (name "lapack") |
| 1431 | (version "3.12.1") |
| 1432 | (source |
| 1433 | (origin |
| 1434 | (method git-fetch) |
| 1435 | (uri (git-reference |
| 1436 | (url "https://github.com/Reference-LAPACK/lapack/") |
| 1437 | (commit (string-append "v" version)))) |
| 1438 | (file-name (git-file-name name version)) |
| 1439 | (sha256 |
| 1440 | (base32 |
| 1441 | "19387ifv5kplnggw5fgz4nzspmqi11wnwzap2knwxgrvknysrwj9")))) |
| 1442 | (build-system cmake-build-system) |
| 1443 | (home-page "https://www.netlib.org/lapack/") |
| 1444 | (inputs (list gfortran python-wrapper)) |
| 1445 | (arguments |
| 1446 | `(#:configure-flags (list |
| 1447 | "-DBUILD_SHARED_LIBS:BOOL=YES" |
| 1448 | "-DCBLAS=ON" |
| 1449 | "-DLAPACKE=ON" |
| 1450 | ;; Build the 'LAPACKE_clatms' functions. |
| 1451 | "-DLAPACKE_WITH_TMG=ON"))) |
| 1452 | (synopsis "Library for numerical linear algebra") |
| 1453 | (description |
| 1454 | "LAPACK is a Fortran 90 library for solving the most commonly occurring |
| 1455 | problems in numerical linear algebra.") |
| 1456 | (license (license:non-copyleft "file://LICENSE" |
| 1457 | "See LICENSE in the distribution.")) |
| 1458 | (properties '((tunable? . #t))))) |
| 1459 | |
| 1460 | (define-public lis |
| 1461 | (package |
| 1462 | (name "lis") |
| 1463 | (version "2.1.8") |
| 1464 | (source (origin |
| 1465 | (method url-fetch) |
| 1466 | (uri (string-append "https://www.ssisc.org/lis/dl/lis-" |
| 1467 | version ".zip")) |
| 1468 | (sha256 |
| 1469 | (base32 "0nh2593xkcdv1c3gmj7i64ca393nn0ngqfl522yiwbidh9dvd1nl")))) |
| 1470 | (build-system gnu-build-system) |
| 1471 | (arguments |
| 1472 | (list |
| 1473 | #:configure-flags #~(list "--enable-fortran" |
| 1474 | "--enable-f90" |
| 1475 | "--enable-openmp" |
| 1476 | "--enable-complex" |
| 1477 | "--disable-sse2" ;; XXX: tuning |
| 1478 | "--enable-shared") |
| 1479 | #:phases |
| 1480 | #~(modify-phases %standard-phases |
| 1481 | (add-after 'install 'install-doc |
| 1482 | (lambda _ |
| 1483 | (let* ((share (string-append #$output "/share")) |
| 1484 | (docdir (string-append share "/doc/lis-" #$version)) |
| 1485 | (mandir (string-append share "/man"))) |
| 1486 | (copy-recursively "doc/man" mandir) |
| 1487 | ;; TODO: Build the manuals ourselves |
| 1488 | (install-file "doc/lis-ug-en.pdf" docdir) |
| 1489 | (install-file "doc/lis-ug-ja.pdf" docdir))))))) |
| 1490 | (inputs (list openmpi)) |
| 1491 | (native-inputs (list gfortran unzip)) |
| 1492 | (home-page "https://www.ssisc.org/lis") |
| 1493 | (synopsis "Solve discretized linear equations and eigenvalue problems") |
| 1494 | (description "Lis is a parallel software library for solving discretized |
| 1495 | linear equations and eigenvalue problems that arise in the numerical solution |
| 1496 | of partial differential equations using iterative methods.") |
| 1497 | (license license:bsd-3))) |
| 1498 | |
| 1499 | (define-public clapack |
| 1500 | (package |
| 1501 | (name "clapack") |
| 1502 | (version "3.2.1") |
| 1503 | (source |
| 1504 | (origin |
| 1505 | (method url-fetch) |
| 1506 | (uri (string-append "http://www.netlib.org/clapack/clapack-" |
| 1507 | version "-CMAKE.tgz")) |
| 1508 | (sha256 |
| 1509 | (base32 |
| 1510 | "0nnap9q1mv14g57dl3vkvxrdr10k5w7zzyxs6rgxhia8q8mphgqb")))) |
| 1511 | (build-system cmake-build-system) |
| 1512 | (arguments |
| 1513 | (list |
| 1514 | #:configure-flags |
| 1515 | #~(list (string-append "-DCMAKE_C_FLAGS=-fcommon -O2" |
| 1516 | " -Wno-error=implicit-function-declaration")) |
| 1517 | #:phases |
| 1518 | #~(modify-phases %standard-phases |
| 1519 | ;; These tests use a lot of stack variables and segfault without |
| 1520 | ;; lifting resource limits. |
| 1521 | (add-after 'unpack 'disable-broken-tests |
| 1522 | (lambda _ |
| 1523 | (substitute* "TESTING/CMakeLists.txt" |
| 1524 | (("add_lapack_test.* xeigtstz\\)") "")))) |
| 1525 | (replace 'install |
| 1526 | (lambda _ |
| 1527 | (let ((libdir (string-append #$output "/lib")) |
| 1528 | (f2cinc (string-append #$output "/include/libf2c"))) |
| 1529 | (mkdir-p f2cinc) |
| 1530 | (display (getcwd)) |
| 1531 | (for-each (lambda (file) |
| 1532 | (install-file file libdir)) |
| 1533 | '("SRC/liblapack.a" |
| 1534 | "F2CLIBS/libf2c/libf2c.a" |
| 1535 | "TESTING/MATGEN/libtmglib.a" |
| 1536 | "BLAS/SRC/libblas.a")) |
| 1537 | (for-each (lambda (file) |
| 1538 | (install-file file f2cinc)) |
| 1539 | (cons "F2CLIBS/libf2c/arith.h" |
| 1540 | (find-files (string-append |
| 1541 | "../clapack-" |
| 1542 | #$version "-CMAKE/F2CLIBS/libf2c") |
| 1543 | "\\.h$"))) |
| 1544 | (copy-recursively (string-append "../clapack-" |
| 1545 | #$version "-CMAKE/INCLUDE") |
| 1546 | (string-append #$output "/include")))))))) |
| 1547 | (home-page "https://www.netlib.org/clapack/") |
| 1548 | (synopsis "Numerical linear algebra library for C") |
| 1549 | (description |
| 1550 | "The CLAPACK library was built using a Fortran to C conversion utility |
| 1551 | called f2c. The entire Fortran 77 LAPACK library is run through f2c to obtain |
| 1552 | C code, and then modified to improve readability. CLAPACK's goal is to |
| 1553 | provide LAPACK for someone who does not have access to a Fortran compiler.") |
| 1554 | (license (license:non-copyleft "file://LICENSE" |
| 1555 | "See LICENSE in the distribution.")))) |
| 1556 | |
| 1557 | (define-public scalapack |
| 1558 | (package |
| 1559 | (name "scalapack") |
| 1560 | (version "2.2.2") |
| 1561 | (source |
| 1562 | (origin |
| 1563 | (method git-fetch) |
| 1564 | (uri (git-reference |
| 1565 | (url "https://github.com/Reference-ScaLAPACK/scalapack") |
| 1566 | (commit (string-append "v" version)))) |
| 1567 | (file-name (git-file-name name version)) |
| 1568 | (sha256 |
| 1569 | (base32 |
| 1570 | "0abs4j9iknd3qiyaj06gh00iyki71c2lzpmyv21ncv7f7vy1ccr8")))) |
| 1571 | (build-system cmake-build-system) |
| 1572 | (inputs |
| 1573 | `(("mpi" ,openmpi) |
| 1574 | ("fortran" ,gfortran) |
| 1575 | ("lapack" ,openblas))) ;for testing only |
| 1576 | (arguments |
| 1577 | `(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES") |
| 1578 | #:phases (modify-phases %standard-phases |
| 1579 | (add-before 'check 'mpi-setup |
| 1580 | ,%openmpi-setup) |
| 1581 | (add-after 'unpack 'skip-faulty-tests |
| 1582 | (lambda _ |
| 1583 | ;; FIXME: Skip two tests that fail to complete. See |
| 1584 | ;; <https://github.com/amd/scalapack/commit/d3b6248b26f615b118ff4d72a00b3028f59a47f6>. |
| 1585 | (substitute* "TESTING/CMakeLists.txt" |
| 1586 | (("^add_test\\(x[cz]heevr.*" all) |
| 1587 | (string-append "# " all "\n"))))) |
| 1588 | (add-before 'configure 'fix-gcc14-errors |
| 1589 | (lambda _ |
| 1590 | (setenv "CFLAGS" |
| 1591 | (string-append |
| 1592 | "-g -O2 -DNDEBUG" |
| 1593 | " -Wno-error=implicit-function-declaration"))))))) |
| 1594 | (home-page "https://www.netlib.org/scalapack/") |
| 1595 | (synopsis "Library for scalable numerical linear algebra") |
| 1596 | (description |
| 1597 | "ScaLAPACK is a Fortran 90 library of high-performance linear algebra |
| 1598 | routines on parallel distributed memory machines. ScaLAPACK solves dense and |
| 1599 | banded linear systems, least squares problems, eigenvalue problems, and |
| 1600 | singular value problems.") |
| 1601 | (license (license:non-copyleft "file://LICENSE" |
| 1602 | "See LICENSE in the distribution.")))) |
| 1603 | |
| 1604 | (define-public feedgnuplot |
| 1605 | (package |
| 1606 | (name "feedgnuplot") |
| 1607 | (version "1.60") |
| 1608 | (home-page "https://github.com/dkogan/feedgnuplot") |
| 1609 | (source (origin |
| 1610 | (method git-fetch) |
| 1611 | (uri (git-reference |
| 1612 | (url home-page) |
| 1613 | (commit (string-append "v" version)))) |
| 1614 | (file-name (git-file-name name version)) |
| 1615 | (sha256 |
| 1616 | (base32 |
| 1617 | "0403hwlian2s431m36qdzcczhvfjvh7128m64hmmwbbrgh0n7md7")))) |
| 1618 | (build-system perl-build-system) |
| 1619 | (arguments |
| 1620 | `(#:phases |
| 1621 | (modify-phases %standard-phases |
| 1622 | (add-before 'check 'adjust-tests |
| 1623 | (lambda _ |
| 1624 | (substitute* "t/plots.t" |
| 1625 | ;; XXX: The vnlog tests uses 'echo' with escaped strings, |
| 1626 | ;; but does not enable escape interpretation. |
| 1627 | (("echo -n ") |
| 1628 | "echo -ne ")))) |
| 1629 | (add-after 'install 'install-documentation |
| 1630 | (lambda* (#:key outputs #:allow-other-keys) |
| 1631 | (let* ((out (assoc-ref outputs "out")) |
| 1632 | (doc (string-append out "/share/doc/feedgnuplot"))) |
| 1633 | (mkdir-p doc) |
| 1634 | (invoke "pod2html" "--title=feedgnuplot" "bin/feedgnuplot" |
| 1635 | "--outfile" (string-append doc "/feedgnuplot.html"))))) |
| 1636 | (add-after 'install 'wrap |
| 1637 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1638 | (let* ((out (assoc-ref outputs "out")) |
| 1639 | (gnuplot (search-input-file inputs "/bin/gnuplot")) |
| 1640 | ;; XXX: We need List::MoreUtils as well as its supporting |
| 1641 | ;; (propagated) modules; for now just refer to labels. |
| 1642 | (modules '("perl-list-moreutils" "perl-exporter-tiny")) |
| 1643 | (PERL5LIB (string-join |
| 1644 | (map (lambda (input) |
| 1645 | (string-append (assoc-ref inputs input) |
| 1646 | "/lib/perl5/site_perl")) |
| 1647 | modules) |
| 1648 | ":"))) |
| 1649 | (wrap-program (string-append out "/bin/feedgnuplot") |
| 1650 | `("PERL5LIB" ":" suffix (,PERL5LIB)) |
| 1651 | `("PATH" ":" suffix (,(dirname gnuplot)))))))))) |
| 1652 | (inputs |
| 1653 | (list bash-minimal gnuplot perl-list-moreutils vnlog)) |
| 1654 | (native-inputs |
| 1655 | ;; For tests. |
| 1656 | (list perl-ipc-run perl-string-shellquote)) |
| 1657 | (synopsis "Pipe-oriented plotting tool") |
| 1658 | (description |
| 1659 | "@command{feedgnuplot} is a tool to plot realtime and stored data |
| 1660 | from the command line, using @command{gnuplot}. It can read data from |
| 1661 | a pipe or file, make a variety of transformations, and render the result |
| 1662 | in the terminal or with an external viewer.") |
| 1663 | (license license:gpl1+))) ;any version |
| 1664 | |
| 1665 | (define-public giza |
| 1666 | (package |
| 1667 | (name "giza") |
| 1668 | (version "1.5.0") |
| 1669 | (source |
| 1670 | (origin |
| 1671 | (method git-fetch) |
| 1672 | (uri (git-reference |
| 1673 | (url "https://github.com/danieljprice/giza") |
| 1674 | (commit (string-append "v" version)))) |
| 1675 | (file-name (git-file-name name version)) |
| 1676 | (sha256 |
| 1677 | (base32 "1qair5j6rq17hwvyxl6k2n4hkvgjw5wczmfzn7qh7kcv3qpg9p5l")))) |
| 1678 | (build-system gnu-build-system) |
| 1679 | (arguments |
| 1680 | (list |
| 1681 | #:phases |
| 1682 | #~(modify-phases %standard-phases |
| 1683 | (add-before 'check 'start-xorg-server |
| 1684 | (lambda* (#:key inputs #:allow-other-keys) |
| 1685 | (system "Xvfb :99 -screen 0 1920x1080x24 &") |
| 1686 | (setenv "DISPLAY" ":99"))) |
| 1687 | ;; Tests are interactive, see |
| 1688 | ;; <https://github.com/danieljprice/giza/blob/v1.5.0/.github/workflows/build.yml#L52>. |
| 1689 | (replace 'check |
| 1690 | (lambda* (#:key tests? #:allow-other-keys) |
| 1691 | (when tests? |
| 1692 | (invoke "sh" "-c" "yes '' | make check"))))))) |
| 1693 | (native-inputs |
| 1694 | (list perl |
| 1695 | pkg-config |
| 1696 | xorg-server-for-tests)) |
| 1697 | (inputs |
| 1698 | (list cairo |
| 1699 | freetype |
| 1700 | gfortran)) |
| 1701 | (home-page "https://danieljprice.github.io/giza/") |
| 1702 | (synopsis "Scientific plotting library for C/Fortran") |
| 1703 | (description |
| 1704 | "Giza is a lightweight scientific plotting library built on top of |
| 1705 | @code{cairo} that provides uniform output to multiple devices.") |
| 1706 | (license license:gpl2+))) |
| 1707 | |
| 1708 | (define-public gnuplot |
| 1709 | (package |
| 1710 | (name "gnuplot") |
| 1711 | (version "6.0.1") |
| 1712 | (source (origin |
| 1713 | (method url-fetch) |
| 1714 | (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/" |
| 1715 | version "/gnuplot-" |
| 1716 | version ".tar.gz")) |
| 1717 | (sha256 |
| 1718 | (base32 "16ipf7m2c2v1cldp3kwxbjj6db6bzy0rkrpp4kzhh61a3866cnp8")))) |
| 1719 | (build-system gnu-build-system) |
| 1720 | (native-inputs |
| 1721 | (list pkg-config (texlive-local-tree))) |
| 1722 | (inputs |
| 1723 | (list cairo gd libcerf lua pango readline)) |
| 1724 | (arguments |
| 1725 | (list #:configure-flags |
| 1726 | #~(list "--with-qt=no" |
| 1727 | (string-append "--with-texdir=" #$output |
| 1728 | "/texmf-local/tex/latex/gnuplot")) |
| 1729 | ;; Plot on a dumb terminal during tests. |
| 1730 | #:make-flags #~'("GNUTERM=dumb"))) |
| 1731 | (home-page "http://www.gnuplot.info") |
| 1732 | (synopsis "Command-line driven graphing utility") |
| 1733 | (description "Gnuplot is a portable command-line driven graphing |
| 1734 | utility. It was originally created to allow scientists and students to |
| 1735 | visualize mathematical functions and data interactively, but has grown to |
| 1736 | support many non-interactive uses such as web scripting. It is also used as a |
| 1737 | plotting engine by third-party applications like Octave.") |
| 1738 | ;; X11 Style with the additional restriction that derived works may only be |
| 1739 | ;; distributed as patches to the original. |
| 1740 | (license (license:fsf-free |
| 1741 | "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright")))) |
| 1742 | |
| 1743 | (define-public hmat |
| 1744 | (package |
| 1745 | (name "hmat") |
| 1746 | (version "1.10.0") |
| 1747 | (source (origin |
| 1748 | (method git-fetch) |
| 1749 | (uri (git-reference |
| 1750 | (url "https://github.com/jeromerobert/hmat-oss") |
| 1751 | (commit version))) |
| 1752 | (file-name (git-file-name name version)) |
| 1753 | (sha256 |
| 1754 | (base32 |
| 1755 | "1cdaq5j2gknar7hcycll1ra9f0pqvri1bqsj0nf21kc4j2ynaw8s")))) |
| 1756 | (build-system cmake-build-system) |
| 1757 | (arguments |
| 1758 | ;; Examples are the tests. |
| 1759 | (list #:configure-flags #~(list "-DBUILD_EXAMPLES=ON"))) |
| 1760 | (inputs (list openblas)) |
| 1761 | (home-page "https://github.com/jeromerobert/hmat-oss") |
| 1762 | (synopsis "Hierarchical matrix library") |
| 1763 | (description "@code{hmat-oss} is hierarchical matrix library written in |
| 1764 | C++ with a C API. It contains a LU and LLt solver, and a few other things.") |
| 1765 | (license license:gpl2+))) |
| 1766 | |
| 1767 | (define-public cminpack |
| 1768 | (package |
| 1769 | (name "cminpack") |
| 1770 | (version "1.3.13") |
| 1771 | (source (origin |
| 1772 | (method git-fetch) |
| 1773 | (uri (git-reference |
| 1774 | (url "https://github.com/devernay/cminpack") |
| 1775 | (commit (string-append "v" version)))) |
| 1776 | (file-name (git-file-name name version)) |
| 1777 | (sha256 |
| 1778 | (base32 |
| 1779 | "0apnph1j9hbr6vx3idcc6lhm19gwmqw4xi435g7dwnj9rgnyydlx")))) |
| 1780 | (build-system cmake-build-system) |
| 1781 | (arguments |
| 1782 | (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"))) |
| 1783 | (home-page "https://github.com/devernay/cminpack") |
| 1784 | (synopsis "C/C++ rewrite of the MINPACK software") |
| 1785 | (description |
| 1786 | "This is a C version of the minpack minimization package. It has been |
| 1787 | derived from the fortran code using f2c and some limited manual editing. |
| 1788 | Extern C linkage permits the package routines to be called from C++.") |
| 1789 | (license (license:non-copyleft ; original minpack license |
| 1790 | "https://github.com/certik/minpack/blob/master/LICENSE")))) |
| 1791 | |
| 1792 | (define-public bonmin |
| 1793 | (package |
| 1794 | (name "bonmin") |
| 1795 | (version "1.8.9") |
| 1796 | (source (origin |
| 1797 | (method git-fetch) |
| 1798 | (uri (git-reference |
| 1799 | (url "https://github.com/coin-or/Bonmin") |
| 1800 | (commit (string-append "releases/" version)))) |
| 1801 | (file-name (git-file-name name version)) |
| 1802 | (sha256 |
| 1803 | (base32 |
| 1804 | "153kj4wx386609g21hw3cv5yxps62qqrc64zwb9ryd2xad1w1a4y")))) |
| 1805 | (build-system gnu-build-system) |
| 1806 | (native-inputs (list gfortran pkg-config)) |
| 1807 | (inputs (list cbc ipopt openblas)) |
| 1808 | (home-page "https://coin-or.github.io/Bonmin/") |
| 1809 | (synopsis "Basic Open-source Nonlinear Mixed INteger programming") |
| 1810 | (description "Bonmin is a code for solving general MINLP (Mixed Integer |
| 1811 | NonLinear Programming) problems. It builds on top of Cbc and Ipopt.") |
| 1812 | (license license:epl1.0))) |
| 1813 | |
| 1814 | (define-public pagmo |
| 1815 | (package |
| 1816 | (name "pagmo") |
| 1817 | (version "2.19.1") |
| 1818 | (source (origin |
| 1819 | (method git-fetch) |
| 1820 | (uri (git-reference |
| 1821 | (url "https://github.com/esa/pagmo2") |
| 1822 | (commit (string-append "v" version)))) |
| 1823 | (file-name (git-file-name name version)) |
| 1824 | (sha256 |
| 1825 | (base32 |
| 1826 | "1xx7f06idfhkh4qijh5rcxnldyac2pqb29j09w7k2b2h91xkgnl9")))) |
| 1827 | (build-system cmake-build-system) |
| 1828 | (arguments |
| 1829 | (list #:configure-flags #~(list "-DPAGMO_BUILD_TESTS=ON" |
| 1830 | "-DPAGMO_WITH_EIGEN3=ON"))) |
| 1831 | ;; Eigen is optional, enables some extra features. |
| 1832 | (inputs (list boost eigen onetbb)) |
| 1833 | (home-page "https://esa.github.io/pagmo2/") |
| 1834 | (synopsis |
| 1835 | "Platform to perform parallel computations of optimisation tasks") |
| 1836 | (description "@code{pagmo} is a C++ scientific library for massively |
| 1837 | parallel optimization. It is built around the idea of providing a unified |
| 1838 | interface to optimization algorithms and to optimization problems and to make |
| 1839 | their deployment in massively parallel environments easy.") |
| 1840 | ;; Pagmo only supports 64-bit x86, ARM and PowerPC: |
| 1841 | ;; https://esa.github.io/pagmo2/install.html |
| 1842 | (supported-systems '("x86_64-linux" "aarch64-linux" "armhf-linux" |
| 1843 | "powerpc64le-linux")) |
| 1844 | ;; Dual licensed, user choice. |
| 1845 | (license (list license:lgpl3+ license:gpl3+)))) |
| 1846 | |
| 1847 | (define-public arccon |
| 1848 | (package |
| 1849 | (name "arccon") |
| 1850 | (version "1.2.0") |
| 1851 | (source |
| 1852 | (origin |
| 1853 | (method git-fetch) |
| 1854 | (uri (git-reference |
| 1855 | (url "https://github.com/arcaneframework/framework") |
| 1856 | (commit (string-append "arccon-v" version)))) |
| 1857 | (file-name (git-file-name name version)) |
| 1858 | (sha256 |
| 1859 | (base32 "0zvj863plifp4rs3wzq5z18vh7z3bh7zy90cvn12b6n0jbpfdpg3")))) |
| 1860 | (build-system cmake-build-system) |
| 1861 | (arguments |
| 1862 | (list |
| 1863 | #:tests? #f |
| 1864 | #:phases |
| 1865 | #~(modify-phases %standard-phases |
| 1866 | (add-before 'configure 'chdir-arccon |
| 1867 | (lambda _ |
| 1868 | (chdir "arccon")))))) |
| 1869 | (home-page "https://github.com/arcaneframework/framework") |
| 1870 | (synopsis "Arcane Framework's CMake build libraries") |
| 1871 | (description "Arccon is part of the Arcane framework, providing core |
| 1872 | functionality for the Arcane development platform.") |
| 1873 | (license license:asl2.0))) |
| 1874 | |
| 1875 | (define-public arccore |
| 1876 | (package |
| 1877 | (name "arccore") |
| 1878 | (version "2.5.0.0") |
| 1879 | (source |
| 1880 | (origin |
| 1881 | (method git-fetch) |
| 1882 | (uri (git-reference |
| 1883 | (url "https://github.com/arcaneframework/framework") |
| 1884 | (commit (string-append "arccore-v" version)))) |
| 1885 | (file-name (git-file-name name version)) |
| 1886 | (sha256 |
| 1887 | (base32 "0cxqwhhs3zafiqnrjs28y60xg14jifg2xdycpr7l2291hyh6r7ra")))) |
| 1888 | (build-system cmake-build-system) |
| 1889 | (native-inputs (list arccon pkg-config googletest)) |
| 1890 | (inputs (list glib openmpi)) |
| 1891 | (arguments |
| 1892 | (list |
| 1893 | #:configure-flags |
| 1894 | #~(list "-DBUILD_SHARED_LIBS=TRUE" "-DARCCORE_USE_MPI=TRUE" |
| 1895 | "-DARCCORE_WANT_TEST=TRUE") |
| 1896 | #:phases |
| 1897 | #~(modify-phases %standard-phases |
| 1898 | (add-before 'configure 'chdir-arccore |
| 1899 | (lambda _ |
| 1900 | (chdir "arccore")))))) |
| 1901 | (home-page "https://github.com/arcaneframework/framework") |
| 1902 | (synopsis "Arcane Framework's base functionalities for simulation code") |
| 1903 | (description |
| 1904 | "Arcane is a development environment for parallel numerical calculation |
| 1905 | code. It supports the architectural aspects of a calculation code, such as data |
| 1906 | structures for meshing and parallelism, as well as more environment-related aspects |
| 1907 | such as dataset configuration.") |
| 1908 | (license license:asl2.0))) |
| 1909 | |
| 1910 | (define-public hdf5-1.8 |
| 1911 | (package |
| 1912 | (name "hdf5") |
| 1913 | (version "1.8.23") |
| 1914 | (source |
| 1915 | (origin |
| 1916 | (method url-fetch) |
| 1917 | (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" |
| 1918 | "hdf5-" (version-major+minor version) |
| 1919 | "/hdf5-" version "/src/hdf5-" |
| 1920 | version ".tar.bz2") |
| 1921 | (string-append "https://support.hdfgroup.org/ftp/HDF5/" |
| 1922 | "current" |
| 1923 | (match (string-split version #\.) |
| 1924 | ((major minor _ ...) |
| 1925 | (string-append major minor))) |
| 1926 | "/src/hdf5-" version ".tar.bz2"))) |
| 1927 | (sha256 |
| 1928 | (base32 "0km65mr6dgk4ia2dqr1b9dzw9qg15j5z35ymbys9cnny51z1zb39")) |
| 1929 | (patches (search-patches "hdf5-config-date.patch")))) |
| 1930 | (build-system gnu-build-system) |
| 1931 | (inputs |
| 1932 | (list zlib)) |
| 1933 | (native-inputs |
| 1934 | (list gfortran perl)) ;part of the test machinery needs Perl |
| 1935 | (outputs '("out" ; core library |
| 1936 | "fortran")) ; fortran interface |
| 1937 | (arguments |
| 1938 | `(;; Some of the users, notably Flann, need the C++ interface. |
| 1939 | #:configure-flags '("--enable-cxx" |
| 1940 | "--enable-fortran" |
| 1941 | "--enable-fortran2003" |
| 1942 | |
| 1943 | ;; Build a thread-safe library. Unfortunately, |
| 1944 | ;; 'configure' invites you to either turn off C++, |
| 1945 | ;; Fortran, and the high-level interface (HL), or |
| 1946 | ;; to pass '--enable-unsupported'. Debian |
| 1947 | ;; packagers chose to pass '--enable-unsupported' |
| 1948 | ;; and we follow their lead here. |
| 1949 | "--enable-threadsafe" |
| 1950 | "--with-pthread" |
| 1951 | "--enable-unsupported") |
| 1952 | ;; Use -fPIC to allow the R bindings to link with the static libraries. |
| 1953 | ;; Declare warnings as non-errors to fix build with gcc@14 |
| 1954 | #:make-flags |
| 1955 | (list "CFLAGS=-g -O2 -fPIC -Wno-error=incompatible-pointer-types" |
| 1956 | "CXXFLAGS=-g -O2 -fPIC") |
| 1957 | #:phases |
| 1958 | (modify-phases %standard-phases |
| 1959 | (add-before 'configure 'patch-configure |
| 1960 | (lambda* (#:key outputs #:allow-other-keys) |
| 1961 | (substitute* "configure" |
| 1962 | (("/bin/mv") "mv")) |
| 1963 | (substitute* "fortran/src/Makefile.in" |
| 1964 | (("libhdf5_fortran_la_LDFLAGS =") |
| 1965 | (string-append "libhdf5_fortran_la_LDFLAGS = -Wl,-rpath=" |
| 1966 | (assoc-ref outputs "fortran") "/lib"))) |
| 1967 | (substitute* "hl/fortran/src/Makefile.in" |
| 1968 | (("libhdf5hl_fortran_la_LDFLAGS =") |
| 1969 | (string-append "libhdf5hl_fortran_la_LDFLAGS = -Wl,-rpath=" |
| 1970 | (assoc-ref outputs "fortran") "/lib"))))) |
| 1971 | (add-after 'configure 'patch-settings |
| 1972 | (lambda _ |
| 1973 | ;; libhdf5.settings contains the full path of the |
| 1974 | ;; compilers used, and its contents are included in |
| 1975 | ;; libhdf5.so. We truncate the hashes to avoid |
| 1976 | ;; unnecessary store references to those compilers: |
| 1977 | (substitute* "src/libhdf5.settings" |
| 1978 | (("(/gnu/store/)([a-zA-Z0-9]*)" all prefix hash) |
| 1979 | (string-append prefix (string-take hash 10) "...")) |
| 1980 | ;; Don't record the build-time kernel version to make the |
| 1981 | ;; settings file reproducible. |
| 1982 | (("Uname information:.*") |
| 1983 | "Uname information: Linux\n")))) |
| 1984 | (add-after 'install 'patch-references |
| 1985 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1986 | (let ((bin (string-append (assoc-ref outputs "out") "/bin")) |
| 1987 | (zlib (assoc-ref inputs "zlib"))) |
| 1988 | (substitute* (find-files bin "h5p?cc") |
| 1989 | (("-lz" lib) |
| 1990 | (string-append "-L" zlib "/lib " lib)))))) |
| 1991 | (add-after 'install 'split |
| 1992 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1993 | ;; Move all fortran-related files |
| 1994 | (let* ((out (assoc-ref outputs "out")) |
| 1995 | (bin (string-append out "/bin")) |
| 1996 | (lib (string-append out "/lib")) |
| 1997 | (inc (string-append out "/include")) |
| 1998 | (ex (string-append out "/share/hdf5_examples/fortran")) |
| 1999 | (fort (assoc-ref outputs "fortran")) |
| 2000 | (fbin (string-append fort "/bin")) |
| 2001 | (flib (string-append fort "/lib")) |
| 2002 | (finc (string-append fort "/include")) |
| 2003 | (fex (string-append fort "/share/hdf5_examples/fortran"))) |
| 2004 | (mkdir-p fbin) |
| 2005 | (mkdir-p flib) |
| 2006 | (mkdir-p finc) |
| 2007 | (mkdir-p fex) |
| 2008 | ;; Note: When built with --enable-parallel, the 'h5fc' file |
| 2009 | ;; doesn't exist, hence this condition. |
| 2010 | (when (file-exists? (string-append bin "/h5fc")) |
| 2011 | (rename-file (string-append bin "/h5fc") |
| 2012 | (string-append fbin "/h5fc"))) |
| 2013 | (for-each (lambda (file) |
| 2014 | (rename-file file |
| 2015 | (string-append flib "/" (basename file)))) |
| 2016 | (find-files lib ".*fortran.*")) |
| 2017 | (for-each (lambda (file) |
| 2018 | (rename-file file |
| 2019 | (string-append finc "/" (basename file)))) |
| 2020 | (find-files inc ".*mod")) |
| 2021 | (for-each (lambda (file) |
| 2022 | (rename-file file |
| 2023 | (string-append fex "/" (basename file)))) |
| 2024 | (find-files ex ".*")) |
| 2025 | (delete-file-recursively ex))))))) |
| 2026 | (home-page "https://www.hdfgroup.org") |
| 2027 | (synopsis "Management suite for extremely large and complex data") |
| 2028 | (description "HDF5 is a suite that makes possible the management of |
| 2029 | extremely large and complex data collections.") |
| 2030 | (license (license:x11-style |
| 2031 | "https://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING")))) |
| 2032 | |
| 2033 | (define-public hdf5-1.10 |
| 2034 | (package |
| 2035 | (inherit hdf5-1.8) |
| 2036 | (version "1.10.9") |
| 2037 | (source |
| 2038 | (origin |
| 2039 | (method url-fetch) |
| 2040 | (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" |
| 2041 | "hdf5-" (version-major+minor version) |
| 2042 | "/hdf5-" version "/src/hdf5-" |
| 2043 | version ".tar.bz2") |
| 2044 | (string-append "https://support.hdfgroup.org/ftp/HDF5/" |
| 2045 | "current" |
| 2046 | (apply string-append |
| 2047 | (take (string-split version #\.) 2)) |
| 2048 | "/src/hdf5-" version ".tar.bz2"))) |
| 2049 | (sha256 |
| 2050 | (base32 "14gih7kmjx4h3lc7pg4fwcl28hf1qqkf2x7rljpxqvzkjrqbxi00")) |
| 2051 | (patches (search-patches "hdf5-config-date.patch")))))) |
| 2052 | |
| 2053 | (define-public hdf5 |
| 2054 | (package |
| 2055 | (name "hdf5") |
| 2056 | (version "1.14.6") |
| 2057 | (outputs '("out" "doc")) |
| 2058 | (source |
| 2059 | (origin |
| 2060 | (method git-fetch) |
| 2061 | (uri (git-reference |
| 2062 | (url "https://github.com/HDFGroup/hdf5") |
| 2063 | (commit (string-append "hdf5_" version)))) |
| 2064 | (file-name (git-file-name name version)) |
| 2065 | (sha256 |
| 2066 | (base32 |
| 2067 | "1f7yv0xra465c3qy8c79fzddib653wzj5dsakb0bs02nwp3xm54q")) |
| 2068 | (modules '((guix build utils))) |
| 2069 | (snippet |
| 2070 | '(for-each |
| 2071 | delete-file |
| 2072 | (append |
| 2073 | (find-files "." "Makefile\\.in$") |
| 2074 | (find-files "java/lib" "\\.jar$") |
| 2075 | (list "aclocal.m4" |
| 2076 | "bin/compile" |
| 2077 | "bin/config.guess" |
| 2078 | "bin/config.sub" |
| 2079 | "bin/depcomp" |
| 2080 | "bin/install-sh" |
| 2081 | "bin/ltmain.sh" |
| 2082 | "bin/missing" |
| 2083 | "bin/test-driver" |
| 2084 | "configure" |
| 2085 | "HDF5Examples/aclocal.m4" |
| 2086 | "HDF5Examples/compile" |
| 2087 | "HDF5Examples/configure" |
| 2088 | "HDF5Examples/depcomp" |
| 2089 | "HDF5Examples/missing" |
| 2090 | "HDF5Examples/test-driver" |
| 2091 | "hl/src/H5LTanalyze.c" |
| 2092 | "hl/src/H5LTparse.c" |
| 2093 | "hl/src/H5LTparse.h" |
| 2094 | "hl/tools/gif2h5/testfiles/ex_image2.h5" |
| 2095 | "hl/tools/gif2h5/testfiles/h52giftst.h5" |
| 2096 | "m4/ax_prog_doxygen.m4" |
| 2097 | "m4/libtool.m4" |
| 2098 | "m4/lt~obsolete.m4" |
| 2099 | "m4/ltoptions.m4" |
| 2100 | "m4/ltsugar.m4" |
| 2101 | "m4/ltversion.m4" |
| 2102 | "src/H5config.h.in" |
| 2103 | "src/H5Edefin.h" |
| 2104 | "src/H5Einit.h" |
| 2105 | "src/H5Epubgen.h" |
| 2106 | "src/H5Eterm.h" |
| 2107 | "src/H5overflow.h" |
| 2108 | "src/H5version.h")))))) |
| 2109 | (build-system cmake-build-system) |
| 2110 | (arguments |
| 2111 | (list |
| 2112 | ;; Some of the users, notably Flann, need the C++ interface. |
| 2113 | #:configure-flags |
| 2114 | #~(list |
| 2115 | "-DBUILD_STATIC_LIBS=OFF" |
| 2116 | "-DHDF5_INSTALL_CMAKE_DIR=lib/cmake" |
| 2117 | "-DHDF5_BUILD_CPP_LIB=ON" |
| 2118 | "-DHDF5_BUILD_FORTRAN=ON" |
| 2119 | ;; Build a thread-safe library. Unfortunately, CMakeLists.txt |
| 2120 | ;; invites you to either turn off C++, Fortran, and the high-level |
| 2121 | ;; interface (HL), or to enable 'ALLOW_UNSUPPORTED'. Debian |
| 2122 | ;; packagers chose to pass '--enable-unsupported' to the 'configure' |
| 2123 | ;; script and we follow their lead here. |
| 2124 | "-DHDF5_ENABLE_THREADSAFE=ON" |
| 2125 | "-DALLOW_UNSUPPORTED=ON" |
| 2126 | "-DHDF5_BUILD_DOC=ON") |
| 2127 | #:phases |
| 2128 | #~(modify-phases %standard-phases |
| 2129 | ;; XXX: src/H5private.h includes <fenv.h> and fails to find the |
| 2130 | ;; stdlib types when the gfortran header is used. Remove gfortran |
| 2131 | ;; from CPLUS_INCLUDE_PATH as a workaround. |
| 2132 | (add-after 'set-paths 'hide-gfortran |
| 2133 | (lambda _ |
| 2134 | (let ((gfortran #$(this-package-native-input "gfortran"))) |
| 2135 | (setenv "CPLUS_INCLUDE_PATH" |
| 2136 | (string-join |
| 2137 | (delete (string-append gfortran "/include/c++") |
| 2138 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) |
| 2139 | ":"))))) |
| 2140 | (add-after 'unpack 'make-gen-deterministic |
| 2141 | (lambda _ |
| 2142 | (substitute* "bin/make_err" |
| 2143 | (("keys %major" all) |
| 2144 | (string-append "sort " all)) |
| 2145 | (("while.*each \\(%section\\).*") |
| 2146 | (string-append |
| 2147 | "foreach $sect_name (sort keys %section) {\n" |
| 2148 | " $sect_desc = $section{$sect_name};\n"))))) |
| 2149 | (add-after 'unpack 'generate-flexbison |
| 2150 | (lambda _ |
| 2151 | (invoke "bash" "bin/genparser" "hl/src"))) |
| 2152 | (add-after 'unpack 'patch-trace-shebang |
| 2153 | (lambda _ |
| 2154 | (for-each patch-shebang |
| 2155 | (find-files "bin" (lambda (file stat) |
| 2156 | (executable-file? file)))))) |
| 2157 | ;; This is a known issue on i686, see |
| 2158 | ;; https://github.com/HDFGroup/hdf5/issues/4926 |
| 2159 | (add-after 'unpack 'fix-fortran-i686-test |
| 2160 | (lambda _ |
| 2161 | (substitute* "fortran/test/tH5R.F90" |
| 2162 | (((string-append |
| 2163 | "CALL h5rget_obj_name_f\\(C_LOC\\(ref_ptr\\(2\\)\\)," |
| 2164 | " \"\", error, name_len=buf_size \\)")) |
| 2165 | (string-append |
| 2166 | "CALL h5rget_obj_name_f(C_LOC(ref_ptr(2))," |
| 2167 | " \"xxxxxxxxxxxxxx\", error, name_len=buf_size)"))))) |
| 2168 | (add-after 'unpack 'generate-headers |
| 2169 | (lambda _ |
| 2170 | (invoke "perl" "bin/make_err" "src/H5err.txt") |
| 2171 | (invoke "perl" "bin/make_vers" "src/H5vers.txt") |
| 2172 | (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) |
| 2173 | ;; Remove references to GCC/GFortran/binutils in order to decrease |
| 2174 | ;; package size. |
| 2175 | (add-before 'generate-headers 'remove-referencess |
| 2176 | (lambda _ |
| 2177 | (substitute* '("src/libhdf5.settings.cmake.in" |
| 2178 | "src/H5build_settings.cmake.c.in") |
| 2179 | (("@CMAKE_AR@") "ar") |
| 2180 | (("@CMAKE_RANLIB@") "ranlib") |
| 2181 | (("@CMAKE_C_COMPILER@") "gcc") |
| 2182 | (("@CMAKE_CXX_COMPILER") "g++") |
| 2183 | (("@CMAKE_Fortran_COMPILER@") "gfortran")) |
| 2184 | (substitute* '("src/libhdf5.settings.autotools.in" |
| 2185 | "src/H5build_settings.autotools.c.in") |
| 2186 | (("@AR@") "ar") |
| 2187 | (("@RANLIB@") "ranlib") |
| 2188 | (("@CXX_VERSION@") "g++") |
| 2189 | (("@@CC_VERSION@") "gcc") |
| 2190 | (("@FC_VERSION@") "gfortran")))) |
| 2191 | (add-after 'install 'remove-gcc-references |
| 2192 | (lambda _ |
| 2193 | (substitute* (map (lambda (f) |
| 2194 | (string-append #$output "/" f)) |
| 2195 | '("bin/h5hlcc" |
| 2196 | "bin/h5hlc++" |
| 2197 | "bin/h5cc" |
| 2198 | "bin/h5c++")) |
| 2199 | (("/gnu/store/[a-z0-9]*-gcc-[0-9.]*/bin/") |
| 2200 | "")))) |
| 2201 | (add-after 'install 'remove-gfortran-references |
| 2202 | (lambda _ |
| 2203 | (substitute* (map (lambda (f) |
| 2204 | (string-append #$output "/" f)) |
| 2205 | '("bin/h5hlfc" |
| 2206 | "bin/h5fc")) |
| 2207 | (("/gnu/store/[a-z0-9]*-gfortran-[0-9.]*/bin/") |
| 2208 | "")))) |
| 2209 | (add-after 'install 'move-html-documentation |
| 2210 | (lambda _ |
| 2211 | (mkdir-p (string-append #$output:doc "/share")) |
| 2212 | (rename-file (string-append #$output "/share/html") |
| 2213 | (string-append #$output:doc "/share/html"))))))) |
| 2214 | (inputs (list libaec zlib)) |
| 2215 | (native-inputs |
| 2216 | (list bison |
| 2217 | doxygen |
| 2218 | flex |
| 2219 | gfortran |
| 2220 | graphviz |
| 2221 | ;; Needed to generate some headers and for tests |
| 2222 | perl |
| 2223 | which)) |
| 2224 | (home-page "https://www.hdfgroup.org") |
| 2225 | (synopsis "Management suite for extremely large and complex data") |
| 2226 | (description "HDF5 is a suite that makes possible the management of |
| 2227 | extremely large and complex data collections.") |
| 2228 | (license (license:x11-style |
| 2229 | "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) |
| 2230 | |
| 2231 | (define-public hdf5-java |
| 2232 | (package |
| 2233 | (name "hdf5-java") |
| 2234 | (version (package-version hdf5)) |
| 2235 | (source (package-source hdf5)) |
| 2236 | (build-system cmake-build-system) |
| 2237 | (arguments |
| 2238 | (list |
| 2239 | #:configure-flags |
| 2240 | #~(list "-DHDF5_BUILD_JAVA=ON" |
| 2241 | "-DHDF5_BUILD_TOOLS=OFF") |
| 2242 | #:modules |
| 2243 | '((guix build cmake-build-system) |
| 2244 | ((guix build ant-build-system) #:prefix ant:) |
| 2245 | (guix build utils)) |
| 2246 | #:imported-modules |
| 2247 | `((guix build ant-build-system) |
| 2248 | ,@%cmake-build-system-modules) |
| 2249 | #:phases |
| 2250 | #~(modify-phases %standard-phases |
| 2251 | (add-after 'unpack 'unbundle |
| 2252 | (lambda* (#:key inputs #:allow-other-keys) |
| 2253 | (let ((simple |
| 2254 | (search-input-file |
| 2255 | inputs "/lib/m2/org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar")) |
| 2256 | (api |
| 2257 | (search-input-file |
| 2258 | inputs "/lib/m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar")) |
| 2259 | (nop |
| 2260 | (search-input-file |
| 2261 | inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar")) |
| 2262 | (junit |
| 2263 | (search-input-file |
| 2264 | inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar")) |
| 2265 | (hamcrest |
| 2266 | (search-input-file |
| 2267 | inputs "/lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"))) |
| 2268 | (substitute* "CMakeLists.txt" |
| 2269 | (("(set *\\(HDF5_JAVA_LOGGING_JAR ).*" _ orig) |
| 2270 | (string-append orig api ")\n")) |
| 2271 | (("(set *\\(HDF5_JAVA_LOGGING_NOP_JAR ).*" _ orig) |
| 2272 | (string-append orig nop ")\n")) |
| 2273 | (("(set *\\(HDF5_JAVA_LOGGING_SIMPLE_JAR ).*" _ orig) |
| 2274 | (string-append orig simple ")\n"))) |
| 2275 | ;; Do not install copies of external libraries |
| 2276 | (substitute* "java/CMakeLists.txt" |
| 2277 | ((".*HDF5_JAVA_LOGGING.*_JAR.*") "")) |
| 2278 | (substitute* "java/test/CMakeLists.txt" |
| 2279 | (("\\$\\{HDF5_JAVA_LIB_DIR\\}/junit\\.jar") |
| 2280 | junit) |
| 2281 | (("\\$\\{HDF5_JAVA_LIB_DIR\\}/hamcrest-core\\.jar") |
| 2282 | hamcrest)) |
| 2283 | (substitute* '("java/test/junit.sh.in" |
| 2284 | "HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in" |
| 2285 | "HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in" |
| 2286 | "HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in" |
| 2287 | "HDF5Examples/JAVA/TUTR/runExample.sh.in") |
| 2288 | (("^LIST_JAR_TESTFILES=\"" m) |
| 2289 | (string-append m hamcrest "\n" |
| 2290 | junit "\n" |
| 2291 | api "\n" |
| 2292 | simple "\n")) |
| 2293 | (("^\\$HDFLIB_HOME/.*") "") |
| 2294 | (("\"\\$BLDLIBDIR\"/junit.jar") |
| 2295 | junit) |
| 2296 | (("\"\\$BLDLIBDIR\"/hamcrest-core.jar") |
| 2297 | hamcrest) |
| 2298 | (("\"\\$BLDLIBDIR\"/slf4j-api-2.0.6.jar") |
| 2299 | api) |
| 2300 | (("\"\\$BLDLIBDIR\"/slf4j-simple-2.0.6.jar") |
| 2301 | simple) |
| 2302 | (("/usr/bin/test") |
| 2303 | (search-input-file inputs "/bin/test")) |
| 2304 | (("/usr/bin/uname") |
| 2305 | (search-input-file inputs "/bin/uname"))) |
| 2306 | (substitute* (find-files "java/test/testfiles/" ".*\\.txt$") |
| 2307 | (("JUnit version 4.13.2") |
| 2308 | "JUnit version 4.12-SNAPSHOT"))))) |
| 2309 | (add-after 'unpack 'patch-trace-shebang |
| 2310 | (lambda _ |
| 2311 | (for-each patch-shebang |
| 2312 | (find-files "bin" (lambda (file stat) |
| 2313 | (executable-file? file)))))) |
| 2314 | (add-after 'unpack 'generate-flexbison |
| 2315 | (lambda _ |
| 2316 | (invoke "bash" "bin/genparser" "hl/src"))) |
| 2317 | (add-after 'unpack 'generate-headers |
| 2318 | (lambda _ |
| 2319 | (invoke "perl" "bin/make_err" "src/H5err.txt") |
| 2320 | (invoke "perl" "bin/make_vers" "src/H5vers.txt") |
| 2321 | (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) |
| 2322 | (add-after 'install 'strip-jar-timestamps |
| 2323 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) |
| 2324 | (native-inputs |
| 2325 | (modify-inputs (package-native-inputs hdf5) |
| 2326 | (prepend `(,icedtea "jdk")) |
| 2327 | (prepend java-hamcrest-core) |
| 2328 | (prepend java-junit) |
| 2329 | (prepend java-slf4j-nop) |
| 2330 | (prepend java-slf4j-simple) |
| 2331 | (prepend (@ (gnu packages compression) zip)) |
| 2332 | (delete "gfortran"))) |
| 2333 | (inputs |
| 2334 | (list java-slf4j-api |
| 2335 | libjpeg-turbo |
| 2336 | zlib)) |
| 2337 | (home-page "https://www.hdfgroup.org") |
| 2338 | (synopsis "Java interface for the HDF5 library") |
| 2339 | (description "The Java HDF5 Interface (JHI5) uses the Java Native |
| 2340 | Interface to wrap the HDF5 library, which is implemented in C.") |
| 2341 | (license (package-license hdf5)))) |
| 2342 | |
| 2343 | (define-public hdf5-parallel-openmpi |
| 2344 | (package/inherit hdf5 |
| 2345 | (name "hdf5-parallel-openmpi") |
| 2346 | (inputs (modify-inputs inputs |
| 2347 | (prepend openmpi))) |
| 2348 | (arguments |
| 2349 | (substitute-keyword-arguments arguments |
| 2350 | ((#:configure-flags flags '()) |
| 2351 | #~(append (filter (lambda (flag) |
| 2352 | (not |
| 2353 | (or (string-prefix? "-DHDF5_ENABLE_THREADSAFE" flag) |
| 2354 | (string-prefix? "-DHDF5_BUILD_CPP_LIB" flag) |
| 2355 | (string-prefix? "-DALLOW_UNSUPPORTED" flag)))) |
| 2356 | #$flags) |
| 2357 | (list "-DBUILD_SHARED_LIBS=ON" |
| 2358 | "-DHDF5_BUILD_CPP_LIB=OFF" |
| 2359 | "-DHDF5_ENABLE_PARALLEL=ON" |
| 2360 | "-DHDF5_ENABLE_THREADSAFE=OFF"))) |
| 2361 | ((#:phases phases) |
| 2362 | #~(modify-phases #$phases |
| 2363 | (add-after 'build 'mpi-setup |
| 2364 | #$%openmpi-setup) |
| 2365 | (add-after 'unpack 'skip-sloppy-tests |
| 2366 | (lambda _ |
| 2367 | ;; XXX: The three tests below often fail for no clear reason |
| 2368 | ;; (timeout or actual failure). Comment them out (there's one |
| 2369 | ;; test per line in this file). |
| 2370 | (substitute* "testpar/CMakeLists.txt" |
| 2371 | (("(t_pmulti_dset|t_shapesame|t_filters_parallel)" _ test) |
| 2372 | (string-append "# " test "\n"))))) |
| 2373 | (replace 'remove-gcc-references |
| 2374 | (lambda _ |
| 2375 | (substitute* (map (lambda (f) |
| 2376 | (string-append #$output "/" f)) |
| 2377 | '("bin/h5hlcc" |
| 2378 | "bin/h5cc")) |
| 2379 | (("/gnu/store/[a-z0-9]*-gcc-[0-9.]*/bin/") |
| 2380 | "")))))))) |
| 2381 | (propagated-inputs |
| 2382 | (list openmpi)) |
| 2383 | (synopsis "Management suite for data with parallel IO support"))) |
| 2384 | |
| 2385 | (define-public hdf5-blosc |
| 2386 | (package |
| 2387 | (name "hdf5-blosc") |
| 2388 | (version "1.0.1") |
| 2389 | (source |
| 2390 | (origin |
| 2391 | (method git-fetch) |
| 2392 | (uri (git-reference |
| 2393 | (url "https://github.com/Blosc/hdf5-blosc") |
| 2394 | (commit (string-append "v" version)))) |
| 2395 | (file-name (git-file-name name version)) |
| 2396 | (sha256 |
| 2397 | (base32 "0kq09w2mz8i735p3zfnsdqdvay0086ls0cb621ckfxq42pr3gkm4")))) |
| 2398 | (build-system cmake-build-system) |
| 2399 | (arguments |
| 2400 | `(#:configure-flags |
| 2401 | (list (string-append "-DBLOSC_INSTALL_DIR=" |
| 2402 | (assoc-ref %build-inputs "c-blosc")) |
| 2403 | (string-append "-DPLUGIN_INSTALL_PATH=" |
| 2404 | (assoc-ref %outputs "out") |
| 2405 | "/hdf5/lib/plugin")) |
| 2406 | #:phases |
| 2407 | (modify-phases %standard-phases |
| 2408 | (add-after 'unpack 'do-not-build-blosc |
| 2409 | (lambda _ |
| 2410 | (substitute* "CMakeLists.txt" |
| 2411 | (("set\\(BLOSC_INSTALL_DIR.*") "") |
| 2412 | (("ExternalProject_Add\\(project_blosc") "message(")) |
| 2413 | #t))))) |
| 2414 | (inputs |
| 2415 | (list c-blosc hdf5)) |
| 2416 | (home-page "https://github.com/Blosc/hdf5-blosc") |
| 2417 | (synopsis "Filter for HDF5 using the Blosc compressor") |
| 2418 | (description "This is a filter for HDF5 that uses the Blosc compressor; by |
| 2419 | installing this filter, you can read and write HDF5 files with |
| 2420 | Blosc-compressed datasets.") |
| 2421 | (license license:expat))) |
| 2422 | |
| 2423 | (define-public hdf5-blosc-parallel-openmpi |
| 2424 | (package/inherit hdf5-blosc |
| 2425 | (name "hdf5-blosc-parallel-openmpi") |
| 2426 | (inputs |
| 2427 | (list c-blosc hdf5-parallel-openmpi)) |
| 2428 | (synopsis "HDF5-Blosc with parallel IO support"))) |
| 2429 | |
| 2430 | (define-public highfive |
| 2431 | (package |
| 2432 | (name "highfive") |
| 2433 | (version "2.10.1") |
| 2434 | (source |
| 2435 | (origin |
| 2436 | (method git-fetch) |
| 2437 | (uri (git-reference |
| 2438 | (url "https://github.com/BlueBrain/HighFive") |
| 2439 | (commit (string-append "v" version)))) |
| 2440 | (file-name (git-file-name name version)) |
| 2441 | (sha256 |
| 2442 | (base32 "1yp9bah6prhy31p2xbj4yv7p0p1k0ifjhb0z9i36ki3zx5nsgzrn")))) |
| 2443 | (build-system cmake-build-system) |
| 2444 | (arguments |
| 2445 | (list |
| 2446 | #:configure-flags |
| 2447 | #~(list "-DHIGHFIVE_EXAMPLES=OFF" |
| 2448 | ;; TODO: maybe build with hdf5-parallel-openmpi |
| 2449 | ;; "-DHIGHFIVE_PARALLEL_HDF5=ON" |
| 2450 | "-DHIGHFIVE_UNIT_TESTS=ON" |
| 2451 | "-GNinja"))) |
| 2452 | (native-inputs |
| 2453 | (list boost-1.83 |
| 2454 | catch2 |
| 2455 | ninja)) |
| 2456 | (inputs |
| 2457 | (list hdf5)) |
| 2458 | (home-page "https://bluebrain.github.io/HighFive/") |
| 2459 | (synopsis "Header-only C++ HDF5 interface") |
| 2460 | (description |
| 2461 | "HighFive is a header-only C++11 friendly interface for @code{libhdf5}. |
| 2462 | It supports STL vector/string, @code{Boost::UBLAS}, @code{Boost::Multi-array} |
| 2463 | and Xtensor; and handles C++ from/to HDF5 with automatic type |
| 2464 | mapping. HighFive does not require additional libraries.") |
| 2465 | ;; Boost Software License (BSL) - Version 1.0 - August 17th, 2003 |
| 2466 | (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt" |
| 2467 | "Some components have other similar licences.")))) |
| 2468 | |
| 2469 | (define-public itex2mml |
| 2470 | (package |
| 2471 | (name "itex2mml") |
| 2472 | (version "1.6.1") |
| 2473 | (source (origin |
| 2474 | (method url-fetch) |
| 2475 | (uri (string-append "https://golem.ph.utexas.edu" |
| 2476 | "/~distler/blog/files/itexToMML-" |
| 2477 | version |
| 2478 | ".tar.gz")) |
| 2479 | (sha256 |
| 2480 | (base32 |
| 2481 | "0pz51c0hfh2mg8xli0wj7hf92s3b7yf5r4114g8z8722lcm5gwiy")) |
| 2482 | (snippet |
| 2483 | #~(begin |
| 2484 | (use-modules (guix build utils)) |
| 2485 | (delete-file-recursively "itex-binaries"))))) |
| 2486 | (build-system gnu-build-system) |
| 2487 | (native-inputs |
| 2488 | (list bison |
| 2489 | flex)) |
| 2490 | (arguments |
| 2491 | (list |
| 2492 | #:make-flags #~(list (string-append "BINDIR=" #$output "/bin/") |
| 2493 | (string-append "CC=" #$(cc-for-target))) |
| 2494 | #:tests? #f ;; there are none |
| 2495 | #:phases |
| 2496 | #~(modify-phases %standard-phases |
| 2497 | (delete 'configure) |
| 2498 | (add-before 'build 'chdir |
| 2499 | (lambda args |
| 2500 | (chdir "itex-src"))) |
| 2501 | (add-before 'install 'make-bindir |
| 2502 | (lambda args |
| 2503 | (mkdir-p (string-append #$output "/bin")))) |
| 2504 | (add-after 'install 'install-doc |
| 2505 | (lambda* (#:key outputs #:allow-other-keys) |
| 2506 | (let* ((doc-prefix (or (assoc-ref outputs "doc") |
| 2507 | #$output)) |
| 2508 | (itex2mml+version (strip-store-file-name #$output)) |
| 2509 | (doc-dir (string-append doc-prefix |
| 2510 | "/share/doc/" |
| 2511 | itex2mml+version))) |
| 2512 | (install-file "../README" doc-dir))))))) |
| 2513 | (home-page "https://golem.ph.utexas.edu/~distler/blog/itex2MML.html") |
| 2514 | (synopsis "LaTeX to XHTML/MathML converter") |
| 2515 | (description |
| 2516 | "The @command{itex2MML} utility is a stream filter. It takes text with |
| 2517 | embedded itex equations, converts the itex equations to MathML, and outputs |
| 2518 | the resulting text.") |
| 2519 | (license (list license:lgpl2.0+ license:gpl2+ license:mpl1.1)))) |
| 2520 | |
| 2521 | (define-public itpp |
| 2522 | (package |
| 2523 | (name "itpp") |
| 2524 | (version "4.3.1") |
| 2525 | (source (origin |
| 2526 | (method url-fetch) |
| 2527 | (uri (string-append "mirror://sourceforge/itpp/itpp/" |
| 2528 | version "/itpp-" |
| 2529 | version ".tar.gz")) |
| 2530 | (sha256 |
| 2531 | (base32 |
| 2532 | "14ddy2xnb6sgp4hiax9v5sv4pr4l4dd4ps76nfha3nrpr1ikhcqm")))) |
| 2533 | (build-system cmake-build-system) |
| 2534 | (arguments |
| 2535 | (list |
| 2536 | #:tests? #f ; Tests require googletest *sources* |
| 2537 | #:phases |
| 2538 | #~(modify-phases %standard-phases |
| 2539 | (add-after 'install 'delete-formulas-log |
| 2540 | ;; Contains date and timing information which is unreproducible, |
| 2541 | ;; and should not be needed when using the package |
| 2542 | (lambda _ |
| 2543 | (delete-file |
| 2544 | (string-append #$output "/share/doc/itpp/html/_formulas.log")))) |
| 2545 | (add-after 'unpack 'set-man-page-date |
| 2546 | (lambda _ |
| 2547 | (substitute* "itpp-config.1.cmake.in" |
| 2548 | ((".PACKAGE_DATE.") "2012-04-18")))) |
| 2549 | (add-before 'build 'set-force-source-date |
| 2550 | ;; for reproducible dates, texlive needs this to respect respect |
| 2551 | ;; SOURCE_DATE_EPOCH |
| 2552 | (lambda _ |
| 2553 | (setenv "FORCE_SOURCE_DATE" "1")))))) |
| 2554 | (inputs (list fftw lapack openblas)) |
| 2555 | ;; FIXME: Even though the fonts are available dvips complains: |
| 2556 | ;; "Font cmmi10 not found; characters will be left blank." |
| 2557 | (native-inputs (list (texlive-local-tree) ghostscript doxygen)) |
| 2558 | (home-page "https://itpp.sourceforge.net") |
| 2559 | (synopsis "C++ library of maths, signal processing and communication classes") |
| 2560 | (description "IT++ is a C++ library of mathematical, signal processing and |
| 2561 | communication classes and functions. Its main use is in simulation of |
| 2562 | communication systems and for performing research in the area of |
| 2563 | communications. The kernel of the library consists of generic vector and |
| 2564 | matrix classes, and a set of accompanying routines. Such a kernel makes IT++ |
| 2565 | similar to MATLAB, GNU Octave or SciPy.") |
| 2566 | (license license:gpl3+))) |
| 2567 | |
| 2568 | (define-public netcdf |
| 2569 | (package |
| 2570 | (name "netcdf") |
| 2571 | (version "4.9.2") |
| 2572 | (source |
| 2573 | (origin |
| 2574 | (method url-fetch) |
| 2575 | (uri (string-append |
| 2576 | "https://downloads.unidata.ucar.edu/netcdf-c/" version |
| 2577 | "/netcdf-c-" version ".tar.gz")) |
| 2578 | (sha256 |
| 2579 | (base32 |
| 2580 | "0j3c3amzvsd8bd52dqgqa8gkgl7n36qf0yahyl4kz5mrpnxvl4fg")) |
| 2581 | (modules '((guix build utils))) |
| 2582 | (snippet |
| 2583 | ;; Make sure this variable is defined only once. Failing to do so |
| 2584 | ;; would break builds of 'netcdf-parallel-openmpi' with a |
| 2585 | ;; multiple-definition link error with GCC 10. |
| 2586 | '(substitute* "ncdump/ocprint.c" |
| 2587 | (("^int ocdebug") "static int ocdebug"))) |
| 2588 | (patches (search-patches "netcdf-date-time.patch")))) |
| 2589 | (build-system gnu-build-system) |
| 2590 | (native-inputs |
| 2591 | (list doxygen |
| 2592 | graphviz |
| 2593 | m4 |
| 2594 | unzip)) |
| 2595 | (inputs |
| 2596 | (list curl |
| 2597 | bzip2 |
| 2598 | hdf5 |
| 2599 | libaec |
| 2600 | libjpeg-turbo |
| 2601 | libxml2 |
| 2602 | zlib |
| 2603 | zstd)) |
| 2604 | (arguments |
| 2605 | (list #:configure-flags |
| 2606 | #~(list "--disable-dap-remote-tests" |
| 2607 | ;; XXX: ... docs/internal.md' does not exist |
| 2608 | ;; "--enable-doxygen" |
| 2609 | "--enable-dot" |
| 2610 | "--enable-netcdf-4" |
| 2611 | #$@(if (or (target-x86-32?) (target-arm32?)) |
| 2612 | '("CFLAGS=-Wno-error=incompatible-pointer-types") |
| 2613 | '()) |
| 2614 | (string-append "--with-plugin-dir=" #$output "/lib/hdf5-plugins")) |
| 2615 | #:phases |
| 2616 | #~(modify-phases %standard-phases |
| 2617 | (add-after 'unpack 'fix-tests |
| 2618 | (lambda* (#:key inputs #:allow-other-keys) |
| 2619 | ;; Network access is required for these tests. |
| 2620 | (substitute* (list "ncdap_test/Makefile.am" |
| 2621 | "ncdap_test/Makefile.in") |
| 2622 | (("testurl.sh") "")) |
| 2623 | (substitute* "nczarr_test/Makefile.in" |
| 2624 | (("/bin/bash") |
| 2625 | (search-input-file inputs "bin/bash"))) |
| 2626 | ;; This test fails on 32 bit platforms. |
| 2627 | #$@(if (or (target-x86-32?) (target-arm32?)) |
| 2628 | '((substitute* '("ncdump/tst_netcdf4_4.sh" |
| 2629 | "ncdump/tst_nccopy4.sh") |
| 2630 | (("#!/bin/sh" m) (string-append m "\nexit 0\n"))) |
| 2631 | (substitute* "ncdump/Makefile.in" |
| 2632 | (("tst_netcdf4_4.log") ""))) |
| 2633 | '()))) |
| 2634 | (add-before 'configure 'fix-source-date |
| 2635 | (lambda _ |
| 2636 | ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build |
| 2637 | ;; environment, `date -u -d ${SOURCE_DATE_EPOCH}` will evaluate |
| 2638 | ;; to '1st hour of the current day', and therefore makes the |
| 2639 | ;; package not reproducible. |
| 2640 | (substitute* "./configure" |
| 2641 | (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"") |
| 2642 | "date --date='@0'")))) |
| 2643 | (add-after 'configure 'patch-settings |
| 2644 | (lambda _ |
| 2645 | ;; libnetcdf.settings contains the full filename of the compilers |
| 2646 | ;; used to build the library. We truncate the hashes of those |
| 2647 | ;; filenames to avoid unnecessary references to the corresponding |
| 2648 | ;; store items. |
| 2649 | (substitute* "libnetcdf.settings" |
| 2650 | (("(/gnu/store/)([0-9A-Za-z]*)" all prefix hash) |
| 2651 | (string-append prefix |
| 2652 | (string-take hash 10) "..."))))) |
| 2653 | (add-before 'check 'fix-test-rcmerge |
| 2654 | (lambda _ |
| 2655 | ;; Set HOME, to fix the test-rcmerge test. |
| 2656 | (setenv "HOME" "/tmp")))) |
| 2657 | |
| 2658 | #:parallel-tests? #f)) ;various race conditions |
| 2659 | (home-page "https://www.unidata.ucar.edu/software/netcdf/") |
| 2660 | (synopsis "Library for scientific data") |
| 2661 | (description "NetCDF is an interface for scientific data access and a |
| 2662 | software library that provides an implementation of the interface. The netCDF |
| 2663 | library defines a machine-independent format for representing scientific data. |
| 2664 | Together, the interface, library, and format support the creation, access, and |
| 2665 | sharing of scientific data.") |
| 2666 | (license (license:x11-style "file://COPYRIGHT")))) |
| 2667 | |
| 2668 | (define-public netcdf-parallel-openmpi |
| 2669 | (package/inherit netcdf |
| 2670 | (name "netcdf-parallel-openmpi") |
| 2671 | (inputs (modify-inputs inputs |
| 2672 | (append openmpi pnetcdf) |
| 2673 | (replace "hdf5" hdf5-parallel-openmpi))) |
| 2674 | ;; TODO: Replace pkg-config references in nc-config with absolute references |
| 2675 | (arguments |
| 2676 | (substitute-keyword-arguments arguments |
| 2677 | ((#:configure-flags flags) |
| 2678 | #~(cons* "CC=mpicc" |
| 2679 | "CXX=mpicxx" |
| 2680 | "--enable-parallel-tests" |
| 2681 | ;; Enable support of CDF-1, 2 and 5 formats. |
| 2682 | "--enable-pnetcdf" |
| 2683 | ;; NetCDF supports both parallel and shared library building |
| 2684 | ;; See https://docs.unidata.ucar.edu/nug/current/getting_and_building_netcdf.html#build_parallel |
| 2685 | "--enable-shared" |
| 2686 | "--with-pic" |
| 2687 | #$flags)) |
| 2688 | ((#:phases phases #~%standard-phases) |
| 2689 | #~(modify-phases #$phases |
| 2690 | (add-after 'build 'mpi-setup |
| 2691 | #$%openmpi-setup))))))) |
| 2692 | |
| 2693 | (define-public netcdf-fortran |
| 2694 | (package |
| 2695 | (name "netcdf-fortran") |
| 2696 | (version "4.5.3") |
| 2697 | (source (origin |
| 2698 | (method url-fetch) |
| 2699 | (uri (string-append |
| 2700 | "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-" |
| 2701 | version ".tar.gz")) |
| 2702 | (sha256 |
| 2703 | (base32 |
| 2704 | "0x4acvfhbsx1q79dkkwrwbgfhm0w5ngnp4zj5kk92s1khihmqfhj")))) |
| 2705 | (build-system gnu-build-system) |
| 2706 | (arguments |
| 2707 | `(#:configure-flags '("FCFLAGS=-fallow-argument-mismatch" |
| 2708 | "FFLAGS=-fallow-argument-mismatch") |
| 2709 | #:parallel-tests? #f)) |
| 2710 | (inputs |
| 2711 | (list libaec hdf5 netcdf)) |
| 2712 | (native-inputs |
| 2713 | (list gfortran)) |
| 2714 | (synopsis "Fortran interface for the netCDF library") |
| 2715 | (description (package-description netcdf)) |
| 2716 | (home-page (package-home-page netcdf)) |
| 2717 | (license (package-license netcdf)))) |
| 2718 | |
| 2719 | (define-public netcdf-cxx4 |
| 2720 | (package |
| 2721 | (name "netcdf-cxx4") |
| 2722 | (version "4.3.1") |
| 2723 | (source |
| 2724 | (origin |
| 2725 | (method git-fetch) |
| 2726 | (uri (git-reference |
| 2727 | (url "https://github.com/Unidata/netcdf-cxx4") |
| 2728 | (commit (string-append "v" version)))) |
| 2729 | (file-name (git-file-name name version)) |
| 2730 | (sha256 |
| 2731 | (base32 "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr")))) |
| 2732 | (build-system cmake-build-system) |
| 2733 | (arguments |
| 2734 | `(#:phases (modify-phases %standard-phases |
| 2735 | (add-before 'configure 'patch-configure |
| 2736 | (lambda _ |
| 2737 | (substitute* "libnetcdf-cxx.settings.in" |
| 2738 | ;; Don't record the build-time host, time and gcc path to make the |
| 2739 | ;; settings file reproducible. |
| 2740 | (("@CONFIG_DATE@") |
| 2741 | "Not set (Guix build)") |
| 2742 | (("@host_cpu@-@host_vendor@-@host_os@") |
| 2743 | "Linux") |
| 2744 | (("@CC_VERSION@") |
| 2745 | "gcc")) |
| 2746 | ;; The filter tests fail with 'Caught unexpected exception'. |
| 2747 | (substitute* "cxx4/CMakeLists.txt" |
| 2748 | (("add_bin_test\\(cxx4 test_filter\\)") |
| 2749 | "")) |
| 2750 | (substitute* "examples/CMakeLists.txt" |
| 2751 | (("add_sh_test\\(examples tst_filter\\)") |
| 2752 | "")))) |
| 2753 | (add-after 'install 'clear-reference-to-compiler |
| 2754 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2755 | ;; Do not retain a reference to GCC and other build only inputs. |
| 2756 | (let ((out (assoc-ref outputs "out"))) |
| 2757 | (substitute* (string-append out "/bin/ncxx4-config") |
| 2758 | (("cc=([[:graph:]]+)/bin/gcc") |
| 2759 | "cc=\"gcc") |
| 2760 | (("cxx=([[:graph:]]+)/bin/c\\+\\+") |
| 2761 | "cxx=\"c++")))))) |
| 2762 | #:configure-flags (list (string-append "-DHDF5_C_LIBRARY_hdf5=" |
| 2763 | (search-input-file |
| 2764 | %build-inputs |
| 2765 | "/lib/libhdf5.so"))))) |
| 2766 | (inputs (list hdf5)) |
| 2767 | (propagated-inputs (list netcdf)) ;include/netcdf includes netcdf.h |
| 2768 | (home-page "https://github.com/Unidata/netcdf-cxx4") |
| 2769 | (synopsis "NetCDF C++ interface") |
| 2770 | (description |
| 2771 | "This package provides a C++ interface to the NetCDF library for |
| 2772 | scientific data storage.") |
| 2773 | (license license:bsd-3))) |
| 2774 | |
| 2775 | (define-public netcdf-cxx4-parallel-openmpi |
| 2776 | (package |
| 2777 | (inherit netcdf-cxx4) |
| 2778 | (name "netcdf-cxx4-parallel-openmpi") |
| 2779 | (synopsis "NetCDF C++ interface (with MPI support)") |
| 2780 | (inputs (modify-inputs inputs |
| 2781 | (replace "hdf5" hdf5-parallel-openmpi))) |
| 2782 | (propagated-inputs (modify-inputs propagated-inputs |
| 2783 | (replace "netcdf" netcdf-parallel-openmpi))))) |
| 2784 | |
| 2785 | (define-public n2p2 |
| 2786 | (package |
| 2787 | (name "n2p2") |
| 2788 | (version "2.3.0") |
| 2789 | (source (origin |
| 2790 | (method git-fetch) |
| 2791 | (uri (git-reference |
| 2792 | (url "https://github.com/CompPhysVienna/n2p2") |
| 2793 | (commit (string-append "v" version)))) |
| 2794 | (file-name (git-file-name name version)) |
| 2795 | (sha256 |
| 2796 | (base32 |
| 2797 | "01090j477gh9zk7wj416fvv1hxdnnxwhzy67bn96a04zhnayzkkj")))) |
| 2798 | (build-system gnu-build-system) |
| 2799 | (arguments |
| 2800 | `(#:make-flags '("MODE=shared" "-C" "src") |
| 2801 | #:phases |
| 2802 | (modify-phases %standard-phases |
| 2803 | (add-after 'unpack 'post-unpack |
| 2804 | (lambda* (#:key inputs #:allow-other-keys) |
| 2805 | (substitute* "src/makefile" |
| 2806 | (("shell") "bash")) |
| 2807 | (substitute* "src/makefile.gnu" |
| 2808 | (("PROJECT_EIGEN=/usr/include/eigen3") |
| 2809 | (string-append "PROJECT_EIGEN=" |
| 2810 | (assoc-ref inputs "eigen") "/include/eigen3"))) |
| 2811 | (substitute* "src/makefile.gnu" |
| 2812 | (("-lblas") |
| 2813 | (string-append "-L" (assoc-ref inputs "openblas") |
| 2814 | "/lib -lopenblas")) |
| 2815 | (("-march=native") |
| 2816 | "")) |
| 2817 | (substitute* "src/application/makefile" |
| 2818 | (("LDFLAGS=") |
| 2819 | "LDFLAGS=-Wl,-rpath='$$ORIGIN/../lib' ")))) |
| 2820 | (delete 'configure) |
| 2821 | (delete 'check) |
| 2822 | (replace 'install |
| 2823 | (lambda* (#:key outputs #:allow-other-keys) |
| 2824 | (let* ((out (assoc-ref outputs "out")) |
| 2825 | (bindir (string-append out "/bin")) |
| 2826 | (libdir (string-append out "/lib")) |
| 2827 | (incdir (string-append out "/include"))) |
| 2828 | (for-each (lambda (f) (install-file f bindir)) |
| 2829 | (find-files "bin" "^nnp-")) |
| 2830 | (for-each (lambda (f) (install-file f libdir)) |
| 2831 | (find-files "lib" ".")) |
| 2832 | (for-each (lambda (f) (install-file f incdir)) |
| 2833 | (find-files "include" "\\.h$")))))))) |
| 2834 | (inputs |
| 2835 | (list openmpi gsl openblas eigen)) |
| 2836 | (synopsis "Neural network potentials for chemistry and physics") |
| 2837 | (description "This package contains software that will allow you to use |
| 2838 | existing neural network potential parameterizations to predict energies and |
| 2839 | forces (with standalone tools but also in conjunction with the MD software |
| 2840 | LAMMPS). In addition it is possible to train new neural network potentials |
| 2841 | with the provided training tools.") |
| 2842 | (home-page "https://compphysvienna.github.io/n2p2/") |
| 2843 | (properties '((tunable? . #t))) ;to benefit from SIMD code in Eigen |
| 2844 | (license license:gpl3+))) |
| 2845 | |
| 2846 | (define-public nlopt |
| 2847 | (package |
| 2848 | (name "nlopt") |
| 2849 | (version "2.10.0") |
| 2850 | (source (origin |
| 2851 | (method git-fetch) |
| 2852 | (uri (git-reference |
| 2853 | (url "https://github.com/stevengj/nlopt/") |
| 2854 | (commit (string-append "v" version)))) |
| 2855 | (file-name (git-file-name name version)) |
| 2856 | (sha256 |
| 2857 | (base32 "04257r7a1bjmm6hznf9v6fimz2p93dk745sf89wmxzhg3rh0ak44")) |
| 2858 | (patches |
| 2859 | (search-patches "nlopt_CMake-Assume-working-c-compiler-597.patch")))) |
| 2860 | (build-system cmake-build-system) |
| 2861 | (arguments |
| 2862 | `(#:configure-flags |
| 2863 | (list "-DNLOPT_TESTS=ON") |
| 2864 | #:phases |
| 2865 | (modify-phases %standard-phases |
| 2866 | (add-before 'configure 'set-libnlopt-file-name |
| 2867 | (lambda* (#:key outputs #:allow-other-keys) |
| 2868 | ;; Make sure the Scheme module refers to the library by its |
| 2869 | ;; absolute file name. |
| 2870 | (let ((out (assoc-ref outputs "out"))) |
| 2871 | (substitute* "src/swig/nlopt-guile.i" |
| 2872 | (("\"nlopt_guile\"") |
| 2873 | (format #f "~s" |
| 2874 | `(format #f "~anlopt_guile" |
| 2875 | (if (getenv "NLOPT_UNINSTALLED") |
| 2876 | "" |
| 2877 | ,(format #f "~a/lib/guile/3.0/extensions/" out)))))) |
| 2878 | (setenv "NLOPT_UNINSTALLED" "1"))))))) |
| 2879 | (inputs (list guile-3.0 octave-cli)) |
| 2880 | (native-inputs (list pkg-config python python-numpy swig-4.0)) |
| 2881 | (home-page "http://ab-initio.mit.edu/wiki/") |
| 2882 | (synopsis "Library for nonlinear optimization") |
| 2883 | (description "NLopt is a library for nonlinear optimization, providing a |
| 2884 | common interface for a number of different free optimization routines available |
| 2885 | online as well as original implementations of various other algorithms.") |
| 2886 | (license license:lgpl2.1+))) |
| 2887 | |
| 2888 | (define-public ipopt |
| 2889 | (package |
| 2890 | (name "ipopt") |
| 2891 | (version "3.13.4") |
| 2892 | (source (origin |
| 2893 | (method git-fetch) |
| 2894 | (uri (git-reference |
| 2895 | (url "https://github.com/coin-or/Ipopt") |
| 2896 | (commit (string-append "releases/" version)))) |
| 2897 | (file-name (git-file-name name version)) |
| 2898 | (sha256 |
| 2899 | (base32 |
| 2900 | "08gznhwhqv1x4baksz350ih8q16r5rd0k8vals6078m3h94khr4b")))) |
| 2901 | (build-system gnu-build-system) |
| 2902 | (arguments |
| 2903 | '(#:configure-flags (list "--with-lapack=-lopenblas") |
| 2904 | #:phases (modify-phases %standard-phases |
| 2905 | (add-after 'install 'add--L-flags-in-ipopt.pc |
| 2906 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2907 | ;; The '.pc' file lists '-llapack -lblas' in "Libs"; |
| 2908 | ;; move it to "Libs.private" where it belongs, and add a |
| 2909 | ;; '-L' flag for LAPACK. |
| 2910 | (let ((out (assoc-ref outputs "out")) |
| 2911 | (lapack (assoc-ref inputs "lapack"))) |
| 2912 | (substitute* (string-append out "/lib/pkgconfig/" |
| 2913 | "ipopt.pc") |
| 2914 | (("Libs: (.*)-llapack -lblas(.*)$" _ before after) |
| 2915 | (string-append "Libs: " before " " after "\n" |
| 2916 | "Libs.private: " before |
| 2917 | "-L" openblas "/lib -lopenblas" |
| 2918 | after "\n"))) |
| 2919 | #t)))))) |
| 2920 | (native-inputs |
| 2921 | (list gfortran pkg-config)) |
| 2922 | (inputs |
| 2923 | ;; TODO: Maybe add dependency on COIN-MUMPS, ASL, and HSL. |
| 2924 | (list openblas)) ;for both libblas and liblapack |
| 2925 | (home-page "https://www.coin-or.org") |
| 2926 | (synopsis "Large-scale nonlinear optimizer") |
| 2927 | (description |
| 2928 | "The Interior Point Optimizer (IPOPT) is a software package for |
| 2929 | large-scale nonlinear optimization. It provides C++, C, and Fortran |
| 2930 | interfaces.") |
| 2931 | (license license:epl2.0))) |
| 2932 | |
| 2933 | (define-public nomad-optimizer |
| 2934 | (package |
| 2935 | (name "nomad-optimizer") |
| 2936 | (version "4.3.1") |
| 2937 | (source |
| 2938 | (origin |
| 2939 | (method git-fetch) |
| 2940 | (uri (git-reference |
| 2941 | (url "https://github.com/bbopt/nomad/") |
| 2942 | (commit (string-append "v." version)))) |
| 2943 | (file-name (git-file-name name version)) |
| 2944 | (sha256 |
| 2945 | (base32 "08bxdvx8p5qzdw331xa5irc1896as4q5hajsid7f3qcxjm4nq4v3")))) |
| 2946 | (build-system cmake-build-system) |
| 2947 | (native-inputs |
| 2948 | (list openmpi)) |
| 2949 | (arguments |
| 2950 | (list |
| 2951 | ;; Cannot build Python interface because it is incompatible with OpenMP |
| 2952 | ;; support, which is enabled by default. |
| 2953 | #:configure-flags |
| 2954 | #~(list "-DBUILD_TESTS=ON" |
| 2955 | "-DBUILD_INTERFACE_C=ON") |
| 2956 | #:phases |
| 2957 | #~(modify-phases %standard-phases |
| 2958 | (add-after 'unpack 'fix-tests |
| 2959 | (lambda _ |
| 2960 | (substitute* "examples/CMakeLists.txt" |
| 2961 | ;; This test passes only sometimes. |
| 2962 | ;; See https://github.com/bbopt/nomad/issues/72. |
| 2963 | (("^ +add_subdirectory\\(\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/advanced/library/PSDMads\\)\n") |
| 2964 | "")) |
| 2965 | (make-file-writable |
| 2966 | "examples/advanced/library/exampleSuggestAndObserve/cache0.txt") |
| 2967 | ;; Fix the tests so they run in out-of-source builds. |
| 2968 | (substitute* |
| 2969 | '("examples/basic/library/COCO/CMakeLists.txt" |
| 2970 | "examples/basic/library/example1/CMakeLists.txt" |
| 2971 | "examples/basic/library/example2/CMakeLists.txt" |
| 2972 | "examples/basic/library/example3/CMakeLists.txt" |
| 2973 | "examples/basic/library/example4/CMakeLists.txt" |
| 2974 | "examples/basic/library/single_obj_parallel/CMakeLists.txt" |
| 2975 | "examples/advanced/library/FixedVariable/CMakeLists.txt" |
| 2976 | "examples/advanced/library/NMonly/CMakeLists.txt" |
| 2977 | "examples/advanced/library/PSDMads/CMakeLists.txt" |
| 2978 | "examples/advanced/library/Restart/CMakeLists.txt" |
| 2979 | "examples/advanced/library/Restart_VNS/CMakeLists.txt" |
| 2980 | "examples/advanced/library/c_api/example1/CMakeLists.txt" |
| 2981 | "examples/advanced/library/c_api/example2/CMakeLists.txt" |
| 2982 | "examples/advanced/library/exampleSuggestAndObserve/CMakeLists.txt") |
| 2983 | ;; The runExampleTest.sh script is run with WORKING_DIRECTORY |
| 2984 | ;; set to CMAKE_CURRENT_SOURCE_DIR. |
| 2985 | ;; Other scripts invoked by that script (for example |
| 2986 | ;; examples/advanced/batch/SuggestAndObserve/loopSuggestAndObserve.sh) |
| 2987 | ;; are in that same directory, but compiled examples are |
| 2988 | ;; located in CMAKE_CURRENT_BINARY_DIR. |
| 2989 | (("(COMMAND \\$\\{CMAKE_BINARY_DIR\\}/examples/runExampleTest\\.sh )\\.(/.*)" |
| 2990 | _ command test) |
| 2991 | (string-append command "${CMAKE_CURRENT_BINARY_DIR}" test))) |
| 2992 | (let ((builddir (string-append (getcwd) "/../build"))) |
| 2993 | (let ((dir "examples/advanced/library/FixedVariable")) |
| 2994 | (substitute* (string-append dir "/fixedVariable.cpp") |
| 2995 | (("^( +std::string sExe = ).*" _ prefix) |
| 2996 | (string-append prefix "\"" builddir "/" dir "/ufl.exe" "\";\n")))) |
| 2997 | ;; The BB_EXE and SURROGATE_EXE paths are interpreted relative |
| 2998 | ;; to the configuration file provided to NOMAD. |
| 2999 | ;; However, the configuration files are all in the source tree |
| 3000 | ;; rather than in the build tree (unlike the compiled |
| 3001 | ;; executables). |
| 3002 | (let ((fix-exe-path (lambda* (dir #:optional |
| 3003 | (file "param.txt") |
| 3004 | (exe-opt "BB_EXE")) |
| 3005 | (substitute* (string-append dir "/" file) |
| 3006 | (((string-append "^" exe-opt " +")) |
| 3007 | ;; The $ prevents NOMAD from prefixing |
| 3008 | ;; the executable with the path of the |
| 3009 | ;; parent directory of the configuration |
| 3010 | ;; file NOMAD was provided with as |
| 3011 | ;; argument (param.txt or some such). |
| 3012 | (string-append exe-opt " $" |
| 3013 | builddir "/" dir "/")))))) |
| 3014 | (for-each |
| 3015 | (lambda (dir) |
| 3016 | (substitute* (string-append dir "/CMakeLists.txt") |
| 3017 | ;; The install phase has not yet run. |
| 3018 | (("(COMMAND.*)\\$\\{CMAKE_INSTALL_PREFIX\\}/bin/nomad\\b" |
| 3019 | _ prefix) |
| 3020 | (string-append prefix "${CMAKE_BINARY_DIR}/src/nomad"))) |
| 3021 | (if (equal? dir "examples/basic/batch/single_obj_MPIparallel") |
| 3022 | (substitute* (string-append dir "/param.txt") |
| 3023 | (("^BB_EXE +'\\$.*mpirun \\$-np \\$4 ") |
| 3024 | (string-append "BB_EXE '$" (which "mpirun") " $" |
| 3025 | builddir "/" dir "/"))) |
| 3026 | (fix-exe-path dir)) |
| 3027 | (when (equal? dir "examples/basic/batch/surrogate_sort") |
| 3028 | (fix-exe-path dir "param.txt" "SURROGATE_EXE")) |
| 3029 | (when (equal? dir "examples/advanced/batch/FixedVariable") |
| 3030 | (fix-exe-path dir "param1.txt") |
| 3031 | (fix-exe-path dir "param2.txt") |
| 3032 | (fix-exe-path dir "param3.txt") |
| 3033 | (fix-exe-path dir "param10.txt"))) |
| 3034 | '("examples/basic/batch/coco_bbob-constrained" |
| 3035 | "examples/basic/batch/example1" |
| 3036 | "examples/basic/batch/example2" |
| 3037 | "examples/basic/batch/example3" |
| 3038 | "examples/basic/batch/multi_obj" |
| 3039 | "examples/basic/batch/multi_obj2" |
| 3040 | "examples/basic/batch/single_obj" |
| 3041 | "examples/basic/batch/single_obj_MPIparallel" |
| 3042 | "examples/basic/batch/single_obj_parallel" |
| 3043 | "examples/basic/batch/surrogate_sort" |
| 3044 | "examples/advanced/batch/FixedVariable" |
| 3045 | "examples/advanced/batch/LHonly")))))) |
| 3046 | (add-before 'configure 'mpi-setup |
| 3047 | #$%openmpi-setup)))) |
| 3048 | (home-page "https://www.gerad.ca/nomad/") |
| 3049 | (synopsis "Nonlinear optimization by mesh-adaptive direct search") |
| 3050 | (description |
| 3051 | "NOMAD is a C++ implementation of the mesh-adaptive direct search (MADS) |
| 3052 | algorithm, designed for difficult blackbox optimization problems. These |
| 3053 | problems occur when the functions defining the objective and constraints are |
| 3054 | the result of costly computer simulations.") |
| 3055 | (license license:lgpl3+))) |
| 3056 | |
| 3057 | (define-public cbc |
| 3058 | (package |
| 3059 | (name "cbc") |
| 3060 | (version "2.10.5") |
| 3061 | (source (origin |
| 3062 | (method url-fetch) |
| 3063 | (uri (string-append "https://www.coin-or.org/download/source/" |
| 3064 | "Cbc/Cbc-" version ".tgz")) |
| 3065 | (sha256 |
| 3066 | (base32 |
| 3067 | "0wk9vr6zc62gw71v7gnra5wxqlcljcgbhm5lasx236v791b986ns")) |
| 3068 | (modules '((guix build utils))) |
| 3069 | (snippet |
| 3070 | ;; Make sure we don't use the bundled software. |
| 3071 | '(delete-file-recursively "ThirdParty")))) |
| 3072 | (build-system gnu-build-system) |
| 3073 | (native-inputs |
| 3074 | (list gfortran pkg-config)) |
| 3075 | (inputs |
| 3076 | (list openblas)) |
| 3077 | (home-page "https://www.coin-or.org") |
| 3078 | (synopsis "Branch-and-cut solver") |
| 3079 | (description |
| 3080 | "Cbc (Coin-or branch and cut) is a mixed integer linear programming |
| 3081 | solver written in C++. It can be used as a library or as a standalone |
| 3082 | executable.") |
| 3083 | (license license:epl1.0))) |
| 3084 | |
| 3085 | (define-public clp |
| 3086 | (package |
| 3087 | (name "clp") |
| 3088 | (version "1.17.6") |
| 3089 | (source (origin |
| 3090 | (method url-fetch) |
| 3091 | (uri (string-append "https://www.coin-or.org/download/source/" |
| 3092 | "Clp/Clp-" version ".tgz")) |
| 3093 | (sha256 |
| 3094 | (base32 |
| 3095 | "0ap1f0lxppa6pnbc4bg7ih7a96avwaki482nig8w5fr3vg9wvkzr")) |
| 3096 | (modules '((guix build utils))) |
| 3097 | (snippet |
| 3098 | ;; Make sure we don't use the bundled software. |
| 3099 | '(begin |
| 3100 | (delete-file-recursively "ThirdParty") |
| 3101 | #t)))) |
| 3102 | (build-system gnu-build-system) |
| 3103 | (native-inputs |
| 3104 | (list gfortran pkg-config)) |
| 3105 | (inputs |
| 3106 | (list openblas)) |
| 3107 | (home-page "https://www.coin-or.org") |
| 3108 | (synopsis "Linear programming solver") |
| 3109 | (description |
| 3110 | "CLP is a high quality linear programming solver. Its main strengths are |
| 3111 | its dual and primal Simplex algorithms. It also has a barrier algorithm for |
| 3112 | linear and quadratic objectives. There are limited facilities for nonlinear |
| 3113 | and quadratic objectives using the Simplex algorithm.") |
| 3114 | (license license:epl1.0))) |
| 3115 | |
| 3116 | (define-public python-cylp |
| 3117 | (package |
| 3118 | (name "python-cylp") |
| 3119 | (version "0.94.0") |
| 3120 | (source |
| 3121 | (origin |
| 3122 | (method git-fetch) |
| 3123 | (uri (git-reference |
| 3124 | (url "https://github.com/coin-or/cylp") |
| 3125 | (commit (string-append "v" version)))) |
| 3126 | (file-name (git-file-name name version)) |
| 3127 | (sha256 |
| 3128 | (base32 "0rgqmwvmpdzl6ygwy3nm33vpphl2ldzpqj0xakh9hg1ccaa3fs6l")))) |
| 3129 | (build-system pyproject-build-system) |
| 3130 | (arguments |
| 3131 | (list |
| 3132 | ;; tests: 52 passed, 55 warnings |
| 3133 | #:test-flags |
| 3134 | ;; XXX: All tests in this file are SEGFAULT, see: |
| 3135 | ;; <https://codeberg.org/guix/guix/issues/2912>. |
| 3136 | #~(list "--ignore=cylp/py/test_PySolve.py" |
| 3137 | "--ignore=cylp/tests/test_CyClpSimplex.py" |
| 3138 | "--ignore=cylp/tests/test_QP.py" |
| 3139 | ;; All tests are failed. |
| 3140 | "--ignore=cylp/tests/test_MIP.py") |
| 3141 | #:phases |
| 3142 | #~(modify-phases %standard-phases |
| 3143 | (add-after 'unpack 'numpy-compatibility |
| 3144 | ;; XXX: See: <https://github.com/coin-or/CyLP/issues/227>. |
| 3145 | ;; |
| 3146 | ;; AttributeError: module 'numpy' has no attribute |
| 3147 | ;; 'float'. `np.float` was a deprecated alias for the builtin |
| 3148 | ;; `float`. To avoid this error in existing code, use `float` by |
| 3149 | ;; itself. Doing this will not modify any behavior and is safe. If |
| 3150 | ;; you specifically wanted the numpy scalar type, use `np.float64` |
| 3151 | ;; here. The aliases was originally deprecated in NumPy 1.20; for |
| 3152 | ;; more details and guidance see the original release note at: |
| 3153 | ;; https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations |
| 3154 | (lambda _ |
| 3155 | (substitute* '("cylp/py/utils/sparseUtil.py" |
| 3156 | "cylp/tests/test_sparseUtil.py") |
| 3157 | (("np.float") "float")))) |
| 3158 | ;; XXX: Adding "--pyargs" option, changing test directory, and |
| 3159 | ;; removing local source did not work; rebuilding extensions takes |
| 3160 | ;; some time but it's only thing which worked to enable tests. |
| 3161 | (add-before 'check 'pre-check |
| 3162 | (lambda* (#:key tests? #:allow-other-keys) |
| 3163 | (if tests? |
| 3164 | (invoke "python" "setup.py" "build_ext" "--inplace"))))))) |
| 3165 | (native-inputs |
| 3166 | (list pkg-config |
| 3167 | python-cython |
| 3168 | python-pytest |
| 3169 | python-setuptools)) |
| 3170 | (inputs |
| 3171 | (list cbc)) |
| 3172 | (propagated-inputs |
| 3173 | (list python-numpy |
| 3174 | python-scipy)) |
| 3175 | (home-page "https://github.com/coin-or/cylp") |
| 3176 | (synopsis "Python interface for CLP, CBC, and CGL") |
| 3177 | (description |
| 3178 | "CyLP is a Python interface to COIN-OR’s Linear and mixed-integer program |
| 3179 | solvers (CLP, CBC, and CGL). CyLP’s unique feature is that you can use it to |
| 3180 | alter the solution process of the solvers from within Python. For example, |
| 3181 | you may define cut generators, branch-and-bound strategies, and primal/dual |
| 3182 | Simplex pivot rules completely in Python.") |
| 3183 | (license license:epl2.0))) |
| 3184 | |
| 3185 | (define-public gecode |
| 3186 | (let* ((commit "f7f0d7c273d6844698f01cec8229ebe0b66a016a") |
| 3187 | (version (git-version "6.2.0" "1" commit))) |
| 3188 | (package |
| 3189 | (name "gecode") |
| 3190 | (version version) |
| 3191 | (source |
| 3192 | (origin |
| 3193 | (method git-fetch) |
| 3194 | (uri (git-reference |
| 3195 | (url "https://github.com/Gecode/gecode") |
| 3196 | (commit commit))) |
| 3197 | (file-name (git-file-name name version)) |
| 3198 | (sha256 |
| 3199 | (base32 |
| 3200 | "16gzwa64w90vifaflmii515rsrqclf2y7nziq621m4ad9cjgcixj")) |
| 3201 | (modules '((guix build utils))) |
| 3202 | ;; delete generated sources |
| 3203 | (snippet '(for-each delete-file |
| 3204 | '("gecode/kernel/var-imp.hpp" |
| 3205 | "gecode/kernel/var-type.hpp"))))) |
| 3206 | (outputs '("out" "examples")) |
| 3207 | (build-system gnu-build-system) |
| 3208 | (arguments |
| 3209 | (list |
| 3210 | #:configure-flags #~(list (string-append "GLDFLAGS=-Wl,-rpath=" |
| 3211 | #$output "/lib") |
| 3212 | "--enable-examples=no") |
| 3213 | #:modules '((guix build gnu-build-system) |
| 3214 | (guix build utils) |
| 3215 | (ice-9 rdelim) |
| 3216 | (ice-9 popen)) |
| 3217 | #:phases |
| 3218 | #~(modify-phases %standard-phases |
| 3219 | (add-before 'configure 'patch-msc-and-version |
| 3220 | (lambda* (#:key outputs #:allow-other-keys) |
| 3221 | (let ((out (assoc-ref outputs "out"))) |
| 3222 | (substitute* "tools/flatzinc/gecode.msc.in" |
| 3223 | (("\\.\\./../..") out) |
| 3224 | (("\\.\\.") |
| 3225 | (string-append out "/share/minizinc"))) |
| 3226 | (substitute* "configure" |
| 3227 | (("(PACKAGE_[^0-9]*)[0-9\\.]+" all match) |
| 3228 | (string-append match #$version)))))) |
| 3229 | (add-after 'build 'build-examples |
| 3230 | (lambda _ |
| 3231 | (invoke "make" "compileexamples"))) |
| 3232 | ;; The Makefile disrespects GLDFLAGS for some reason, |
| 3233 | ;; so we have to patch it ourselves. |
| 3234 | (add-after 'install 'fix-rpath |
| 3235 | (lambda _ |
| 3236 | (let ((libdir (string-append #$output "/lib"))) |
| 3237 | (for-each |
| 3238 | (lambda (file) |
| 3239 | (let* ((pipe (open-pipe* OPEN_READ "patchelf" |
| 3240 | "--print-rpath" file)) |
| 3241 | (line (read-line pipe))) |
| 3242 | (and (zero? (close-pipe pipe)) |
| 3243 | (invoke "patchelf" "--set-rpath" |
| 3244 | (string-append libdir ":" line) |
| 3245 | file)))) |
| 3246 | (find-files libdir ".*\\.so$"))))) |
| 3247 | (add-after 'install 'install-examples |
| 3248 | (lambda* (#:key outputs #:allow-other-keys) |
| 3249 | (let* ((examples (assoc-ref outputs "examples")) |
| 3250 | (bindir (format #f "bindir=~a/bin" examples))) |
| 3251 | (invoke "make" "installexamples" bindir))))))) |
| 3252 | (native-inputs (list patchelf perl sed)) |
| 3253 | (home-page "https://www.gecode.org") |
| 3254 | (synopsis "Toolkit for developing constraint-based systems") |
| 3255 | (description |
| 3256 | "Gecode is a C++ toolkit for developing constraint-based systems |
| 3257 | and applications. It provides a modular and extensible solver.") |
| 3258 | (license license:expat)))) |
| 3259 | |
| 3260 | (define-public libfixmath |
| 3261 | (let ((commit "1416c9979635c69f344d3c1de84b3246001a6540") |
| 3262 | (revision "1")) |
| 3263 | (package |
| 3264 | (name "libfixmath") |
| 3265 | (version (git-version "0" revision commit)) |
| 3266 | (source (origin |
| 3267 | (method git-fetch) |
| 3268 | (uri (git-reference |
| 3269 | (url "https://github.com/PetteriAimonen/libfixmath") |
| 3270 | (commit commit))) |
| 3271 | (file-name (git-file-name name version)) |
| 3272 | (sha256 |
| 3273 | (base32 |
| 3274 | "1vnpycw30rq3xwqyvj20l7pnw74dc4f27304i0918igsrdsjw501")))) |
| 3275 | (build-system cmake-build-system) |
| 3276 | (arguments |
| 3277 | (list |
| 3278 | #:phases |
| 3279 | #~(modify-phases %standard-phases |
| 3280 | (replace 'install |
| 3281 | (lambda _ |
| 3282 | (let ((includes (string-append #$output "/include/libfixmath")) |
| 3283 | (lib (string-append #$output "/lib"))) |
| 3284 | (mkdir-p includes) |
| 3285 | (for-each (lambda (file) |
| 3286 | (install-file file includes)) |
| 3287 | (find-files "../source" "\\.h(pp)?$")) |
| 3288 | (for-each (lambda (file) |
| 3289 | (install-file file lib)) |
| 3290 | (find-files "." "\\.a$")))))))) |
| 3291 | (home-page "https://code.google.com/archive/p/libfixmath/") |
| 3292 | (synopsis "Cross platform fixed point maths library") |
| 3293 | (description "This library implements the @file{math.h} functions in |
| 3294 | fixed point (16.16) format.") |
| 3295 | (license license:expat)))) |
| 3296 | |
| 3297 | (define-public glucose |
| 3298 | (package |
| 3299 | (name "glucose") |
| 3300 | (version "4.2.1") |
| 3301 | (source |
| 3302 | (origin |
| 3303 | (method git-fetch) |
| 3304 | (uri (git-reference |
| 3305 | (url "https://github.com/audemard/glucose") |
| 3306 | (commit version))) |
| 3307 | (file-name (git-file-name name version)) |
| 3308 | (sha256 |
| 3309 | (base32 "0zrn4hnkf8k95dc3s3acydl1bqkr8a0axw56g7n562lx7zj7sd62")) |
| 3310 | (modules '((guix build utils))) |
| 3311 | (snippet |
| 3312 | ;; Remove code related to the parallel version as non-free; |
| 3313 | ;; from parallel/Main.cc: |
| 3314 | ;; "The parallel version of Glucose (all files modified |
| 3315 | ;; since Glucose 3.0 releases, 2013) cannot be used in any |
| 3316 | ;; competitive event" |
| 3317 | '(begin |
| 3318 | (delete-file-recursively "parallel") |
| 3319 | (substitute* "CMakeLists.txt" |
| 3320 | (("^add_library\\(glucosep.*$") |
| 3321 | "") |
| 3322 | (("^add_executable\\(glucose-syrup.*$") |
| 3323 | "") |
| 3324 | (("^target_link_libraries\\(glucose-syrup.*$") |
| 3325 | "")))))) |
| 3326 | (build-system cmake-build-system) |
| 3327 | (arguments |
| 3328 | (list |
| 3329 | #:tests? #f ;there are no tests |
| 3330 | #:configure-flags |
| 3331 | #~(list "-DBUILD_SHARED_LIBS=ON" |
| 3332 | (string-append "-DCMAKE_BUILD_RPATH=" #$output "/lib")) |
| 3333 | #:phases |
| 3334 | #~(modify-phases %standard-phases |
| 3335 | (replace 'install |
| 3336 | (lambda _ |
| 3337 | (install-file "libglucose.so" |
| 3338 | (string-append #$output "/lib")) |
| 3339 | (install-file "glucose-simp" |
| 3340 | (string-append #$output "/bin")) |
| 3341 | ;; Add a symbolic link with the customary name used until |
| 3342 | ;; the parallel version was written, and which is expected |
| 3343 | ;; by Sage. |
| 3344 | (symlink "glucose-simp" |
| 3345 | (string-append #$output "/bin/glucose"))))))) |
| 3346 | (inputs (list zlib)) |
| 3347 | (home-page "https://www.labri.fr/perso/lsimon/research/glucose/") |
| 3348 | (synopsis "SAT Solver") |
| 3349 | (description |
| 3350 | "Glucose is a SAT solver based on a scoring scheme introduced |
| 3351 | in 2009 for the clause learning mechanism of so called “Modern” SAT solvers. |
| 3352 | It is designed to be parallel.") |
| 3353 | (license license:expat))) |
| 3354 | |
| 3355 | (define-public libflame |
| 3356 | ;; The latest release (5.2.0) dates back to 2019. Use a newer one, which |
| 3357 | ;; among other things provides extra LAPACK symbols, such as 'dgemlq_' |
| 3358 | ;; (needed by LAPACKe). |
| 3359 | (let ((commit "70c19e770ead0ae846c59b59216deb16d236b40c") |
| 3360 | (revision "0")) |
| 3361 | (package |
| 3362 | (name "libflame") |
| 3363 | (version (git-version "5.2.0" revision commit)) |
| 3364 | (outputs '("out" "static")) |
| 3365 | (home-page "https://github.com/flame/libflame") |
| 3366 | (source (origin |
| 3367 | (method git-fetch) |
| 3368 | (uri (git-reference (url home-page) (commit commit))) |
| 3369 | (file-name (git-file-name name version)) |
| 3370 | (sha256 |
| 3371 | (base32 |
| 3372 | "0rk8ln5p4yybsws6p60w0vkxbqp53jddv90brlgf60mk6lv51sxl")))) |
| 3373 | (build-system gnu-build-system) |
| 3374 | (arguments |
| 3375 | (list #:configure-flags |
| 3376 | ;; Sensible defaults: https://github.com/flame/libflame/issues/28 |
| 3377 | #~(list "--enable-dynamic-build" |
| 3378 | "--enable-max-arg-list-hack" |
| 3379 | "--enable-lapack2flame" |
| 3380 | "--enable-verbose-make-output" |
| 3381 | "--enable-multithreading=pthreads" ; Openblas isn't built with openmp. |
| 3382 | #$@(if (target-x86?) |
| 3383 | #~("--enable-vector-intrinsics=sse") |
| 3384 | #~()) |
| 3385 | "--enable-supermatrix" |
| 3386 | "--enable-memory-alignment=16" |
| 3387 | "--enable-ldim-alignment") |
| 3388 | #:make-flags #~(list "FC=gfortran -fPIC") |
| 3389 | #:phases |
| 3390 | #~(modify-phases %standard-phases |
| 3391 | (add-after 'unpack 'patch-/usr/bin/env-bash |
| 3392 | (lambda _ |
| 3393 | (substitute* "build/config.mk.in" |
| 3394 | (("/usr/bin/env bash") |
| 3395 | (which "bash"))))) |
| 3396 | (replace 'check |
| 3397 | (lambda* (#:key tests? #:allow-other-keys) |
| 3398 | (substitute* "test/Makefile" |
| 3399 | (("LIBBLAS .*") |
| 3400 | "LIBBLAS = -lopenblas\n") |
| 3401 | (("LIBLAPACK .*") |
| 3402 | "LIBLAPACK = -lopenblas\n")) |
| 3403 | (when tests? |
| 3404 | (with-directory-excursion "test" |
| 3405 | (mkdir "obj") |
| 3406 | (invoke "make") |
| 3407 | (invoke "./test_libflame.x"))))) |
| 3408 | (add-after 'install 'install-static |
| 3409 | (lambda* (#:key outputs #:allow-other-keys) |
| 3410 | (let ((out (assoc-ref outputs "out")) |
| 3411 | (static (assoc-ref outputs "static"))) |
| 3412 | (mkdir-p (string-append static "/lib")) |
| 3413 | (rename-file (string-append out |
| 3414 | "/lib/libflame.a") |
| 3415 | (string-append static |
| 3416 | "/lib/libflame.a")) |
| 3417 | (install-file (string-append out |
| 3418 | "/include/FLAME.h") |
| 3419 | (string-append static "/include")))))))) |
| 3420 | (inputs (list gfortran)) |
| 3421 | (native-inputs (list openblas perl python-wrapper)) |
| 3422 | (synopsis "High-performance library for @acronym{DLA, dense linear algebra} computations") |
| 3423 | (description "@code{libflame} is a portable library for dense matrix |
| 3424 | computations, providing much of the functionality present in LAPACK, developed |
| 3425 | by current and former members of the @acronym{SHPC, Science of High-Performance |
| 3426 | Computing} group in the @url{https://www.ices.utexas.edu/, Institute for |
| 3427 | Computational Engineering and Sciences} at The University of Texas at Austin. |
| 3428 | @code{libflame} includes a compatibility layer, @code{lapack2flame}, which |
| 3429 | includes a complete LAPACK implementation.") |
| 3430 | (license license:bsd-3)))) |
| 3431 | |
| 3432 | (define-public hpcombi |
| 3433 | (package |
| 3434 | (name "hpcombi") |
| 3435 | (version "1.1.0") |
| 3436 | (source (origin |
| 3437 | (method git-fetch) |
| 3438 | (uri (git-reference |
| 3439 | (url "https://github.com/libsemigroups/hpcombi") |
| 3440 | (commit (string-append "v" version)))) |
| 3441 | (file-name (git-file-name name version)) |
| 3442 | (sha256 |
| 3443 | (base32 |
| 3444 | "0xxqjz4lba57vn65m2k5jxrz0v7y6jwnhxwg6njd4vrafv5w17yv")))) |
| 3445 | (native-inputs |
| 3446 | (list catch2)) |
| 3447 | (build-system cmake-build-system) |
| 3448 | (home-page "https://libsemigroups.github.io/HPCombi/") |
| 3449 | (synopsis "Fast combinatorics in C++ using SSE/AVX instruction sets") |
| 3450 | (description "HPCombi is a C++17 header-only library using the SSE and AVX |
| 3451 | instruction sets, and some equivalents, for very fast manipulation of |
| 3452 | combinatorial objects such as transformations, permutations, and boolean |
| 3453 | matrices of small size.") |
| 3454 | (license license:gpl3+))) |
| 3455 | |
| 3456 | (define-public scasp |
| 3457 | (package |
| 3458 | (name "scasp") |
| 3459 | (version "1.1.4") |
| 3460 | (source (origin |
| 3461 | (method git-fetch) |
| 3462 | (uri (git-reference |
| 3463 | (url "https://github.com/SWI-Prolog/sCASP") |
| 3464 | (commit (string-append "V" version)))) |
| 3465 | (file-name (git-file-name name version)) |
| 3466 | (sha256 |
| 3467 | (base32 |
| 3468 | "1m4fs1ywich9cwj55miqp5zxs7c1fw9wvy7lcj5rkrgcanks5qk4")))) |
| 3469 | (build-system copy-build-system) |
| 3470 | (arguments |
| 3471 | (list |
| 3472 | #:install-plan #~`(("scasp" "bin/") |
| 3473 | ("prolog" "lib/swipl/library")) |
| 3474 | #:modules `((guix build copy-build-system) |
| 3475 | ((guix build gnu-build-system) #:prefix gnu:) |
| 3476 | (guix build utils) |
| 3477 | (ice-9 regex)) |
| 3478 | #:phases |
| 3479 | #~(modify-phases %standard-phases |
| 3480 | (add-before 'install 'build (assoc-ref gnu:%standard-phases 'build)) |
| 3481 | (add-after 'build 'check (assoc-ref gnu:%standard-phases 'check))))) |
| 3482 | (native-inputs (list swi-prolog)) |
| 3483 | (home-page "https://github.com/SWI-Prolog/sCASP") |
| 3484 | (synopsis "Interpreter for ASP programs with constraints") |
| 3485 | (description "@code{s(CASP)} is a top-down interpreter for ASP programs |
| 3486 | with constraints.") |
| 3487 | (license license:asl2.0))) |
| 3488 | |
| 3489 | (define-public scs |
| 3490 | (package |
| 3491 | (name "scs") |
| 3492 | (version "3.2.10") |
| 3493 | (source |
| 3494 | (origin |
| 3495 | (method git-fetch) |
| 3496 | (uri (git-reference |
| 3497 | (url "https://github.com/cvxgrp/scs") |
| 3498 | (commit version))) |
| 3499 | (file-name (git-file-name name version)) |
| 3500 | (sha256 |
| 3501 | (base32 "00csacax6gh3cj39044iijsy6gkz0d1ac805z13qkllfs6bsvchy")))) |
| 3502 | (build-system cmake-build-system) |
| 3503 | (inputs |
| 3504 | (list lapack |
| 3505 | openblas)) |
| 3506 | (home-page "https://osqp.org/") |
| 3507 | (synopsis "Splitting Conic Solver") |
| 3508 | (description |
| 3509 | "SCS (splitting conic solver) is a numerical optimization package for |
| 3510 | solving large-scale convex cone problems.") |
| 3511 | (license license:expat))) |
| 3512 | |
| 3513 | (define-public ceres |
| 3514 | (package |
| 3515 | (name "ceres-solver") |
| 3516 | (version "2.0.0") |
| 3517 | (home-page "http://ceres-solver.org/") |
| 3518 | (source (origin |
| 3519 | (method url-fetch) |
| 3520 | (uri (string-append home-page "ceres-solver-" |
| 3521 | version ".tar.gz")) |
| 3522 | (sha256 |
| 3523 | (base32 |
| 3524 | "00vng9vnmdb1qga01m0why90m0041w7bn6kxa2h4m26aflfqla8h")))) |
| 3525 | (build-system cmake-build-system) |
| 3526 | (arguments |
| 3527 | ;; TODO: Build HTML user documentation and install separately. |
| 3528 | '(#:configure-flags '("-DBUILD_EXAMPLES=OFF" |
| 3529 | "-DBUILD_SHARED_LIBS=ON") |
| 3530 | |
| 3531 | #:phases (modify-phases %standard-phases |
| 3532 | (add-before 'configure 'set-library-directory |
| 3533 | (lambda _ |
| 3534 | ;; Install libraries to lib/, not lib64/. |
| 3535 | (substitute* "CMakeLists.txt" |
| 3536 | (("set\\(LIB_SUFFIX \"64\"\\)") |
| 3537 | "set(LIB_SUFFIX \"\")"))))))) |
| 3538 | (native-inputs (list pkg-config)) |
| 3539 | ;; These inputs need to be propagated to satisfy dependent packages. |
| 3540 | (propagated-inputs (list eigen gflags glog)) |
| 3541 | (inputs (list openblas suitesparse)) |
| 3542 | (synopsis "C++ library for solving large optimization problems") |
| 3543 | (description |
| 3544 | "Ceres Solver is a C++ library for modeling and solving large, |
| 3545 | complicated optimization problems. It is a feature rich, mature and |
| 3546 | performant library which has been used in production since 2010. Ceres Solver |
| 3547 | can solve two kinds of problems: |
| 3548 | @enumerate |
| 3549 | @item non-linear least squares problems with bounds constraints; |
| 3550 | @item general unconstrained optimization problems. |
| 3551 | @end enumerate\n") |
| 3552 | (license license:bsd-3) |
| 3553 | |
| 3554 | ;; Mark as tunable to take advantage of SIMD code in Eigen. |
| 3555 | (properties `((tunable? . #t))))) |
| 3556 | |
| 3557 | (define-public ceres-solver-benchmarks |
| 3558 | (package |
| 3559 | (inherit ceres) |
| 3560 | (name "ceres-solver-benchmarks") |
| 3561 | (arguments |
| 3562 | '(#:modules ((ice-9 popen) |
| 3563 | (ice-9 rdelim) |
| 3564 | (guix build utils) |
| 3565 | (guix build cmake-build-system)) |
| 3566 | |
| 3567 | #:phases (modify-phases %standard-phases |
| 3568 | (delete 'configure) |
| 3569 | (replace 'build |
| 3570 | (lambda* (#:key outputs #:allow-other-keys) |
| 3571 | (let* ((out (assoc-ref outputs "out")) |
| 3572 | (bin (string-append out "/bin"))) |
| 3573 | (define flags |
| 3574 | (string-tokenize |
| 3575 | (read-line (open-pipe* OPEN_READ |
| 3576 | "pkg-config" "eigen3" |
| 3577 | "--cflags")))) |
| 3578 | |
| 3579 | (define (compile-file top-dir) |
| 3580 | (lambda (file) |
| 3581 | (let ((source (string-append file ".cc"))) |
| 3582 | (format #t "building '~a'...~%" file) |
| 3583 | (apply invoke "c++" "-fopenmp" "-O2" "-g" "-DNDEBUG" |
| 3584 | source "-lceres" "-lbenchmark" "-lglog" |
| 3585 | "-pthread" |
| 3586 | "-o" (string-append bin "/" file) |
| 3587 | "-I" top-dir flags)))) |
| 3588 | |
| 3589 | (mkdir-p bin) |
| 3590 | (with-directory-excursion "internal/ceres" |
| 3591 | (for-each (compile-file "..") |
| 3592 | '("schur_eliminator_benchmark" |
| 3593 | "small_blas_gemm_benchmark" |
| 3594 | "small_blas_gemv_benchmark")) |
| 3595 | (with-directory-excursion "autodiff_benchmarks" |
| 3596 | ((compile-file "../..") "autodiff_benchmarks")))))) |
| 3597 | (delete 'check) |
| 3598 | (delete 'install)))) |
| 3599 | (inputs (modify-inputs inputs |
| 3600 | (prepend googlebenchmark ceres))) |
| 3601 | (synopsis "Benchmarks of the Ceres optimization problem solver"))) |
| 3602 | |
| 3603 | ;; For a fully featured Octave, users are strongly recommended also to install |
| 3604 | ;; the following packages: less, ghostscript, gnuplot. |
| 3605 | (define-public octave-cli |
| 3606 | (package |
| 3607 | (name "octave-cli") |
| 3608 | (version "11.3.0") |
| 3609 | (source |
| 3610 | (origin |
| 3611 | (method url-fetch) |
| 3612 | (uri (string-append "mirror://gnu/octave/octave-" |
| 3613 | version ".tar.xz")) |
| 3614 | (sha256 |
| 3615 | (base32 |
| 3616 | "1q8jbrpvydqgp5bvy491nmiv6zm12mjzxd7wybsd3ridkcag701b")))) |
| 3617 | (build-system gnu-build-system) |
| 3618 | (inputs |
| 3619 | (list alsa-lib |
| 3620 | arpack-ng |
| 3621 | bdb |
| 3622 | curl |
| 3623 | fftw |
| 3624 | fftwf |
| 3625 | fltk |
| 3626 | fontconfig |
| 3627 | freetype |
| 3628 | gl2ps |
| 3629 | glpk |
| 3630 | glu |
| 3631 | graphicsmagick |
| 3632 | |
| 3633 | ;; TODO: libjpeg-turbo is indirectly required through libtiff. In |
| 3634 | ;; the next rebuild cycle, add an absolute reference for -ljpeg in |
| 3635 | ;; libtiff.la instead of having to provide it here. |
| 3636 | libjpeg-turbo |
| 3637 | |
| 3638 | hdf5 |
| 3639 | libsndfile |
| 3640 | libxft |
| 3641 | mesa |
| 3642 | openblas |
| 3643 | pcre |
| 3644 | portaudio |
| 3645 | qhull |
| 3646 | rapidjson |
| 3647 | readline |
| 3648 | suitesparse |
| 3649 | zlib)) |
| 3650 | (native-inputs |
| 3651 | (list gfortran |
| 3652 | pkg-config |
| 3653 | perl |
| 3654 | ;; The following inputs are not actually used in the build process. |
| 3655 | ;; However, the ./configure gratuitously tests for their existence and |
| 3656 | ;; assumes that programs not present at build time are also not, and |
| 3657 | ;; can never be, available at run time! If these inputs are therefore |
| 3658 | ;; not present, support for them will be built out. However, Octave |
| 3659 | ;; will still run without them, albeit without the features they |
| 3660 | ;; provide. |
| 3661 | less |
| 3662 | ghostscript |
| 3663 | gnuplot |
| 3664 | texinfo |
| 3665 | zip)) |
| 3666 | ;; Octave code uses this variable to detect directories holding multiple CA |
| 3667 | ;; certificates to verify peers with. This is required for the networking |
| 3668 | ;; functions that require encryption to work properly. |
| 3669 | (native-search-paths |
| 3670 | (list (search-path-specification |
| 3671 | (variable "CURLOPT_CAPATH") |
| 3672 | (files '("etc/ssl/certs"))))) |
| 3673 | (arguments |
| 3674 | (list |
| 3675 | #:configure-flags |
| 3676 | #~(list (string-append "--with-shell=" |
| 3677 | (assoc-ref %build-inputs "bash") |
| 3678 | "/bin/sh") |
| 3679 | |
| 3680 | ;; XXX: Without this flag, linking octave-cli fails with |
| 3681 | ;; undefined references to 'logf@GLIBCXX_3.4' et.al. due to |
| 3682 | ;; not pulling in liboctinterp.la for -lstdc++. |
| 3683 | "--enable-link-all-dependencies") |
| 3684 | #:phases |
| 3685 | #~(modify-phases %standard-phases |
| 3686 | (add-before 'check 'set-home |
| 3687 | (lambda _ |
| 3688 | (setenv "HOME" (getenv "TMPDIR")))) |
| 3689 | (add-after 'configure 'configure-makeinfo |
| 3690 | (lambda* (#:key inputs #:allow-other-keys) |
| 3691 | (substitute* "libinterp/corefcn/help.h" |
| 3692 | (("\"makeinfo\"") |
| 3693 | (format #f "~s" |
| 3694 | (search-input-file inputs "bin/makeinfo"))))))))) |
| 3695 | (home-page "https://www.gnu.org/software/octave/") |
| 3696 | (synopsis "High-level language for numerical computation (no GUI)") |
| 3697 | (description "GNU Octave is a high-level interpreted language that is |
| 3698 | specialized for numerical computations. It can be used for both linear and |
| 3699 | non-linear applications and it provides great support for visualizing results. |
| 3700 | Work may be performed both at the interactive command-line as well as via |
| 3701 | script files.") |
| 3702 | (license license:gpl3+))) |
| 3703 | |
| 3704 | (define-public octave |
| 3705 | (package (inherit octave-cli) |
| 3706 | (name "octave") |
| 3707 | (arguments |
| 3708 | (substitute-keyword-arguments arguments |
| 3709 | ((#:modules modules %default-gnu-modules) |
| 3710 | `((guix build qt-utils) ,@modules)) |
| 3711 | ((#:imported-modules imported-modules %default-gnu-imported-modules) |
| 3712 | `((guix build qt-utils) ,@imported-modules)) |
| 3713 | ((#:phases phases) |
| 3714 | #~(modify-phases #$phases |
| 3715 | (add-after 'install 'wrap-qt |
| 3716 | (lambda* (#:key inputs #:allow-other-keys) |
| 3717 | (for-each (lambda (path) |
| 3718 | (wrap-qt-program |
| 3719 | (string-append "../" path) ;relative to bin |
| 3720 | #:output #$output #:inputs inputs)) |
| 3721 | (with-directory-excursion #$output |
| 3722 | (find-files "libexec" "^octave-gui$"))))))))) |
| 3723 | (native-inputs |
| 3724 | (modify-inputs native-inputs |
| 3725 | (prepend qttools-5 ;for qthelpgenerator |
| 3726 | qttools ;for lrelease |
| 3727 | (texlive-local-tree (list texlive-epsf))))) ;for texi2dvi |
| 3728 | (inputs |
| 3729 | (modify-inputs inputs |
| 3730 | (prepend qscintilla-qt6 qtbase qtwayland qt5compat))) |
| 3731 | (synopsis "High-level language for numerical computation (with GUI)"))) |
| 3732 | |
| 3733 | (define-public opencascade-occt |
| 3734 | (package |
| 3735 | (name "opencascade-occt") |
| 3736 | (version "7.9.3") |
| 3737 | (properties |
| 3738 | '((release-tag-prefix . "^V") |
| 3739 | (release-tag-version-delimiter . "_"))) |
| 3740 | (source |
| 3741 | (origin |
| 3742 | (method git-fetch) |
| 3743 | (uri (git-reference |
| 3744 | (url "https://git.dev.opencascade.org/repos/occt.git") |
| 3745 | (commit |
| 3746 | (string-append "V" |
| 3747 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) |
| 3748 | version))))) |
| 3749 | (file-name (git-file-name name version)) |
| 3750 | (sha256 |
| 3751 | (base32 "1wmrbr5yar3iz1c80h6diyqigd8hv05j7wral2kkrbvhzpwjd7k6")) |
| 3752 | (snippet |
| 3753 | #~(begin |
| 3754 | (use-modules (guix build utils)) |
| 3755 | ;; Remove files specific to non-free operating systems. |
| 3756 | (delete-file-recursively "samples/ios") |
| 3757 | (delete-file-recursively "samples/mfc") |
| 3758 | (delete-file-recursively "samples/qt/FuncDemo") |
| 3759 | ;; Remove references to deleted files. |
| 3760 | (substitute* "dox/FILES_HTML.txt" |
| 3761 | ((".*standard.*") "" ) |
| 3762 | ((".*UIKitSample.*") "")))))) |
| 3763 | (build-system cmake-build-system) |
| 3764 | (arguments |
| 3765 | (list |
| 3766 | ;; There is no test target for make. OCCT provides an |
| 3767 | ;; 'Automated Testing System', which may be accessed after |
| 3768 | ;; installation via the draw.sh script. draw.sh is located in |
| 3769 | ;; the bin directory. For details see: |
| 3770 | ;; https://dev.opencascade.org/doc/occt-7.3.0/overview/html/\ |
| 3771 | ;; occt_dev_guides__tests.html |
| 3772 | #:tests? #f |
| 3773 | #:configure-flags |
| 3774 | #~(list "-DCMAKE_CXX_FLAGS=-fpermissive" ;from unsigned char* to char* |
| 3775 | "-DUSE_DRACO:BOOL=ON" |
| 3776 | "-DUSE_FREEIMAGE:BOOL=ON" |
| 3777 | "-DUSE_RAPIDJSON:BOOL=ON" |
| 3778 | "-DUSE_TBB:BOOL=ON" |
| 3779 | "-DUSE_VTK:BOOL=ON" |
| 3780 | "-DBUILD_DOC_Overview:BOOL=OFF" |
| 3781 | "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" |
| 3782 | "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" |
| 3783 | "-UCMAKE_INSTALL_LIBDIR"))) |
| 3784 | (native-inputs (list doxygen fontconfig)) |
| 3785 | (inputs |
| 3786 | (list draco |
| 3787 | freetype |
| 3788 | freeimage |
| 3789 | glu |
| 3790 | libxext |
| 3791 | libxi |
| 3792 | libxmu |
| 3793 | mesa |
| 3794 | onetbb |
| 3795 | rapidjson |
| 3796 | tcl |
| 3797 | tk |
| 3798 | vtk)) |
| 3799 | ;; TODO: build Overview documentation and add 'doc' output. |
| 3800 | (home-page "https://dev.opencascade.org") |
| 3801 | (synopsis "Libraries for 3D modeling and numerical simulation") |
| 3802 | (description |
| 3803 | "Open CASCADE is a set of libraries for the development of applications |
| 3804 | dealing with 3D CAD data or requiring industrial 3D capabilities. It includes |
| 3805 | C++ class libraries providing services for 3D surface and solid modeling, CAD |
| 3806 | data exchange, and visualization. It is used for development of specialized |
| 3807 | software dealing with 3D models in design (CAD), manufacturing (CAM), |
| 3808 | numerical simulation (CAE), measurement equipment (CMM), and quality |
| 3809 | control (CAQ) domains. |
| 3810 | |
| 3811 | This is the certified version of the Open Cascade Technology (OCCT) library.") |
| 3812 | (license (list ;; OCCT library: |
| 3813 | license:lgpl2.1; with an exception for the use of header |
| 3814 | ; files, see OCCT_LGPL_EXCEPTION.txt. |
| 3815 | ;; Files src/OpenGl/glext.h, adm/cmake/cotire.cmake and |
| 3816 | ;; src/OpenGl/OpenGl_HaltonSampler.hxx: |
| 3817 | license:expat |
| 3818 | ;; Files src/ExprIntrp/ExprIntrp.tab.* and |
| 3819 | ;; src/StepFile/step.tab.*: |
| 3820 | license:gpl3+ ; with Bison 2.2 exception. |
| 3821 | ;; File src/NCollection/NCollection_UtfIterator.lxx: |
| 3822 | (license:non-copyleft |
| 3823 | "https://www.unicode.org/license.html") |
| 3824 | ;; File src/NCollection/NCollection_StdAllocator.hxx: |
| 3825 | license:public-domain)))) |
| 3826 | |
| 3827 | (define-public fast-downward |
| 3828 | (package |
| 3829 | (name "fast-downward") |
| 3830 | (version "23.06.0") |
| 3831 | (source (origin |
| 3832 | (method git-fetch) |
| 3833 | (uri (git-reference |
| 3834 | (url "https://github.com/aibasel/downward") |
| 3835 | (commit (string-append "release-" version)))) |
| 3836 | (file-name (git-file-name name version)) |
| 3837 | (sha256 |
| 3838 | (base32 "1xrgnvbkzkdf6srbrlsnf4qrgp0f1lkk7yxf34ynna0w49l468d4")))) |
| 3839 | (build-system cmake-build-system) |
| 3840 | (arguments |
| 3841 | (list |
| 3842 | #:tests? #f ; no tests |
| 3843 | #:phases |
| 3844 | #~(modify-phases %standard-phases |
| 3845 | (add-after 'unpack 'fix-driver |
| 3846 | (lambda* (#:key outputs #:allow-other-keys) |
| 3847 | (substitute* "driver/run_components.py" |
| 3848 | ;; strip gratuitous "bin" |
| 3849 | (("os\\.path\\.join\\((.*), \"bin\"\\)" all keep) |
| 3850 | (string-append "os.path.join(" keep ")"))))) |
| 3851 | (add-before 'configure 'chdir |
| 3852 | (lambda _ (chdir "src"))) |
| 3853 | (replace 'install |
| 3854 | (lambda* (#:key outputs #:allow-other-keys) |
| 3855 | (let* ((out (assoc-ref outputs "out")) |
| 3856 | (dest (string-append out "/libexec/fast-downward" |
| 3857 | "/builds/release"))) |
| 3858 | (mkdir-p dest) |
| 3859 | (with-directory-excursion "bin" |
| 3860 | (install-file "downward" dest) |
| 3861 | (copy-recursively "translate" |
| 3862 | (string-append dest "/translate")))))) |
| 3863 | (add-after 'install 'install-driver |
| 3864 | (lambda* (#:key outputs #:allow-other-keys) |
| 3865 | (with-directory-excursion ".." |
| 3866 | (let* ((out (assoc-ref outputs "out")) |
| 3867 | (bin (string-append out "/bin/fast-downward")) |
| 3868 | (dest (string-append out "/libexec/fast-downward"))) |
| 3869 | (copy-recursively "driver" |
| 3870 | (string-append dest "/driver")) |
| 3871 | (mkdir-p (dirname bin)) |
| 3872 | (copy-file "fast-downward.py" bin) |
| 3873 | (wrap-program bin |
| 3874 | `("PYTHONPATH" prefix (,dest)))))))))) |
| 3875 | (inputs (list bash-minimal python)) |
| 3876 | (home-page "https://www.fast-downward.org/") |
| 3877 | (synopsis "Domain-independent classical planning system") |
| 3878 | (description "Fast Downward is a portfolio-based planning system that |
| 3879 | supports the propositional fragment of PDDL2.2.") |
| 3880 | (license license:gpl3+))) |
| 3881 | |
| 3882 | (define-public gmsh |
| 3883 | (package |
| 3884 | (name "gmsh") |
| 3885 | (version "4.15.2") |
| 3886 | (source |
| 3887 | (origin |
| 3888 | (method git-fetch) |
| 3889 | (uri (git-reference |
| 3890 | (url "https://gitlab.onelab.info/gmsh/gmsh.git") |
| 3891 | (commit |
| 3892 | (string-append "gmsh_" |
| 3893 | (string-replace-substring version "." "_"))))) |
| 3894 | (file-name (git-file-name name version)) |
| 3895 | (sha256 |
| 3896 | (base32 "1z5fl1im7mss5w8c8ngbhj5wbx0b8knmwg5hfdg036yb0x5pdc4j")) |
| 3897 | (modules '((guix build utils))) |
| 3898 | (snippet |
| 3899 | '(delete-file-recursively "contrib/metis")))) |
| 3900 | (build-system cmake-build-system) |
| 3901 | (arguments |
| 3902 | (list |
| 3903 | #:configure-flags |
| 3904 | #~(list "-DENABLE_SYSTEM_CONTRIB:BOOL=ON" |
| 3905 | "-DENABLE_BUILD_SHARED:BOOL=ON" |
| 3906 | "-DENABLE_BUILD_DYNAMIC:BOOL=ON") |
| 3907 | #:imported-modules (append %cmake-build-system-modules |
| 3908 | %pyproject-build-system-modules) |
| 3909 | #:modules '(((guix build pyproject-build-system) #:select (site-packages)) |
| 3910 | (guix build cmake-build-system) |
| 3911 | (guix build utils)) |
| 3912 | #:phases |
| 3913 | #~(modify-phases %standard-phases |
| 3914 | (add-after 'unpack 'patch-paths |
| 3915 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 3916 | ;; Use the standard Guix site-package path for |
| 3917 | ;; installation of the Python API. |
| 3918 | (substitute* "CMakeLists.txt" |
| 3919 | (("include\\(GNUInstallDirs\\)\n") |
| 3920 | (string-append "include(GNUInstallDirs)\n" |
| 3921 | " set(GMSH_PY_LIB " |
| 3922 | (site-packages inputs outputs) ")\n")) |
| 3923 | (("\\$\\{GMSH\\_PY\\} DESTINATION \\$\\{GMSH\\_LIB\\}") |
| 3924 | "${GMSH_PY} DESTINATION ${GMSH_PY_LIB}")) |
| 3925 | ;; Find the shared library. |
| 3926 | (let ((libgmsh (string-append #$output |
| 3927 | "/lib/libgmsh.so"))) |
| 3928 | (substitute* "api/gmsh.py" |
| 3929 | (("find_library\\(\"gmsh\"\\)") |
| 3930 | (simple-format #f "\"~a\"" libgmsh))))))))) |
| 3931 | (inputs |
| 3932 | (list fltk |
| 3933 | fontconfig |
| 3934 | glu |
| 3935 | gmp |
| 3936 | hdf5 |
| 3937 | libx11 |
| 3938 | libxext |
| 3939 | libxft |
| 3940 | mesa |
| 3941 | metis |
| 3942 | openblas |
| 3943 | opencascade-occt)) |
| 3944 | (native-inputs |
| 3945 | (list python-wrapper)) |
| 3946 | (home-page "https://gmsh.info/") |
| 3947 | (synopsis "3D finite element grid generator") |
| 3948 | (description "Gmsh is a 3D finite element grid generator with a built-in |
| 3949 | CAD engine and post-processor. Its design goal is to provide a fast, light |
| 3950 | and user-friendly meshing tool with parametric input and advanced |
| 3951 | visualization capabilities. Gmsh is built around four modules: geometry, |
| 3952 | mesh, solver and post-processing. The specification of any input to these |
| 3953 | modules is done either interactively using the graphical user interface or in |
| 3954 | ASCII text files using Gmsh's own scripting language.") |
| 3955 | (license license:gpl2+))) |
| 3956 | |
| 3957 | (define-public veusz |
| 3958 | ;; TODO: Maybe move to (gnu packages plotutils) |
| 3959 | (package |
| 3960 | (name "veusz") |
| 3961 | (version "4.2.1") |
| 3962 | (source |
| 3963 | (origin |
| 3964 | (method git-fetch) |
| 3965 | (uri (git-reference |
| 3966 | (url "https://github.com/veusz/veusz") |
| 3967 | (commit (string-append "veusz-" version)))) |
| 3968 | (file-name (git-file-name name version)) |
| 3969 | (sha256 |
| 3970 | (base32 "1wcqrzcp1h95qca25w0mrzrvq6sifvndmn2223ak0b4p1dssq1l1")))) |
| 3971 | (build-system pyproject-build-system) |
| 3972 | (arguments |
| 3973 | (list |
| 3974 | ;; TODO: When run with custom test backend "tests/runselftest.py": |
| 3975 | ;; <...> |
| 3976 | ;; qt.qpa.plugin: Could not load the Qt platform plugin |
| 3977 | ;; "xcb" in "" even though it was found. This application failed to |
| 3978 | ;; start because no Qt platform plugin could be |
| 3979 | ;; initialized. Reinstalling the application may fix this problem. |
| 3980 | #:tests? #f |
| 3981 | #:imported-modules (append %qt-build-system-modules |
| 3982 | %pyproject-build-system-modules) |
| 3983 | #:modules '((guix build pyproject-build-system) |
| 3984 | ((guix build qt-build-system) #:prefix qt:) |
| 3985 | (guix build utils)) |
| 3986 | #:phases |
| 3987 | #~(modify-phases %standard-phases |
| 3988 | ;; Veusz uses python's site-packages to look for pyqt6_include_dir. |
| 3989 | (add-after 'unpack 'fix-pyqt6-include-dir |
| 3990 | (lambda _ |
| 3991 | (substitute* "pyqt_setuptools.py" |
| 3992 | (("get_path\\('platlib'\\)") |
| 3993 | (format #f "~s" |
| 3994 | (string-append |
| 3995 | #$(this-package-input "python-pyqt") |
| 3996 | "/lib/python" |
| 3997 | #$(version-major+minor |
| 3998 | (package-version python-wrapper)) |
| 3999 | "/site-packages")))))) |
| 4000 | (add-after 'wrap 'qt-wrap |
| 4001 | (lambda args |
| 4002 | (apply (assoc-ref qt:%standard-phases 'qt-wrap) |
| 4003 | `(,@args #:qtbase #$(this-package-input "qtbase")))))))) |
| 4004 | (native-inputs |
| 4005 | (list pkg-config |
| 4006 | python-setuptools |
| 4007 | qttools)) |
| 4008 | (inputs |
| 4009 | (list bash-minimal |
| 4010 | ghostscript ;optional, for EPS/PS output |
| 4011 | python-dbus |
| 4012 | python-numpy |
| 4013 | python-pyqt-6 |
| 4014 | qtbase |
| 4015 | qtsvg |
| 4016 | qtwayland |
| 4017 | ;; |
| 4018 | ;; These are extra requirements which are listed for the reference, |
| 4019 | ;; try not to include them directly and install on demand to reduce |
| 4020 | ;; closure size and relax module cycles (maths<-->astronomy, |
| 4021 | ;; maths<-->python-science). |
| 4022 | ;; |
| 4023 | ;; [optional] |
| 4024 | ;; python-astropy |
| 4025 | ;; python-pyemf3 ;not packaged |
| 4026 | ;; python-iminuit |
| 4027 | python-h5py)) ;for HDF5 data |
| 4028 | (home-page "https://veusz.github.io/") |
| 4029 | (synopsis "Scientific plotting package") |
| 4030 | (description |
| 4031 | "Veusz is a scientific plotting and graphing program with a graphical |
| 4032 | user interface, designed to produce publication-ready 2D and 3D plots. In |
| 4033 | addition it can be used as a module in Python for plotting. It supports |
| 4034 | vector and bitmap output, including PDF, Postscript, SVG and EMF.") |
| 4035 | (license license:gpl2+))) |
| 4036 | |
| 4037 | (define-public voro++ |
| 4038 | (package |
| 4039 | (name "voro++") |
| 4040 | (version "0.4.6") |
| 4041 | (source |
| 4042 | (origin |
| 4043 | (method git-fetch) |
| 4044 | (uri (git-reference |
| 4045 | (url "https://github.com/chr1shr/voro") |
| 4046 | (commit (string-append "v" version)))) |
| 4047 | (file-name (git-file-name name version)) |
| 4048 | (sha256 |
| 4049 | (base32 "0rxyb662w9y3xadyxz2x7gvc7mafbhl13szdc55fsk5sygpdlkv5")))) |
| 4050 | (build-system gnu-build-system) |
| 4051 | (arguments |
| 4052 | (list |
| 4053 | #:make-flags #~(list (string-append "PREFIX=" #$output)) |
| 4054 | #:phases |
| 4055 | #~(modify-phases %standard-phases |
| 4056 | (delete 'configure) ;no configure |
| 4057 | (replace 'check |
| 4058 | ;; There is no test suite but the project provides a verity of |
| 4059 | ;; examples to check performance, target "all" build each example |
| 4060 | ;; (basic, walls, custom, extra, degenerate, and interface), see |
| 4061 | ;; detailed description in "examples/README". |
| 4062 | ;; |
| 4063 | ;; Running timing example only: |
| 4064 | ;; These codes and scripts can be used to test the code's |
| 4065 | ;; performance. The program timing_test.cc creates a container |
| 4066 | ;; with 100000 particles, and then times the computation of all |
| 4067 | ;; the cells in the container, using the dummy function |
| 4068 | ;; compute_all_cells(). |
| 4069 | (lambda* (#:key tests? #:allow-other-keys) |
| 4070 | (when tests? |
| 4071 | (with-directory-excursion "examples/timing" |
| 4072 | (invoke "perl" "timing_test.pl")))))))) |
| 4073 | (native-inputs |
| 4074 | (list perl)) |
| 4075 | (home-page "https://math.lbl.gov/voro++/") |
| 4076 | (synopsis "C++ library for the computation of the Voronoi diagram") |
| 4077 | (description |
| 4078 | "Voro++ is a software library for carrying out three-dimensional |
| 4079 | computations of the Voronoi tessellation. A distinguishing feature of the |
| 4080 | Voro++ library is that it carries out cell-based calculations, computing the |
| 4081 | Voronoi cell for each particle individually. It is particularly well-suited |
| 4082 | for applications that rely on cell-based statistics, where features of Voronoi |
| 4083 | cells (eg. volume, centroid, number of faces) can be used to analyze a system |
| 4084 | of particles. |
| 4085 | |
| 4086 | Voro++ comprises of several C++ classes that can be built as a static library. |
| 4087 | A command-line utility is also provided that can use most features of the |
| 4088 | code. The direct cell-by-cell construction makes the library particularly |
| 4089 | well-suited to handling special boundary conditions and walls. It employs |
| 4090 | algorithms that are tolerant for numerical precision errors, it exhibits high |
| 4091 | performance, and it has been successfully employed on very large particle |
| 4092 | systems.") |
| 4093 | (license license:bsd-3))) |
| 4094 | |
| 4095 | (define-public maxflow |
| 4096 | (package |
| 4097 | (name "maxflow") |
| 4098 | ;; Versioning is ambiguous: the git tag matching this commit is ‘3.0.5’, |
| 4099 | ;; which matches CMakeLists.txt, but README.md and CHANGES say ‘3.04’. |
| 4100 | (version "3.0.5") |
| 4101 | (source (origin |
| 4102 | (method git-fetch) |
| 4103 | (uri (git-reference |
| 4104 | (url "https://github.com/gerddie/maxflow") |
| 4105 | (commit version))) |
| 4106 | (file-name (git-file-name name version)) |
| 4107 | (sha256 |
| 4108 | (base32 |
| 4109 | "0rll38whw55h0vcjrrwdnh9ascvxby0ph7n1l0d12z17cg215kkb")))) |
| 4110 | (build-system cmake-build-system) |
| 4111 | (home-page "https://pub.ist.ac.at/~vnk/software.html") |
| 4112 | (synopsis "Library implementing Maxflow algorithm") |
| 4113 | (description "An implementation of the maxflow algorithm described in |
| 4114 | @cite{An Experimental Comparison of Min-Cut/Max-Flow Algorithms for |
| 4115 | Energy Minimization in Computer Vision.\n |
| 4116 | Yuri Boykov and Vladimir Kolmogorov.\n |
| 4117 | In IEEE Transactions on Pattern Analysis and Machine Intelligence,\n |
| 4118 | September 2004}") |
| 4119 | (license license:gpl3+))) |
| 4120 | |
| 4121 | (define-public petsc |
| 4122 | (package |
| 4123 | (name "petsc") |
| 4124 | (version "3.24.0") |
| 4125 | (source |
| 4126 | (origin |
| 4127 | (method url-fetch) |
| 4128 | ;; The *-lite-* tarball does not contain the *large* documentation |
| 4129 | (uri (string-append "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/" |
| 4130 | "petsc-lite-" version ".tar.gz")) |
| 4131 | (sha256 |
| 4132 | (base32 "10q9bnf7j6nr3fn9x7b8l0c3hqa9mhmsk1j5sdyshg5f1kc6746c")))) |
| 4133 | (outputs '("out" ; libraries and headers |
| 4134 | "examples")) ; ~30MiB of examples |
| 4135 | (build-system gnu-build-system) |
| 4136 | (native-inputs |
| 4137 | (list python which)) |
| 4138 | (inputs |
| 4139 | (list gfortran openblas superlu |
| 4140 | ;; leaving out hdf5 and fftw, as petsc expects them to be built with mpi |
| 4141 | ;; leaving out opengl, as configuration seems to only be for mac |
| 4142 | )) |
| 4143 | (arguments |
| 4144 | (list |
| 4145 | #:test-target "test" |
| 4146 | #:parallel-build? #f ; build is parallel by default |
| 4147 | #:configure-flags |
| 4148 | #~(list "COPTFLAGS=-g -O3" |
| 4149 | "CXXOPTFLAGS=-g -O3" |
| 4150 | "FOPTFLAGS=-g -O3" |
| 4151 | "--with-mpi=0" |
| 4152 | "--with-openmp=1" |
| 4153 | "--with-openblas=1" |
| 4154 | (string-append "--with-openblas-dir=" |
| 4155 | #$(this-package-input "openblas")) |
| 4156 | "--with-superlu=1" |
| 4157 | "--with-debugging=0") |
| 4158 | #:make-flags |
| 4159 | ;; Honor (parallel-job-count) for build. Do not use --with-make-np, |
| 4160 | ;; whose value is dumped to $out/lib/petsc/conf/petscvariables. |
| 4161 | #~(list (format #f "MAKE_NP=~a" (parallel-job-count))) |
| 4162 | #:phases |
| 4163 | #~(modify-phases %standard-phases |
| 4164 | (replace 'configure |
| 4165 | ;; PETSc's configure script is actually a python script, so we can't |
| 4166 | ;; run it with bash. |
| 4167 | (lambda* (#:key outputs (configure-flags '()) |
| 4168 | #:allow-other-keys) |
| 4169 | (let* ((prefix (assoc-ref outputs "out")) |
| 4170 | (flags `(,(string-append "--prefix=" prefix) |
| 4171 | ,@configure-flags))) |
| 4172 | ;; Sort source files in configure (for reproducibility). |
| 4173 | (substitute* "config/gmakegen.py" |
| 4174 | (("join\\(srcs\\[lang\\]\\)") |
| 4175 | "join(sorted(srcs[lang]))")) |
| 4176 | |
| 4177 | (format #t "build directory: ~s~%" (getcwd)) |
| 4178 | (format #t "configure flags: ~s~%" flags) |
| 4179 | (apply invoke "./configure" flags) |
| 4180 | |
| 4181 | ;; Generate test scripts with the right shebang. |
| 4182 | (substitute* "config/example_template.py" |
| 4183 | (("#!/usr/bin/env bash") |
| 4184 | (string-append "#!" (which "bash"))))))) |
| 4185 | (add-after 'configure 'clean-local-references |
| 4186 | (lambda* (#:key outputs #:allow-other-keys) |
| 4187 | (let ((out (assoc-ref outputs "out"))) |
| 4188 | (substitute* (find-files "." "^petsc(conf|machineinfo).h$") |
| 4189 | ;; Prevent build directory from leaking into compiled code |
| 4190 | (((getcwd)) out) |
| 4191 | (("Machine characteristics: Linux-[0-9]+\\.[0-9]+\\.[0-9]+-arch[0-9]+-[0-9]+") |
| 4192 | "Machine characteristics: Linux-x.x.x-archx-x") |
| 4193 | (("([[:graph:]]+)/bin/make") "\"make")) |
| 4194 | (substitute* (find-files "." "petscvariables") |
| 4195 | ;; Do not expose build machine characteristics, set to defaults. |
| 4196 | (("MAKE_NP = [[:digit:]]+") "MAKE_NP = 2") |
| 4197 | (("MAKE_TEST_NP = [[:digit:]]+") "MAKE_TEST_NP = 2") |
| 4198 | (("MAKE_LOAD = .*") "MAKE_LOAD = 256.0\n") |
| 4199 | (("NPMAX = [[:digit:]]+") "NPMAX = 2"))))) |
| 4200 | (add-after 'install 'clean-install |
| 4201 | ;; Try to keep installed files from leaking build directory names. |
| 4202 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 4203 | (let ((out (assoc-ref outputs "out"))) |
| 4204 | (substitute* (map (lambda (file) |
| 4205 | (string-append out "/lib/petsc/conf/" file)) |
| 4206 | '("petscvariables")) |
| 4207 | (((getcwd)) out)) |
| 4208 | ;; Make compiler references point to the store |
| 4209 | (substitute* (string-append out "/lib/petsc/conf/petscvariables") |
| 4210 | (("= (gcc|g\\+\\+|gfortran)" _ compiler) |
| 4211 | (string-append "= " (which compiler)))) |
| 4212 | ;; PETSc installs some build logs, which aren't necessary. |
| 4213 | (for-each (lambda (file) |
| 4214 | (let ((f (string-append out "/lib/petsc/conf/" file))) |
| 4215 | (when (file-exists? f) |
| 4216 | (delete-file f)))) |
| 4217 | '("configure.log" "make.log" "gmake.log" |
| 4218 | "test.log" "error.log" "RDict.db" |
| 4219 | "PETScBuildInternal.cmake" |
| 4220 | "configure-hash" |
| 4221 | ;; Once installed, should uninstall with Guix |
| 4222 | "uninstall.py"))))) |
| 4223 | (add-after 'clean-install 'clear-reference-to-compiler |
| 4224 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 4225 | ;; Do not retain a reference to GCC and other build only inputs. |
| 4226 | (let ((out (assoc-ref outputs "out"))) |
| 4227 | (substitute* (string-append out "/lib/petsc/conf/petscvariables") |
| 4228 | (("([[:graph:]]+)/bin/gcc") "gcc") |
| 4229 | (("([[:graph:]]+)/bin/g\\+\\+") "g++") |
| 4230 | (("([[:graph:]]+)/bin/make") "make") |
| 4231 | (("([[:graph:]]+)/bin/diff") "diff") |
| 4232 | (("([[:graph:]]+)/bin/sed") "sed") |
| 4233 | (("([[:graph:]]+)/bin/gfortran") "gfortran") |
| 4234 | (("([[:graph:]]+)/bin/gcov") "gcov"))))) |
| 4235 | |
| 4236 | ;; Some of the tests get linked with '-L$prefix/lib -lpetsc' (even |
| 4237 | ;; though that's unnecessary because they also explicitly link |
| 4238 | ;; against 'libpetsc.so' from the build directory). To work around |
| 4239 | ;; it, run tests after installation. See |
| 4240 | ;; <https://gitlab.com/petsc/petsc/-/issues/1634>. |
| 4241 | (delete 'check) |
| 4242 | (add-after 'install 'check |
| 4243 | (assoc-ref %standard-phases 'check)) |
| 4244 | |
| 4245 | (add-after 'install 'move-examples |
| 4246 | (lambda* (#:key outputs #:allow-other-keys) |
| 4247 | (let* ((out (assoc-ref outputs "out")) |
| 4248 | (examples (assoc-ref outputs "examples")) |
| 4249 | (exdir (string-append out "/share/petsc/examples")) |
| 4250 | (exdir' (string-append examples "/share/petsc/examples"))) |
| 4251 | (copy-recursively exdir exdir') |
| 4252 | (delete-file-recursively exdir))))))) |
| 4253 | (home-page "https://petsc.org") |
| 4254 | (synopsis "Library to solve PDEs") |
| 4255 | (description "PETSc, pronounced PET-see (the S is silent), is a suite of |
| 4256 | data structures and routines for the scalable (parallel) solution of |
| 4257 | scientific applications modeled by partial differential equations.") |
| 4258 | (license (license:non-copyleft |
| 4259 | "https://www.mcs.anl.gov/petsc/documentation/copyright.html")) |
| 4260 | (properties '((tunable? . #t))))) |
| 4261 | |
| 4262 | (define-public petsc-complex |
| 4263 | (package |
| 4264 | (inherit petsc) |
| 4265 | (name "petsc-complex") |
| 4266 | (arguments |
| 4267 | (substitute-keyword-arguments arguments |
| 4268 | ((#:configure-flags cf) |
| 4269 | #~(cons "--with-scalar-type=complex" #$cf)))) |
| 4270 | (synopsis "Library to solve PDEs (with complex scalars)"))) |
| 4271 | |
| 4272 | (define-public petsc-openmpi |
| 4273 | (package |
| 4274 | (inherit petsc) |
| 4275 | (name "petsc-openmpi") |
| 4276 | (inputs |
| 4277 | (modify-inputs inputs |
| 4278 | (prepend hdf5-parallel-openmpi |
| 4279 | hypre-openmpi |
| 4280 | metis |
| 4281 | mumps-openmpi |
| 4282 | openmpi |
| 4283 | pt-scotch32 |
| 4284 | scalapack |
| 4285 | `(,pt-scotch32 "metis")))) |
| 4286 | (arguments |
| 4287 | (substitute-keyword-arguments arguments |
| 4288 | ((#:configure-flags cf) |
| 4289 | #~`("--with-hypre=1" |
| 4290 | "--with-mpiexec=mpirun" |
| 4291 | "--with-metis=1" |
| 4292 | "--with-mumps=1" |
| 4293 | "--with-scalapack=1" |
| 4294 | "--with-ptscotch=1" |
| 4295 | ,(string-append "--with-mpi-dir=" |
| 4296 | #$(this-package-input "openmpi")) |
| 4297 | ,(string-append "--with-hdf5-include=" |
| 4298 | #$(this-package-input "hdf5-parallel-openmpi") |
| 4299 | "/include") |
| 4300 | ,(string-append "--with-hdf5-lib=" |
| 4301 | #$(this-package-input "hdf5-parallel-openmpi") |
| 4302 | "/lib/libhdf5.a") |
| 4303 | ,@(delete "--with-mpi=0" #$cf))) |
| 4304 | ((#:phases phases) |
| 4305 | #~(modify-phases #$phases |
| 4306 | (add-before 'configure 'mpi-setup |
| 4307 | #$%openmpi-setup) |
| 4308 | (add-after 'install 'patch-header-inclusions |
| 4309 | ;; TODO: Replace with ‘patch-header-inclusions’ when (some form |
| 4310 | ;; of) https://issues.guix.gnu.org/54780#19 is merged. |
| 4311 | (lambda _ |
| 4312 | (substitute* (string-append #$output "/include/petsclayouthdf5.h") |
| 4313 | (("<(H5Ipublic.h)>" _ header) |
| 4314 | (format #f "<~a/include/~a>" |
| 4315 | #$(this-package-input "hdf5-parallel-openmpi") |
| 4316 | header))))))))) |
| 4317 | (synopsis "Library to solve PDEs (with MUMPS and MPI support)"))) |
| 4318 | |
| 4319 | (define-public petsc-complex-openmpi |
| 4320 | (package |
| 4321 | (inherit petsc-complex) |
| 4322 | (name "petsc-complex-openmpi") |
| 4323 | (inputs |
| 4324 | (modify-inputs inputs |
| 4325 | (prepend openmpi))) |
| 4326 | (arguments |
| 4327 | (substitute-keyword-arguments arguments |
| 4328 | ((#:configure-flags cf) |
| 4329 | #~`("--with-mpiexec=mpirun" |
| 4330 | ,(string-append "--with-mpi-dir=" |
| 4331 | #$(this-package-input "openmpi")) |
| 4332 | ,@(delete "--with-mpi=0" #$cf))) |
| 4333 | ((#:phases phases) |
| 4334 | #~(modify-phases #$phases |
| 4335 | (add-before 'configure 'mpi-setup |
| 4336 | #$%openmpi-setup))))) |
| 4337 | (synopsis "Library to solve PDEs (with complex scalars and MPI support)"))) |
| 4338 | |
| 4339 | (define-public pnetcdf |
| 4340 | (package |
| 4341 | (name "pnetcdf") |
| 4342 | (version "1.13.0") |
| 4343 | (source |
| 4344 | (origin |
| 4345 | (method url-fetch) |
| 4346 | (uri (string-append |
| 4347 | "https://parallel-netcdf.github.io/Release/pnetcdf-" |
| 4348 | version ".tar.gz")) |
| 4349 | (sha256 |
| 4350 | (base32 |
| 4351 | "14f4nbcnw80y59cl0kjpxqqfaxzzd62kixnhb6ihp6aigb3z385b")))) |
| 4352 | (build-system gnu-build-system) |
| 4353 | (arguments |
| 4354 | (list #:configure-flags |
| 4355 | #~(list "--enable-shared" |
| 4356 | (string-append "--with-mpi=" #$(this-package-input "openmpi"))) |
| 4357 | #:phases |
| 4358 | #~(modify-phases %standard-phases |
| 4359 | (add-after 'build 'mpi-setup |
| 4360 | #$%openmpi-setup)))) |
| 4361 | (inputs (list openmpi zlib)) |
| 4362 | (native-inputs (list m4)) |
| 4363 | (home-page "https://parallel-netcdf.github.io/") |
| 4364 | (synopsis "Parallel I/O Library for NetCDF File Access") |
| 4365 | (description "PnetCDF is a high-performance parallel I/O library for accessing |
| 4366 | Unidata's NetCDF, files in classic formats, specifically the formats of CDF-1, 2, and |
| 4367 | 5.") |
| 4368 | (license (license:x11-style "file://COPYRIGHT")))) |
| 4369 | |
| 4370 | (define-public popf |
| 4371 | (package |
| 4372 | (name "popf") |
| 4373 | (version "0.0.15") |
| 4374 | (source (origin |
| 4375 | (method git-fetch) |
| 4376 | (uri (git-reference |
| 4377 | (url "https://github.com/fmrico/popf") |
| 4378 | (commit version))) |
| 4379 | (file-name (git-file-name name version)) |
| 4380 | (sha256 |
| 4381 | (base32 |
| 4382 | "1i1am3h6japn8fgapi5s5mnyrm31a05jkjhzgk48cd2n42c5060v")))) |
| 4383 | (build-system cmake-build-system) |
| 4384 | (arguments |
| 4385 | (list |
| 4386 | #:tests? #f ; no tests |
| 4387 | #:phases |
| 4388 | #~(modify-phases %standard-phases |
| 4389 | (add-after 'unpack 'fix-cmake |
| 4390 | (lambda* (#:key inputs #:allow-other-keys) |
| 4391 | (substitute* (find-files "." "CMakeLists\\.txt") |
| 4392 | (("/usr/local/opt/flex/include") |
| 4393 | (dirname (search-input-file inputs "include/FlexLexer.h")))) |
| 4394 | (substitute* "CMakeLists.txt" |
| 4395 | (("find_package\\(ament_cmake REQUIRED\\)") "") |
| 4396 | (("ament_.*") "") |
| 4397 | (("(RUNTIME DESTINATION) .*" all dst) |
| 4398 | (string-append dst " libexec/${PROJECT_NAME}"))))) |
| 4399 | (add-after 'install 'symlink |
| 4400 | (lambda* (#:key outputs #:allow-other-keys) |
| 4401 | (let ((out (assoc-ref outputs "out"))) |
| 4402 | (mkdir-p (string-append out "/bin")) |
| 4403 | (for-each (lambda (link) |
| 4404 | (symlink |
| 4405 | (string-append out "/libexec/popf/" (cdr link)) |
| 4406 | (string-append out "/bin/" (car link)))) |
| 4407 | '(("popf" . "popf") ("VAL" . "validate"))))))))) |
| 4408 | (inputs (list cbc flex)) |
| 4409 | (native-inputs (list flex bison perl)) |
| 4410 | (home-page "https://github.com/fmrico/popf") |
| 4411 | (synopsis "Forward-chaining temporal planner") |
| 4412 | (description "This package contains an implementation of the @acronym{POPF, |
| 4413 | Partial Order Planning Forwards} planner described in @cite{Forward-Chaining |
| 4414 | Partial Order Planning}, that has been updated to compile with newer C++ |
| 4415 | compilers.") |
| 4416 | (license license:gpl2+))) |
| 4417 | |
| 4418 | (define-public ppl |
| 4419 | (package |
| 4420 | (name "ppl") |
| 4421 | (version "1.2") |
| 4422 | (source |
| 4423 | (origin |
| 4424 | (method url-fetch) |
| 4425 | (uri (string-append "https://www.bugseng.com/products/ppl/download/" |
| 4426 | "ftp/releases/" version |
| 4427 | "/ppl-" version ".tar.gz")) |
| 4428 | (sha256 |
| 4429 | (base32 |
| 4430 | "1j5aji1g2vmdvc0gqz45n2ll2l2f6czca04wiyfl5g3sm3a6vhvb")))) |
| 4431 | (build-system gnu-build-system) |
| 4432 | (native-inputs |
| 4433 | (list m4)) |
| 4434 | (inputs |
| 4435 | (list glpk gmp)) |
| 4436 | (home-page "https://www.bugseng.com/parma-polyhedra-library") |
| 4437 | (synopsis |
| 4438 | "Parma Polyhedra Library for computations with polyhedra") |
| 4439 | (description |
| 4440 | "The Parma Polyhedra Library (PPL) provides numerical abstractions |
| 4441 | especially targeted at applications in the field of analysis and |
| 4442 | verification of complex systems. These abstractions include convex |
| 4443 | polyhedra, defined as the intersection of a finite number of (open or |
| 4444 | closed) halfspaces, each described by a linear inequality (strict or |
| 4445 | non-strict) with rational coefficients; some special classes of polyhedra |
| 4446 | shapes that offer interesting complexity/precision tradeoffs; and grids |
| 4447 | which represent regularly spaced points that satisfy a set of linear |
| 4448 | congruence relations. The library also supports finite powersets and |
| 4449 | products of (any kind of) polyhedra and grids, a mixed integer linear |
| 4450 | programming problem solver using an exact-arithmetic version of the simplex |
| 4451 | algorithm, a parametric integer programming solver, and primitives for |
| 4452 | termination analysis via the automatic synthesis of linear ranking |
| 4453 | functions.") |
| 4454 | (license license:gpl3+))) |
| 4455 | |
| 4456 | (define-public primecount |
| 4457 | (package |
| 4458 | (name "primecount") |
| 4459 | (version "8.6") |
| 4460 | (source |
| 4461 | (origin |
| 4462 | (method git-fetch) |
| 4463 | (uri (git-reference |
| 4464 | (url "https://github.com/kimwalisch/primecount") |
| 4465 | (commit (string-append "v" version)))) |
| 4466 | (file-name (git-file-name name version)) |
| 4467 | (sha256 |
| 4468 | (base32 |
| 4469 | "0xm0dzdjnm877gndh7r0mj0pgqx42f0v5vnhjx6ig7gv5g0c2s92")))) |
| 4470 | (build-system cmake-build-system) |
| 4471 | (arguments |
| 4472 | (list |
| 4473 | #:configure-flags |
| 4474 | #~(list "-DBUILD_LIBPRIMESIEVE=OFF" |
| 4475 | "-DBUILD_MANPAGE=ON" |
| 4476 | "-DBUILD_SHARED_LIBS=ON" |
| 4477 | "-DBUILD_STATIC_LIBS=OFF" |
| 4478 | "-DBUILD_TESTS=ON"))) |
| 4479 | (native-inputs |
| 4480 | (list asciidoc)) |
| 4481 | (inputs |
| 4482 | (list primesieve)) |
| 4483 | (synopsis "Fast prime counting function implementations") |
| 4484 | (description |
| 4485 | "@code{primecount} is a command-line program and C/C++ library that |
| 4486 | counts the number of primes no greater than x (maximum 1031) using highly |
| 4487 | optimized implementations of the combinatorial prime counting algorithms.") |
| 4488 | (home-page "https://github.com/kimwalisch/primecount") |
| 4489 | (license license:bsd-2))) |
| 4490 | |
| 4491 | (define-public primesieve |
| 4492 | (package |
| 4493 | (name "primesieve") |
| 4494 | (version "12.10") |
| 4495 | (source |
| 4496 | (origin |
| 4497 | (method git-fetch) |
| 4498 | (uri (git-reference |
| 4499 | (url "https://github.com/kimwalisch/primesieve") |
| 4500 | (commit (string-append "v" version)))) |
| 4501 | (file-name (git-file-name name version)) |
| 4502 | (sha256 |
| 4503 | (base32 |
| 4504 | "0vlhhrylv63dmcf9kgsg15596pj06iflfnvjph3w8zlfaajwv9gd")))) |
| 4505 | (build-system cmake-build-system) |
| 4506 | (arguments |
| 4507 | (list |
| 4508 | #:configure-flags |
| 4509 | #~(list "-DBUILD_STATIC_LIBS=OFF" |
| 4510 | "-DBUILD_TESTS=ON"))) |
| 4511 | (synopsis "Prime number generator") |
| 4512 | (description |
| 4513 | "@code{primesieve} is a command-line program and C/C++ library for |
| 4514 | quickly generating prime numbers. It is very cache efficient, it detects your |
| 4515 | CPU's L1 & L2 cache sizes and allocates its main data structures accordingly. |
| 4516 | It is also multi-threaded by default, it uses all available CPU cores whenever |
| 4517 | possible i.e. if sequential ordering is not required. primesieve can generate |
| 4518 | primes and prime k-tuplets up to 264.") |
| 4519 | (home-page "https://github.com/kimwalisch/primesieve") |
| 4520 | (license license:bsd-2))) |
| 4521 | |
| 4522 | ;; It is unfortunate that we cannot just link with the existing blis package. |
| 4523 | (define-public python-blis |
| 4524 | (package |
| 4525 | (name "python-blis") |
| 4526 | (version "1.3.3") |
| 4527 | (source |
| 4528 | (origin |
| 4529 | (method git-fetch) |
| 4530 | (uri (git-reference |
| 4531 | (url "https://github.com/explosion/cython-blis") |
| 4532 | (commit (string-append "release-v" version)))) |
| 4533 | (file-name (git-file-name name version)) |
| 4534 | (sha256 |
| 4535 | (base32 "0ncr47054iy16wapb5yndr6rf3mh8wvi54ljgs791qp3i2yvjb08")))) |
| 4536 | (build-system pyproject-build-system) |
| 4537 | (arguments |
| 4538 | (list |
| 4539 | #:phases |
| 4540 | #~(modify-phases %standard-phases |
| 4541 | (add-before 'check 'remove-local-blis |
| 4542 | (lambda _ |
| 4543 | (copy-recursively "blis/tests" "tests") |
| 4544 | ;; This would otherwise interfere with finding the installed |
| 4545 | ;; blis when running tests. |
| 4546 | (delete-file-recursively "blis")))))) |
| 4547 | (native-inputs |
| 4548 | (list python-cython |
| 4549 | python-numpy |
| 4550 | python-pytest |
| 4551 | python-setuptools)) |
| 4552 | (home-page "https://github.com/explosion/cython-blis") |
| 4553 | (synopsis "Blis as a self-contained C-extension for Python") |
| 4554 | (description |
| 4555 | "This package provides the Blis BLAS-like linear algebra library, as a |
| 4556 | self-contained C-extension for Python.") |
| 4557 | (license license:bsd-3))) |
| 4558 | |
| 4559 | (define-public python-constraint2 |
| 4560 | (package |
| 4561 | (name "python-constraint2") |
| 4562 | (version "2.5.0") |
| 4563 | (source |
| 4564 | (origin |
| 4565 | (method git-fetch) |
| 4566 | (uri (git-reference |
| 4567 | (url "https://github.com/python-constraint/python-constraint") |
| 4568 | (commit version))) |
| 4569 | (file-name (git-file-name name version)) |
| 4570 | (sha256 |
| 4571 | (base32 "1y62jvgb5dm91abgfs3cy260y1lxiwpvirs378a3lj4mrlmrqdsm")))) |
| 4572 | (build-system pyproject-build-system) |
| 4573 | (arguments |
| 4574 | (list |
| 4575 | #:test-flags |
| 4576 | #~(list "--ignore=tests/test_toml_file.py" ;release information tests |
| 4577 | "--ignore=tests/test_util_benchmark.py") |
| 4578 | #:phases |
| 4579 | #~(modify-phases %standard-phases |
| 4580 | (add-after 'unpack 'fix-pytest-config |
| 4581 | (lambda _ |
| 4582 | ;; Drop test coverage requirements |
| 4583 | (substitute* "pyproject.toml" |
| 4584 | (("--cov(-[^ ]*)?([ =][^ \"]*)?") ""))))))) |
| 4585 | (native-inputs |
| 4586 | (list python-cython |
| 4587 | python-poetry-core ;actual build backend |
| 4588 | python-pytest |
| 4589 | python-setuptools)) ;required for cythonization |
| 4590 | (home-page "https://python-constraint.github.io/python-constraint") |
| 4591 | (synopsis "Constraint satisfaction problem resolver for Python") |
| 4592 | (description |
| 4593 | "The @code{python-constraint} module offers efficient solvers for |
| 4594 | @url{https://en.wikipedia.org/wiki/Constraint_satisfaction_problem, constraint |
| 4595 | satisfaction problems} over finite domains in an accessible Python package.") |
| 4596 | (license license:bsd-3))) |
| 4597 | |
| 4598 | (define-public python-cvxopt |
| 4599 | (package |
| 4600 | (name "python-cvxopt") |
| 4601 | (version "1.3.3") |
| 4602 | (source |
| 4603 | (origin |
| 4604 | (method git-fetch) |
| 4605 | (uri (git-reference |
| 4606 | (url "https://github.com/cvxopt/cvxopt") |
| 4607 | (commit version))) |
| 4608 | (file-name (git-file-name name version)) |
| 4609 | (sha256 |
| 4610 | (base32 "0g2lddikgmvi838b5vgfy7kbdvqsvzxrvw3i8pxq1q378dwsyp0d")))) |
| 4611 | (build-system pyproject-build-system) |
| 4612 | (arguments |
| 4613 | (list |
| 4614 | #:phases |
| 4615 | #~(modify-phases %standard-phases |
| 4616 | (add-after 'unpack 'find-libraries |
| 4617 | (lambda* (#:key inputs #:allow-other-keys) |
| 4618 | (setenv "CVXOPT_BLAS_LIB" "openblas") |
| 4619 | (setenv "CVXOPT_LAPACK_LIB" "openblas") |
| 4620 | (setenv "CVXOPT_BUILD_FFTW" "1") |
| 4621 | (setenv "CVXOPT_BUILD_GLPK" "1") |
| 4622 | (setenv "CVXOPT_BUILD_GSL" "1")))))) |
| 4623 | (native-inputs (list python-pytest python-setuptools)) |
| 4624 | (inputs (list fftw glpk gsl openblas suitesparse)) |
| 4625 | (home-page "https://www.cvxopt.org") |
| 4626 | (synopsis "Python library for convex optimization") |
| 4627 | (description |
| 4628 | "CVXOPT is a package for convex optimization based on the Python |
| 4629 | programming language. Its main purpose is to make the development of software |
| 4630 | for convex optimization applications straightforward by building on Python’s |
| 4631 | extensive standard library and on the strengths of Python as a high-level |
| 4632 | programming language.") |
| 4633 | (license license:gpl3+))) |
| 4634 | |
| 4635 | (define-public python-ducc0 |
| 4636 | (package |
| 4637 | (name "python-ducc0") |
| 4638 | (version "0.37.1") |
| 4639 | (source |
| 4640 | (origin |
| 4641 | (method git-fetch) |
| 4642 | (uri (git-reference |
| 4643 | (url "https://gitlab.mpcdf.mpg.de/mtr/ducc") |
| 4644 | (commit (string-append |
| 4645 | "ducc0_" (string-replace-substring version "." "_"))))) |
| 4646 | (file-name (git-file-name name version)) |
| 4647 | (sha256 |
| 4648 | (base32 "0pckbip2ffmiwm73wrpvif3gy0a09v9b9kbyallp520l6l69n4k8")))) |
| 4649 | (build-system pyproject-build-system) |
| 4650 | (arguments |
| 4651 | (list |
| 4652 | #:test-flags |
| 4653 | #~(list "--numprocesses" (number->string (parallel-job-count)) |
| 4654 | "python/test") |
| 4655 | #:phases |
| 4656 | #~(modify-phases %standard-phases |
| 4657 | (add-before 'build 'set-env |
| 4658 | (lambda _ |
| 4659 | (setenv "DUCC0_OPTIMIZATION" "portable-strip")))))) |
| 4660 | (native-inputs |
| 4661 | (list cmake-minimal |
| 4662 | pybind11-2 |
| 4663 | python-nanobind |
| 4664 | python-pytest |
| 4665 | python-pytest-xdist |
| 4666 | python-scikit-build-core |
| 4667 | python-setuptools)) |
| 4668 | (propagated-inputs |
| 4669 | (list python-numpy)) |
| 4670 | (home-page "https://gitlab.mpcdf.mpg.de/mtr/ducc") |
| 4671 | (synopsis "Distinctly Useful Code Collection") |
| 4672 | (description |
| 4673 | "This package provides a collection of basic programming tools for |
| 4674 | numerical computation, including Fast Fourier Transforms, Spherical Harmonic |
| 4675 | Transforms, non-equispaced Fourier transforms, as well as some concrete |
| 4676 | applications like 4pi convolution on the sphere and gridding/degridding of |
| 4677 | radio interferometry data.") |
| 4678 | (license license:gpl2+))) |
| 4679 | |
| 4680 | (define-public python-kiwisolver |
| 4681 | (package |
| 4682 | (name "python-kiwisolver") |
| 4683 | (version "1.5.0") |
| 4684 | (source |
| 4685 | (origin |
| 4686 | (method git-fetch) |
| 4687 | (uri (git-reference |
| 4688 | (url "https://github.com/nucleic/kiwi") |
| 4689 | (commit version))) |
| 4690 | (file-name (git-file-name name version)) |
| 4691 | (sha256 |
| 4692 | (base32 "18fxn3nvc6917mkm0as7088m794fqdp8rlk4qgypva9fir1br1r6")))) |
| 4693 | (build-system pyproject-build-system) |
| 4694 | (native-inputs |
| 4695 | (list python-cppy |
| 4696 | python-pytest |
| 4697 | python-setuptools |
| 4698 | python-setuptools-scm)) |
| 4699 | (home-page "https://github.com/nucleic/kiwi") |
| 4700 | (synopsis "Fast implementation of the Cassowary constraint solver") |
| 4701 | (description |
| 4702 | "Kiwi is an efficient C++ implementation of the Cassowary constraint |
| 4703 | solving algorithm. Kiwi has been designed from the ground up to be |
| 4704 | lightweight and fast. Kiwi ranges from 10x to 500x faster than the original |
| 4705 | Cassowary solver with typical use cases gaining a 40x improvement. Memory |
| 4706 | savings are consistently > 5x.") |
| 4707 | (license license:bsd-3))) |
| 4708 | |
| 4709 | (define-public python-libensemble |
| 4710 | (package |
| 4711 | (name "python-libensemble") |
| 4712 | (version "1.6.0") |
| 4713 | (source |
| 4714 | (origin |
| 4715 | (method git-fetch) |
| 4716 | (uri (git-reference |
| 4717 | (url "https://github.com/Libensemble/libensemble") |
| 4718 | (commit (string-append "v" version)))) |
| 4719 | (file-name (git-file-name name version)) |
| 4720 | (sha256 |
| 4721 | (base32 "1381xnhf8mrpbkhzaibqf0k8rmvb0bsjjfv0wjrf052yv1jzjimx")))) |
| 4722 | (build-system pyproject-build-system) |
| 4723 | (arguments |
| 4724 | (list |
| 4725 | ;; tests: 180 passed, 13 skipped |
| 4726 | #:phases |
| 4727 | #~(modify-phases %standard-phases |
| 4728 | (replace 'check |
| 4729 | (lambda* (#:key tests? #:allow-other-keys) |
| 4730 | (when tests? |
| 4731 | (substitute* '("libensemble/tests/unit_tests/test_executor.py" |
| 4732 | "libensemble/tests/unit_tests/test_resources.py") |
| 4733 | (((string-join |
| 4734 | ;; Tests expecting running MPI. |
| 4735 | (list "(test_finish_and_kill" |
| 4736 | "test_futures_interface" |
| 4737 | "test_futures_interface_cancel" |
| 4738 | "test_get_local_nodelist_.*_not_in_list" |
| 4739 | "test_get_local_resources_dedicated_mode" |
| 4740 | "test_kill_on_file" |
| 4741 | "test_kill_on_timeout" |
| 4742 | "test_kill_on_timeout_polling_loop_method" |
| 4743 | "test_launch_and_poll" |
| 4744 | "test_launch_and_poll_multitasks" |
| 4745 | "test_launch_and_wait" |
| 4746 | "test_launch_and_wait_no_platform" |
| 4747 | "test_launch_and_wait_timeout" |
| 4748 | "test_launch_as_gen" |
| 4749 | "test_launch_wait_on_start" |
| 4750 | "test_machinefile_from_resources" |
| 4751 | "test_procs_and_machinefile_logic" |
| 4752 | "test_wresources_set_gpus" |
| 4753 | "test_wresources_set_gpus_by_platform" |
| 4754 | "test_wresources_set_gpus_by_platform_gpu_tiles" |
| 4755 | "test_wresources_set_gpus_x2" |
| 4756 | "test_wresources_set_limit_gpus" |
| 4757 | "test_wresources_set_no_gpus)") |
| 4758 | "|") all) |
| 4759 | (string-append "__off_" all))) |
| 4760 | (invoke "python" "libensemble/tests/run_tests.py" "-u"))))))) |
| 4761 | (native-inputs |
| 4762 | (list openmpi |
| 4763 | python-mock |
| 4764 | python-mpi4py |
| 4765 | python-pytest |
| 4766 | python-pytest-cov ;custom test config |
| 4767 | python-pytest-timeout |
| 4768 | python-rich |
| 4769 | python-setuptools)) |
| 4770 | (propagated-inputs |
| 4771 | (list python-gest-api |
| 4772 | python-mpmath |
| 4773 | python-numpy |
| 4774 | python-psutil |
| 4775 | python-pydantic |
| 4776 | python-pyyaml |
| 4777 | python-tomli)) |
| 4778 | (home-page "https://github.com/Libensemble/libensemble") |
| 4779 | (synopsis "Toolkit for dynamic ensembles of calculations") |
| 4780 | (description "@code{libensemble} is a complete toolkit for dynamic |
| 4781 | ensembles of calculations. It connects @code{deciders} to experiments or |
| 4782 | simulations.") |
| 4783 | (license license:bsd-3))) |
| 4784 | |
| 4785 | (define-public python-ndim |
| 4786 | (package |
| 4787 | (name "python-ndim") |
| 4788 | (version "0.1.6") |
| 4789 | (source |
| 4790 | (origin |
| 4791 | (method git-fetch) |
| 4792 | (uri (git-reference |
| 4793 | (url "https://github.com/diego-hayashi/ndim") |
| 4794 | (commit (string-append "v" version)))) |
| 4795 | (file-name (git-file-name name version)) |
| 4796 | (sha256 |
| 4797 | (base32 "1hri82k7pcpw9dns8l1f2asa3dm7hjv71wnxi3752258ia2qa44v")))) |
| 4798 | (build-system pyproject-build-system) |
| 4799 | (propagated-inputs (list python-sympy)) |
| 4800 | (native-inputs (list python-flit-core python-pytest)) |
| 4801 | (home-page "https://github.com/diego-hayashi/ndim") |
| 4802 | (synopsis "Multidimensional volumes and monomial integrals") |
| 4803 | (description |
| 4804 | "@code{ndim} computes all kinds of volumes and integrals of |
| 4805 | monomials over such volumes in a fast, numerically stable way, using |
| 4806 | recurrence relations.") |
| 4807 | (license license:gpl3+))) |
| 4808 | |
| 4809 | (define-public python-petsc4py |
| 4810 | (package |
| 4811 | (name "python-petsc4py") |
| 4812 | (version "3.24.0") |
| 4813 | (source |
| 4814 | (origin |
| 4815 | (method url-fetch) |
| 4816 | (uri (pypi-uri "petsc4py" version)) |
| 4817 | (sha256 |
| 4818 | (base32 "06wi2r43drlfj3hml5392pckn2n99rjfb1p1hz75n3d84z5jrj9x")))) |
| 4819 | (build-system pyproject-build-system) |
| 4820 | (arguments |
| 4821 | (list |
| 4822 | #:phases |
| 4823 | #~(modify-phases %standard-phases |
| 4824 | (add-before 'build 'set-PETSC_DIR |
| 4825 | (lambda* (#:key inputs #:allow-other-keys) |
| 4826 | ;; Define path to PETSc installation. |
| 4827 | (setenv "PETSC_DIR" |
| 4828 | (assoc-ref inputs "petsc-openmpi")))) |
| 4829 | (add-before 'check 'mpi-setup #$%openmpi-setup) |
| 4830 | (replace 'check |
| 4831 | (lambda* (#:key tests? #:allow-other-keys) |
| 4832 | (when tests? |
| 4833 | (invoke "python" "test/runtests.py"))))))) |
| 4834 | (native-inputs (list python-cython python-setuptools)) |
| 4835 | (inputs (list petsc-openmpi python-numpy)) |
| 4836 | (home-page "https://bitbucket.org/petsc/petsc4py/") |
| 4837 | (synopsis "Python bindings for PETSc") |
| 4838 | (description "PETSc, the Portable, Extensible Toolkit for |
| 4839 | Scientific Computation, is a suite of data structures and routines for |
| 4840 | the scalable (parallel) solution of scientific applications modeled by |
| 4841 | partial differential equations. It employs the MPI standard for all |
| 4842 | message-passing communication. @code{petsc4py} provides Python |
| 4843 | bindings to almost all functions of PETSc.") |
| 4844 | (license license:bsd-3))) |
| 4845 | |
| 4846 | (define-public python-primecountpy |
| 4847 | (package |
| 4848 | (name "python-primecountpy") |
| 4849 | (version "0.2.1") |
| 4850 | (source |
| 4851 | (origin |
| 4852 | (method git-fetch) ; Fetch from GitHub to avoid precompiled files |
| 4853 | (uri (git-reference |
| 4854 | (url "https://github.com/dimpase/primecountpy") |
| 4855 | (commit (string-append "v" version)))) |
| 4856 | (file-name (git-file-name name version)) |
| 4857 | (sha256 |
| 4858 | (base32 "0ddv2r6mwn2p2xgi6pa50mjirxb0zj10ngimfpak36yaj8bp0as1")))) |
| 4859 | (build-system pyproject-build-system) |
| 4860 | (arguments |
| 4861 | (list #:tests? #f)) ; there are no tests |
| 4862 | (native-inputs |
| 4863 | (list pkg-config |
| 4864 | python-cysignals |
| 4865 | python-cython |
| 4866 | python-meson)) |
| 4867 | (inputs |
| 4868 | (list pari-gp |
| 4869 | primecount |
| 4870 | primesieve)) |
| 4871 | (home-page "https://github.com/dimpase/primecountpy") |
| 4872 | (synopsis "Cython interface for C++ primecount library") |
| 4873 | (description "This package provides a Cython interface to the C++ library |
| 4874 | @code{primecount}.") |
| 4875 | ;; pyproject.toml says gpl3 but file headers say gpl2+, see |
| 4876 | ;; <https://github.com/dimpase/primecountpy/issues/16>. |
| 4877 | (license license:gpl2+))) |
| 4878 | |
| 4879 | (define-public python-py-bobyqa |
| 4880 | (package |
| 4881 | (name "python-py-bobyqa") |
| 4882 | (version "1.5.0") |
| 4883 | (source |
| 4884 | (origin |
| 4885 | (method git-fetch) ;no tests in PyPI release |
| 4886 | (uri (git-reference |
| 4887 | (url "https://github.com/numericalalgorithmsgroup/pybobyqa") |
| 4888 | (commit (string-append "v" version)))) |
| 4889 | (file-name (git-file-name name version)) |
| 4890 | (sha256 |
| 4891 | (base32 "0k9iapdlbp1k2ck1550ckw0y75f71gxzqkv4clz89ym4fwqwszv2")))) |
| 4892 | (build-system pyproject-build-system) |
| 4893 | (native-inputs |
| 4894 | (list python-pytest |
| 4895 | python-setuptools |
| 4896 | python-wheel)) |
| 4897 | (propagated-inputs |
| 4898 | (list python-numpy |
| 4899 | python-pandas |
| 4900 | python-scipy |
| 4901 | python-setuptools)) |
| 4902 | (home-page "https://github.com/numericalalgorithmsgroup/pybobyqa") |
| 4903 | (synopsis "Derivative-free solver for general objective minimization") |
| 4904 | (description |
| 4905 | "Py-BOBYQA is a flexible package for solving bound-constrained general |
| 4906 | objective minimization, without requiring derivatives of the objective. At |
| 4907 | its core, it is a Python implementation of the BOBYQA algorithm by Powell,but |
| 4908 | Py-BOBYQA has extra features improving its performance on some problems. |
| 4909 | Py-BOBYQA is particularly useful when evaluations of the objective function |
| 4910 | are expensive and/or noisy.") |
| 4911 | (license license:gpl3))) |
| 4912 | |
| 4913 | (define-public python-pyglm |
| 4914 | (package |
| 4915 | (name "python-pyglm") |
| 4916 | (version "2.8.1") |
| 4917 | (source |
| 4918 | (origin |
| 4919 | ;; Test files are not included in the archive in pypi. |
| 4920 | (method git-fetch) |
| 4921 | (uri (git-reference |
| 4922 | (url "https://github.com/Zuzu-Typ/PyGLM") |
| 4923 | (commit version) |
| 4924 | ;; XXX: Attempt to use Guix's [email protected] failed, try to figure out |
| 4925 | ;; how to fix it. |
| 4926 | (recursive? #t))) |
| 4927 | (file-name (git-file-name name version)) |
| 4928 | (sha256 |
| 4929 | (base32 |
| 4930 | "1ra54m0pb5aca7q6ymappjsyxdzdy17yz8rrhlql04k0p9lnf1v8")))) |
| 4931 | (build-system pyproject-build-system) |
| 4932 | (native-inputs |
| 4933 | (list python-pytest |
| 4934 | python-setuptools |
| 4935 | python-wheel)) |
| 4936 | (home-page "https://github.com/Zuzu-Typ/PyGLM") |
| 4937 | (synopsis "OpenGL Mathematics library for Python") |
| 4938 | (description "PyGLM is a Python extension library which brings the OpenGL |
| 4939 | Mathematics (GLM) library to Python.") |
| 4940 | (license license:zlib))) |
| 4941 | |
| 4942 | (define-public python-simplesat |
| 4943 | (package |
| 4944 | (name "python-simplesat") |
| 4945 | (version "0.9.2") |
| 4946 | (source |
| 4947 | (origin |
| 4948 | (method git-fetch) |
| 4949 | (uri (git-reference |
| 4950 | (url "https://github.com/enthought/sat-solver") |
| 4951 | (commit (string-append "v" version)))) |
| 4952 | (file-name (git-file-name name version)) |
| 4953 | (sha256 |
| 4954 | (base32 "0z44pi8yb6pvc9bisl3qnn3glj7ir0ad2j4gd4jfg2kxvwvi0w0b")))) |
| 4955 | (build-system pyproject-build-system) |
| 4956 | (arguments |
| 4957 | (list |
| 4958 | #:test-flags #~(list "--ignore=old"))) |
| 4959 | (native-inputs |
| 4960 | (list python-mock |
| 4961 | python-pytest |
| 4962 | python-pyyaml |
| 4963 | python-setuptools)) |
| 4964 | (propagated-inputs |
| 4965 | (list python-attrs |
| 4966 | python-okonomiyaki |
| 4967 | python-six)) |
| 4968 | (home-page "https://github.com/enthought/sat-solver") |
| 4969 | (synopsis |
| 4970 | "@acronym{SAT, Boolean Satisfiability Problem} dependency handling") |
| 4971 | (description |
| 4972 | "This package provides a prototype Python implementation for SAT-based |
| 4973 | problems.") |
| 4974 | (license license:bsd-3))) |
| 4975 | |
| 4976 | (define-public slepc |
| 4977 | (package |
| 4978 | (name "slepc") |
| 4979 | (version "3.24.0") |
| 4980 | (source |
| 4981 | (origin |
| 4982 | (method url-fetch) |
| 4983 | (uri (string-append "http://slepc.upv.es/download/distrib/slepc-" |
| 4984 | version ".tar.gz")) |
| 4985 | (sha256 |
| 4986 | (base32 |
| 4987 | "1sdl9hv34pckwkxjq2spiyc6k5czd9y4m852k338l4x9ib4i8bbf")))) |
| 4988 | (build-system gnu-build-system) |
| 4989 | (native-inputs |
| 4990 | `(("python" ,python) |
| 4991 | ("which" ,which) |
| 4992 | ("petsc:examples" ,petsc "examples"))) ;for gmakegen.py script |
| 4993 | (inputs |
| 4994 | `(("arpack" ,arpack-ng) |
| 4995 | ("gfortran" ,gfortran))) |
| 4996 | (propagated-inputs |
| 4997 | (list petsc)) |
| 4998 | (arguments |
| 4999 | `(#:parallel-build? #f ;build is parallel by default |
| 5000 | #:configure-flags |
| 5001 | `(,(string-append "--with-arpack-dir=" |
| 5002 | (assoc-ref %build-inputs "arpack") "/lib")) |
| 5003 | #:make-flags ;honor (parallel-job-count) |
| 5004 | `(,(format #f "MAKE_NP=~a" (parallel-job-count)) |
| 5005 | ,(string-append "PETSCCONFIGDIR=" |
| 5006 | (assoc-ref %build-inputs "petsc:examples") |
| 5007 | "/share/petsc/examples/config")) |
| 5008 | #:phases |
| 5009 | (modify-phases %standard-phases |
| 5010 | (replace 'configure |
| 5011 | ;; configure is a python script, so we can't run it with bash. |
| 5012 | (lambda* (#:key inputs outputs (configure-flags '()) |
| 5013 | #:allow-other-keys) |
| 5014 | (let* ((prefix (assoc-ref outputs "out")) |
| 5015 | (flags `(,(string-append "--prefix=" prefix) |
| 5016 | ,@configure-flags))) |
| 5017 | (format #t "build directory: ~s~%" (getcwd)) |
| 5018 | (format #t "configure flags: ~s~%" flags) |
| 5019 | (setenv "SLEPC_DIR" (getcwd)) |
| 5020 | (setenv "PETSC_DIR" (assoc-ref inputs "petsc")) |
| 5021 | (apply invoke "./configure" flags)))) |
| 5022 | (add-after 'install 'delete-doc |
| 5023 | ;; TODO: SLEPc installs HTML documentation alongside headers in |
| 5024 | ;; $out/include. We'd like to move them to share/doc, but delete |
| 5025 | ;; them for now, as they are incomplete and installing the complete |
| 5026 | ;; documentation is difficult. |
| 5027 | (lambda* (#:key outputs #:allow-other-keys) |
| 5028 | (let* ((out (assoc-ref outputs "out"))) |
| 5029 | (for-each delete-file (find-files out "\\.html$")) |
| 5030 | #t))) |
| 5031 | (add-after 'install 'clean-install |
| 5032 | ;; Clean up unnecessary build logs from installation. |
| 5033 | (lambda* (#:key outputs #:allow-other-keys) |
| 5034 | (let ((out (assoc-ref outputs "out"))) |
| 5035 | (for-each (lambda (file) |
| 5036 | (let ((f (string-append out "/lib/slepc/conf/" file))) |
| 5037 | (when (file-exists? f) |
| 5038 | (delete-file f)))) |
| 5039 | '("configure.log" "make.log" "gmake.log" |
| 5040 | "test.log" "error.log" "RDict.db" |
| 5041 | "uninstall.py")) |
| 5042 | #t)))))) |
| 5043 | (home-page "https://slepc.upv.es") |
| 5044 | (synopsis "Scalable library for eigenproblems") |
| 5045 | (description "SLEPc is a software library for the solution of large sparse |
| 5046 | eigenproblems on parallel computers. It can be used for the solution of |
| 5047 | linear eigenvalue problems formulated in either standard or generalized form, |
| 5048 | as well as other related problems such as the singular value decomposition. |
| 5049 | The emphasis of the software is on methods and techniques appropriate for |
| 5050 | problems in which the associated matrices are sparse, for example, those |
| 5051 | arising after the discretization of partial differential equations.") |
| 5052 | (license license:bsd-2) |
| 5053 | (properties |
| 5054 | `((release-monitoring-url . "http://slepc.upv.es/download/"))))) |
| 5055 | |
| 5056 | (define-public slepc-complex |
| 5057 | (package (inherit slepc) |
| 5058 | (name "slepc-complex") |
| 5059 | (propagated-inputs |
| 5060 | `(("petsc" ,petsc-complex) |
| 5061 | ,@(alist-delete "petsc" (package-propagated-inputs slepc)))) |
| 5062 | (synopsis "Scalable library for eigenproblems (with complex scalars)"))) |
| 5063 | |
| 5064 | (define-public slepc-openmpi |
| 5065 | (package (inherit slepc) |
| 5066 | (name "slepc-openmpi") |
| 5067 | (arguments |
| 5068 | (substitute-keyword-arguments arguments |
| 5069 | ((#:phases phases '%standard-phases) |
| 5070 | `(modify-phases ,phases |
| 5071 | (add-before 'check 'mpi-setup |
| 5072 | ,%openmpi-setup))))) |
| 5073 | (inputs |
| 5074 | `(("mpi" ,openmpi) |
| 5075 | ,@(alist-delete "arpack" (package-inputs slepc)))) |
| 5076 | (propagated-inputs |
| 5077 | `(("petsc" ,petsc-openmpi) |
| 5078 | ("arpack" ,arpack-ng-openmpi) |
| 5079 | ,@(alist-delete "petsc" (package-propagated-inputs slepc)))) |
| 5080 | (synopsis "Scalable library for eigenproblems (with MPI support)"))) |
| 5081 | |
| 5082 | (define-public slepc-complex-openmpi |
| 5083 | (package (inherit slepc-openmpi) |
| 5084 | (name "slepc-complex-openmpi") |
| 5085 | (propagated-inputs |
| 5086 | `(("petsc" ,petsc-complex-openmpi) |
| 5087 | ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi)))) |
| 5088 | (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)"))) |
| 5089 | |
| 5090 | (define-public python-slepc4py |
| 5091 | (package |
| 5092 | (name "python-slepc4py") |
| 5093 | (version "3.24.0") |
| 5094 | (source |
| 5095 | (origin |
| 5096 | (method url-fetch) |
| 5097 | (uri (pypi-uri "slepc4py" version)) |
| 5098 | (sha256 |
| 5099 | (base32 "1wiqcwgr9mq81dd68glsnwn57gqmgahcvcchqqqq3ns7bykvdjah")))) |
| 5100 | (build-system pyproject-build-system) |
| 5101 | (arguments |
| 5102 | (list |
| 5103 | #:phases |
| 5104 | #~(modify-phases %standard-phases |
| 5105 | (add-before 'build 'pre-build |
| 5106 | (lambda* (#:key inputs #:allow-other-keys) |
| 5107 | ;; Define path to PETSc installation. |
| 5108 | (setenv "PETSC_DIR" |
| 5109 | (assoc-ref inputs "petsc-openmpi")) |
| 5110 | ;; Define path to SLEPc installation. |
| 5111 | (setenv "SLEPC_DIR" |
| 5112 | (assoc-ref inputs "slepc-openmpi")))) |
| 5113 | (add-before 'check 'mpi-setup |
| 5114 | #$%openmpi-setup) |
| 5115 | (replace 'check |
| 5116 | (lambda* (#:key tests? #:allow-other-keys) |
| 5117 | (when tests? |
| 5118 | (invoke "python" "test/runtests.py"))))))) |
| 5119 | (native-inputs (list python-cython python-setuptools)) |
| 5120 | (inputs (list python-numpy python-petsc4py petsc-openmpi slepc-openmpi)) |
| 5121 | (home-page "https://bitbucket.org/slepc/slepc4py/") |
| 5122 | (synopsis "Python bindings for SLEPc") |
| 5123 | (description |
| 5124 | "SLEPc, the Scalable Library for Eigenvalue Problem Computations, is |
| 5125 | based on PETSc, the Portable, Extensible Toolkit for Scientific Computation. |
| 5126 | It employs the MPI standard for all message-passing communication. |
| 5127 | @code{slepc4py} provides Python bindings to almost all functions of SLEPc.") |
| 5128 | (license license:bsd-3))) |
| 5129 | |
| 5130 | (define-public metamath |
| 5131 | (package |
| 5132 | (name "metamath") |
| 5133 | (version "0.193") |
| 5134 | (source |
| 5135 | (origin |
| 5136 | (method git-fetch) |
| 5137 | (uri (git-reference |
| 5138 | (url "https://github.com/metamath/metamath-exe") |
| 5139 | (commit (string-append "v" version)))) |
| 5140 | (file-name (git-file-name name version)) |
| 5141 | (sha256 |
| 5142 | (base32 "1s9hyknfvhj86g3giayyf3dxzg23iij0rs7bdvj075v9qbyhqn9b")))) |
| 5143 | (build-system gnu-build-system) |
| 5144 | (native-inputs |
| 5145 | (list autoconf automake)) |
| 5146 | (home-page "https://us.metamath.org/") |
| 5147 | (synopsis "Proof verifier based on a minimalistic formalism") |
| 5148 | (description |
| 5149 | "Metamath is a tiny formal language and that can express theorems in |
| 5150 | abstract mathematics, with an accompyaning @command{metamath} executable that |
| 5151 | verifies databases of these proofs. There is a public database, |
| 5152 | @url{https://github.com/metamath/set.mm, set.mm}, implementing first-order |
| 5153 | logic and Zermelo-Frenkel set theory with Choice, along with a large swath of |
| 5154 | associated, high-level theorems, e.g.@: the fundamental theorem of arithmetic, |
| 5155 | the Cauchy-Schwarz inequality, Stirling's formula, etc. See the Metamath |
| 5156 | book.") |
| 5157 | (license license:gpl2+))) |
| 5158 | |
| 5159 | (define-public minizinc |
| 5160 | (package |
| 5161 | (name "minizinc") |
| 5162 | (version "2.8.4") |
| 5163 | (source (origin |
| 5164 | (method git-fetch) |
| 5165 | (uri (git-reference |
| 5166 | (url "https://github.com/MiniZinc/libminizinc") |
| 5167 | (commit version))) |
| 5168 | (file-name (git-file-name name version)) |
| 5169 | (sha256 |
| 5170 | (base32 |
| 5171 | "03iliizyadd0wvx6a63rg22lb6p4m6krhlpfm2hfzwj66y3a76j6")) |
| 5172 | (modules '((guix build utils) |
| 5173 | (ice-9 ftw) |
| 5174 | (srfi srfi-1))) |
| 5175 | (snippet |
| 5176 | '(begin |
| 5177 | ;; Do not advertise proprietary solvers |
| 5178 | (with-directory-excursion "cmake/targets" |
| 5179 | (let ((targets '("libminizinc_fzn.cmake" |
| 5180 | "libminizinc_gecode.cmake" |
| 5181 | "libminizinc_mip.cmake" |
| 5182 | "libminizinc_nl.cmake" |
| 5183 | "libminizinc_osicbc.cmake" |
| 5184 | "libminizinc_parser.cmake" |
| 5185 | "libmzn.cmake" |
| 5186 | "minizinc.cmake" |
| 5187 | "mzn2doc.cmake"))) |
| 5188 | (for-each delete-file |
| 5189 | (remove |
| 5190 | (lambda (file) |
| 5191 | (member file (cons* "." ".." targets))) |
| 5192 | (scandir "."))) |
| 5193 | (substitute* "libmzn.cmake" |
| 5194 | (("include\\(cmake/targets/(.*)\\)" all target) |
| 5195 | (if (member target targets) all ""))))) |
| 5196 | (with-directory-excursion "include/minizinc/solvers/MIP" |
| 5197 | (for-each delete-file |
| 5198 | (remove |
| 5199 | (lambda (file) |
| 5200 | (member file '("." ".." |
| 5201 | "MIP_osicbc_solverfactory.hh" |
| 5202 | "MIP_osicbc_wrap.hh" |
| 5203 | "MIP_solverinstance.hh" |
| 5204 | "MIP_solverinstance.hpp" |
| 5205 | "MIP_wrap.hh"))) |
| 5206 | (scandir ".")))) |
| 5207 | (with-directory-excursion "solvers/MIP" |
| 5208 | (for-each delete-file |
| 5209 | (remove |
| 5210 | (lambda (file) |
| 5211 | (member file '("." ".." |
| 5212 | "MIP_osicbc_solverfactory.cpp" |
| 5213 | "MIP_osicbc_wrap.cpp" |
| 5214 | "MIP_solverinstance.cpp" |
| 5215 | "MIP_wrap.cpp"))) |
| 5216 | (scandir ".")))) |
| 5217 | (substitute* "CMakeLists.txt" |
| 5218 | (("find_package\\(([^ ]*).*\\)" all pkg) |
| 5219 | (if (member pkg '("Gecode" "OsiCBC" "Threads")) |
| 5220 | all |
| 5221 | ""))) |
| 5222 | ;; TODO: swap out miniz for zlib |
| 5223 | #t)))) |
| 5224 | (build-system cmake-build-system) |
| 5225 | (arguments |
| 5226 | (list |
| 5227 | #:tests? #f ; no ‘check’ target |
| 5228 | #:modules '((guix build cmake-build-system) |
| 5229 | (guix build utils) |
| 5230 | (srfi srfi-1)) |
| 5231 | #:phases |
| 5232 | #~(modify-phases %standard-phases |
| 5233 | (add-after 'install 'install-solver-configs |
| 5234 | (lambda _ |
| 5235 | (let ((chuffed #$(this-package-input "chuffed")) |
| 5236 | (gecode #$(this-package-input "gecode")) |
| 5237 | (or-tools #$(this-package-input "or-tools")) |
| 5238 | (pkgdatadir (string-append #$output |
| 5239 | "/share/minizinc"))) |
| 5240 | (call-with-output-file (string-append pkgdatadir |
| 5241 | "/Preferences.json") |
| 5242 | (lambda (port) |
| 5243 | (display "\ |
| 5244 | { |
| 5245 | \"tagDefaults\": [ |
| 5246 | [\"\", \"org.gecode.gecode\"], |
| 5247 | [\"gecode\", \"org.gecode.gecode\"] |
| 5248 | ], |
| 5249 | \"solverDefaults\": [] |
| 5250 | }" |
| 5251 | port) |
| 5252 | (newline port))) |
| 5253 | (for-each |
| 5254 | (lambda (solver) |
| 5255 | (copy-recursively |
| 5256 | (string-append solver "/share/minizinc/solvers") |
| 5257 | (string-append pkgdatadir "/solvers"))) |
| 5258 | (list chuffed gecode or-tools)))))))) |
| 5259 | (native-inputs |
| 5260 | (list bison flex)) |
| 5261 | (inputs |
| 5262 | (list cbc chuffed gecode or-tools zlib)) |
| 5263 | (home-page "https://www.minizinc.org") |
| 5264 | (synopsis "High-level constraint modeling language") |
| 5265 | (description "MiniZinc is a high-level modeling language for constraint |
| 5266 | satisfaction and optimization problems. Models are compiled to FlatZinc, a |
| 5267 | language understood by many solvers.") |
| 5268 | (license license:mpl2.0))) |
| 5269 | |
| 5270 | (define-public mumps |
| 5271 | (package |
| 5272 | (name "mumps") |
| 5273 | (version "5.9.1") |
| 5274 | (source |
| 5275 | (origin |
| 5276 | (method url-fetch) |
| 5277 | (uri (string-append "https://mumps-solver.org/MUMPS_" version |
| 5278 | ".tar.gz")) |
| 5279 | (sha256 |
| 5280 | (base32 |
| 5281 | "0ihv7q05hwdwrjm3savkdkj4886xz7xa3fhqqqx00nkbcibrp735")))) |
| 5282 | (build-system gnu-build-system) |
| 5283 | (inputs |
| 5284 | (list gfortran |
| 5285 | ;; These are required for linking against mumps, but we let the user |
| 5286 | ;; declare the dependency. |
| 5287 | openblas |
| 5288 | metis |
| 5289 | scotch)) |
| 5290 | (arguments |
| 5291 | `(#:modules ((ice-9 match) |
| 5292 | (ice-9 popen) |
| 5293 | (srfi srfi-1) |
| 5294 | ,@%default-gnu-modules) |
| 5295 | #:phases |
| 5296 | (modify-phases %standard-phases |
| 5297 | (replace 'configure |
| 5298 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 5299 | (call-with-output-file "Makefile.inc" |
| 5300 | (lambda (port) |
| 5301 | (format port " |
| 5302 | PLAT = |
| 5303 | LIBEXT = .a |
| 5304 | LIBEXT_SHARED = .so |
| 5305 | OUTC = -o |
| 5306 | OUTF = -o |
| 5307 | BLASDIR = ~a |
| 5308 | LIBBLAS = -Wl,-rpath=$(BLASDIR)/lib -Wl,-rpath='$$ORIGIN' |
| 5309 | LIBBLAS += -L$(BLASDIR)/lib |
| 5310 | LIBBLAS += -lopenblas~@[ |
| 5311 | SCALAPDIR = ~a |
| 5312 | SCALAP = -Wl,-rpath=$(SCALAPDIR)/lib -Wl,-rpath='$$ORIGIN' |
| 5313 | SCALAP += -L$(SCALAPDIR)/lib -lscalapack~] |
| 5314 | RM = rm -f~:[ |
| 5315 | CC = gcc |
| 5316 | FC = gfortran |
| 5317 | FL = gfortran |
| 5318 | INCSEQ = -I$(topdir)/libseq |
| 5319 | LIBSEQ = $(LAPACK) -L$(topdir)/libseq -lmpiseq |
| 5320 | LIBSEQNEEDED = libseqneeded |
| 5321 | INCS = $(INCSEQ) |
| 5322 | LIBS = $(LIBSEQ)~; |
| 5323 | CC = mpicc |
| 5324 | FC = mpifort |
| 5325 | FL = mpifort |
| 5326 | INCPAR = |
| 5327 | LIBPAR = $(SCALAP) $(LAPACK) |
| 5328 | LIBSEQNEEDED = |
| 5329 | INCS = $(INCPAR) |
| 5330 | LIBS = $(LIBPAR)~] |
| 5331 | AR = ar vr # rules require trailing space, ugh... |
| 5332 | RANLIB = ranlib |
| 5333 | LIBOTHERS = -pthread |
| 5334 | CDEFS = -DAdd_ |
| 5335 | PIC = -fPIC |
| 5336 | FPIC_OPT = $(PIC) |
| 5337 | RPATH_OPT = -Wl,-rpath,~a/lib |
| 5338 | OPTF = -O2 -fopenmp -DALLOW_NON_INIT -DBLR_MT |
| 5339 | OPTF += -fallow-argument-mismatch $(PIC) |
| 5340 | OPTL = -O2 -fopenmp $(PIC) |
| 5341 | OPTC = -O2 -fopenmp $(PIC) |
| 5342 | LPORDDIR = $(topdir)/PORD/lib |
| 5343 | IPORD = -I$(topdir)/PORD/include |
| 5344 | LPORD = -L$(LPORDDIR) -lpord |
| 5345 | SONAME = -soname |
| 5346 | SHARED_OPT = -shared |
| 5347 | ORDERINGSF = -Dpord~@[ |
| 5348 | METISDIR = ~a |
| 5349 | IMETIS = -I$(METISDIR)/include |
| 5350 | LMETIS = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis |
| 5351 | ORDERINGSF += -Dmetis~]~@[~:{ |
| 5352 | SCOTCHDIR = ~a |
| 5353 | ISCOTCH = -I$(SCOTCHDIR)/include |
| 5354 | LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a -lesmumps |
| 5355 | LSCOTCH += -lscotch -lscotcherr |
| 5356 | ORDERINGSF += ~a~}~] |
| 5357 | ORDERINGSC = $(ORDERINGSF) |
| 5358 | LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) |
| 5359 | IORDERINGSF = $(ISCOTCH) |
| 5360 | IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)" |
| 5361 | (assoc-ref inputs "openblas") |
| 5362 | (assoc-ref inputs "scalapack") |
| 5363 | (->bool (which "mpicc")) ;; MPI support enabled? |
| 5364 | (assoc-ref outputs "out") |
| 5365 | (assoc-ref inputs "metis") |
| 5366 | (match (list (assoc-ref inputs "pt-scotch") |
| 5367 | (assoc-ref inputs "scotch")) |
| 5368 | ((#f #f) |
| 5369 | #f) |
| 5370 | ((#f scotch) |
| 5371 | `((,scotch "" "-Dscotch"))) |
| 5372 | ((ptscotch _) |
| 5373 | `((,ptscotch |
| 5374 | "-lesmumps -lptscotch -lptscotcherr " |
| 5375 | "-Dptscotch"))))))))) |
| 5376 | (replace 'build |
| 5377 | ;; By default only the d-precision library is built. Make with "all" |
| 5378 | ;; target so that all precision libraries and examples are built. |
| 5379 | ;; Then, "make allshared" builts equivalent shared libraries as well. |
| 5380 | (lambda _ |
| 5381 | (invoke "make" "all" |
| 5382 | (format #f "-j~a" (parallel-job-count))) |
| 5383 | (invoke "make" "allshared" |
| 5384 | (format #f "-j~a" (parallel-job-count))))) |
| 5385 | (replace 'check |
| 5386 | ;; Run the simple test drivers, which read test input from stdin: |
| 5387 | ;; from the "real" input for the single- and double-precision |
| 5388 | ;; testers, and from the "cmplx" input for complex-precision |
| 5389 | ;; testers. The EXEC-PREFIX key is used by the mumps-openmpi |
| 5390 | ;; package to prefix execution with "mpirun". |
| 5391 | (lambda* (#:key (exec-prefix '()) #:allow-other-keys) |
| 5392 | (with-directory-excursion "examples" |
| 5393 | (every |
| 5394 | (lambda (prec type) |
| 5395 | (let ((tester (apply open-pipe* |
| 5396 | `(,OPEN_WRITE |
| 5397 | ,@exec-prefix |
| 5398 | ,(string-append "./" prec |
| 5399 | "simpletest")))) |
| 5400 | (input (open-input-file |
| 5401 | (string-append "input_simpletest_" type)))) |
| 5402 | (begin |
| 5403 | (dump-port input tester) |
| 5404 | (close-port input) |
| 5405 | (zero? (close-pipe tester))))) |
| 5406 | '("s" "d" "c" "z") |
| 5407 | '("real" "real" "cmplx" "cmplx"))))) |
| 5408 | (replace 'install |
| 5409 | (lambda* (#:key outputs #:allow-other-keys) |
| 5410 | (let* ((out (assoc-ref outputs "out")) |
| 5411 | (libdir (string-append out "/lib"))) |
| 5412 | (copy-recursively "lib" libdir) |
| 5413 | (copy-recursively "include" (string-append out "/include")) |
| 5414 | (when (file-exists? "libseq/libmpiseq.a") |
| 5415 | (install-file "libseq/libmpiseq.a" libdir)) |
| 5416 | (when (file-exists? "libseq/libmpiseq.so") |
| 5417 | (install-file "libseq/libmpiseq.so" libdir)) |
| 5418 | #t)))))) |
| 5419 | (home-page "https://mumps-solver.org") |
| 5420 | (synopsis "Multifrontal sparse direct solver") |
| 5421 | (description |
| 5422 | "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a |
| 5423 | sparse system of linear equations A x = b using Gaussian elimination.") |
| 5424 | (license license:cecill-c))) |
| 5425 | |
| 5426 | (define-public mumps-metis |
| 5427 | (package |
| 5428 | (inherit mumps) |
| 5429 | (name "mumps-metis") |
| 5430 | (inputs (modify-inputs inputs |
| 5431 | (delete "scotch"))))) |
| 5432 | |
| 5433 | (define-public mumps-openmpi |
| 5434 | (package |
| 5435 | (inherit mumps) |
| 5436 | (name "mumps-openmpi") |
| 5437 | (inputs |
| 5438 | (modify-inputs inputs |
| 5439 | (delete "scotch") |
| 5440 | (prepend openmpi scalapack pt-scotch))) |
| 5441 | (arguments |
| 5442 | (substitute-keyword-arguments arguments |
| 5443 | ((#:phases phases) |
| 5444 | `(modify-phases ,phases |
| 5445 | (add-before 'check 'mpi-setup |
| 5446 | ,%openmpi-setup) |
| 5447 | (replace 'check |
| 5448 | (lambda _ |
| 5449 | ((assoc-ref ,phases 'check) |
| 5450 | #:exec-prefix '("mpirun" "-n" "2")))))))) |
| 5451 | (synopsis "Multifrontal sparse direct solver (with MPI)"))) |
| 5452 | |
| 5453 | (define-public mumps-metis-openmpi |
| 5454 | (package |
| 5455 | (inherit mumps-openmpi) |
| 5456 | (name "mumps-metis-openmpi") |
| 5457 | (inputs (modify-inputs inputs |
| 5458 | (delete "pt-scotch"))))) |
| 5459 | |
| 5460 | (define-public ruby-asciimath |
| 5461 | (package |
| 5462 | (name "ruby-asciimath") |
| 5463 | (version "2.0.6") |
| 5464 | (source |
| 5465 | (origin |
| 5466 | (method url-fetch) |
| 5467 | (uri (rubygems-uri "asciimath" version)) |
| 5468 | (sha256 |
| 5469 | (base32 |
| 5470 | "0b5h65vas9fj4k85gw18cf6pgqbdxfjzj63632rdkngabar67zlq")))) |
| 5471 | (build-system ruby-build-system) |
| 5472 | (native-inputs |
| 5473 | (list ruby-nokogiri ruby-rspec)) |
| 5474 | (synopsis "AsciiMath parsing and conversion library") |
| 5475 | (description |
| 5476 | "A pure Ruby AsciiMath parsing and conversion library. AsciiMath is an |
| 5477 | easy-to-write markup language for mathematics.") |
| 5478 | (home-page "https://github.com/asciidoctor/asciimath") |
| 5479 | (license license:expat))) |
| 5480 | |
| 5481 | (define-public superlu |
| 5482 | (package |
| 5483 | (name "superlu") |
| 5484 | (version "5.3.0") |
| 5485 | (source |
| 5486 | (origin |
| 5487 | (method url-fetch) |
| 5488 | (uri (string-append "https://portal.nersc.gov/project/sparse/superlu/" |
| 5489 | "superlu-" version ".tar.gz")) |
| 5490 | (sha256 |
| 5491 | (base32 "0xvib7nk2rlbsiv1iwkwl9kxppkalkciv628bsyiiv0pv754n48q")) |
| 5492 | (modules '((guix build utils))) |
| 5493 | (snippet |
| 5494 | ;; Replace the non-free implementation of MC64 with a stub adapted |
| 5495 | ;; from Debian |
| 5496 | '(begin |
| 5497 | (use-modules (ice-9 regex) |
| 5498 | (ice-9 rdelim)) |
| 5499 | (call-with-output-file "SRC/mc64ad.c" |
| 5500 | (lambda (port) |
| 5501 | (display " |
| 5502 | #include <stdio.h> |
| 5503 | #include <stdlib.h> |
| 5504 | void mc64id_(int *a) { |
| 5505 | fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\"); |
| 5506 | abort (); |
| 5507 | } |
| 5508 | void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g, |
| 5509 | int *h, int *i, int *j, int *k, double *l, int *m, int *n) { |
| 5510 | fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\"); |
| 5511 | abort (); |
| 5512 | }\n" port))) |
| 5513 | ;; Remove the corresponding license verbiage. MC64 license follows |
| 5514 | ;; a "------" line separator. |
| 5515 | (with-atomic-file-replacement "License.txt" |
| 5516 | (let ((rx (make-regexp "-{8}"))) |
| 5517 | (lambda (in out) |
| 5518 | (let loop () |
| 5519 | (let ((line (read-line in 'concat))) |
| 5520 | (unless (regexp-exec rx line) |
| 5521 | (display line out) |
| 5522 | (loop)))) |
| 5523 | #t))))))) |
| 5524 | (build-system cmake-build-system) |
| 5525 | (native-inputs |
| 5526 | (list tcsh)) |
| 5527 | (inputs |
| 5528 | `(("blas" ,openblas) |
| 5529 | ("gfortran" ,gfortran))) |
| 5530 | (arguments |
| 5531 | `(#:configure-flags '("-Denable_blaslib:BOOL=NO" ;do not use internal cblas |
| 5532 | "-DTPL_BLAS_LIBRARIES=openblas" |
| 5533 | "-DBUILD_SHARED_LIBS:BOOL=YES"))) |
| 5534 | (home-page "https://portal.nersc.gov/project/sparse/superlu/") |
| 5535 | (synopsis "Supernodal direct solver for sparse linear systems") |
| 5536 | (description |
| 5537 | "SuperLU is a general purpose library for the direct solution of large, |
| 5538 | sparse, nonsymmetric systems of linear equations on high performance machines. |
| 5539 | The library is written in C and is callable from either C or Fortran. The |
| 5540 | library routines perform an LU decomposition with partial pivoting and |
| 5541 | triangular system solves through forward and back substitution. The library |
| 5542 | also provides threshold-based ILU factorization preconditioners.") |
| 5543 | (license (list license:bsd-3 |
| 5544 | license:gpl2+ ;EXAMPLE/*fgmr.c |
| 5545 | (license:fsf-free "file://SRC/colamd.h"))))) |
| 5546 | |
| 5547 | (define-public superlu-dist |
| 5548 | (package |
| 5549 | (name "superlu-dist") |
| 5550 | (version "6.4.0") |
| 5551 | (source |
| 5552 | (origin |
| 5553 | (method git-fetch) |
| 5554 | (uri (git-reference |
| 5555 | (url "https://github.com/xiaoyeli/superlu_dist") |
| 5556 | (commit (string-append "v" version)))) |
| 5557 | (file-name (git-file-name name version)) |
| 5558 | (sha256 |
| 5559 | (base32 "0fa29yr72p4yq5ln4rgfsawmi5935n4qcr5niz6864bjladz4lql")) |
| 5560 | (modules '((guix build utils))) |
| 5561 | (snippet |
| 5562 | ;; Replace the non-free implementation of MC64 with a stub |
| 5563 | '(begin |
| 5564 | (make-file-writable "SRC/mc64ad_dist.c") |
| 5565 | (call-with-output-file "SRC/mc64ad_dist.c" |
| 5566 | (lambda (port) |
| 5567 | (display " |
| 5568 | #include <stdio.h> |
| 5569 | #include <stdlib.h> |
| 5570 | void mc64id_dist(int *a) { |
| 5571 | fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\"); |
| 5572 | abort (); |
| 5573 | } |
| 5574 | void mc64ad_dist (int *a, int *b, int *c, int *d, int *e, double *f, int *g, |
| 5575 | int *h, int *i, int *j, int *k, double *l, int *m, int *n) { |
| 5576 | fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\"); |
| 5577 | abort (); |
| 5578 | }\n" port))) |
| 5579 | (substitute* "SRC/util.c" ;adjust default algorithm |
| 5580 | (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag_MC64;") |
| 5581 | ;; TODO: set to "LargeDiag_AWPM" once combinatorial-blas has |
| 5582 | ;; general (i.e. non-square) processor-grid support. |
| 5583 | "RowPerm = NOROWPERM;")) |
| 5584 | #t)) |
| 5585 | (patches (search-patches "superlu-dist-scotchmetis.patch" |
| 5586 | "superlu-dist-awpm-grid.patch")))) |
| 5587 | (build-system cmake-build-system) |
| 5588 | (native-inputs |
| 5589 | (list tcsh)) |
| 5590 | (inputs |
| 5591 | `(("gfortran" ,gfortran) |
| 5592 | ("blas" ,openblas) |
| 5593 | ("combblas" ,combinatorial-blas))) |
| 5594 | (propagated-inputs |
| 5595 | `(("mpi" ,openmpi) ;headers include MPI heades |
| 5596 | ("parmetis" ,pt-scotch32 "metis") |
| 5597 | ("pt-scotch" ,pt-scotch32))) |
| 5598 | (arguments |
| 5599 | `(#:parallel-tests? #f ;tests use MPI and OpenMP |
| 5600 | #:configure-flags (list "-DBUILD_SHARED_LIBS:BOOL=YES" |
| 5601 | "-DTPL_ENABLE_COMBBLASLIB=YES" |
| 5602 | "-DTPL_BLAS_LIBRARIES=-lopenblas" |
| 5603 | "-DTPL_LAPACK_LIBRARIES=-lopenblas" |
| 5604 | (string-append "-DTPL_PARMETIS_LIBRARIES=" |
| 5605 | (string-join |
| 5606 | '("ptscotchparmetisv3" "ptscotcherr" |
| 5607 | "scotchmetisv3" "scotcherr") |
| 5608 | ";")) |
| 5609 | (string-append "-DTPL_PARMETIS_INCLUDE_DIRS=" |
| 5610 | (assoc-ref %build-inputs "parmetis") |
| 5611 | "/include") |
| 5612 | "-DTPL_ENABLE_COMBBLASLIB=ON" |
| 5613 | (string-append "-DTPL_COMBBLAS_INCLUDE_DIRS=" |
| 5614 | (assoc-ref %build-inputs "combblas") |
| 5615 | "/include/CombBLAS;" |
| 5616 | (assoc-ref %build-inputs "combblas") |
| 5617 | "/include/BipartiteMatchings") |
| 5618 | "-DTPL_COMBBLAS_LIBRARIES=CombBLAS") |
| 5619 | #:phases |
| 5620 | (modify-phases %standard-phases |
| 5621 | (add-before 'configure 'set-c++-standard |
| 5622 | (lambda _ |
| 5623 | (substitute* "CMakeLists.txt" |
| 5624 | ;; AWPM headers require C++14 |
| 5625 | (("CMAKE_CXX_STANDARD 11") "CMAKE_CXX_STANDARD 14")))) |
| 5626 | (add-before 'check 'mpi-setup |
| 5627 | ,%openmpi-setup) |
| 5628 | (add-before 'check 'omp-setup |
| 5629 | (lambda _ (setenv "OMP_NUM_THREADS" "1") #t))))) |
| 5630 | (home-page (package-home-page superlu)) |
| 5631 | (synopsis "Parallel supernodal direct solver") |
| 5632 | (description |
| 5633 | "SuperLU_DIST is a parallel extension to the serial SuperLU library. |
| 5634 | It is targeted for distributed memory parallel machines. SuperLU_DIST is |
| 5635 | implemented in ANSI C, and MPI for communications.") |
| 5636 | (license license:bsd-3))) |
| 5637 | |
| 5638 | (define-public scotch |
| 5639 | (package |
| 5640 | (name "scotch") |
| 5641 | (version "7.0.15") |
| 5642 | (source |
| 5643 | (origin |
| 5644 | (method git-fetch) |
| 5645 | (uri (git-reference |
| 5646 | (url "https://gitlab.inria.fr/scotch/scotch") |
| 5647 | (commit (string-append "v" version)))) |
| 5648 | (file-name (git-file-name name version)) |
| 5649 | (sha256 |
| 5650 | (base32 "1d2v481zgi0b42qny3d97ysm1f5y89qkjhlzpnh8xx2abljssnqi")) |
| 5651 | (patches (search-patches "scotch-cmake-remove-metis.patch")))) |
| 5652 | (build-system cmake-build-system) |
| 5653 | (inputs |
| 5654 | (list zlib)) |
| 5655 | (native-inputs |
| 5656 | (list flex bison gfortran)) |
| 5657 | (outputs '("out" "metis")) |
| 5658 | (arguments |
| 5659 | (list #:parallel-tests? #f |
| 5660 | #:configure-flags #~'("-DBUILD_SHARED_LIBS=YES" "-DINTSIZE=64" |
| 5661 | "-DBUILD_PTSCOTCH=OFF") |
| 5662 | #:phases |
| 5663 | #~(modify-phases %standard-phases |
| 5664 | (add-after 'unpack 'add-metis-executable-runpath |
| 5665 | (lambda _ |
| 5666 | ;; 'adm2dgr' is linked to libptscotchparmetisv3 and |
| 5667 | ;; installed in the "metis" output so add |
| 5668 | ;; '${ORIGIN}/../lib' to its RUNPATH. |
| 5669 | (substitute* "src/libscotchmetis/CMakeLists.txt" |
| 5670 | (("target_link_libraries\\(adm2dgr (.*)\\)" _ libraries) |
| 5671 | (string-append |
| 5672 | "target_link_libraries(adm2dgr " |
| 5673 | libraries |
| 5674 | " -Wl,-rpath='\\${ORIGIN}/../lib')\n"))))) |
| 5675 | (add-after 'install 'install-metis |
| 5676 | (lambda* (#:key outputs #:allow-other-keys) |
| 5677 | ;; Move the METIS compatibility library to a separate output to |
| 5678 | ;; avoid a name clash on <metis.h>. |
| 5679 | (let* ((out (assoc-ref outputs "out")) |
| 5680 | (metis (assoc-ref outputs "metis")) |
| 5681 | (prefix (string-length out))) |
| 5682 | (for-each (lambda (file) |
| 5683 | (let ((target |
| 5684 | (string-append metis |
| 5685 | (string-drop file |
| 5686 | prefix)))) |
| 5687 | (mkdir-p (dirname target)) |
| 5688 | (rename-file file target))) |
| 5689 | (find-files out "(adm2dgr|metis)")))))))) |
| 5690 | (home-page "https://www.labri.fr/perso/pelegrin/scotch/") |
| 5691 | (properties |
| 5692 | `((release-monitoring-url |
| 5693 | . "https://gitlab.inria.fr/scotch/scotch/-/releases"))) |
| 5694 | (synopsis "Programs and libraries for graph algorithms") |
| 5695 | (description "SCOTCH is a set of programs and libraries which implement |
| 5696 | the static mapping and sparse matrix reordering algorithms developed within |
| 5697 | the SCOTCH project. Its purpose is to apply graph theory, with a divide and |
| 5698 | conquer approach, to scientific computing problems such as graph and mesh |
| 5699 | partitioning, static mapping, and sparse matrix ordering, in application |
| 5700 | domains ranging from structural mechanics to operating systems or |
| 5701 | bio-chemistry.") |
| 5702 | ;; See LICENSE_en.txt |
| 5703 | (license license:cecill-c))) |
| 5704 | |
| 5705 | (define-public scotch32 |
| 5706 | ;; This is the 'INTSIZE32' variant, which uses 32-bit integers, as needed by |
| 5707 | ;; some applications. |
| 5708 | (package |
| 5709 | (inherit scotch) |
| 5710 | (name "scotch32") |
| 5711 | (arguments |
| 5712 | (substitute-keyword-arguments arguments |
| 5713 | ((#:configure-flags flags #~'()) |
| 5714 | #~'("-DBUILD_SHARED_LIBS=YES" "-DBUILD_PTSCOTCH=OFF" "-DINTSIZE=32")))) |
| 5715 | (synopsis |
| 5716 | "Programs and libraries for graph algorithms (32-bit integers)"))) |
| 5717 | |
| 5718 | (define-public pt-scotch |
| 5719 | (package |
| 5720 | (inherit scotch) |
| 5721 | (name "pt-scotch") |
| 5722 | (propagated-inputs |
| 5723 | (list openmpi)) ;headers include MPI headers |
| 5724 | (arguments |
| 5725 | (substitute-keyword-arguments arguments |
| 5726 | ((#:configure-flags flags #~'()) |
| 5727 | #~'("-DBUILD_SHARED_LIBS=YES" "-DBUILD_PTSCOTCH=ON" "-DINTSIZE=64")) |
| 5728 | ((#:phases phases #~%standard-phases) |
| 5729 | #~(modify-phases #$phases |
| 5730 | (add-before 'check 'mpi-setup |
| 5731 | #$%openmpi-setup))))) |
| 5732 | (synopsis "Programs and libraries for graph algorithms (with MPI)"))) |
| 5733 | |
| 5734 | (define-public pt-scotch32 |
| 5735 | (package |
| 5736 | (inherit pt-scotch) |
| 5737 | (name "pt-scotch32") |
| 5738 | (propagated-inputs |
| 5739 | (list openmpi)) ;headers include MPI headers |
| 5740 | (arguments |
| 5741 | (substitute-keyword-arguments arguments |
| 5742 | ((#:configure-flags flags #~'()) |
| 5743 | #~'("-DBUILD_SHARED_LIBS=YES" "-DBUILD_PTSCOTCH=ON" "-DINTSIZE=32")))) |
| 5744 | (synopsis |
| 5745 | "Programs and libraries for graph algorithms (with MPI and 32-bit integers)"))) |
| 5746 | |
| 5747 | (define-public gklib |
| 5748 | (let ((commit "8bd6bad750b2b0d90800c632cf18e8ee93ad72d7") |
| 5749 | (revision "1")) |
| 5750 | (package |
| 5751 | (name "gklib") |
| 5752 | (version (git-version "5.1.1" revision commit)) |
| 5753 | (source |
| 5754 | (origin |
| 5755 | (method git-fetch) |
| 5756 | (uri (git-reference |
| 5757 | (url "https://github.com/KarypisLab/GKlib") |
| 5758 | (commit commit))) |
| 5759 | (file-name (git-file-name name version)) |
| 5760 | (sha256 |
| 5761 | (base32 |
| 5762 | "08k4zzyd7zsisdhfmnwz7zb9w3pzpgagyjq52mwk8i6sqajdxsdn")))) |
| 5763 | (build-system cmake-build-system) |
| 5764 | (arguments |
| 5765 | (list |
| 5766 | #:tests? #f |
| 5767 | #:configure-flags |
| 5768 | #~(list "-DBUILD_SHARED_LIBS=ON" |
| 5769 | #$@(if (target-x86?) |
| 5770 | '() |
| 5771 | '("-DNO_X86=1"))) |
| 5772 | #:phases |
| 5773 | #~(modify-phases %standard-phases |
| 5774 | (add-after 'unpack 'remove-march=native |
| 5775 | (lambda _ |
| 5776 | (substitute* "GKlibSystem.cmake" |
| 5777 | (("-march=native") ""))))))) |
| 5778 | (home-page "https://github.com/KarypisLab/GKlib") |
| 5779 | (synopsis "Helper library for METIS") |
| 5780 | (description |
| 5781 | "GKlib is a library of various helper routines and frameworks used by |
| 5782 | software from KarypisLab, such as METIS.") |
| 5783 | (license license:asl2.0)))) |
| 5784 | |
| 5785 | ;; XXX: Remove once the full SuiteSparse package is replaced. |
| 5786 | (define-public metis |
| 5787 | (package |
| 5788 | (name "metis") |
| 5789 | (version "5.1.0") |
| 5790 | (source |
| 5791 | (origin |
| 5792 | (method url-fetch) |
| 5793 | (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/" |
| 5794 | "metis-" version ".tar.gz")) |
| 5795 | (sha256 |
| 5796 | (base32 |
| 5797 | "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn")))) |
| 5798 | (properties |
| 5799 | `((release-monitoring-url |
| 5800 | . "http://glaros.dtc.umn.edu/gkhome/metis/metis/download"))) |
| 5801 | (build-system cmake-build-system) |
| 5802 | (arguments |
| 5803 | (list |
| 5804 | #:tests? #f ;no tests |
| 5805 | #:configure-flags |
| 5806 | #~(list "-DSHARED=ON" |
| 5807 | (string-append "-DGKLIB_PATH=" |
| 5808 | (getcwd) "/metis-" #$version "/GKlib")))) |
| 5809 | (inputs (list openblas)) |
| 5810 | (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview") |
| 5811 | (synopsis "Graph partitioning and fill-reducing matrix ordering library") |
| 5812 | (description |
| 5813 | "METIS is a set of serial programs for partitioning graphs, partitioning |
| 5814 | finite element meshes, and producing fill-reducing orderings for sparse |
| 5815 | matrices. The algorithms implemented in METIS are based on the multilevel |
| 5816 | recursive-bisection, multilevel k-way, and multi-constraint partitioning |
| 5817 | schemes.") |
| 5818 | (license license:asl2.0))) ;As of version 5.0.3 |
| 5819 | |
| 5820 | (define-public metis-5.2 |
| 5821 | (package |
| 5822 | (name "metis") |
| 5823 | (version "5.2.1") |
| 5824 | (source |
| 5825 | (origin |
| 5826 | (method git-fetch) |
| 5827 | (uri (git-reference |
| 5828 | (url "https://github.com/KarypisLab/METIS") |
| 5829 | (commit (string-append "v" version)))) |
| 5830 | (file-name (git-file-name name version)) |
| 5831 | (sha256 |
| 5832 | (base32 |
| 5833 | "19vi1wsi2gp2m5vb715yfnzd2g7brm4r40qxg65ysrzgl13lpmvr")) |
| 5834 | (snippet |
| 5835 | #~(delete-file "manual/manual.pdf")))) |
| 5836 | (build-system cmake-build-system) |
| 5837 | (inputs (list gklib openblas)) |
| 5838 | (arguments |
| 5839 | (list |
| 5840 | #:tests? #f ; Tests are not automatic |
| 5841 | #:configure-flags |
| 5842 | #~(list "-DSHARED=ON" |
| 5843 | (string-append "-DGKLIB_PATH=" #$gklib)) |
| 5844 | #:phases |
| 5845 | #~(modify-phases %standard-phases |
| 5846 | ;; The original Makefile copies some files and invokes CMake. |
| 5847 | (add-before 'configure 'prepare-cmake |
| 5848 | (lambda _ |
| 5849 | (substitute* "Makefile" |
| 5850 | (("config: distclean") "config:") |
| 5851 | (("BUILDDIR =.*") |
| 5852 | "BUILDDIR = .\n") |
| 5853 | ((".*cmake.*") "")) |
| 5854 | (substitute* "CMakeLists.txt" |
| 5855 | (("build/") "../source/")) |
| 5856 | (invoke "make" "config")))))) |
| 5857 | (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview") |
| 5858 | (synopsis "Graph partitioning and fill-reducing matrix ordering library") |
| 5859 | (description |
| 5860 | "METIS is a set of serial programs for partitioning graphs, partitioning |
| 5861 | finite element meshes, and producing fill-reducing orderings for sparse |
| 5862 | matrices. The algorithms implemented in METIS are based on the multilevel |
| 5863 | recursive-bisection, multilevel k-way, and multi-constraint partitioning |
| 5864 | schemes.") |
| 5865 | (license license:asl2.0))) |
| 5866 | |
| 5867 | (define-public gsegrafix |
| 5868 | ;; This is an old and equally dead "experimental fork" of the longer-dead |
| 5869 | ;; original. At least it no longer requires the even-deader libgnomeprint{,ui} |
| 5870 | ;; libraries, instead rendering plots with Pango. |
| 5871 | (package |
| 5872 | (name "gsegrafix") |
| 5873 | (version "1.0.7.2") |
| 5874 | (source |
| 5875 | (origin |
| 5876 | (method url-fetch) |
| 5877 | (uri (string-append "mirror://savannah/gsegrafix-experimental/" |
| 5878 | "gsegrafix-experimental-" version ".tar.gz")) |
| 5879 | (sha256 |
| 5880 | (base32 "0fwh6719xy2zasmqlp0vdx6kzm45hn37ga88xmw5cz0yx7xw4j6f")))) |
| 5881 | (build-system gnu-build-system) |
| 5882 | (arguments |
| 5883 | `(#:configure-flags |
| 5884 | (list "--disable-static"))) |
| 5885 | (inputs |
| 5886 | (list glib gtk+)) |
| 5887 | (native-inputs |
| 5888 | (list pkg-config)) |
| 5889 | (home-page "https://www.gnu.org/software/gsegrafix/") |
| 5890 | (synopsis "GNOME application to create scientific and engineering plots") |
| 5891 | (description |
| 5892 | "GSEGrafix is an application which produces high-quality graphical |
| 5893 | plots for science and engineering. Plots are specified via simple ASCII |
| 5894 | parameter files and data files and are presented in an anti-aliased GNOME |
| 5895 | canvas. The program supports rectangular two-dimensional plots, histograms, |
| 5896 | polar-axis plots and three-dimensional plots. Plots can be printed or saved |
| 5897 | to BMP, JPEG or PNG image formats.") |
| 5898 | (license license:gpl3+))) |
| 5899 | |
| 5900 | (define-public maxima |
| 5901 | (package |
| 5902 | (name "maxima") |
| 5903 | (version "5.47.0") |
| 5904 | (source |
| 5905 | (origin |
| 5906 | (method url-fetch) |
| 5907 | (uri (string-append "mirror://sourceforge/maxima/Maxima-source/" |
| 5908 | version "-source/" name "-" version ".tar.gz")) |
| 5909 | (sha256 |
| 5910 | (base32 "0yhgsi7s22bpblrmrj60x0jsjdz98b5hjdcq7b0fhlzx4hdh414i")) |
| 5911 | (patches (search-patches "maxima-defsystem-mkdir.patch")))) |
| 5912 | (build-system gnu-build-system) |
| 5913 | (inputs |
| 5914 | (list bash-minimal |
| 5915 | gnuplot ;for plots |
| 5916 | sbcl |
| 5917 | sed |
| 5918 | tk)) ;Tcl/Tk is used by 'xmaxima' |
| 5919 | (native-inputs |
| 5920 | (list texinfo perl python)) |
| 5921 | (arguments |
| 5922 | (list |
| 5923 | #:configure-flags |
| 5924 | #~(list "--enable-sbcl" |
| 5925 | (string-append "--with-sbcl=" #$sbcl "/bin/sbcl") |
| 5926 | (string-append "--with-posix-shell=" #$bash-minimal "/bin/sh") |
| 5927 | (string-append "--with-wish=" #$tk "/bin/wish" |
| 5928 | #$(version-major+minor (package-version tk)))) |
| 5929 | ;; By default Maxima attempts to write temporary files to |
| 5930 | ;; '/tmp/nix-build-maxima-*', which won't exist at run time. |
| 5931 | ;; Work around that. |
| 5932 | #:make-flags #~(list "TMPDIR=/tmp") |
| 5933 | #:phases |
| 5934 | #~(modify-phases %standard-phases |
| 5935 | (add-after 'unpack 'patch-paths |
| 5936 | (lambda* (#:key inputs #:allow-other-keys) |
| 5937 | (let* ((sed (search-input-file inputs "/bin/sed")) |
| 5938 | (coreutils (assoc-ref inputs "coreutils")) |
| 5939 | (dirname (string-append coreutils "/bin/dirname")) |
| 5940 | (head (string-append coreutils "/bin/head")) |
| 5941 | (perl (search-input-file inputs "/bin/perl")) |
| 5942 | (python (search-input-file inputs "/bin/python3"))) |
| 5943 | (substitute* "src/maxima.in" |
| 5944 | (("sed ") (string-append sed " ")) |
| 5945 | (("dirname") dirname) |
| 5946 | (("head") head)) |
| 5947 | (substitute* "doc/info/Makefile.in" |
| 5948 | (("/usr/bin/env perl") perl)) |
| 5949 | (substitute* "doc/info/build_html.sh.in" |
| 5950 | (("python") python))))) |
| 5951 | (add-before 'check 'pre-check |
| 5952 | (lambda _ |
| 5953 | (chmod "src/maxima" #o555))) |
| 5954 | (replace 'check |
| 5955 | (lambda _ |
| 5956 | ;; This is derived from the testing code in the "debian/rules" file |
| 5957 | ;; of Debian's Maxima package. |
| 5958 | ;; If Maxima can successfully run this, the binary to be installed |
| 5959 | ;; should be fine. |
| 5960 | (invoke "sh" "-c" |
| 5961 | (string-append |
| 5962 | "./maxima-local " |
| 5963 | "--lisp=sbcl " |
| 5964 | "--batch-string=\"run_testsuite();\" " |
| 5965 | "| grep -q \"No unexpected errors found\"")))) |
| 5966 | ;; Make sure the doc and emacs files are found in the |
| 5967 | ;; standard location. Also configure maxima to find gnuplot |
| 5968 | ;; without having it on the PATH. |
| 5969 | (add-after 'install 'post-install |
| 5970 | (lambda* (#:key outputs inputs #:allow-other-keys) |
| 5971 | (let* ((gnuplot (assoc-ref inputs "gnuplot")) |
| 5972 | (out (assoc-ref outputs "out")) |
| 5973 | (datadir (string-append out "/share/maxima/" #$version)) |
| 5974 | (binutils (dirname (search-input-file inputs "/bin/as")))) |
| 5975 | (with-directory-excursion out |
| 5976 | (mkdir-p "share/emacs") |
| 5977 | (mkdir-p "share/doc") |
| 5978 | (symlink |
| 5979 | (string-append datadir "/doc/") |
| 5980 | (string-append out "/share/doc/maxima")) |
| 5981 | (with-atomic-file-replacement |
| 5982 | (string-append datadir "/share/maxima-init.lisp") |
| 5983 | (lambda (in out) |
| 5984 | (format out "~a ~s~a~%" |
| 5985 | "(setf $gnuplot_command " |
| 5986 | (string-append gnuplot "/bin/gnuplot") ")") |
| 5987 | (dump-port in out)))) |
| 5988 | ;; Ensure that Maxima will have access to the GNU binutils |
| 5989 | ;; components at runtime. |
| 5990 | (wrap-program (string-append out "/bin/maxima") |
| 5991 | `("PATH" prefix (#$binutils)))))) |
| 5992 | ;; The Maxima command ‘describe’ allows picking the relevant portions |
| 5993 | ;; from Maxima’s Texinfo docs. However it does not support reading |
| 5994 | ;; gzipped info files. |
| 5995 | (delete 'compress-documentation)))) |
| 5996 | (home-page "https://maxima.sourceforge.io") |
| 5997 | (synopsis "Numeric and symbolic expression manipulation") |
| 5998 | (description "Maxima is a system for the manipulation of symbolic and |
| 5999 | numerical expressions. It yields high precision numeric results by using |
| 6000 | exact fractions, arbitrary precision integers, and variable precision floating |
| 6001 | point numbers.") |
| 6002 | ;; Some files are lgpl2.1+. Some are gpl2+. Some explicitly state gpl1+. |
| 6003 | ;; Others simply say "GNU General Public License" without stating a |
| 6004 | ;; version (which implicitly means gpl1+). |
| 6005 | ;; At least one file (src/maxima.asd) says "version 2." |
| 6006 | ;; GPLv2 only is therefore the smallest subset. |
| 6007 | (license license:gpl2))) |
| 6008 | |
| 6009 | (define-public maxima-ecl |
| 6010 | (package/inherit maxima |
| 6011 | (name "maxima-ecl") |
| 6012 | (properties '((hidden? . #t))) |
| 6013 | (inputs |
| 6014 | (modify-inputs inputs |
| 6015 | (delete "sbcl") |
| 6016 | (prepend ecl))) |
| 6017 | (arguments |
| 6018 | (substitute-keyword-arguments arguments |
| 6019 | ((#:configure-flags flags) |
| 6020 | #~(list "--enable-ecl")) |
| 6021 | ((#:phases phases) |
| 6022 | #~(modify-phases #$phases |
| 6023 | (add-after 'install 'install-lib |
| 6024 | (lambda _ |
| 6025 | (let ((lib (string-append |
| 6026 | #$output "/lib/maxima/" |
| 6027 | #$(package-version this-package) |
| 6028 | "/binary-ecl"))) |
| 6029 | (install-file "src/binary-ecl/maxima.fas" lib)))) |
| 6030 | (replace 'check |
| 6031 | (lambda _ |
| 6032 | (invoke "sh" "-c" |
| 6033 | (string-append |
| 6034 | "./maxima-local " |
| 6035 | "--lisp=ecl " |
| 6036 | "--batch-string=\"run_testsuite();\" " |
| 6037 | "| grep -q \"No unexpected errors found\"")))))))) |
| 6038 | (description |
| 6039 | (string-append |
| 6040 | (package-description maxima) |
| 6041 | " This package variant uses ECL as the underlying Lisp |
| 6042 | implementation.")))) |
| 6043 | |
| 6044 | (define-public wxmaxima |
| 6045 | (package |
| 6046 | (name "wxmaxima") |
| 6047 | (version "25.04.0") |
| 6048 | (source (origin |
| 6049 | (method git-fetch) |
| 6050 | (uri (git-reference |
| 6051 | (url "https://github.com/wxMaxima-developers/wxmaxima") |
| 6052 | (commit (string-append "Version-" version)))) |
| 6053 | (file-name (git-file-name name version)) |
| 6054 | (sha256 |
| 6055 | (base32 |
| 6056 | "0m8sk02cmiqxqlcw8rcljyinwajn5hvj5ldf3xr5v1asq1mvck00")))) |
| 6057 | (build-system cmake-build-system) |
| 6058 | (native-inputs (list gettext-minimal)) |
| 6059 | (inputs (list bash-minimal |
| 6060 | wxwidgets |
| 6061 | maxima |
| 6062 | ;; Runtime support. |
| 6063 | adwaita-icon-theme |
| 6064 | gtk+ |
| 6065 | shared-mime-info)) |
| 6066 | (arguments |
| 6067 | `(#:tests? #f ; tests fail non-deterministically |
| 6068 | #:phases |
| 6069 | (modify-phases %standard-phases |
| 6070 | (add-after 'unpack 'patch-doc-path |
| 6071 | (lambda _ |
| 6072 | ;; Don't look in share/doc/wxmaxima-xx.xx.x for the |
| 6073 | ;; documentation. Only licensing information is placed there by |
| 6074 | ;; Guix. |
| 6075 | (substitute* "src/Dirstructure.cpp" |
| 6076 | (("/doc/wxmaxima-\\%s") |
| 6077 | "/doc/wxmaxima")))) |
| 6078 | (add-after 'install 'wrap-program |
| 6079 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 6080 | (wrap-program (string-append (assoc-ref outputs "out") |
| 6081 | "/bin/wxmaxima") |
| 6082 | `("PATH" ":" prefix |
| 6083 | (,(string-append (assoc-ref inputs "maxima") |
| 6084 | "/bin"))) |
| 6085 | ;; For GtkFileChooserDialog. |
| 6086 | `("GSETTINGS_SCHEMA_DIR" = |
| 6087 | (,(string-append (assoc-ref inputs "gtk+") |
| 6088 | "/share/glib-2.0/schemas"))) |
| 6089 | `("XDG_DATA_DIRS" ":" prefix |
| 6090 | ( ;; Needed by gdk-pixbuf to know supported icon formats. |
| 6091 | ,(string-append (assoc-ref inputs "shared-mime-info") |
| 6092 | "/share") |
| 6093 | ;; The default icon theme of GTK+. |
| 6094 | ,(string-append (assoc-ref inputs "adwaita-icon-theme") |
| 6095 | "/share"))))))))) |
| 6096 | (home-page "https://wxmaxima-developers.github.io/wxmaxima/") |
| 6097 | (synopsis |
| 6098 | "Graphical user interface for the Maxima computer algebra system") |
| 6099 | (description |
| 6100 | "wxMaxima is a graphical user interface for the Maxima computer algebra |
| 6101 | system. It eases the use of Maxima by making most of its commands available |
| 6102 | through a menu system and by providing input dialogs for commands that require |
| 6103 | more than one argument. It also implements its own display engine that |
| 6104 | outputs mathematical symbols directly instead of depicting them with ASCII |
| 6105 | characters. |
| 6106 | |
| 6107 | wxMaxima also features 2D and 3D inline plots, simple animations, mixing of |
| 6108 | text and mathematical calculations to create documents, exporting of input and |
| 6109 | output to TeX, and a browser for Maxima's manual including command index and |
| 6110 | full text searching.") |
| 6111 | (license license:gpl2+))) |
| 6112 | |
| 6113 | (define-public armadillo |
| 6114 | (package |
| 6115 | (name "armadillo") |
| 6116 | (version "12.4.2") |
| 6117 | (source (origin |
| 6118 | (method url-fetch) |
| 6119 | (uri (string-append "mirror://sourceforge/arma/armadillo-" |
| 6120 | version ".tar.xz")) |
| 6121 | (sha256 |
| 6122 | (base32 |
| 6123 | "150fcl2cca3ks91ahgr32jw0ww8lc8ng84mczfab7clvigqpdnpv")))) |
| 6124 | (build-system cmake-build-system) |
| 6125 | (arguments |
| 6126 | `(#:tests? #f ; no test target |
| 6127 | #:configure-flags '("-DOPENBLAS_PROVIDES_LAPACK=ON"))) |
| 6128 | (inputs |
| 6129 | (list openblas arpack-ng)) |
| 6130 | (home-page "https://arma.sourceforge.net/") |
| 6131 | (synopsis "C++ linear algebra library") |
| 6132 | (description |
| 6133 | "Armadillo is a C++ linear algebra library, aiming towards a good balance |
| 6134 | between speed and ease of use. It is useful for algorithm development |
| 6135 | directly in C++, or quick conversion of research code into production |
| 6136 | environments. It can be used for machine learning, pattern recognition, |
| 6137 | signal processing, bioinformatics, statistics, econometrics, etc. The library |
| 6138 | provides efficient classes for vectors, matrices and cubes, as well as 150+ |
| 6139 | associated functions (e.g., contiguous and non-contiguous submatrix views).") |
| 6140 | (license license:asl2.0))) |
| 6141 | |
| 6142 | (define-public muparser |
| 6143 | (package |
| 6144 | (name "muparser") |
| 6145 | (version "2.3.5") |
| 6146 | (source |
| 6147 | (origin |
| 6148 | (method git-fetch) |
| 6149 | (uri (git-reference |
| 6150 | (url "https://github.com/beltoforion/muparser") |
| 6151 | (commit (string-append "v" version)))) |
| 6152 | (file-name (git-file-name name version)) |
| 6153 | (sha256 |
| 6154 | (base32 "0zazg6awbfimjlf7352frps47ykpn7z0kz5q686xni7nka0g2k88")))) |
| 6155 | (build-system cmake-build-system) |
| 6156 | (home-page "https://beltoforion.de/en/muparser") |
| 6157 | (synopsis "Fast parser library for mathematical expressions") |
| 6158 | (description |
| 6159 | "muParser is an extensible high performance math parser library. It is |
| 6160 | based on transforming an expression into a bytecode and precalculating constant |
| 6161 | parts of it.") |
| 6162 | (license license:expat))) |
| 6163 | |
| 6164 | (define-public openblas |
| 6165 | (package |
| 6166 | (name "openblas") |
| 6167 | (version "0.3.31") |
| 6168 | (source |
| 6169 | (origin |
| 6170 | (method git-fetch) |
| 6171 | (uri (git-reference |
| 6172 | (url "https://github.com/OpenMathLib/OpenBLAS") |
| 6173 | (commit (string-append "v" version)))) |
| 6174 | (file-name (git-file-name name version)) |
| 6175 | (sha256 |
| 6176 | (base32 |
| 6177 | "1ifbbk4mg4ykm92i9b09wwbcwpyzlfzn8lhds8f3p7cbcga7q530")))) |
| 6178 | ;; To build the package, we can either rely on a preset Makefile, or |
| 6179 | ;; generate a new one through a CMake configuration. |
| 6180 | ;; We choose the first option, so we delete the configure phase and we set |
| 6181 | ;; the build system to gnu-build-system to build the package through the |
| 6182 | ;; 'make' command. |
| 6183 | (build-system gnu-build-system) |
| 6184 | (arguments |
| 6185 | (list |
| 6186 | ;; Set the test target (but tests are indeed already run in the build |
| 6187 | ;; phase, which calls 'make -C test all'). |
| 6188 | #:test-target "test" |
| 6189 | ;; No default baseline is supplied for powerpc-linux. |
| 6190 | #:substitutable? (not (target-ppc32?)) |
| 6191 | #:make-flags |
| 6192 | #~(list (string-append "PREFIX=" #$output) |
| 6193 | "CFLAGS=-O3" ; optimization flags |
| 6194 | "FFLAGS=-O3" ; optimization flags |
| 6195 | "SHELL=bash" |
| 6196 | "DEBUG=1" ; enable debug symbols -g |
| 6197 | "MAKE_NB_JOBS=0" ; use jobserver for submakes |
| 6198 | "NO_STATIC=1" ; avoid a 67 MiB static archive |
| 6199 | |
| 6200 | ;; This is the maximum number of threads OpenBLAS will ever use |
| 6201 | ;; (that is, if $OPENBLAS_NUM_THREADS is greater than that, then |
| 6202 | ;; NUM_THREADS is used.) If we don't set it, the makefile sets |
| 6203 | ;; it to the number of cores of the build machine, which is |
| 6204 | ;; obviously wrong. |
| 6205 | "NUM_THREADS=128" |
| 6206 | |
| 6207 | ;; OpenMP support prevents deadlocks when multithreaded Openblas |
| 6208 | ;; is called from an OpenMP parallel region and takes care of |
| 6209 | ;; deactivating threads when necessary. See |
| 6210 | ;; http://www.openmathlib.org/OpenBLAS/docs/faq/#using-openblas-with-openmp |
| 6211 | ;; for more details. |
| 6212 | "USE_OPENMP=1" |
| 6213 | |
| 6214 | ;; DYNAMIC_ARCH is only supported on some architectures. |
| 6215 | ;; DYNAMIC_ARCH combined with TARGET=GENERIC provides a library |
| 6216 | ;; which uses the optimizations for the detected CPU. This can |
| 6217 | ;; be overridden at runtime with the environment variable |
| 6218 | ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU |
| 6219 | ;; type. On other architectures we target only the baseline CPU |
| 6220 | ;; supported by Guix. |
| 6221 | #$@(cond |
| 6222 | ((or (target-x86-64?) |
| 6223 | (target-x86-32?) |
| 6224 | (target-ppc64le?) |
| 6225 | (target-aarch64?)) |
| 6226 | ;; Dynamic older enables a few extra CPU architectures |
| 6227 | ;; on x86_64 that were released before 2010. |
| 6228 | '("DYNAMIC_ARCH=1" "DYNAMIC_OLDER=1" "TARGET=GENERIC")) |
| 6229 | ;; On some of these architectures the CPU type can't be detected. |
| 6230 | ;; We list the oldest CPU core we want to have support for. |
| 6231 | ;; On MIPS we force the "SICORTEX" TARGET, as for the other |
| 6232 | ;; two available MIPS targets special extended instructions |
| 6233 | ;; for Loongson cores are used. |
| 6234 | ((target-mips64el?) |
| 6235 | '("TARGET=SICORTEX")) |
| 6236 | ((target-arm32?) |
| 6237 | '("TARGET=ARMV7")) |
| 6238 | ((target-riscv64?) |
| 6239 | '("TARGET=RISCV64_GENERIC")) |
| 6240 | (else '()))) |
| 6241 | #:phases |
| 6242 | #~(modify-phases %standard-phases |
| 6243 | ;; Skip configure phase since we rely on a preset Makefile. |
| 6244 | (delete 'configure) |
| 6245 | ;; Get libgfortran found when building in utest. |
| 6246 | (add-before 'build 'set-extralib |
| 6247 | (lambda* (#:key inputs #:allow-other-keys) |
| 6248 | (setenv "FEXTRALIB" |
| 6249 | (string-append |
| 6250 | "-L" |
| 6251 | (dirname |
| 6252 | (search-input-file inputs |
| 6253 | "/lib/libgfortran.so"))))))))) |
| 6254 | (inputs |
| 6255 | (list `(,gfortran "lib"))) |
| 6256 | (native-inputs |
| 6257 | (list cunit gfortran perl)) |
| 6258 | (outputs '("out" "debug")) |
| 6259 | (home-page "https://www.openblas.net/") |
| 6260 | (synopsis "Optimized BLAS library based on GotoBLAS") |
| 6261 | (description |
| 6262 | "OpenBLAS is a Basic Linear Algebra Subprograms (BLAS) library forked |
| 6263 | from the GotoBLAS2-1.13 BSD version.") |
| 6264 | (license license:bsd-3))) |
| 6265 | |
| 6266 | (define-public openblas-ilp64 |
| 6267 | (package/inherit openblas |
| 6268 | (name "openblas-ilp64") |
| 6269 | (supported-systems %64bit-supported-systems) |
| 6270 | (arguments |
| 6271 | (substitute-keyword-arguments arguments |
| 6272 | ((#:make-flags flags #~'()) |
| 6273 | ;; These should be '64' but julia hardcodes '64_'. |
| 6274 | #~(append (list "INTERFACE64=1" |
| 6275 | "SYMBOLSUFFIX=64_" |
| 6276 | "LIBPREFIX=libopenblas64_") |
| 6277 | #$flags)))) |
| 6278 | (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)") |
| 6279 | (license license:bsd-3))) |
| 6280 | |
| 6281 | (define-public libblastrampoline |
| 6282 | (package |
| 6283 | (name "libblastrampoline") |
| 6284 | (version "5.1.1") |
| 6285 | (source |
| 6286 | (origin |
| 6287 | (method git-fetch) |
| 6288 | (uri (git-reference |
| 6289 | (url "https://github.com/JuliaLinearAlgebra/libblastrampoline") |
| 6290 | (commit (string-append "v" version)))) |
| 6291 | (file-name (git-file-name name version)) |
| 6292 | (sha256 |
| 6293 | (base32 |
| 6294 | "0mf79zw11kxyil72y2ly5x8bbz3ng3nsqmp0zcps16b69wvfs19c")))) |
| 6295 | (build-system gnu-build-system) |
| 6296 | (arguments |
| 6297 | `(#:make-flags (list "-C" "src" |
| 6298 | (string-append "prefix=" (assoc-ref %outputs "out")) |
| 6299 | (string-append "CC=" ,(cc-for-target))) |
| 6300 | #:tests? #f ; No check target. |
| 6301 | #:phases |
| 6302 | (modify-phases %standard-phases |
| 6303 | (delete 'configure)))) |
| 6304 | (home-page "https://github.com/JuliaLinearAlgebra/libblastrampoline") |
| 6305 | (synopsis "PLT trampolines to provide a BLAS and LAPACK demuxing library") |
| 6306 | (description |
| 6307 | "This package uses PLT trampolines to provide a BLAS and LAPACK demuxing |
| 6308 | library.") |
| 6309 | (license license:expat))) |
| 6310 | |
| 6311 | (define-public palp |
| 6312 | (package |
| 6313 | (name "palp") |
| 6314 | (version "2.21") |
| 6315 | (source (origin |
| 6316 | (method url-fetch) |
| 6317 | (uri (string-append |
| 6318 | "http://hep.itp.tuwien.ac.at/~kreuzer/CY/palp/palp-" |
| 6319 | version ".tar.gz")) |
| 6320 | (sha256 |
| 6321 | (base32 |
| 6322 | "1myxjv0jxgr9acchwnjh9g5l61wxwiva3q6c1d6892lr37r7njky")))) |
| 6323 | (build-system gnu-build-system) |
| 6324 | (arguments |
| 6325 | (list #:make-flags #~(list (string-append "CC=" #$(cc-for-target))) |
| 6326 | #:tests? #f ; no tests |
| 6327 | #:phases #~(modify-phases %standard-phases |
| 6328 | (delete 'configure) |
| 6329 | (replace 'install |
| 6330 | (lambda _ |
| 6331 | (for-each |
| 6332 | (lambda (name) |
| 6333 | (install-file name (string-append #$output "/bin"))) |
| 6334 | '("class.x" "cws.x" "mori.x" "nef.x" "poly.x"))))))) |
| 6335 | (home-page "http://hep.itp.tuwien.ac.at/~kreuzer/CY/CYpalp.html") |
| 6336 | (synopsis "Package for Analyzing Lattice Polytopes") |
| 6337 | (description |
| 6338 | "PALP is a set of programs for calculations with lattice polytopes and |
| 6339 | applications to toric geometry.") |
| 6340 | (license license:gpl3))) |
| 6341 | |
| 6342 | (define-public blis |
| 6343 | (package |
| 6344 | (name "blis") |
| 6345 | (version "0.9.0") |
| 6346 | (home-page "https://github.com/flame/blis") |
| 6347 | (source (origin |
| 6348 | (method git-fetch) |
| 6349 | (uri (git-reference (url home-page) (commit version))) |
| 6350 | (sha256 |
| 6351 | (base32 |
| 6352 | "14v2awhxma6nzas42hq97702672f2njrskqhsv9kl23hvrvci8fm")) |
| 6353 | (file-name (git-file-name "blis" version)))) |
| 6354 | (native-inputs |
| 6355 | (list python perl)) |
| 6356 | (build-system gnu-build-system) |
| 6357 | (arguments |
| 6358 | (list |
| 6359 | #:configure-flags #~'("--enable-cblas") |
| 6360 | #:modules |
| 6361 | '((guix build gnu-build-system) |
| 6362 | (guix build utils) |
| 6363 | (srfi srfi-1)) |
| 6364 | #:test-target "test" |
| 6365 | #:phases |
| 6366 | #~(modify-phases %standard-phases |
| 6367 | (replace 'configure |
| 6368 | (lambda* (#:key outputs target system (configure-flags '()) |
| 6369 | #:allow-other-keys) |
| 6370 | ;; This is a home-made 'configure' script. |
| 6371 | (let* (;; Guix-specific support for choosing the configuration |
| 6372 | ;; via #:configure-flags: see below for details. |
| 6373 | (config-flag-prefix "--blis-config=") |
| 6374 | (maybe-config-flag (find |
| 6375 | (lambda (s) |
| 6376 | (string-prefix? config-flag-prefix s)) |
| 6377 | configure-flags)) |
| 6378 | (configure-flags (if maybe-config-flag |
| 6379 | (delete maybe-config-flag |
| 6380 | configure-flags) |
| 6381 | configure-flags)) |
| 6382 | ;; Select the "configuration" to build. |
| 6383 | ;; The "generic" configuration is non-optimized but |
| 6384 | ;; portable (no assembly). |
| 6385 | ;; The "x86_64" configuration family includes |
| 6386 | ;; sub-configurations for all supported |
| 6387 | ;; x86_64 microarchitectures. |
| 6388 | ;; BLIS currently lacks runtime hardware detection |
| 6389 | ;; for other architectures: see |
| 6390 | ;; <https://github.com/flame/blis/commit/c534da6>. |
| 6391 | ;; Conservatively, we stick to "generic" on armhf, |
| 6392 | ;; aarch64, and ppc64le for now. (But perhaps |
| 6393 | ;; "power9", "cortexa9", and "cortexa57" might be |
| 6394 | ;; general enough to use?) |
| 6395 | ;; Another approach would be to use the "auto" |
| 6396 | ;; configuration and make this package |
| 6397 | ;; non-substitutable. |
| 6398 | ;; The build is fairly intensive, though. |
| 6399 | (blis-config |
| 6400 | (cond |
| 6401 | (maybe-config-flag |
| 6402 | (substring maybe-config-flag |
| 6403 | (string-length config-flag-prefix))) |
| 6404 | ((string-prefix? "x86_64" (or target system)) |
| 6405 | "x86_64") |
| 6406 | (else |
| 6407 | "generic"))) |
| 6408 | (configure-args |
| 6409 | `("-p" ,#$output |
| 6410 | "-d" "opt" |
| 6411 | "--disable-static" |
| 6412 | "--enable-shared" |
| 6413 | "--enable-threading=openmp" |
| 6414 | "--enable-verbose-make" |
| 6415 | ,@configure-flags |
| 6416 | ,blis-config))) |
| 6417 | (format #t "configure args: ~s~%" configure-args) |
| 6418 | (apply invoke |
| 6419 | "./configure" |
| 6420 | configure-args)))) |
| 6421 | (add-before 'check 'show-test-output |
| 6422 | (lambda _ |
| 6423 | ;; By default "make check" is silent. Make it verbose. |
| 6424 | (system "tail -F output.testsuite &")))))) |
| 6425 | (synopsis "High-performance basic linear algebra (BLAS) routines") |
| 6426 | (description |
| 6427 | "BLIS is a portable software framework for instantiating high-performance |
| 6428 | BLAS-like dense linear algebra libraries. The framework was designed to |
| 6429 | isolate essential kernels of computation that, when optimized, immediately |
| 6430 | enable optimized implementations of most of its commonly used and |
| 6431 | computationally intensive operations. While BLIS exports a new BLAS-like API, |
| 6432 | it also includes a BLAS compatibility layer which gives application developers |
| 6433 | access to BLIS implementations via traditional BLAS routine calls.") |
| 6434 | (license license:bsd-3))) |
| 6435 | |
| 6436 | (define ignorance blis) |
| 6437 | |
| 6438 | (define-public openlibm |
| 6439 | (package |
| 6440 | (name "openlibm") |
| 6441 | (version "0.8.7") |
| 6442 | (source |
| 6443 | (origin |
| 6444 | (method git-fetch) |
| 6445 | (uri (git-reference |
| 6446 | (url "https://github.com/JuliaLang/openlibm") |
| 6447 | (commit (string-append "v" version)))) |
| 6448 | (file-name (git-file-name name version)) |
| 6449 | (sha256 |
| 6450 | (base32 "0lgylmspyhsndfxzya9bymyz7vnah3197jylr497jgbm4b62q8bx")))) |
| 6451 | (build-system gnu-build-system) |
| 6452 | (arguments |
| 6453 | `(#:make-flags |
| 6454 | (list (string-append "prefix=" (assoc-ref %outputs "out")) |
| 6455 | ,(string-append "CC=" (cc-for-target))) |
| 6456 | #:phases |
| 6457 | ;; no configure script |
| 6458 | (modify-phases %standard-phases (delete 'configure)) |
| 6459 | #:tests? #f)) ;the tests are part of the default target |
| 6460 | (home-page "https://openlibm.org/") |
| 6461 | (synopsis "Portable C mathematical library (libm)") |
| 6462 | (description |
| 6463 | "OpenLibm is an effort to have a high quality, portable, standalone C |
| 6464 | mathematical library (libm). It can be used standalone in applications and |
| 6465 | programming language implementations. The project was born out of a need to |
| 6466 | have a good libm for the Julia programming language that worked consistently |
| 6467 | across compilers and operating systems, and in 32-bit and 64-bit |
| 6468 | environments.") |
| 6469 | ;; Each architecture has its own make target, and there is none for mips. |
| 6470 | (supported-systems (delete "mips64el-linux" %supported-systems)) |
| 6471 | ;; See LICENSE.md for details. |
| 6472 | (license (list license:expat |
| 6473 | license:isc |
| 6474 | license:bsd-2 |
| 6475 | license:public-domain |
| 6476 | license:lgpl2.1+)))) |
| 6477 | |
| 6478 | (define-public openspecfun |
| 6479 | (package |
| 6480 | (name "openspecfun") |
| 6481 | (version "0.5.3") |
| 6482 | (source |
| 6483 | (origin |
| 6484 | (method git-fetch) |
| 6485 | (uri (git-reference |
| 6486 | (url "https://github.com/JuliaLang/openspecfun") |
| 6487 | (commit (string-append "v" version)))) |
| 6488 | (file-name (git-file-name name version)) |
| 6489 | (sha256 |
| 6490 | (base32 "0pfw6l3ch7isz403llx7inxlvavqh01jh1hb9dpidi86sjjx9kfh")))) |
| 6491 | (build-system gnu-build-system) |
| 6492 | (arguments |
| 6493 | '(#:tests? #f ; no "check" target |
| 6494 | #:make-flags |
| 6495 | (list (string-append "prefix=" (assoc-ref %outputs "out"))) |
| 6496 | #:phases |
| 6497 | (modify-phases %standard-phases |
| 6498 | (delete 'configure)))) ; no configure script |
| 6499 | (inputs |
| 6500 | `(("fortran" ,gfortran))) |
| 6501 | (home-page "https://github.com/JuliaLang/openspecfun") |
| 6502 | (synopsis "Collection of special mathematical functions") |
| 6503 | (description |
| 6504 | "Openspecfun provides AMOS and Faddeeva. AMOS (from Netlib) is a |
| 6505 | portable package for Bessel Functions of a Complex Argument and Nonnegative |
| 6506 | Order; it contains subroutines for computing Bessel functions and Airy |
| 6507 | functions. Faddeeva allows computing the various error functions of arbitrary |
| 6508 | complex arguments (Faddeeva function, error function, complementary error |
| 6509 | function, scaled complementary error function, imaginary error function, and |
| 6510 | Dawson function); given these, one can also easily compute Voigt functions, |
| 6511 | Fresnel integrals, and similar related functions as well.") |
| 6512 | ;; Faddeeva is released under the Expat license; AMOS is included as |
| 6513 | ;; public domain software. |
| 6514 | (license (list license:expat license:public-domain)))) |
| 6515 | |
| 6516 | (define-public osqp |
| 6517 | (package |
| 6518 | (name "osqp") |
| 6519 | (version "1.0.0") |
| 6520 | (source |
| 6521 | (origin |
| 6522 | (method git-fetch) |
| 6523 | (uri (git-reference |
| 6524 | (url "https://github.com/osqp/osqp") |
| 6525 | (commit (string-append "v" version)))) |
| 6526 | (file-name (git-file-name name version)) |
| 6527 | (sha256 |
| 6528 | (base32 "15n86mc232m04w8n38fx3pqam4y0swx7hcy4klhch7bk6avk5q04")))) |
| 6529 | (build-system cmake-build-system) |
| 6530 | (arguments |
| 6531 | (list |
| 6532 | #:configure-flags |
| 6533 | #~(list "-DOSQP_BUILD_UNITTESTS=ON" |
| 6534 | "-DOSQP_BUILD_SHARED_LIB=ON") |
| 6535 | #:phases |
| 6536 | #~(modify-phases %standard-phases |
| 6537 | (add-after 'unpack 'fix-qdldl-source-location |
| 6538 | (lambda _ |
| 6539 | (substitute* "algebra/_common/lin_sys/qdldl/qdldl.cmake" |
| 6540 | (("Fetching/configuring QDLDL solver") |
| 6541 | (format #f "Adding/configuring QDLDL solver from: ~a" |
| 6542 | #$(package-source |
| 6543 | (this-package-native-input "qdldl")))) |
| 6544 | (("GIT_REPOSITORY https://github.com/osqp/qdldl\\.git") |
| 6545 | (format #f "SOURCE_DIR ~a" |
| 6546 | #$(package-source |
| 6547 | (this-package-native-input "qdldl")))) |
| 6548 | (("GIT_TAG v0.1.8") |
| 6549 | "")))) |
| 6550 | (add-after 'unpack 'fix-catch2-source-location |
| 6551 | (lambda _ |
| 6552 | (substitute* "tests/CMakeLists.txt" |
| 6553 | (("GIT_REPOSITORY https://github.com/catchorg/Catch2\\.git") |
| 6554 | (format #f "SOURCE_DIR ~a" |
| 6555 | #$(package-source |
| 6556 | (this-package-native-input "catch2")))) |
| 6557 | (("GIT_TAG v2.13.6") |
| 6558 | ""))))))) |
| 6559 | (native-inputs |
| 6560 | (list catch2-2 |
| 6561 | python-wrapper ;You need python installed to generate unittests. |
| 6562 | python-numpy ;You need numpy ... |
| 6563 | python-scipy ;You need scipy ... |
| 6564 | qdldl)) |
| 6565 | (home-page "https://osqp.org/") |
| 6566 | (synopsis "Operator Splitting QP Solver") |
| 6567 | (description |
| 6568 | "The OSQP (Operator Splitting Quadratic Program) solver is a numerical |
| 6569 | optimization package for solving convex quadratic programs. |
| 6570 | |
| 6571 | It uses a custom ADMM-based first-order method requiring only a single matrix |
| 6572 | factorization in the setup phase. All the other operations are extremely |
| 6573 | cheap. It also implements custom sparse linear algebra routines exploiting |
| 6574 | structures in the problem data.") |
| 6575 | (license license:asl2.0))) |
| 6576 | |
| 6577 | (define %suitesparse-package-versions |
| 6578 | '(("AMD" . "3.3.3") |
| 6579 | ("BTF" . "2.3.2") |
| 6580 | ("CAMD" . "3.3.3") |
| 6581 | ("CCOLAMD" . "3.3.4") |
| 6582 | ("CHOLMOD" . "5.3.2") |
| 6583 | ("COLAMD" . "3.3.4") |
| 6584 | ("CXSparse" . "4.4.1") |
| 6585 | ("KLU" . "2.3.5") |
| 6586 | ("LDL" . "3.3.2") |
| 6587 | ("SuiteSparse_Mongoose" . "3.3.4") |
| 6588 | ("RBio" . "4.3.4") |
| 6589 | ("SPEX" . "3.2.3") |
| 6590 | ("SPQR" . "4.3.4") |
| 6591 | ("UMFPACK" . "6.3.5"))) |
| 6592 | |
| 6593 | ;; Source for the modular SuiteSparse packages. When updating, also update the |
| 6594 | ;; (different) versions of the subpackages. |
| 6595 | (define suitesparse-version "7.10.2") |
| 6596 | (define suitesparse-source |
| 6597 | (origin |
| 6598 | (method git-fetch) |
| 6599 | (uri (git-reference |
| 6600 | (url "https://github.com/DrTimothyAldenDavis/SuiteSparse") |
| 6601 | (commit (string-append "v" suitesparse-version)))) |
| 6602 | (file-name (git-file-name "suitesparse" suitesparse-version)) |
| 6603 | (sha256 |
| 6604 | (base32 |
| 6605 | "1ndwx2cp5zxrikq4xdrzjrxk1b5ps7lyi6qw34m8jpfpa0ba01ln")) |
| 6606 | (modules '((guix build utils))) |
| 6607 | (snippet |
| 6608 | #~(begin |
| 6609 | ;; Empty except for a .gitignore. |
| 6610 | (delete-file-recursively "build") |
| 6611 | ;; Delete autogenerated and bundled files |
| 6612 | (for-each delete-file (find-files "." "\\.pdf$")) |
| 6613 | ;; ssget |
| 6614 | (delete-file-recursively "ssget") |
| 6615 | ;; SuiteSparse_config |
| 6616 | (delete-file "SuiteSparse_config/SuiteSparse_config.h") |
| 6617 | ;; CHOLMOD |
| 6618 | (delete-file-recursively "CHOLMOD/SuiteSparse_metis") |
| 6619 | ; GraphBLAS |
| 6620 | (delete-file "GraphBLAS/README.md") |
| 6621 | (delete-file "GraphBLAS/Config/GB_prejit.c") |
| 6622 | (delete-file-recursively "GraphBLAS/cpu_features") |
| 6623 | (delete-file-recursively "GraphBLAS/lz4/lz4.c") |
| 6624 | (delete-file-recursively "GraphBLAS/lz4/lz4.h") |
| 6625 | (delete-file-recursively "GraphBLAS/lz4/lz4hc.c") |
| 6626 | (delete-file-recursively "GraphBLAS/lz4/lz4hc.h") |
| 6627 | (delete-file "GraphBLAS/Tcov/PreJIT/GB_prejit.c") |
| 6628 | (delete-file "GraphBLAS/xxHash/xxhash.h") |
| 6629 | (delete-file-recursively "GraphBLAS/zstd/zstd_subset") |
| 6630 | ;; KLU |
| 6631 | (delete-file "KLU/Include/klu.h") |
| 6632 | (delete-file "KLU/Doc/klu_version.tex") |
| 6633 | ;; LDL |
| 6634 | (delete-file "LDL/Include/ldl.h") |
| 6635 | (delete-file "LDL/Doc/ldl_version.tex") |
| 6636 | ;; RBio |
| 6637 | (delete-file "RBio/Include/RBio.h") |
| 6638 | ;; SPEX |
| 6639 | (delete-file "SPEX/Include/SPEX.h") |
| 6640 | (delete-file "SPEX/Doc/SPEX_version.tex") |
| 6641 | ;; SPQR |
| 6642 | (delete-file "SPQR/Include/SuiteSparseQR_definitions.h") |
| 6643 | (delete-file "SPQR/Doc/spqr_version.tex") |
| 6644 | ;; UMFPACK |
| 6645 | (delete-file "UMFPACK/Include/umfpack.h") |
| 6646 | (delete-file "UMFPACK/Doc/umfpack_version.tex"))))) |
| 6647 | |
| 6648 | (define-public suitesparse-config |
| 6649 | (package |
| 6650 | (name "suitesparse-config") |
| 6651 | (version suitesparse-version) |
| 6652 | (source suitesparse-source) |
| 6653 | (build-system cmake-build-system) |
| 6654 | (arguments |
| 6655 | (list |
| 6656 | #:tests? #f |
| 6657 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6658 | #:phases |
| 6659 | #~(modify-phases %standard-phases |
| 6660 | (add-after 'unpack 'chdir |
| 6661 | (lambda _ |
| 6662 | (chdir "SuiteSparse_config")))))) |
| 6663 | (inputs (list openblas)) |
| 6664 | (native-inputs (list pkg-config)) |
| 6665 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6666 | (synopsis "Configuration for all SuiteSparse packages") |
| 6667 | (description "SuiteSparse is a suite of sparse matrix algorithms. This |
| 6668 | package contains a library with common configuration options.") |
| 6669 | (license license:bsd-3))) |
| 6670 | |
| 6671 | (define-public suitesparse-amd |
| 6672 | (package |
| 6673 | (name "suitesparse-amd") |
| 6674 | (version (assoc-ref %suitesparse-package-versions "AMD")) |
| 6675 | (source suitesparse-source) |
| 6676 | (build-system cmake-build-system) |
| 6677 | (arguments |
| 6678 | (list |
| 6679 | #:tests? #f |
| 6680 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6681 | #:phases |
| 6682 | #~(modify-phases %standard-phases |
| 6683 | (add-after 'unpack 'chdir |
| 6684 | (lambda _ |
| 6685 | (chdir "AMD"))) |
| 6686 | (add-after 'chdir 'set-cmake-module-path |
| 6687 | (lambda _ |
| 6688 | (substitute* "CMakeLists.txt" |
| 6689 | (("set.*CMAKE_MODULE_PATH.*") |
| 6690 | (string-append "set(CMAKE_MODULE_PATH " |
| 6691 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 6692 | "set(DUMMY\n"))))) |
| 6693 | (add-after 'build 'build-doc |
| 6694 | (lambda _ |
| 6695 | ;; Generating font shapes require a writable TEXMFVAR directory. |
| 6696 | (setenv "TEXMFVAR" "/tmp") |
| 6697 | (with-directory-excursion "../AMD/Doc" |
| 6698 | (invoke "make")))) |
| 6699 | ;; Required for suitesparse-umfpack |
| 6700 | (add-after 'install 'install-internal-header |
| 6701 | (lambda _ |
| 6702 | (install-file "../AMD/Include/amd_internal.h" |
| 6703 | (string-append #$output "/include")))) |
| 6704 | (add-after 'install-internal-header 'install-doc |
| 6705 | (lambda _ |
| 6706 | (install-file "../AMD/Doc/AMD_UserGuide.pdf" |
| 6707 | (string-append #$output "/share/doc/" |
| 6708 | #$name "-" #$version)))) |
| 6709 | (replace 'install-license-files |
| 6710 | (lambda _ |
| 6711 | (install-file "../AMD/Doc/License.txt" |
| 6712 | (string-append #$output "/share/doc/" |
| 6713 | #$name "-" #$version))))))) |
| 6714 | (propagated-inputs (list suitesparse-config)) |
| 6715 | (native-inputs (list gfortran (texlive-local-tree '()))) |
| 6716 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6717 | (synopsis "Sparse matrix ordering for Cholesky factorization") |
| 6718 | (description "AMD is a set of routines for ordering a sparse matrix prior |
| 6719 | to Cholesky factorization (or for LU factorization with diagonal pivoting).") |
| 6720 | (license license:bsd-3))) |
| 6721 | |
| 6722 | (define-public suitesparse-btf |
| 6723 | (package |
| 6724 | (name "suitesparse-btf") |
| 6725 | (version (assoc-ref %suitesparse-package-versions "BTF")) |
| 6726 | (source suitesparse-source) |
| 6727 | (build-system cmake-build-system) |
| 6728 | (arguments |
| 6729 | (list |
| 6730 | #:tests? #f |
| 6731 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6732 | #:phases |
| 6733 | #~(modify-phases %standard-phases |
| 6734 | (add-after 'unpack 'chdir |
| 6735 | (lambda _ |
| 6736 | (chdir "BTF"))) |
| 6737 | (add-after 'chdir 'set-cmake-module-path |
| 6738 | (lambda _ |
| 6739 | (substitute* "CMakeLists.txt" |
| 6740 | (("set.*CMAKE_MODULE_PATH.*") |
| 6741 | (string-append "set(CMAKE_MODULE_PATH " |
| 6742 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 6743 | "set(DUMMY\n"))))) |
| 6744 | (replace 'install-license-files |
| 6745 | (lambda _ |
| 6746 | (install-file "../BTF/Doc/License.txt" |
| 6747 | (string-append #$output "/share/doc/" |
| 6748 | #$name "-" #$version))))))) |
| 6749 | (propagated-inputs (list suitesparse-config)) |
| 6750 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6751 | (synopsis "Library for permuting matrices into block upper triangular form") |
| 6752 | (description "BTF (Block Triangular Form) is a C library for permuting a |
| 6753 | matrix into block upper triangular form.") |
| 6754 | (license license:lgpl2.1+))) |
| 6755 | |
| 6756 | (define-public suitesparse-camd |
| 6757 | (package |
| 6758 | (name "suitesparse-camd") |
| 6759 | (version (assoc-ref %suitesparse-package-versions "CAMD")) |
| 6760 | (source suitesparse-source) |
| 6761 | (build-system cmake-build-system) |
| 6762 | (arguments |
| 6763 | (list |
| 6764 | #:tests? #f |
| 6765 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6766 | #:phases |
| 6767 | #~(modify-phases %standard-phases |
| 6768 | (add-after 'unpack 'chdir |
| 6769 | (lambda _ |
| 6770 | (chdir "CAMD"))) |
| 6771 | (add-after 'chdir 'set-cmake-module-path |
| 6772 | (lambda _ |
| 6773 | (substitute* "CMakeLists.txt" |
| 6774 | (("set.*CMAKE_MODULE_PATH.*") |
| 6775 | (string-append "set(CMAKE_MODULE_PATH " |
| 6776 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 6777 | "set(DUMMY\n"))))) |
| 6778 | (add-after 'build 'build-doc |
| 6779 | (lambda _ |
| 6780 | ;; Generating font shapes require a writable TEXMFVAR directory. |
| 6781 | (setenv "TEXMFVAR" "/tmp") |
| 6782 | (with-directory-excursion "../CAMD/Doc" |
| 6783 | (invoke "make")))) |
| 6784 | (add-after 'install 'install-doc |
| 6785 | (lambda _ |
| 6786 | (install-file "../CAMD/Doc/CAMD_UserGuide.pdf" |
| 6787 | (string-append #$output "/share/doc/" |
| 6788 | #$name "-" #$version)))) |
| 6789 | (replace 'install-license-files |
| 6790 | (lambda _ |
| 6791 | (install-file "../CAMD/Doc/License.txt" |
| 6792 | (string-append #$output "/share/doc/" |
| 6793 | #$name "-" #$version))))))) |
| 6794 | (propagated-inputs (list suitesparse-config)) |
| 6795 | (native-inputs (list (texlive-local-tree '()))) |
| 6796 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6797 | (synopsis "Sparse matrix ordering for Cholesky factorization with constraints") |
| 6798 | (description "CAMD is a set of routines for ordering a sparse matrix prior |
| 6799 | to Cholesky factorization (or for LU factorization with diagonal pivoting). |
| 6800 | It is a variant of AMD which has the the option to apply constraints to the |
| 6801 | ordering.") |
| 6802 | (license license:bsd-3))) |
| 6803 | |
| 6804 | (define-public suitesparse-colamd |
| 6805 | (package |
| 6806 | (name "suitesparse-colamd") |
| 6807 | (version (assoc-ref %suitesparse-package-versions "COLAMD")) |
| 6808 | (source suitesparse-source) |
| 6809 | (build-system cmake-build-system) |
| 6810 | (arguments |
| 6811 | (list |
| 6812 | #:tests? #f |
| 6813 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6814 | #:phases |
| 6815 | #~(modify-phases %standard-phases |
| 6816 | (add-after 'unpack 'chdir |
| 6817 | (lambda _ |
| 6818 | (chdir "COLAMD"))) |
| 6819 | (add-after 'chdir 'set-cmake-module-path |
| 6820 | (lambda _ |
| 6821 | (substitute* "CMakeLists.txt" |
| 6822 | (("set.*CMAKE_MODULE_PATH.*") |
| 6823 | (string-append "set(CMAKE_MODULE_PATH " |
| 6824 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 6825 | "set(DUMMY\n"))))) |
| 6826 | (replace 'install-license-files |
| 6827 | (lambda _ |
| 6828 | (install-file "../COLAMD/Doc/License.txt" |
| 6829 | (string-append #$output "/share/doc/" |
| 6830 | #$name "-" #$version))))))) |
| 6831 | (propagated-inputs (list suitesparse-config)) |
| 6832 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6833 | (synopsis "Column Approximate Minimum Degree Ordering") |
| 6834 | (description "COLAMD is library for computing a permutation vector for a |
| 6835 | matrix with which the LU factorization becomes sparser.") |
| 6836 | (license license:bsd-3))) |
| 6837 | |
| 6838 | (define-public suitesparse-ccolamd |
| 6839 | (package |
| 6840 | (name "suitesparse-ccolamd") |
| 6841 | (version (assoc-ref %suitesparse-package-versions "CCOLAMD")) |
| 6842 | (source suitesparse-source) |
| 6843 | (build-system cmake-build-system) |
| 6844 | (arguments |
| 6845 | (list |
| 6846 | #:tests? #f |
| 6847 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6848 | #:phases |
| 6849 | #~(modify-phases %standard-phases |
| 6850 | (add-after 'unpack 'chdir |
| 6851 | (lambda _ |
| 6852 | (chdir "CCOLAMD"))) |
| 6853 | (add-after 'chdir 'set-cmake-module-path |
| 6854 | (lambda _ |
| 6855 | (substitute* "CMakeLists.txt" |
| 6856 | (("set.*CMAKE_MODULE_PATH.*") |
| 6857 | (string-append "set(CMAKE_MODULE_PATH " |
| 6858 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 6859 | "set(DUMMY\n"))))) |
| 6860 | (replace 'install-license-files |
| 6861 | (lambda _ |
| 6862 | (install-file "../CCOLAMD/Doc/License.txt" |
| 6863 | (string-append #$output "/share/doc/" |
| 6864 | #$name "-" #$version))))))) |
| 6865 | (propagated-inputs (list suitesparse-config)) |
| 6866 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6867 | (synopsis "Column Approximate Minimum Degree Ordering with constraints") |
| 6868 | (description "CCOLAMD is library for computing a permutation vector for a |
| 6869 | matrix with which the LU factorization becomes sparser. It is a variant of |
| 6870 | COLAMD which has the the option to apply constraints to the ordering.") |
| 6871 | (license license:bsd-3))) |
| 6872 | |
| 6873 | (define-public gklib-suitesparse |
| 6874 | (package/inherit gklib |
| 6875 | (name "gklib-suitesparse") |
| 6876 | (source (origin |
| 6877 | (inherit (package-source gklib)) |
| 6878 | (patches (cons |
| 6879 | (search-patch |
| 6880 | "gklib-suitesparse.patch") |
| 6881 | (origin-patches (package-source gklib)))))) |
| 6882 | (arguments |
| 6883 | (substitute-keyword-arguments arguments |
| 6884 | ((#:phases phases #~%standard-phases) |
| 6885 | #~(modify-phases #$phases |
| 6886 | (add-after 'unpack 'patch-cmake |
| 6887 | (lambda _ |
| 6888 | (substitute* "CMakeLists.txt" |
| 6889 | (("add_library\\(GKlib.*" all) |
| 6890 | (string-append |
| 6891 | all |
| 6892 | "target_link_libraries(GKlib PUBLIC" |
| 6893 | " ${SUITESPARSE_CONFIG_LIBRARIES} m)\n"))))))))) |
| 6894 | (propagated-inputs (list suitesparse-config)))) |
| 6895 | |
| 6896 | (define-public metis-suitesparse |
| 6897 | (package/inherit metis-5.2 |
| 6898 | (name "metis-suitesparse") |
| 6899 | (arguments |
| 6900 | (substitute-keyword-arguments (package-arguments metis-5.2) |
| 6901 | ((#:phases phases) |
| 6902 | #~(modify-phases #$phases |
| 6903 | (add-before 'prepare-cmake 'set-idxwidth |
| 6904 | (lambda _ |
| 6905 | (substitute* "Makefile" |
| 6906 | (("IDXWIDTH.*=.*") |
| 6907 | "IDXWIDTH = \"\\#define IDXTYPEWIDTH 64\"\n")))) |
| 6908 | (add-before 'prepare-cmake 'link-suitesparse-config |
| 6909 | (lambda _ |
| 6910 | (substitute* "programs/CMakeLists.txt" |
| 6911 | (("include_directories.*" all) |
| 6912 | (string-append |
| 6913 | all "find_package(SuiteSparse_config REQUIRED)\n")) |
| 6914 | (("(target_link_libraries.*)GKlib(.*)" _ start end) |
| 6915 | (string-append |
| 6916 | start "GKlib ${SUITESPARSE_CONFIG_LIBRARIES}" end))))))) |
| 6917 | ((#:configure-flags _) |
| 6918 | #~(list "-DSHARED=ON" |
| 6919 | (string-append "-DGKLIB_PATH=" #$gklib-suitesparse))))) |
| 6920 | (inputs (list suitesparse-config gklib-suitesparse)))) |
| 6921 | |
| 6922 | (define-public suitesparse-cholmod |
| 6923 | (package |
| 6924 | (name "suitesparse-cholmod") |
| 6925 | (version (assoc-ref %suitesparse-package-versions "CHOLMOD")) |
| 6926 | (source suitesparse-source) |
| 6927 | (build-system cmake-build-system) |
| 6928 | (arguments |
| 6929 | (list |
| 6930 | #:tests? #f |
| 6931 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6932 | #:phases |
| 6933 | #~(modify-phases %standard-phases |
| 6934 | (add-after 'unpack 'chdir |
| 6935 | (lambda _ |
| 6936 | (chdir "CHOLMOD"))) |
| 6937 | (add-after 'chdir 'set-cmake-module-path |
| 6938 | (lambda _ |
| 6939 | (substitute* "CMakeLists.txt" |
| 6940 | (("set.*CMAKE_MODULE_PATH.*") |
| 6941 | (string-append |
| 6942 | "set(CMAKE_MODULE_PATH " |
| 6943 | (string-join |
| 6944 | (map (lambda (path) |
| 6945 | (string-append path "/lib/cmake/SuiteSparse")) |
| 6946 | (list #$suitesparse-amd |
| 6947 | #$suitesparse-camd |
| 6948 | #$suitesparse-ccolamd |
| 6949 | #$suitesparse-colamd |
| 6950 | #$suitesparse-config))) |
| 6951 | ")\nset(DUMMY\n")) |
| 6952 | (("add_subdirectory.*GPU.*") "\n") |
| 6953 | ((".*cmake_modules/FindCHOLMOD_CUDA.cmake.*") "\n")))) |
| 6954 | (add-after 'chdir 'use-external-metis |
| 6955 | (lambda _ |
| 6956 | (let ((port (open-file "CMakeLists.txt" "a"))) |
| 6957 | (display |
| 6958 | (string-append |
| 6959 | "find_library(METIS_LIBRARY NAME metis PATHS ENV LIBRARY_PATH) |
| 6960 | get_filename_component(METIS_LIBRARY ${METIS_LIBRARY} REALPATH) |
| 6961 | find_library(GKLIB_LIBRARY NAME GKlib PATHS ENV LIBRARY_PATH) |
| 6962 | get_filename_component(GKLIB_LIBRARY ${GKLIB_LIBRARY} REALPATH) |
| 6963 | target_link_libraries(CHOLMOD PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY}) |
| 6964 | target_link_libraries(CHOLMOD_static PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY})") |
| 6965 | port) |
| 6966 | (close-port port)) |
| 6967 | (delete-file "Partition/cholmod_metis_wrapper.c") |
| 6968 | (delete-file "Partition/cholmod_metis_wrapper.h") |
| 6969 | (substitute* "Partition/cholmod_metis.c" |
| 6970 | (("#include \"cholmod_metis_wrapper\\.h\"") "") |
| 6971 | (("#include \"SuiteSparse_metis/include/metis.h\"") |
| 6972 | "#include <metis.h>") |
| 6973 | (("SuiteSparse_metis_METIS") "METIS")))) |
| 6974 | (add-after 'build 'build-doc |
| 6975 | (lambda _ |
| 6976 | (setenv "TEXMFVAR" "/tmp") ;for font shapes generation |
| 6977 | (with-directory-excursion "../CHOLMOD/Doc" |
| 6978 | (invoke "make")))) |
| 6979 | (add-after 'install 'install-doc |
| 6980 | (lambda _ |
| 6981 | (install-file "../CHOLMOD/Doc/CHOLMOD_UserGuide.pdf" |
| 6982 | (string-append #$output "/share/doc/" |
| 6983 | #$name "-" #$version)))) |
| 6984 | (replace 'install-license-files |
| 6985 | (lambda _ |
| 6986 | (let ((out (string-append #$output |
| 6987 | "/share/doc/" #$name "-" #$version))) |
| 6988 | (install-file "../CHOLMOD/Doc/License.txt" out) |
| 6989 | (install-file "../CHOLMOD/Check/lesser.txt" out) |
| 6990 | (install-file "../CHOLMOD/MatrixOps/gpl.txt" out))))))) |
| 6991 | (inputs |
| 6992 | (list gklib-suitesparse |
| 6993 | metis-suitesparse |
| 6994 | openblas |
| 6995 | suitesparse-amd |
| 6996 | suitesparse-camd |
| 6997 | suitesparse-ccolamd |
| 6998 | suitesparse-colamd)) |
| 6999 | (propagated-inputs (list suitesparse-config)) |
| 7000 | (native-inputs (list (texlive-local-tree '()))) |
| 7001 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7002 | (synopsis "Library for solving sparse symmetric positive definite linear |
| 7003 | equations") |
| 7004 | (description "CHOLMOD is a set of routines for factorizing sparse symmetrix |
| 7005 | positive definite matrices, updating/downdating sparse Cholesky factorizations |
| 7006 | and other related operations.") |
| 7007 | (license (list license:gpl2+ license:lgpl2.1+)))) |
| 7008 | |
| 7009 | (define-public suitesparse-cxsparse |
| 7010 | (package |
| 7011 | (name "suitesparse-cxsparse") |
| 7012 | (version (assoc-ref %suitesparse-package-versions "CXSparse")) |
| 7013 | (source suitesparse-source) |
| 7014 | (build-system cmake-build-system) |
| 7015 | (arguments |
| 7016 | (list |
| 7017 | #:tests? #f |
| 7018 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7019 | #:phases |
| 7020 | #~(modify-phases %standard-phases |
| 7021 | (add-after 'unpack 'chdir |
| 7022 | (lambda _ |
| 7023 | (chdir "CXSparse"))) |
| 7024 | (add-after 'chdir 'set-cmake-module-path |
| 7025 | (lambda _ |
| 7026 | (substitute* "CMakeLists.txt" |
| 7027 | (("set.*CMAKE_MODULE_PATH.*") |
| 7028 | (string-append "set(CMAKE_MODULE_PATH " |
| 7029 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 7030 | "set(DUMMY\n"))))) |
| 7031 | (replace 'install-license-files |
| 7032 | (lambda _ |
| 7033 | (let ((out (string-append #$output |
| 7034 | "/share/doc/" #$name "-" #$version))) |
| 7035 | (install-file "../CXSparse/Doc/License.txt" out) |
| 7036 | (install-file "../CXSparse/Doc/lesser.txt" out))))))) |
| 7037 | (propagated-inputs (list suitesparse-config)) |
| 7038 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7039 | (synopsis "Concise eXtended Sparse Matrix Package") |
| 7040 | (description "CXSparse is a collection of sparse matrix algorithms for |
| 7041 | direct methods on both real and complex matrices.") |
| 7042 | (license license:lgpl2.1+))) |
| 7043 | |
| 7044 | (define-public suitesparse-klu |
| 7045 | (package |
| 7046 | (name "suitesparse-klu") |
| 7047 | (version (assoc-ref %suitesparse-package-versions "KLU")) |
| 7048 | (source suitesparse-source) |
| 7049 | (build-system cmake-build-system) |
| 7050 | (arguments |
| 7051 | (list |
| 7052 | #:tests? #f |
| 7053 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7054 | #:phases |
| 7055 | #~(modify-phases %standard-phases |
| 7056 | (add-after 'unpack 'chdir |
| 7057 | (lambda _ |
| 7058 | (chdir "KLU"))) |
| 7059 | (add-after 'chdir 'set-cmake-module-path |
| 7060 | (lambda _ |
| 7061 | (substitute* "CMakeLists.txt" |
| 7062 | (("set.*CMAKE_MODULE_PATH.*") |
| 7063 | (string-append |
| 7064 | "set(CMAKE_MODULE_PATH " |
| 7065 | (string-join |
| 7066 | (map (lambda (path) |
| 7067 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7068 | (list #$suitesparse-amd |
| 7069 | #$suitesparse-btf |
| 7070 | #$suitesparse-camd |
| 7071 | #$suitesparse-ccolamd |
| 7072 | #$suitesparse-cholmod |
| 7073 | #$suitesparse-colamd |
| 7074 | #$suitesparse-config))) |
| 7075 | ")\nset(DUMMY\n"))))) |
| 7076 | (add-after 'build 'build-doc |
| 7077 | (lambda _ |
| 7078 | (substitute* "../KLU/Doc/Makefile" |
| 7079 | (("\\.\\./\\.\\./BTF/Include/btf.h") |
| 7080 | (string-append #$suitesparse-btf "/include/btf.h"))) |
| 7081 | (setenv "TEXMFVAR" "/tmp") ;for generating font shapes |
| 7082 | (with-directory-excursion "../KLU/Doc" |
| 7083 | (invoke "make")))) |
| 7084 | (add-after 'install 'install-doc |
| 7085 | (lambda _ |
| 7086 | (install-file "../KLU/Doc/KLU_UserGuide.pdf" |
| 7087 | (string-append #$output "/share/doc/" |
| 7088 | #$name "-" #$version)))) |
| 7089 | (replace 'install-license-files |
| 7090 | (lambda _ |
| 7091 | (install-file "../KLU/Doc/License.txt" |
| 7092 | (string-append #$output "/share/doc/" |
| 7093 | #$name "-" #$version))))))) |
| 7094 | (inputs |
| 7095 | (list suitesparse-camd |
| 7096 | suitesparse-ccolamd |
| 7097 | suitesparse-colamd |
| 7098 | suitesparse-config)) |
| 7099 | (propagated-inputs |
| 7100 | (list suitesparse-amd |
| 7101 | suitesparse-btf |
| 7102 | suitesparse-cholmod)) |
| 7103 | (native-inputs (list (texlive-local-tree '()))) |
| 7104 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7105 | (synopsis "Routines for solving sparse linear problems with a LU factorization") |
| 7106 | (description "KLU is a method for computing the LU factorization of sparse |
| 7107 | for real and complex matrices.") |
| 7108 | (license license:lgpl2.1+))) |
| 7109 | |
| 7110 | (define-public suitesparse-ldl |
| 7111 | (package |
| 7112 | (name "suitesparse-ldl") |
| 7113 | (version (assoc-ref %suitesparse-package-versions "LDL")) |
| 7114 | (source suitesparse-source) |
| 7115 | (build-system cmake-build-system) |
| 7116 | (arguments |
| 7117 | (list |
| 7118 | #:tests? #f |
| 7119 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7120 | #:phases |
| 7121 | #~(modify-phases %standard-phases |
| 7122 | (add-after 'unpack 'chdir |
| 7123 | (lambda _ |
| 7124 | (chdir "LDL"))) |
| 7125 | (add-after 'chdir 'set-cmake-module-path |
| 7126 | (lambda _ |
| 7127 | (substitute* "CMakeLists.txt" |
| 7128 | (("set.*CMAKE_MODULE_PATH.*") |
| 7129 | (string-append |
| 7130 | "set(CMAKE_MODULE_PATH " |
| 7131 | (string-join |
| 7132 | (map (lambda (path) |
| 7133 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7134 | (list #$suitesparse-amd |
| 7135 | #$suitesparse-config))) |
| 7136 | ")\nset(DUMMY\n"))))) |
| 7137 | (add-after 'build 'build-doc |
| 7138 | (lambda _ |
| 7139 | (substitute* "../LDL/Doc/Makefile" |
| 7140 | (("\\.\\./\\.\\./BTF/Include/btf.h") |
| 7141 | (string-append #$suitesparse-btf "/include/btf.h"))) |
| 7142 | (setenv "TEXMFVAR" "/tmp") ;for font shape generation |
| 7143 | (with-directory-excursion "../LDL/Doc" |
| 7144 | (invoke "make")))) |
| 7145 | (add-after 'install 'install-doc |
| 7146 | (lambda _ |
| 7147 | (install-file "../LDL/Doc/ldl_userguide.pdf" |
| 7148 | (string-append #$output "/share/doc/" |
| 7149 | #$name "-" #$version)))) |
| 7150 | (replace 'install-license-files |
| 7151 | (lambda _ |
| 7152 | (install-file "../LDL/Doc/License.txt" |
| 7153 | (string-append #$output "/share/doc/" |
| 7154 | #$name "-" #$version))))))) |
| 7155 | (inputs (list suitesparse-amd)) |
| 7156 | (propagated-inputs (list suitesparse-config)) |
| 7157 | (native-inputs (list (texlive-local-tree '()))) |
| 7158 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7159 | (synopsis "LDL' factorization method for sparse, symmetric matrices") |
| 7160 | (description "This package contains a set of routines for computing the |
| 7161 | LDL' factorization of sparse, symmetric matrices. Its focus lies on concise |
| 7162 | code.") |
| 7163 | (license license:lgpl2.1+))) |
| 7164 | |
| 7165 | (define-public suitesparse-rbio |
| 7166 | (package |
| 7167 | (name "suitesparse-rbio") |
| 7168 | (version (assoc-ref %suitesparse-package-versions "RBio")) |
| 7169 | (source suitesparse-source) |
| 7170 | (build-system cmake-build-system) |
| 7171 | (arguments |
| 7172 | (list |
| 7173 | #:tests? #f |
| 7174 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7175 | #:phases |
| 7176 | #~(modify-phases %standard-phases |
| 7177 | (add-after 'unpack 'chdir |
| 7178 | (lambda _ |
| 7179 | (chdir "RBio"))) |
| 7180 | (add-after 'chdir 'set-cmake-module-path |
| 7181 | (lambda _ |
| 7182 | (substitute* "CMakeLists.txt" |
| 7183 | (("set.*CMAKE_MODULE_PATH.*") |
| 7184 | (string-append |
| 7185 | "set(CMAKE_MODULE_PATH " |
| 7186 | (string-join |
| 7187 | (map (lambda (path) |
| 7188 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7189 | (list #$suitesparse-config))) |
| 7190 | ")\nset(DUMMY\n"))))) |
| 7191 | (replace 'install-license-files |
| 7192 | (lambda _ |
| 7193 | (let ((out (string-append #$output |
| 7194 | "/share/doc/" #$name "-" #$version))) |
| 7195 | (install-file "../RBio/Doc/License.txt" out) |
| 7196 | (install-file "../RBio/Doc/gpl.txt" out))))))) |
| 7197 | (propagated-inputs (list suitesparse-config)) |
| 7198 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7199 | (synopsis "Library for the Rutherford/Boeing sparse matrix format") |
| 7200 | (description "This package provides the C library of RBio. It can be used |
| 7201 | for reading and writing sparse matrices in the Rutherford/Boeing format.") |
| 7202 | (license license:gpl2+))) |
| 7203 | |
| 7204 | (define-public suitesparse-mongoose |
| 7205 | (package |
| 7206 | (name "suitesparse-mongoose") |
| 7207 | (version (assoc-ref %suitesparse-package-versions "SuiteSparse_Mongoose")) |
| 7208 | (source suitesparse-source) |
| 7209 | (build-system cmake-build-system) |
| 7210 | (arguments |
| 7211 | (list |
| 7212 | #:tests? #f |
| 7213 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7214 | #:phases |
| 7215 | #~(modify-phases %standard-phases |
| 7216 | (add-after 'unpack 'chdir |
| 7217 | (lambda _ |
| 7218 | (chdir "Mongoose"))) |
| 7219 | (add-after 'chdir 'set-cmake-module-path |
| 7220 | (lambda _ |
| 7221 | (substitute* "CMakeLists.txt" |
| 7222 | (("set.*CMAKE_MODULE_PATH.*") |
| 7223 | (string-append "set(CMAKE_MODULE_PATH " |
| 7224 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 7225 | "set(DUMMY\n"))))) |
| 7226 | (add-after 'build 'build-doc |
| 7227 | (lambda _ |
| 7228 | ;; A writable TEXMFVAR is required for building font shapes. |
| 7229 | (setenv "TEXMFVAR" "/tmp") |
| 7230 | ;; XeLaTeX fails with .eps graphics |
| 7231 | (with-directory-excursion "../Mongoose/Doc" |
| 7232 | (for-each |
| 7233 | (lambda (name) |
| 7234 | (invoke "epstopdf" name)) |
| 7235 | (find-files "Figures" "\\.eps$")) |
| 7236 | (substitute* "Mongoose_UserGuide.tex" |
| 7237 | (("\\.eps") ".pdf")) |
| 7238 | (invoke "make")))) |
| 7239 | (add-after 'install 'install-doc |
| 7240 | (lambda _ |
| 7241 | (install-file "../Mongoose/Doc/Mongoose_UserGuide.pdf" |
| 7242 | (string-append #$output "/share/doc/" |
| 7243 | #$name "-" #$version)))) |
| 7244 | (replace 'install-license-files |
| 7245 | (lambda _ |
| 7246 | (install-file "../Mongoose/Doc/License.txt" |
| 7247 | (string-append #$output "/share/doc/" |
| 7248 | #$name "-" #$version))))))) |
| 7249 | (propagated-inputs (list suitesparse-config)) |
| 7250 | (native-inputs |
| 7251 | (list texlive-epstopdf |
| 7252 | (texlive-local-tree |
| 7253 | (list texlive-algorithmicx |
| 7254 | texlive-booktabs |
| 7255 | texlive-lastpage |
| 7256 | texlive-multirow |
| 7257 | texlive-pgf |
| 7258 | texlive-caption |
| 7259 | texlive-etoolbox |
| 7260 | texlive-csquotes |
| 7261 | texlive-fancybox |
| 7262 | texlive-enumitem |
| 7263 | texlive-microtype |
| 7264 | texlive-cancel |
| 7265 | texlive-sourcecodepro |
| 7266 | texlive-xkeyval |
| 7267 | texlive-fontspec |
| 7268 | texlive-wasy |
| 7269 | texlive-wasysym |
| 7270 | texlive-float |
| 7271 | texlive-tcolorbox |
| 7272 | texlive-environ |
| 7273 | texlive-xcolor |
| 7274 | texlive-xetex |
| 7275 | texlive-listings)))) |
| 7276 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7277 | (synopsis "Graph partitioning library") |
| 7278 | (description "Mongoose is a library for graph partitioning by computing |
| 7279 | edge cuts using a coarsening and refinement framework.") |
| 7280 | (license license:gpl3))) |
| 7281 | |
| 7282 | (define-public suitesparse-spex |
| 7283 | (package |
| 7284 | (name "suitesparse-spex") |
| 7285 | (version (assoc-ref %suitesparse-package-versions "SPEX")) |
| 7286 | (source suitesparse-source) |
| 7287 | (build-system cmake-build-system) |
| 7288 | (arguments |
| 7289 | (list |
| 7290 | #:tests? #f |
| 7291 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7292 | #:phases |
| 7293 | #~(modify-phases %standard-phases |
| 7294 | (add-after 'unpack 'chdir |
| 7295 | (lambda _ |
| 7296 | (chdir "SPEX"))) |
| 7297 | (add-after 'chdir 'set-cmake-module-path |
| 7298 | (lambda _ |
| 7299 | (substitute* "CMakeLists.txt" |
| 7300 | (("set.*CMAKE_MODULE_PATH.*") |
| 7301 | (string-append |
| 7302 | "set(CMAKE_MODULE_PATH " |
| 7303 | (string-join |
| 7304 | (map (lambda (path) |
| 7305 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7306 | (list #$suitesparse-amd |
| 7307 | #$suitesparse-colamd |
| 7308 | #$suitesparse-config))) |
| 7309 | ")\nset(DUMMY\n"))))) |
| 7310 | (add-after 'build 'build-doc |
| 7311 | (lambda _ |
| 7312 | (setenv "TEXMFVAR" "/tmp") ;for font shapes generation |
| 7313 | (with-directory-excursion "../SPEX/Doc" |
| 7314 | (invoke "make")))) |
| 7315 | (add-after 'install 'install-doc |
| 7316 | (lambda _ |
| 7317 | (install-file "../SPEX/Doc/SPEX_UserGuide.pdf" |
| 7318 | (string-append #$output "/share/doc/" |
| 7319 | #$name "-" #$version))))))) |
| 7320 | (inputs (list suitesparse-amd suitesparse-colamd)) |
| 7321 | (propagated-inputs (list gmp mpfr suitesparse-config)) |
| 7322 | (native-inputs |
| 7323 | (list (texlive-local-tree |
| 7324 | (list texlive-paralist |
| 7325 | texlive-comment |
| 7326 | texlive-psfrag |
| 7327 | texlive-soul |
| 7328 | texlive-multirow |
| 7329 | texlive-algorithms |
| 7330 | texlive-fncychap |
| 7331 | texlive-float |
| 7332 | texlive-algorithmicx |
| 7333 | texlive-cprotect |
| 7334 | texlive-bigfoot |
| 7335 | texlive-caption |
| 7336 | texlive-listings |
| 7337 | texlive-xcolor |
| 7338 | texlive-framed |
| 7339 | texlive-mdframed |
| 7340 | texlive-etoolbox |
| 7341 | texlive-zref |
| 7342 | texlive-needspace)))) |
| 7343 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7344 | (synopsis "Package for SParse EXact algebra") |
| 7345 | (description "SPEX is a set of routines for sparse exact linear algebra. |
| 7346 | It contains the SPEX Left LU library for computing a sparse exact left-looking |
| 7347 | LU factorization for solving unsymmetric sparse linear systems.") |
| 7348 | ;; Dual licensed. |
| 7349 | (license (list license:lgpl3+ license:gpl2+)))) |
| 7350 | |
| 7351 | (define-public suitesparse-spqr |
| 7352 | (package |
| 7353 | (name "suitesparse-spqr") |
| 7354 | (version (assoc-ref %suitesparse-package-versions "SPQR")) |
| 7355 | (source suitesparse-source) |
| 7356 | (build-system cmake-build-system) |
| 7357 | (arguments |
| 7358 | (list |
| 7359 | #:tests? #f |
| 7360 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7361 | #:phases |
| 7362 | #~(modify-phases %standard-phases |
| 7363 | (add-after 'unpack 'chdir |
| 7364 | (lambda _ |
| 7365 | (chdir "SPQR"))) |
| 7366 | (add-after 'chdir 'set-cmake-module-path |
| 7367 | (lambda _ |
| 7368 | (substitute* "CMakeLists.txt" |
| 7369 | (("set.*CMAKE_MODULE_PATH.*") |
| 7370 | (string-append |
| 7371 | "set(CMAKE_MODULE_PATH " |
| 7372 | (string-join |
| 7373 | (map (lambda (path) |
| 7374 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7375 | (list #$suitesparse-amd |
| 7376 | #$suitesparse-camd |
| 7377 | #$suitesparse-ccolamd |
| 7378 | #$suitesparse-cholmod |
| 7379 | #$suitesparse-colamd |
| 7380 | #$suitesparse-config))) |
| 7381 | ")\nset(DUMMY\n"))))) |
| 7382 | (add-after 'build 'build-doc |
| 7383 | (lambda _ |
| 7384 | (setenv "TEXMFVAR" "/tmp") ;for generating font shapes |
| 7385 | (with-directory-excursion "../SPQR/Doc" |
| 7386 | (invoke "make")))) |
| 7387 | (add-after 'install 'install-doc |
| 7388 | (lambda _ |
| 7389 | (install-file "../SPQR/Doc/spqr_user_guide.pdf" |
| 7390 | (string-append #$output "/share/doc/" |
| 7391 | #$name "-" #$version)))) |
| 7392 | (replace 'install-license-files |
| 7393 | (lambda _ |
| 7394 | (install-file "../SPQR/Doc/License.txt" |
| 7395 | (string-append #$output "/share/doc/" |
| 7396 | #$name "-" #$version))))))) |
| 7397 | (inputs (list openblas |
| 7398 | suitesparse-amd |
| 7399 | suitesparse-camd |
| 7400 | suitesparse-ccolamd |
| 7401 | suitesparse-colamd |
| 7402 | suitesparse-config)) |
| 7403 | (propagated-inputs (list suitesparse-cholmod)) |
| 7404 | (native-inputs |
| 7405 | (list (texlive-local-tree |
| 7406 | (list texlive-epsf |
| 7407 | texlive-etoolbox)))) |
| 7408 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7409 | (synopsis "Sparse QR factorization method") |
| 7410 | (description "The SPQR (SuiteSparseQR) package provides sparse QR |
| 7411 | factorization based on the multifrontal method, using BLAS for the frontal |
| 7412 | matrices.") |
| 7413 | (license license:gpl2+))) |
| 7414 | |
| 7415 | (define-public suitesparse-umfpack |
| 7416 | (package |
| 7417 | (name "suitesparse-umfpack") |
| 7418 | (version (assoc-ref %suitesparse-package-versions "UMFPACK")) |
| 7419 | (source suitesparse-source) |
| 7420 | (build-system cmake-build-system) |
| 7421 | (arguments |
| 7422 | (list |
| 7423 | #:tests? #f |
| 7424 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7425 | #:phases |
| 7426 | #~(modify-phases %standard-phases |
| 7427 | (add-after 'unpack 'chdir |
| 7428 | (lambda _ |
| 7429 | (chdir "UMFPACK"))) |
| 7430 | (add-after 'chdir 'set-cmake-module-path |
| 7431 | (lambda _ |
| 7432 | (substitute* "CMakeLists.txt" |
| 7433 | (("set.*CMAKE_MODULE_PATH.*") |
| 7434 | (string-append |
| 7435 | "set(CMAKE_MODULE_PATH " |
| 7436 | (string-join |
| 7437 | (map (lambda (path) |
| 7438 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7439 | (list #$suitesparse-amd |
| 7440 | #$suitesparse-camd |
| 7441 | #$suitesparse-ccolamd |
| 7442 | #$suitesparse-cholmod |
| 7443 | #$suitesparse-colamd |
| 7444 | #$suitesparse-config))) |
| 7445 | ")\nset(DUMMY\n"))))) |
| 7446 | (add-after 'build 'build-doc |
| 7447 | (lambda _ |
| 7448 | (setenv "TEXMFVAR" "/tmp") ;for generating font shapes |
| 7449 | (with-directory-excursion "../UMFPACK/Doc" |
| 7450 | (invoke "make")))) |
| 7451 | (add-after 'install 'install-doc |
| 7452 | (lambda _ |
| 7453 | (let ((outdir |
| 7454 | (string-append #$output "/share/doc/" |
| 7455 | #$name "-" #$version))) |
| 7456 | (install-file "../UMFPACK/Doc/UMFPACK_UserGuide.pdf" outdir) |
| 7457 | (install-file "../UMFPACK/Doc/UMFPACK_QuickStart.pdf" outdir)))) |
| 7458 | (replace 'install-license-files |
| 7459 | (lambda _ |
| 7460 | (let ((outdir |
| 7461 | (string-append #$output "/share/doc/" |
| 7462 | #$name "-" #$version))) |
| 7463 | (install-file "../UMFPACK/Doc/License.txt" outdir) |
| 7464 | (install-file "../UMFPACK/Doc/gpl.txt" outdir))))))) |
| 7465 | (inputs (list openblas |
| 7466 | suitesparse-camd |
| 7467 | suitesparse-ccolamd |
| 7468 | suitesparse-cholmod |
| 7469 | suitesparse-colamd)) |
| 7470 | (propagated-inputs |
| 7471 | (list suitesparse-amd |
| 7472 | suitesparse-config)) |
| 7473 | (native-inputs |
| 7474 | (list (texlive-local-tree |
| 7475 | (list texlive-etoolbox |
| 7476 | texlive-framed |
| 7477 | texlive-mdframed |
| 7478 | texlive-needspace |
| 7479 | texlive-xcolor |
| 7480 | texlive-zref)))) |
| 7481 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7482 | (synopsis "Routines for solving sparse linear problems via LU factorization") |
| 7483 | (description "UMFPACK is a set of routines for solving unsymmetric sparse |
| 7484 | linear systems using the Unsymmetric MultiFrontal method and direct sparse LU |
| 7485 | factorization.") |
| 7486 | (license license:gpl2+))) |
| 7487 | |
| 7488 | (define-public suitesparse |
| 7489 | (package |
| 7490 | (name "suitesparse") |
| 7491 | (version "5.13.0") |
| 7492 | (source |
| 7493 | (origin |
| 7494 | (method git-fetch) |
| 7495 | (uri (git-reference |
| 7496 | (url "https://github.com/DrTimothyAldenDavis/SuiteSparse") |
| 7497 | (commit (string-append "v" version)))) |
| 7498 | (file-name (git-file-name name version)) |
| 7499 | (sha256 |
| 7500 | (base32 |
| 7501 | "1zwri246yr39p9ymjp18dzv36ch0dn107sf0jghj7capigasfxq2")) |
| 7502 | (patches (search-patches "suitesparse-mongoose-cmake.patch")) |
| 7503 | (modules '((guix build utils))) |
| 7504 | (snippet |
| 7505 | ;; Remove bundled metis source |
| 7506 | '(begin |
| 7507 | (delete-file-recursively "metis-5.1.0") |
| 7508 | #t)))) |
| 7509 | (build-system gnu-build-system) |
| 7510 | (arguments |
| 7511 | (list |
| 7512 | #:tests? #f ;no "check" target |
| 7513 | #:make-flags |
| 7514 | #~(list (string-append "CC=" #$(cc-for-target)) |
| 7515 | "TBB=-ltbb" |
| 7516 | "MY_METIS_LIB=-lmetis" |
| 7517 | |
| 7518 | ;; The default is to link against netlib lapack. Use OpenBLAS |
| 7519 | ;; instead. |
| 7520 | "BLAS=-lopenblas" |
| 7521 | "LAPACK=-lopenblas" |
| 7522 | |
| 7523 | ;; Flags for cmake (required to build GraphBLAS and Mongoose) |
| 7524 | (string-append |
| 7525 | "CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX=" #$output |
| 7526 | " -DCMAKE_VERBOSE_MAKEFILE=ON" |
| 7527 | " -DCMAKE_C_FLAGS_RELEASE=\"$(CFLAGS) $(CPPFLAGS)\"" |
| 7528 | " -DCMAKE_CXX_FLAGS_RELEASE=\"$(CXXFLAGS) $(CPPFLAGS)\"" |
| 7529 | " -DCMAKE_SKIP_RPATH=TRUE" |
| 7530 | " -DCMAKE_BUILD_TYPE=Release" |
| 7531 | " -DCMAKE_INSTALL_LIBDIR=lib") |
| 7532 | (string-append "INSTALL_LIB=" #$output "/lib") |
| 7533 | (string-append "INSTALL_INCLUDE=" #$output "/include") |
| 7534 | "library") |
| 7535 | #:phases |
| 7536 | #~(modify-phases %standard-phases |
| 7537 | #$@(if (target-riscv64?) |
| 7538 | ;; GraphBLAS FTBFS on riscv64-linux |
| 7539 | #~((add-after 'unpack 'skip-graphblas |
| 7540 | (lambda _ |
| 7541 | (substitute* "Makefile" |
| 7542 | ((".*cd GraphBLAS.*") |
| 7543 | "") |
| 7544 | (("metisinstall gbinstall moninstall") |
| 7545 | "metisinstall moninstall"))))) |
| 7546 | #~()) |
| 7547 | (delete 'configure)))) ;no configure script |
| 7548 | (inputs |
| 7549 | (list tbb openblas gmp mpfr metis)) |
| 7550 | (native-inputs |
| 7551 | (list cmake-minimal m4)) |
| 7552 | (home-page "https://faculty.cse.tamu.edu/davis/suitesparse.html") |
| 7553 | (synopsis "Suite of sparse matrix software") |
| 7554 | (description |
| 7555 | "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK, |
| 7556 | multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR, |
| 7557 | multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit |
| 7558 | simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and |
| 7559 | CXSparse, a concise sparse Cholesky factorization package; and many other |
| 7560 | packages. |
| 7561 | |
| 7562 | This package contains all of the above-mentioned parts. |
| 7563 | ") |
| 7564 | ;; LGPLv2.1+: |
| 7565 | ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL |
| 7566 | ;; GPLv2+: |
| 7567 | ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK |
| 7568 | (license (list license:gpl2+ license:lgpl2.1+)))) |
| 7569 | |
| 7570 | (define-public cglm |
| 7571 | (package |
| 7572 | (name "cglm") |
| 7573 | (version "0.9.6") |
| 7574 | (source |
| 7575 | (origin |
| 7576 | (method git-fetch) |
| 7577 | (uri (git-reference |
| 7578 | (url "https://github.com/recp/cglm") |
| 7579 | (commit (string-append "v" version)))) |
| 7580 | (file-name (git-file-name name version)) |
| 7581 | (sha256 |
| 7582 | (base32 "1b04zdypa8clhpzg95h8m8xjylk8y5pw9kfn4jv19qlz5bsz183i")))) |
| 7583 | (build-system meson-build-system) |
| 7584 | (arguments |
| 7585 | `(#:configure-flags '("-Dbuild_tests=true"))) |
| 7586 | (home-page "https://github.com/recp/cglm") |
| 7587 | (synopsis "Mathematics C library for graphics programming") |
| 7588 | (description |
| 7589 | "@acronym{CGLM, C OpenGL Mathematics} is an optimised 3D maths library |
| 7590 | for graphics software based on the @acronym{GLSL, OpenGL Shading Language} |
| 7591 | specifications. |
| 7592 | |
| 7593 | It's similar to the original C++ GLM library but written in C99 and compatible |
| 7594 | with C89.") |
| 7595 | (license license:expat))) |
| 7596 | |
| 7597 | (define-public glm |
| 7598 | (package |
| 7599 | (name "glm") |
| 7600 | (version "1.0.1") |
| 7601 | (source |
| 7602 | (origin |
| 7603 | (method git-fetch) |
| 7604 | (uri (git-reference |
| 7605 | (url "https://github.com/g-truc/glm") |
| 7606 | (commit version))) |
| 7607 | (file-name (git-file-name name version)) |
| 7608 | (sha256 |
| 7609 | (base32 "0890rvv3czi3nqj11dc2m3wcdfv0dm0nr63wfcpfikk9sk6b4w8s")))) |
| 7610 | (build-system cmake-build-system) |
| 7611 | (arguments |
| 7612 | (list |
| 7613 | #:phases |
| 7614 | #~(modify-phases %standard-phases |
| 7615 | (add-after 'install 'post-install |
| 7616 | (lambda _ |
| 7617 | (let* ((doc (string-append #$output "/share/doc/glm")) |
| 7618 | (pkgconfig (string-append #$output "/lib/pkgconfig"))) |
| 7619 | (mkdir-p doc) |
| 7620 | (mkdir-p pkgconfig) |
| 7621 | (copy-recursively "../source/doc/api" (string-append doc "/html")) |
| 7622 | (install-file "../source/doc/manual.pdf" doc) |
| 7623 | (call-with-output-file (string-append pkgconfig "/glm.pc") |
| 7624 | (lambda (port) |
| 7625 | (format port |
| 7626 | "prefix=~a |
| 7627 | includedir=${prefix}/include |
| 7628 | |
| 7629 | Name: GLM |
| 7630 | Description: OpenGL Mathematics |
| 7631 | Version: ~a |
| 7632 | Cflags: -I${includedir}~%" #$output #$version))))))))) |
| 7633 | (native-inputs |
| 7634 | (list unzip)) |
| 7635 | (home-page "https://glm.g-truc.net/") |
| 7636 | (synopsis "OpenGL Mathematics library") |
| 7637 | (description "OpenGL Mathematics (GLM) is a header-only C++ mathematics |
| 7638 | library for graphics software based on the OpenGL Shading Language (GLSL) |
| 7639 | specifications.") |
| 7640 | (license license:expat))) |
| 7641 | |
| 7642 | (define-public lpsolve |
| 7643 | (package |
| 7644 | (name "lpsolve") |
| 7645 | (version "5.5.2.5") |
| 7646 | (source |
| 7647 | (origin |
| 7648 | (method url-fetch) |
| 7649 | (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version |
| 7650 | "/lp_solve_" version "_source.tar.gz")) |
| 7651 | (sha256 |
| 7652 | (base32 |
| 7653 | "12pj1idjz31r7c2mb5w03vy1cmvycvbkx9z29s40qdmkp1i7q6i0")) |
| 7654 | (modules '((guix build utils))) |
| 7655 | (snippet |
| 7656 | '(begin |
| 7657 | (substitute* (list "lp_solve/ccc" "lpsolve55/ccc") |
| 7658 | (("^c=cc") "c=gcc") |
| 7659 | ;; Pretend to be on a 64 bit platform to obtain a common directory |
| 7660 | ;; name for the build results on all architectures; nothing else |
| 7661 | ;; seems to depend on it. |
| 7662 | (("^PLATFORM=.*$") "PLATFORM=ux64\n") |
| 7663 | |
| 7664 | ;; The check for 'isnan' as it is written fails with |
| 7665 | ;; "non-floating-point argument in call to function |
| 7666 | ;; ‘__builtin_isnan’", which leads to the 'NOISNAN' cpp macro |
| 7667 | ;; definition, which in turn leads to bad things. Fix the feature |
| 7668 | ;; test. |
| 7669 | (("isnan\\(0\\)") "isnan(0.)")) |
| 7670 | #t)))) |
| 7671 | (build-system gnu-build-system) |
| 7672 | (arguments |
| 7673 | `(#:tests? #f ; no check target |
| 7674 | #:phases |
| 7675 | (modify-phases %standard-phases |
| 7676 | (delete 'configure) ; no configure script |
| 7677 | (add-after 'unpack 'apply-gcc-14-patch |
| 7678 | (lambda _ |
| 7679 | (substitute* '("lpsolve55/ccc" |
| 7680 | "lp_solve/ccc") |
| 7681 | (("^c=gcc") "c=\"gcc -Wno-error=implicit-int\"")))) |
| 7682 | (replace 'build |
| 7683 | (lambda _ |
| 7684 | (with-directory-excursion "lpsolve55" |
| 7685 | (invoke "bash" "ccc")) |
| 7686 | (with-directory-excursion "lp_solve" |
| 7687 | (invoke "bash" "ccc")) |
| 7688 | #t)) |
| 7689 | (replace 'install |
| 7690 | (lambda* (#:key outputs #:allow-other-keys) |
| 7691 | (let* ((out (assoc-ref outputs "out")) |
| 7692 | (bin (string-append out "/bin")) |
| 7693 | (lib (string-append out "/lib")) |
| 7694 | ;; This is where LibreOffice expects to find the header |
| 7695 | ;; files, and where they are installed by Debian. |
| 7696 | (include (string-append out "/include/lpsolve"))) |
| 7697 | (install-file "lpsolve55/bin/ux64/liblpsolve55.a" lib) |
| 7698 | (install-file "lpsolve55/bin/ux64/liblpsolve55.so" lib) |
| 7699 | (install-file "lp_solve/bin/ux64/lp_solve" bin) |
| 7700 | |
| 7701 | ;; Install a subset of the header files as on Debian |
| 7702 | ;; (plus lp_bit.h, which matches the regular expression). |
| 7703 | (for-each (lambda (name) |
| 7704 | (install-file name include)) |
| 7705 | (find-files "." "lp_[HMSa-z].*\\.h$")) |
| 7706 | (with-directory-excursion "shared" |
| 7707 | (for-each (lambda (name) |
| 7708 | (install-file name include)) |
| 7709 | (find-files "." "\\.h$"))) |
| 7710 | #t)))))) |
| 7711 | (home-page "https://lpsolve.sourceforge.net/") |
| 7712 | (synopsis "Mixed integer linear programming (MILP) solver") |
| 7713 | (description |
| 7714 | "lp_solve is a mixed integer linear programming solver based on the |
| 7715 | revised simplex and the branch-and-bound methods.") |
| 7716 | (license license:lgpl2.1+))) |
| 7717 | |
| 7718 | (define-public dealii |
| 7719 | (package |
| 7720 | (name "dealii") |
| 7721 | (version "9.7.1") |
| 7722 | (source |
| 7723 | (origin |
| 7724 | (method url-fetch) |
| 7725 | (uri (string-append "https://github.com/dealii/dealii/releases/" |
| 7726 | "download/v" version "/dealii-" version ".tar.gz")) |
| 7727 | (sha256 |
| 7728 | (base32 "0hyyly71ljnb7fsl2yan7wf3zxhkly7i8gczpv7gsm6vhgprc80g")) |
| 7729 | (modules '((guix build utils))) |
| 7730 | (snippet |
| 7731 | ;; Remove bundled boost, Kokkos, muparser, TBB and UMFPACK. |
| 7732 | #~(delete-file-recursively "bundled")))) |
| 7733 | (build-system cmake-build-system) |
| 7734 | (outputs '("out" "doc")) |
| 7735 | (native-inputs |
| 7736 | ;; Required to build the documentation. |
| 7737 | (list graphviz doxygen perl)) |
| 7738 | (inputs |
| 7739 | (list arpack-ng |
| 7740 | openblas |
| 7741 | gfortran |
| 7742 | muparser |
| 7743 | taskflow |
| 7744 | zlib)) |
| 7745 | (propagated-inputs |
| 7746 | ;; Some scripts are installed into share/deal.II/scripts that require |
| 7747 | ;; perl and python, but they are not executable (and some are missing the |
| 7748 | ;; shebang line) and therefore must be explicitly passed to the |
| 7749 | ;; interpreter. |
| 7750 | ;; Anyway, they are meant to be used at build time, so rather than adding |
| 7751 | ;; the interpreters here, any package depending on them should just add |
| 7752 | ;; the requisite interpreter to its native inputs. |
| 7753 | (list boost |
| 7754 | hdf5 |
| 7755 | kokkos |
| 7756 | onetbb |
| 7757 | suitesparse ; For UMFPACK. |
| 7758 | sundials)) |
| 7759 | (arguments |
| 7760 | (list #:build-type "DebugRelease" ; Only Debug, Release or DebugRelease. |
| 7761 | ;; The tests take too long and must be explicitly enabled with |
| 7762 | ;; "make setup_tests". |
| 7763 | ;; See https://www.dealii.org/developer/developers/testsuite.html. |
| 7764 | ;; (They can also be run for an already installed deal.II.) |
| 7765 | #:tests? #f |
| 7766 | #:configure-flags |
| 7767 | #~(let ((doc (string-append #$output:doc "/share/doc/" |
| 7768 | #$name "-" #$version))) |
| 7769 | (list "-DDEAL_II_COMPONENT_DOCUMENTATION=ON" |
| 7770 | (string-append "-DDEAL_II_DOCREADME_RELDIR=" doc) |
| 7771 | (string-append "-DDEAL_II_DOCHTML_RELDIR=" doc "/html") |
| 7772 | ;; Don't compile the examples because the source and |
| 7773 | ;; CMakeLists.txt are installed anyway, allowing users to |
| 7774 | ;; do so for themselves. |
| 7775 | "-DDEAL_II_COMPILE_EXAMPLES=OFF" |
| 7776 | (string-append "-DDEAL_II_EXAMPLES_RELDIR=" doc |
| 7777 | "/examples"))) |
| 7778 | #:phases |
| 7779 | #~(modify-phases %standard-phases |
| 7780 | ;; Without unsetting CPATH, the build fails with the following |
| 7781 | ;; error (similar to <https://bugs.gnu.org/30756>): |
| 7782 | ;; |
| 7783 | ;; /gnu/store/…-gcc-11.3.0/include/c++/math.h:30:16: fatal error: math.h: No such file or directory |
| 7784 | ;; 30 | # include_next <math.h> |
| 7785 | ;; | ^~~~~~~~ |
| 7786 | ;; |
| 7787 | ;; Why does unsetting CPATH magically fix the error? |
| 7788 | ;; TODO: Properly fix this issue. |
| 7789 | (add-after 'set-paths 'unset-cpath |
| 7790 | (lambda _ |
| 7791 | (unsetenv "CPATH"))) |
| 7792 | (add-after 'install 'remove-build-logs |
| 7793 | ;; These build logs leak the name of the build directory by |
| 7794 | ;; storing the values of CMAKE_SOURCE_DIR and |
| 7795 | ;; CMAKE_BINARY_DIR. |
| 7796 | (lambda _ |
| 7797 | (let ((doc (string-append #$output:doc "/share/doc/" |
| 7798 | #$name "-" #$version))) |
| 7799 | (for-each delete-file |
| 7800 | (map (lambda (f) (string-append doc "/" f)) |
| 7801 | '("detailed.log" "summary.log"))))))))) |
| 7802 | (home-page "https://www.dealii.org/") |
| 7803 | (synopsis "Finite element library") |
| 7804 | (description |
| 7805 | "Deal.II is a C++ program library targeted at the computational solution |
| 7806 | of partial differential equations using adaptive finite elements. The main |
| 7807 | aim of deal.II is to enable rapid development of modern finite element codes, |
| 7808 | using among other aspects adaptive meshes and a wide array of tools often used |
| 7809 | in finite element programs.") |
| 7810 | (license license:lgpl2.1+))) |
| 7811 | |
| 7812 | (define-public flann |
| 7813 | (package |
| 7814 | (name "flann") |
| 7815 | (version "1.9.2") |
| 7816 | (home-page "https://github.com/mariusmuja/flann/") |
| 7817 | (source |
| 7818 | (origin |
| 7819 | (method git-fetch) |
| 7820 | (uri (git-reference (url home-page) (commit version))) |
| 7821 | (file-name (git-file-name name version)) |
| 7822 | (sha256 |
| 7823 | (base32 |
| 7824 | "1954azd78qx1dkcs47cyyhb34845zdg0qrhs9z649sfc5mf2gbhp")) |
| 7825 | (patches (search-patches "flann-pc-file.patch")))) |
| 7826 | (build-system cmake-build-system) |
| 7827 | (outputs '("out")) |
| 7828 | (native-inputs |
| 7829 | (list pkg-config unzip)) |
| 7830 | (propagated-inputs (list lz4)) |
| 7831 | ;; utils/serialization.h includes lz.4 |
| 7832 | (inputs |
| 7833 | (list |
| 7834 | hdf5 |
| 7835 | ;; FIXME: 'mkoctfile' fails with a linker error: |
| 7836 | ;; ld: cannot find -loctinterp |
| 7837 | ;; ld: cannot find -loctave |
| 7838 | ;; Disable it for now. |
| 7839 | ;; octave-cli |
| 7840 | python)) |
| 7841 | (arguments |
| 7842 | (list |
| 7843 | #:tests? #f ; The test data are downloaded from the Internet. |
| 7844 | ;; The 'share/flann/octave' contains a .mex file, which is an ELF file |
| 7845 | ;; taken 46 MiB unstripped, and 6 MiB stripped. |
| 7846 | #:strip-directories #~(list "lib" "lib64" "libexec" |
| 7847 | "bin" "sbin" "share/flann/octave") |
| 7848 | ;; Save 10 MiB by not installing .a files. Passing |
| 7849 | ;; '-DBUILD_STATIC_LIBS=OFF' has no effect. |
| 7850 | #:phases |
| 7851 | #~(modify-phases %standard-phases |
| 7852 | (add-after 'install 'remove-static-libraries |
| 7853 | (lambda _ |
| 7854 | (let ((lib (string-append #$output "/lib"))) |
| 7855 | (for-each delete-file |
| 7856 | (find-files lib "\\.a$")))))))) |
| 7857 | (synopsis "Library for approximate nearest neighbors computation") |
| 7858 | (description "FLANN is a library for performing fast approximate |
| 7859 | nearest neighbor searches in high dimensional spaces. It implements a |
| 7860 | collection of algorithms and a system for automatically choosing the best |
| 7861 | algorithm and optimum parameters depending on the dataset. |
| 7862 | |
| 7863 | FLANN is written in C++ and contains bindings for C, Octave and Python.") |
| 7864 | (license (license:non-copyleft "file://COPYING" |
| 7865 | "See COPYING in the distribution.")))) |
| 7866 | |
| 7867 | (define-public nanoflann |
| 7868 | (package |
| 7869 | (name "nanoflann") |
| 7870 | (version "1.9.0") |
| 7871 | (source |
| 7872 | (origin |
| 7873 | (method git-fetch) |
| 7874 | (uri (git-reference |
| 7875 | (url "https://github.com/jlblancoc/nanoflann") |
| 7876 | (commit (string-append "v" version)))) |
| 7877 | (file-name (git-file-name name version)) |
| 7878 | (sha256 |
| 7879 | (base32 "1cizyl30ad5ljxy0dvj4hw85222rzhsw7lsdgjp5rl6kpqqrxmqw")))) |
| 7880 | (build-system cmake-build-system) |
| 7881 | (arguments |
| 7882 | (list |
| 7883 | #:configure-flags |
| 7884 | #~(list "-DNANOFLANN_BUILD_EXAMPLES=OFF" "-DNANOFLANN_BUILD_TESTS=ON"))) |
| 7885 | (native-inputs (list googletest)) |
| 7886 | (home-page "https://github.com/jlblancoc/nanoflann") |
| 7887 | (synopsis |
| 7888 | "C++11 header-only library for nearest neighbor search with KD-trees") |
| 7889 | (description |
| 7890 | "nanoflann is a C++11 header-only library for building KD-trees of datasets |
| 7891 | with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D |
| 7892 | rotation groups). It is a fork of the FLANN library that replaces virtual |
| 7893 | methods inlined templates for improved runtime and memory efficiency.") |
| 7894 | (license license:bsd-2))) |
| 7895 | |
| 7896 | (define-public wcalc |
| 7897 | (package |
| 7898 | (name "wcalc") |
| 7899 | (version "2.5") |
| 7900 | (source |
| 7901 | (origin |
| 7902 | (method url-fetch) |
| 7903 | (uri (string-append "mirror://sourceforge/w-calc/Wcalc/" version "/" |
| 7904 | "wcalc-" version ".tar.bz2")) |
| 7905 | (sha256 |
| 7906 | (base32 |
| 7907 | "1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f")) |
| 7908 | (snippet |
| 7909 | #~(begin |
| 7910 | (for-each delete-file |
| 7911 | (list "src/common/scanner.c" |
| 7912 | "src/common/parser.c" |
| 7913 | "src/common/parser.h")))))) |
| 7914 | (build-system gnu-build-system) |
| 7915 | (inputs |
| 7916 | (list mpfr readline)) |
| 7917 | (native-inputs |
| 7918 | (list bison flex)) |
| 7919 | (home-page "https://w-calc.sourceforge.net/index.php") |
| 7920 | (synopsis "Flexible command-line scientific calculator") |
| 7921 | (description "Wcalc is a very capable calculator. It has standard functions |
| 7922 | (sin, asin, and sinh for example, in either radians or degrees), many |
| 7923 | pre-defined constants (pi, e, c, etc.), support for using variables, \"active\" |
| 7924 | variables, a command history, hex/octal/binary input and output, unit |
| 7925 | conversions, embedded comments, and an expandable expression entry field. It |
| 7926 | evaluates expressions using the standard order of operations.") |
| 7927 | (license license:gpl2+))) |
| 7928 | |
| 7929 | (define-public xaos |
| 7930 | (package |
| 7931 | (name "xaos") |
| 7932 | (version "4.3.3") |
| 7933 | (source (origin |
| 7934 | (method git-fetch) |
| 7935 | (uri (git-reference |
| 7936 | (url "https://github.com/xaos-project/XaoS") |
| 7937 | (commit (string-append "release-" version)))) |
| 7938 | (file-name (git-file-name name version)) |
| 7939 | (sha256 |
| 7940 | (base32 |
| 7941 | "0imq6rvvjwjgmrfr25yr5lmhmqr4s6a5174jhah90mhf7pb62j0i")))) |
| 7942 | (build-system gnu-build-system) |
| 7943 | (native-inputs `(("gettext" ,gettext-minimal) |
| 7944 | ("qtbase" ,qtbase) |
| 7945 | ("qttools" ,qttools))) |
| 7946 | (inputs (list libx11 zlib libpng gsl)) |
| 7947 | ;; The upstream project file ("XaoS.pro") and the Makefile it generates are |
| 7948 | ;; not enough for this package to install properly. These phases fix that. |
| 7949 | (arguments |
| 7950 | (list #:tests? #f ;no "check" target |
| 7951 | #:phases |
| 7952 | #~(modify-phases %standard-phases |
| 7953 | (add-before 'configure 'make-qt-deterministic |
| 7954 | (lambda _ |
| 7955 | ;; Make Qt deterministic. |
| 7956 | (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1"))) |
| 7957 | (replace 'configure |
| 7958 | (lambda* (#:key outputs #:allow-other-keys) |
| 7959 | (let ((out (assoc-ref outputs "out"))) |
| 7960 | (substitute* "XaoS.pro" |
| 7961 | ;; The DESTDIR is originally set to install the xaos binary to |
| 7962 | ;; the "bin" folder inside the build directory. Setting make |
| 7963 | ;; flags doesn't seem to change this. |
| 7964 | (("DESTDIR.*$") |
| 7965 | (string-append "DESTDIR=" out "/bin")) |
| 7966 | (("/usr/local") |
| 7967 | out) |
| 7968 | ;; Set the correct path to the lrelease binary. |
| 7969 | (("lrelease-qt6") "lrelease")) |
| 7970 | (substitute* "src/include/config.h" |
| 7971 | (("/usr/share/XaoS") |
| 7972 | (string-append out "/share/XaoS"))) |
| 7973 | (invoke "qmake")))) |
| 7974 | (add-after 'install 'install-data |
| 7975 | (lambda* (#:key outputs #:allow-other-keys) |
| 7976 | (let* ((out (assoc-ref outputs "out")) |
| 7977 | (share (string-append out "/share"))) |
| 7978 | (mkdir-p share) |
| 7979 | (for-each |
| 7980 | (lambda (folder) |
| 7981 | (copy-recursively folder |
| 7982 | (string-append share "/XaoS/" folder))) |
| 7983 | '("catalogs" "examples" "tutorial")) |
| 7984 | (install-file "xdg/xaos.png" |
| 7985 | (string-append share "/pixmaps")) |
| 7986 | (install-file "xdg/io.github.xaos_project.XaoS.desktop" |
| 7987 | (string-append share "/applications")))))))) |
| 7988 | (synopsis "Real-time fractal zoomer") |
| 7989 | (description "GNU XaoS is a graphical program that generates fractal |
| 7990 | patterns and allows you to zoom in and out of them infinitely in a fluid, |
| 7991 | continuous manner. It also includes tutorials that help to explain how fractals |
| 7992 | are built. It can generate many different fractal types such as the Mandelbrot |
| 7993 | set.") |
| 7994 | (home-page "https://xaos-project.github.io/") |
| 7995 | (license license:gpl2+))) |
| 7996 | |
| 7997 | (define-public hypre |
| 7998 | (package |
| 7999 | (name "hypre") |
| 8000 | (version "2.32.0") |
| 8001 | (source |
| 8002 | (origin |
| 8003 | (method git-fetch) |
| 8004 | (uri (git-reference |
| 8005 | (url "https://github.com/hypre-space/hypre") |
| 8006 | (commit (string-append "v" version)))) |
| 8007 | (file-name (git-file-name name version)) |
| 8008 | (sha256 |
| 8009 | (base32 "1hlydh15wz0yv5bgry7yyx4pvrl656mifhqjgifzf6dyksfvwpl7")))) |
| 8010 | (build-system gnu-build-system) |
| 8011 | (outputs '("out" ;5.3 MiB of headers and libraries |
| 8012 | "doc")) ;12 MiB of documentation |
| 8013 | (native-inputs |
| 8014 | (list doc++ |
| 8015 | doxygen-1.16 |
| 8016 | ghostscript |
| 8017 | python |
| 8018 | python-breathe |
| 8019 | python-sphinx |
| 8020 | python-sphinx-rtd-theme |
| 8021 | (texlive-local-tree |
| 8022 | (list texlive-adjustbox |
| 8023 | texlive-alphalph |
| 8024 | texlive-booktabs |
| 8025 | texlive-capt-of |
| 8026 | texlive-caption |
| 8027 | texlive-changepage |
| 8028 | texlive-cmap |
| 8029 | texlive-courier |
| 8030 | texlive-enumitem |
| 8031 | texlive-etoc |
| 8032 | texlive-fancyvrb |
| 8033 | texlive-float |
| 8034 | texlive-fncychap |
| 8035 | texlive-framed |
| 8036 | texlive-hanging |
| 8037 | texlive-helvetic |
| 8038 | texlive-jknapltx |
| 8039 | texlive-latexmk |
| 8040 | texlive-listofitems |
| 8041 | texlive-ltablex |
| 8042 | texlive-multirow |
| 8043 | texlive-natbib |
| 8044 | texlive-needspace |
| 8045 | texlive-newunicodechar |
| 8046 | texlive-ninecolors |
| 8047 | texlive-parskip |
| 8048 | texlive-sectsty |
| 8049 | texlive-stackengine |
| 8050 | texlive-tabularray |
| 8051 | texlive-tabulary |
| 8052 | texlive-tex-gyre |
| 8053 | texlive-titlesec |
| 8054 | texlive-tocloft |
| 8055 | texlive-ulem |
| 8056 | texlive-upquote |
| 8057 | texlive-varwidth |
| 8058 | texlive-wasy |
| 8059 | texlive-wasysym |
| 8060 | texlive-wrapfig |
| 8061 | texlive-xcolor |
| 8062 | texlive-xltabular |
| 8063 | texlive-xypic)))) |
| 8064 | (inputs |
| 8065 | (list openblas)) |
| 8066 | (arguments |
| 8067 | (list #:modules `((srfi srfi-1) |
| 8068 | ,@%default-gnu-modules) |
| 8069 | #:configure-flags #~'("--enable-shared" |
| 8070 | "--disable-fortran" |
| 8071 | "--without-MPI" |
| 8072 | "--with-openmp" |
| 8073 | "--with-fei" |
| 8074 | "--with-lapack" |
| 8075 | "--with-blas") |
| 8076 | #:phases |
| 8077 | #~(modify-phases %standard-phases |
| 8078 | (add-before 'configure 'chdir-src |
| 8079 | (lambda _ |
| 8080 | (chdir "src"))) |
| 8081 | (replace 'configure |
| 8082 | (lambda* (#:key build target configure-flags |
| 8083 | #:allow-other-keys #:rest args) |
| 8084 | (let* ((configure (assoc-ref %standard-phases 'configure))) |
| 8085 | (apply configure |
| 8086 | (append args |
| 8087 | (list #:configure-flags |
| 8088 | (cons (string-append "--host=" |
| 8089 | (or target build)) |
| 8090 | configure-flags))))))) |
| 8091 | (add-after 'build 'build-docs |
| 8092 | (lambda _ |
| 8093 | (setenv "TEXMFVAR" "/tmp") |
| 8094 | (invoke "make" "-C" "docs"))) |
| 8095 | (replace 'check |
| 8096 | (lambda* (#:key tests? #:allow-other-keys) |
| 8097 | (when tests? |
| 8098 | (setenv "LD_LIBRARY_PATH" |
| 8099 | (string-append (getcwd) "/hypre/lib")) |
| 8100 | (setenv "PATH" |
| 8101 | (string-append "." ":" (getenv "PATH"))) |
| 8102 | (invoke "make" "check" "CHECKRUN=") |
| 8103 | (for-each (lambda (filename) |
| 8104 | (let ((size (stat:size (stat filename)))) |
| 8105 | (when (positive? size) |
| 8106 | (error (format #f |
| 8107 | "~a size ~d; error indication~%" |
| 8108 | filename size))))) |
| 8109 | (find-files "test" ".*\\.err$"))))) |
| 8110 | (add-after 'install 'install-docs |
| 8111 | (lambda* (#:key outputs #:allow-other-keys) |
| 8112 | ;; Custom install because docs/Makefile doesn't honor ${docdir}. |
| 8113 | (let* ((doc (assoc-ref outputs "doc")) |
| 8114 | (docdir (string-append doc "/share/doc/hypre-" |
| 8115 | #$version))) |
| 8116 | (with-directory-excursion "docs" |
| 8117 | (for-each (lambda (base) |
| 8118 | (install-file (string-append base |
| 8119 | ".pdf") docdir) |
| 8120 | (copy-recursively (string-append base |
| 8121 | "-html") |
| 8122 | (string-append docdir |
| 8123 | "/" base))) |
| 8124 | '("usr-manual" "ref-manual"))))))))) |
| 8125 | (home-page "https://computing.llnl.gov/projects\ |
| 8126 | /hypre-scalable-linear-solvers-multigrid-methods") |
| 8127 | (synopsis "Library of solvers and preconditioners for linear equations") |
| 8128 | (description |
| 8129 | "HYPRE is a software library of high performance preconditioners and |
| 8130 | solvers for the solution of large, sparse linear systems of equations. It |
| 8131 | features multigrid solvers for both structured and unstructured grid |
| 8132 | problems.") |
| 8133 | (properties '((tunable? . #t))) |
| 8134 | (license license:lgpl2.1))) |
| 8135 | |
| 8136 | (define-public hypre-openmpi |
| 8137 | (package |
| 8138 | (inherit hypre) |
| 8139 | (name "hypre-openmpi") |
| 8140 | (inputs (modify-inputs inputs |
| 8141 | (prepend openmpi))) |
| 8142 | (arguments |
| 8143 | (substitute-keyword-arguments arguments |
| 8144 | ((#:configure-flags flags) |
| 8145 | #~`("--with-MPI" ,@(delete "--without-MPI" |
| 8146 | #$flags))) |
| 8147 | ((#:phases phases) |
| 8148 | #~(modify-phases #$phases |
| 8149 | (add-before 'check 'mpi-setup |
| 8150 | #$%openmpi-setup))))) |
| 8151 | (synopsis "Parallel solvers and preconditioners for linear equations") |
| 8152 | (description |
| 8153 | "HYPRE is a software library of high performance preconditioners and |
| 8154 | solvers for the solution of large, sparse linear systems of equations on |
| 8155 | parallel computers. It features parallel multigrid solvers for both |
| 8156 | structured and unstructured grid problems."))) |
| 8157 | |
| 8158 | (define-public matio |
| 8159 | (package |
| 8160 | (name "matio") |
| 8161 | (version "1.5.23") |
| 8162 | (source |
| 8163 | (origin |
| 8164 | (method url-fetch) |
| 8165 | (uri (string-append "mirror://sourceforge/matio/matio/" version "/" |
| 8166 | "matio-" version ".tar.gz")) |
| 8167 | (sha256 |
| 8168 | (base32 |
| 8169 | "0vjdkxn402gwrgbi5ii3n2ai01bjzzfb588iqd9ylinzc7kfm4cz")))) |
| 8170 | (build-system gnu-build-system) |
| 8171 | (arguments |
| 8172 | (list |
| 8173 | #:phases |
| 8174 | #~(modify-phases %standard-phases |
| 8175 | (add-before 'install 'install-matioConfig.h |
| 8176 | (lambda _ |
| 8177 | (install-file "src/matioConfig.h" |
| 8178 | (string-append #$output "/include"))))))) |
| 8179 | (inputs |
| 8180 | (list zlib hdf5)) |
| 8181 | (home-page "http://matio.sourceforge.net/") |
| 8182 | (synopsis "Library for reading and writing MAT files") |
| 8183 | (description "Matio is a library for reading and writing MAT files. It |
| 8184 | supports compressed MAT files, as well as newer (version 7.3) MAT files.") |
| 8185 | (license license:bsd-2))) |
| 8186 | |
| 8187 | (define-public vc |
| 8188 | (package |
| 8189 | (name "vc") |
| 8190 | (version "1.4.3") |
| 8191 | (source |
| 8192 | (origin |
| 8193 | (method url-fetch) |
| 8194 | (uri (string-append "https://github.com/VcDevel/Vc/releases/" |
| 8195 | "download/" version "/Vc-" version ".tar.gz")) |
| 8196 | (sha256 |
| 8197 | (base32 "0zq37r8yisd4dwlb024l10wk2yq9kisa4xm79ia1ggrz7w2s13lq")))) |
| 8198 | (build-system cmake-build-system) |
| 8199 | (arguments |
| 8200 | (list |
| 8201 | #:configure-flags |
| 8202 | #~(list ;; By default, Vc will optimize for the CPU of the build machine. |
| 8203 | ;; Setting this to "none" makes it create portable binaries. See |
| 8204 | ;; "cmake/OptimizeForArchitecture.cmake". |
| 8205 | "-DTARGET_ARCHITECTURE=none") |
| 8206 | #:phases |
| 8207 | #~(modify-phases %standard-phases |
| 8208 | (add-after 'unpack 'copy-testdata |
| 8209 | (lambda _ |
| 8210 | (copy-recursively #$(this-package-native-input "testdata") |
| 8211 | "tests/testdata")))))) |
| 8212 | (native-inputs |
| 8213 | `(("virtest" ,virtest) |
| 8214 | |
| 8215 | ;; This is a submodule in the git project, but not part of the |
| 8216 | ;; released sources. See the git branch for the commit to take. |
| 8217 | ("testdata" |
| 8218 | ,(let ((commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3")) |
| 8219 | (origin |
| 8220 | (method git-fetch) |
| 8221 | (uri (git-reference |
| 8222 | (url "https://github.com/VcDevel/vc-testdata") |
| 8223 | (commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3"))) |
| 8224 | (file-name (git-file-name "vc-testdata" (string-take commit 7))) |
| 8225 | (sha256 |
| 8226 | (base32 |
| 8227 | "1hkhqib03qlcq412ym2dciynfxcdr2ygqhnplz4l1vissr1wnqn2"))))))) |
| 8228 | (synopsis "SIMD vector classes for C++") |
| 8229 | (description "Vc provides portable, zero-overhead C++ types for explicitly |
| 8230 | data-parallel programming. It is a library designed to ease explicit |
| 8231 | vectorization of C++ code. Its types enable explicitly stating data-parallel |
| 8232 | operations on multiple values. The parallelism is therefore added via the type |
| 8233 | system. Vc has an intuitive API and provides portability between different |
| 8234 | compilers and compiler versions as well as portability between different vector |
| 8235 | instruction sets. Thus, an application written with Vc can be compiled for: |
| 8236 | @enumerate |
| 8237 | @item AVX and AVX2 |
| 8238 | @item SSE2 up to SSE4.2 or SSE4a |
| 8239 | @item Scalar |
| 8240 | @item MIC |
| 8241 | @item NEON (in development) |
| 8242 | @item NVIDIA GPUs / CUDA (in development) |
| 8243 | @end enumerate\n") |
| 8244 | (home-page "https://github.com/VcDevel/Vc") |
| 8245 | ;; "No support_???.cpp file exists for this architecture." |
| 8246 | (supported-systems '("x86_64-linux" "i686-linux")) |
| 8247 | (license license:bsd-3))) |
| 8248 | |
| 8249 | (define-public reducelcs |
| 8250 | ;; This is the last commit which is available upstream, no |
| 8251 | ;; release happened since 2010. |
| 8252 | (let ((commit "963f74f7279ba6fc0ea7d8ddfd361ea190c80313") |
| 8253 | (revision "2")) |
| 8254 | (package |
| 8255 | (name "reducelcs") |
| 8256 | (version (git-version "1.0" revision commit)) |
| 8257 | (source |
| 8258 | (origin |
| 8259 | (method git-fetch) |
| 8260 | (uri (git-reference |
| 8261 | (url "https://github.com/gdv/Reduce-Expand-for-LCS") |
| 8262 | (commit commit))) |
| 8263 | (file-name (git-file-name name version)) |
| 8264 | (sha256 |
| 8265 | (base32 |
| 8266 | "03chvd9wb2z08r7ka2npr49dbimjvzn2gfm7cnp5l079vbw1dfny")))) |
| 8267 | (build-system gnu-build-system) |
| 8268 | (inputs (list openlibm)) |
| 8269 | (arguments |
| 8270 | (list |
| 8271 | #:tests? #f ; no tests |
| 8272 | #:phases |
| 8273 | #~(modify-phases %standard-phases |
| 8274 | (delete 'configure) ; No configure script exists. |
| 8275 | (replace 'install ; No install phase exists. |
| 8276 | (lambda* (#:key outputs #:allow-other-keys) |
| 8277 | (let* ((out (assoc-ref outputs "out")) |
| 8278 | (bin (string-append out "/bin"))) |
| 8279 | (install-file "Approximation" bin) |
| 8280 | (install-file "CollectResults" bin) |
| 8281 | (install-file "GenerateInstances" bin))))))) |
| 8282 | (synopsis "Approximate Longest Commons Subsequence computation tool") |
| 8283 | (description |
| 8284 | "@code{reduceLCS} is an implementation of the Reduce-Expand |
| 8285 | algorithm for LCS. It is a fast program to compute the approximate |
| 8286 | Longest Commons Subsequence of a set of strings.") |
| 8287 | (home-page "https://github.com/gdv/Reduce-Expand-for-LCS") |
| 8288 | (license license:gpl3+)))) |
| 8289 | |
| 8290 | (define-public java-smtinterpol |
| 8291 | (package |
| 8292 | (name "java-smtinterpol") |
| 8293 | (version "2.5") |
| 8294 | (source (origin |
| 8295 | (method git-fetch) |
| 8296 | (uri (git-reference |
| 8297 | (url "https://github.com/ultimate-pa/smtinterpol") |
| 8298 | (commit version))) |
| 8299 | (file-name (git-file-name name version)) |
| 8300 | (modules '((guix build utils))) |
| 8301 | (snippet #~(begin |
| 8302 | (delete-file-recursively "jacoco") |
| 8303 | (delete-file-recursively "libs") |
| 8304 | (delete-file-recursively "sonar"))) |
| 8305 | (sha256 |
| 8306 | (base32 |
| 8307 | "0bq5l7g830a8hxw1xyyfp2ph6jqk8ak0ichlymdglpnpngf6322f")))) |
| 8308 | (build-system ant-build-system) |
| 8309 | (arguments |
| 8310 | (list #:build-target "dist" |
| 8311 | #:test-target "runtests" |
| 8312 | #:phases |
| 8313 | #~(modify-phases %standard-phases |
| 8314 | (add-after 'unpack 'fix-build.xml |
| 8315 | (lambda _ |
| 8316 | (substitute* "build.xml" |
| 8317 | (("<tstamp>") "<!--") |
| 8318 | (("</tstamp>") "-->") |
| 8319 | (("executable=\"git\"") |
| 8320 | (string-append "executable=\"" |
| 8321 | (which "sh") |
| 8322 | "\"")) |
| 8323 | (("<property file=.*/>" all) |
| 8324 | (string-append all |
| 8325 | "<property environment=\"env\" />")) |
| 8326 | (("<classpath>" all) |
| 8327 | (string-append |
| 8328 | all |
| 8329 | "<pathelement path=\"${env.CLASSPATH}\" />")) |
| 8330 | (("<fileset file=\".*/libs/.*/>") "") |
| 8331 | (("<junit") |
| 8332 | "<junit haltonfailure=\"yes\"")) |
| 8333 | (call-with-output-file "describe" |
| 8334 | (lambda (port) |
| 8335 | (format port "echo ~a" #$version))))) |
| 8336 | (add-before 'check 'delete-failing-tests |
| 8337 | (lambda _ |
| 8338 | (delete-file |
| 8339 | (string-append "SMTInterpolTest/src/de/uni_freiburg" |
| 8340 | "/informatik/ultimate/smtinterpol/convert/" |
| 8341 | "EqualityDestructorTest.java")))) |
| 8342 | (replace 'install |
| 8343 | (lambda* (#:key outputs #:allow-other-keys) |
| 8344 | (let* ((out (assoc-ref outputs "out")) |
| 8345 | (java (string-append out "/share/java"))) |
| 8346 | (for-each (lambda (f) (install-file f java)) |
| 8347 | (find-files "dist" "\\.jar$")))))))) |
| 8348 | (native-inputs (list java-junit)) |
| 8349 | (home-page "http://ultimate.informatik.uni-freiburg.de/smtinterpol/") |
| 8350 | (synopsis "Interpolating SMT solver") |
| 8351 | (description "SMTInterpol is an @acronym{SMT, Satisfiability Modulo Theories} |
| 8352 | solver, that can compute Craig interpolants for various theories.") |
| 8353 | (license license:lgpl3+))) |
| 8354 | |
| 8355 | (define-public yices |
| 8356 | (package |
| 8357 | (name "yices") |
| 8358 | (version "2.7.0") |
| 8359 | (source (origin |
| 8360 | (method git-fetch) |
| 8361 | (uri (git-reference |
| 8362 | (url "https://github.com/SRI-CSL/yices2/") |
| 8363 | (commit (string-append "yices-" version)))) |
| 8364 | (sha256 |
| 8365 | (base32 "1jikmka2bi2as08lsvpf43r7s4lscpg0g4lg7dr68aba1jk9wb5j")) |
| 8366 | (file-name (git-file-name name version)))) |
| 8367 | (build-system gnu-build-system) |
| 8368 | (arguments |
| 8369 | (list #:configure-flags |
| 8370 | #~(list #$@(if (%current-target-system) |
| 8371 | '() |
| 8372 | (list (string-append "--build=" |
| 8373 | (%current-system)))) |
| 8374 | "--enable-mcsat" |
| 8375 | ;; XXX: Ewww, static linkage |
| 8376 | (string-append |
| 8377 | "--with-static-libpoly=" |
| 8378 | (search-input-file %build-inputs "lib/libpoly.a")) |
| 8379 | (string-append |
| 8380 | "--with-static-gmp=" |
| 8381 | (search-input-file %build-inputs "lib/libgmp.a")) |
| 8382 | (string-append |
| 8383 | "--with-pic-libpoly=" |
| 8384 | (search-input-file %build-inputs "lib/libpicpoly.a"))) |
| 8385 | #:phases |
| 8386 | #~(modify-phases %standard-phases |
| 8387 | (add-after 'unpack 'fix-build-files |
| 8388 | (lambda _ |
| 8389 | (substitute* "Makefile.build" |
| 8390 | (("SHELL=.*") "") |
| 8391 | (("/sbin/ldconfig") (which "ldconfig"))) |
| 8392 | (substitute* (find-files "etc" "install-yices.*") |
| 8393 | (("/usr/bin/install") (which "install")) |
| 8394 | (("/bin/ln") (which "ln")) |
| 8395 | (("/sbin/ldconfig") (which "ldconfig")) |
| 8396 | (("install_dir=.*") |
| 8397 | (string-append "install_dir=" #$output)))))))) |
| 8398 | (inputs (list cudd gmp gperf libpoly)) |
| 8399 | (native-inputs (list autoconf automake bash-minimal python-minimal-wrapper)) |
| 8400 | (home-page "https://yices.csl.sri.com/") |
| 8401 | (synopsis "Satisfiability modulo theories solver") |
| 8402 | (description "Yices is a solver for @acronym{SMT, satisfiability modulo |
| 8403 | theories} problems. It can process input in SMT-LIB format or its own |
| 8404 | s-expression-based format.") |
| 8405 | (license license:gpl3+))) |
| 8406 | |
| 8407 | (define-public symfpu |
| 8408 | (package |
| 8409 | (name "symfpu") |
| 8410 | (version "1.2.0") |
| 8411 | (source |
| 8412 | (origin |
| 8413 | (method git-fetch) |
| 8414 | (uri (git-reference |
| 8415 | (url "https://github.com/martin-cs/symfpu") |
| 8416 | (commit (string-append "symfpu-" version "-dual-license")))) |
| 8417 | (file-name (git-file-name name version)) |
| 8418 | (sha256 |
| 8419 | (base32 "13a9y0spyi6pggbhjgwi9g2qy822h1zakzhhwvm8qgk5c4njv3c6")) |
| 8420 | (patches (search-patches "symfpu-fix-rounding-test-case.patch")))) |
| 8421 | (build-system copy-build-system) |
| 8422 | (arguments |
| 8423 | (list |
| 8424 | #:install-plan |
| 8425 | #~`(("symfpu.pc" "lib/pkgconfig/symfpu.pc") |
| 8426 | ("core" "include/symfpu/core" #:exclude ("Makefile")) |
| 8427 | ("utils" "include/symfpu/utils" #:exclude ("Makefile"))) |
| 8428 | #:phases |
| 8429 | #~(modify-phases %standard-phases |
| 8430 | ;; Make sure that the tests exit with a zero exit status by default. |
| 8431 | ;; Generated tests have assert(3) statements which exit with a |
| 8432 | ;; non-zero exit status on test failure. |
| 8433 | (add-after 'unpack 'fix-tests |
| 8434 | (lambda _ |
| 8435 | (substitute* "applications/test.cpp" |
| 8436 | (("return 1") "return 0")))) |
| 8437 | (add-before 'install 'check |
| 8438 | (lambda* (#:key tests? #:allow-other-keys) |
| 8439 | (when tests? |
| 8440 | ;; To ensure the test application builds prior to 'install, |
| 8441 | ;; set up a symlink and modify CXXFLAGS to find the headers. |
| 8442 | (symlink #$source "symfpu") |
| 8443 | (invoke "make" "CXXFLAGS=-I." "test") |
| 8444 | |
| 8445 | ;; Run tests in their breadth (i.e., --allTests) but on a very |
| 8446 | ;; small value range as otherwise the tests run for a long time. |
| 8447 | (invoke "./test" |
| 8448 | "--allTests" |
| 8449 | "--printC" |
| 8450 | "--start=0" |
| 8451 | "--end=125" |
| 8452 | "--verbose") |
| 8453 | |
| 8454 | ;; Test script generates C code which we then compile & execute. |
| 8455 | (for-each |
| 8456 | (lambda (file) |
| 8457 | (let ((case (string-drop-right file (string-length ".c")))) |
| 8458 | (format #t "Running test case ~a~%" case) |
| 8459 | (invoke "g++" "-std=gnu++11" "-o" case file) |
| 8460 | (invoke (string-append "./" case)))) |
| 8461 | (find-files "." "^testC..*\\.c$"))))) |
| 8462 | (add-before 'install 'build-pkgconfig |
| 8463 | (lambda* (#:key outputs #:allow-other-keys) |
| 8464 | (with-output-to-file "symfpu.pc" |
| 8465 | (lambda _ |
| 8466 | (format #t |
| 8467 | "prefix=~a~@ |
| 8468 | exec_prefix=${prefix}~@ |
| 8469 | includedir=${prefix}/include~@ |
| 8470 | ~@ |
| 8471 | ~@ |
| 8472 | Name: symfpu~@ |
| 8473 | Version: ~a~@ |
| 8474 | Description: library for IEEE-754 floats~@ |
| 8475 | Cflags: -I${includedir}~%" |
| 8476 | (assoc-ref outputs "out") |
| 8477 | #$version)))))))) |
| 8478 | (synopsis |
| 8479 | "Concrete and symbolic implementation of IEEE-754 floating-point numbers") |
| 8480 | (description |
| 8481 | "SoftFPU is a C++ library implementing concrete and symbolic |
| 8482 | mantics for floating point numbers as defined in the IEEE-754 Standard |
| 8483 | r Floating-Point Arithmetic. It is templated in terms of the |
| 8484 | t-vectors, propositions, floating-point formats and rounding mode types |
| 8485 | ed. This allow the same code to be executed as an arbitrary precision |
| 8486 | brary or to be used to build symbolic representations of floating-point |
| 8487 | erations.") |
| 8488 | (home-page "https://github.com/martin-cs/symfpu") |
| 8489 | (license (list license:bsd-3 license:gpl3+)))) |
| 8490 | |
| 8491 | (define-public bitwuzla |
| 8492 | (package |
| 8493 | (name "bitwuzla") |
| 8494 | (version "0.9.1") |
| 8495 | (source |
| 8496 | (origin |
| 8497 | (method git-fetch) |
| 8498 | (uri (git-reference |
| 8499 | (url "https://github.com/bitwuzla/bitwuzla") |
| 8500 | (commit version))) |
| 8501 | (file-name (git-file-name name version)) |
| 8502 | (sha256 |
| 8503 | (base32 "085cph4vdr8j64wmia88bmrd84vgs51rkpismdh7b1f5s0nsvr6y")))) |
| 8504 | (build-system meson-build-system) |
| 8505 | (arguments |
| 8506 | `(#:configure-flags '("-Dtesting=enabled" "-Ddefault_library=shared" |
| 8507 | "-Dkissat=true"))) |
| 8508 | (native-inputs (list googletest pkg-config)) |
| 8509 | (inputs (list cadical-2.1 |
| 8510 | gmp |
| 8511 | kissat |
| 8512 | mpfr |
| 8513 | symfpu)) |
| 8514 | (synopsis "SMT solver optimized for the theory of bit-vectors") |
| 8515 | (description |
| 8516 | "Bitwuzla is a @acronym{SMT, Satisfiability Modulo Theories} solver |
| 8517 | for the theories of fixed-size bit-vectors, floating-point arithmetic, |
| 8518 | arrays, uninterpreted functions and their combinations.") |
| 8519 | (home-page "https://bitwuzla.github.io/") |
| 8520 | (license license:expat))) |
| 8521 | |
| 8522 | (define-public z3 |
| 8523 | (package |
| 8524 | (name "z3") |
| 8525 | (version "4.13.0") |
| 8526 | (home-page "https://github.com/Z3Prover/z3") |
| 8527 | (source (origin |
| 8528 | (method git-fetch) |
| 8529 | (uri (git-reference (url home-page) |
| 8530 | (commit (string-append "z3-" version)))) |
| 8531 | (file-name (git-file-name name version)) |
| 8532 | (sha256 |
| 8533 | (base32 |
| 8534 | "0j46lckf3zgx2xjay7z6nvlgh47gisbbl4s3m5zn280a13fwz1ih")))) |
| 8535 | (build-system cmake-build-system) |
| 8536 | (arguments |
| 8537 | (list |
| 8538 | #:imported-modules (append %cmake-build-system-modules |
| 8539 | %pyproject-build-system-modules) |
| 8540 | #:modules '((guix build cmake-build-system) |
| 8541 | (guix build utils) |
| 8542 | ((guix build pyproject-build-system) #:prefix py:)) |
| 8543 | #:configure-flags |
| 8544 | #~(list "-DZ3_BUILD_PYTHON_BINDINGS=ON" |
| 8545 | "-DZ3_LINK_TIME_OPTIMIZATION=ON" |
| 8546 | (string-append |
| 8547 | "-DCMAKE_INSTALL_PYTHON_PKG_DIR=" |
| 8548 | #$output "/lib/python" |
| 8549 | #$(version-major+minor (package-version python-wrapper)) |
| 8550 | "/site-packages")) |
| 8551 | #:phases |
| 8552 | #~(modify-phases %standard-phases |
| 8553 | (replace 'check |
| 8554 | (lambda* (#:key parallel-build? tests? #:allow-other-keys) |
| 8555 | (when tests? |
| 8556 | (invoke "make" "test-z3" |
| 8557 | (format #f "-j~a" |
| 8558 | (if parallel-build? |
| 8559 | (parallel-job-count) |
| 8560 | 1))) |
| 8561 | (invoke "./test-z3" "/a")))) |
| 8562 | (add-after 'install 'compile-python-modules |
| 8563 | (assoc-ref py:%standard-phases 'compile-bytecode)) |
| 8564 | ;; This step is missing in the CMake build system, do it here. |
| 8565 | (add-after 'compile-python-modules 'fix-z3-library-path |
| 8566 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 8567 | (let* ((dest (string-append (py:site-packages inputs outputs) |
| 8568 | "/z3/lib/libz3.so")) |
| 8569 | (z3-lib (string-append #$output "/lib/libz3.so"))) |
| 8570 | (mkdir-p (dirname dest)) |
| 8571 | (symlink z3-lib dest))))))) |
| 8572 | (native-inputs |
| 8573 | (list which python-wrapper)) |
| 8574 | (synopsis "Theorem prover") |
| 8575 | (description "Z3 is a theorem prover and @dfn{satisfiability modulo |
| 8576 | theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.") |
| 8577 | (license license:expat))) |
| 8578 | |
| 8579 | (define-public ocaml-z3 |
| 8580 | (package |
| 8581 | (inherit z3) |
| 8582 | (name "ocaml-z3") |
| 8583 | (build-system gnu-build-system) |
| 8584 | (arguments |
| 8585 | `(#:tests? #f; no ml tests |
| 8586 | #:phases |
| 8587 | (modify-phases %standard-phases |
| 8588 | (add-before 'configure 'bootstrap |
| 8589 | (lambda* (#:key outputs #:allow-other-keys) |
| 8590 | (let ((out (assoc-ref outputs "out"))) |
| 8591 | (setenv "OCAMLFIND_LDCONF" "ignore") |
| 8592 | (setenv "OCAMLFIND_DESTDIR" (string-append out "/lib/ocaml/site-lib")) |
| 8593 | (mkdir-p (string-append out "/lib/ocaml/site-lib")) |
| 8594 | (substitute* "scripts/mk_util.py" |
| 8595 | (("LIBZ3 = LIBZ3") |
| 8596 | (string-append "LIBZ3 = LIBZ3 + ' -dllpath " out "/lib'")) |
| 8597 | ;; Do not build z3 again, use the library passed as input |
| 8598 | ;; instead |
| 8599 | (("z3linkdep,") "\"\",") |
| 8600 | (("z3linkdep)") "\"\")")) |
| 8601 | (invoke "python" "scripts/mk_make.py")))) |
| 8602 | (replace 'configure |
| 8603 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 8604 | (invoke "./configure" |
| 8605 | "--ml" |
| 8606 | (string-append "--prefix=" (assoc-ref outputs "out"))))) |
| 8607 | (add-after 'configure 'change-directory |
| 8608 | (lambda _ |
| 8609 | (chdir "build") |
| 8610 | #t)) |
| 8611 | (replace 'build |
| 8612 | (lambda _ |
| 8613 | (invoke "make" "ml"))) |
| 8614 | (replace 'install |
| 8615 | (lambda* (#:key outputs #:allow-other-keys) |
| 8616 | (invoke "ocamlfind" "install" "-destdir" |
| 8617 | (string-append (assoc-ref outputs "out") "/lib/ocaml/site-lib") |
| 8618 | "z3" "api/ml/META" "api/ml/z3enums.mli" "api/ml/z3enums.cmi" |
| 8619 | "api/ml/z3enums.cmx" "api/ml/z3native.mli" |
| 8620 | "api/ml/z3native.cmi" "api/ml/z3native.cmx" |
| 8621 | "../src/api/ml/z3.mli" "api/ml/z3.cmi" "api/ml/z3.cmx" |
| 8622 | "api/ml/libz3ml.a" "api/ml/z3ml.a" "api/ml/z3ml.cma" |
| 8623 | "api/ml/z3ml.cmxa" "api/ml/z3ml.cmxs" "api/ml/dllz3ml.so")))))) |
| 8624 | (native-inputs |
| 8625 | `(("which" ,which) |
| 8626 | ("python" ,python-wrapper) |
| 8627 | ("ocaml" ,ocaml) |
| 8628 | ("ocaml-findlib" ,ocaml-findlib))) |
| 8629 | (propagated-inputs |
| 8630 | (list ocaml-zarith)) |
| 8631 | (inputs |
| 8632 | (list z3)))) |
| 8633 | |
| 8634 | (define-public elpa |
| 8635 | (package |
| 8636 | (name "elpa") |
| 8637 | (version "2025.06.001") |
| 8638 | (source |
| 8639 | (origin |
| 8640 | (method git-fetch) |
| 8641 | (uri (git-reference |
| 8642 | (url "https://gitlab.mpcdf.mpg.de/elpa/elpa") |
| 8643 | (commit (string-append "new_release_" version)))) |
| 8644 | (file-name (git-file-name name version)) |
| 8645 | (sha256 |
| 8646 | (base32 "1j2mqa8g76z6xmwji99320v6q98p823glvxjsdcdpaji59wgvdql")))) |
| 8647 | (build-system gnu-build-system) |
| 8648 | (arguments |
| 8649 | (list #:configure-flags |
| 8650 | #~`("--enable-openmp" "--with-mpi=no" |
| 8651 | ;; ELPA unfortunately does not support runtime dispatch, so we |
| 8652 | ;; can only enable the "generic" kernels. See the "Cross |
| 8653 | ;; compilation" section of INSTALL.md. |
| 8654 | "--enable-generic-kernels" |
| 8655 | "--disable-sse" |
| 8656 | "--disable-sse-assembly" ;Require SSE3 |
| 8657 | "--disable-avx" |
| 8658 | "--disable-avx2" |
| 8659 | "--disable-avx512" |
| 8660 | #$(string-append "CFLAGS=-O3 -funsafe-loop-optimizations " |
| 8661 | "-funsafe-math-optimizations " |
| 8662 | "-ftree-vect-loop-version -ftree-vectorize " |
| 8663 | (let ((system (or (%current-target-system) |
| 8664 | (%current-system)))) |
| 8665 | (cond |
| 8666 | ((or (string-prefix? "x86_64" system) |
| 8667 | (string-prefix? "i686" system)) |
| 8668 | "-msse2") |
| 8669 | (else ""))))) |
| 8670 | #:parallel-tests? #f ;tests are multi-threaded, via BLAS |
| 8671 | #:phases |
| 8672 | #~(modify-phases %standard-phases |
| 8673 | (add-before 'bootstrap 'patch-shebangs-early |
| 8674 | (lambda _ |
| 8675 | (patch-shebang "generate_automake_test_programs.py"))) |
| 8676 | (add-before 'configure 'patch-header-generation |
| 8677 | (lambda _ |
| 8678 | (substitute* "configure" |
| 8679 | (("^ *make.*top_srcdir=\"\\$srcdir\"" &) |
| 8680 | (string-append & " CPP=\"$CPP\""))) #t)) |
| 8681 | (add-before 'check 'setup-tests |
| 8682 | (lambda _ |
| 8683 | ;; Decrease test time and RAM use by computing fewer |
| 8684 | ;; eigenvalues. The flags are (MATRIX-SIZE, EIGENVALUES, |
| 8685 | ;; BLOCK-SIZE), where the default is (500, 250, 16) for C |
| 8686 | ;; tests and (5000, 150, 16) for Fortran. This also causes |
| 8687 | ;; several tests to pass that otherwise would otherwise |
| 8688 | ;; fail with matrix size 5000; possibly due to floating |
| 8689 | ;; point tolerances that are too tight. |
| 8690 | (setenv "TEST_FLAGS" "1500 50 16") ;from elpa.spec |
| 8691 | (setenv "OMP_NUM_THREADS" |
| 8692 | (number->string (parallel-job-count))) |
| 8693 | (substitute* "Makefile" |
| 8694 | ;; Test scripts are generated, patch the shebang |
| 8695 | (("#!/bin/bash") |
| 8696 | (string-append "#!" (which "sh"))))))))) |
| 8697 | (native-inputs |
| 8698 | (list autoconf-2.71 |
| 8699 | automake |
| 8700 | libtool |
| 8701 | gfortran |
| 8702 | perl |
| 8703 | python)) |
| 8704 | (inputs (list openblas)) |
| 8705 | (home-page "https://elpa.mpcdf.mpg.de") |
| 8706 | (synopsis "Eigenvalue solvers for symmetric matrices") |
| 8707 | (description |
| 8708 | "The ELPA library provides efficient and scalable direct eigensolvers for |
| 8709 | symmetric matrices.") |
| 8710 | (license license:lgpl3) |
| 8711 | (properties '((tunable? . #t))))) |
| 8712 | |
| 8713 | (define-public elpa-openmpi |
| 8714 | (package/inherit elpa |
| 8715 | (name "elpa-openmpi") |
| 8716 | (inputs |
| 8717 | (modify-inputs inputs |
| 8718 | (prepend openmpi scalapack zlib))) |
| 8719 | (arguments |
| 8720 | (substitute-keyword-arguments arguments |
| 8721 | ((#:configure-flags cf #~()) |
| 8722 | #~(cons "--with-mpi=yes" |
| 8723 | (delete "--with-mpi=no" #$cf))) |
| 8724 | ((#:phases phases #~%standard-phases) |
| 8725 | #~(modify-phases #$phases |
| 8726 | (add-before 'check 'mpi-setup |
| 8727 | (lambda _ |
| 8728 | ;; Tests use 2 mpi tasks by default, use our remaining build |
| 8729 | ;; cores as OpenMP threads. |
| 8730 | (setenv "OMP_NUM_THREADS" |
| 8731 | (number->string (max (quotient (parallel-job-count) 2) |
| 8732 | 1))) |
| 8733 | (#$%openmpi-setup))))))) |
| 8734 | (synopsis "Eigenvalue solvers for symmetric matrices (with MPI support)"))) |
| 8735 | |
| 8736 | (define-public elemental |
| 8737 | ;; The build of 0.87.7 is failed for a long time due to new version of GCC. The |
| 8738 | ;; latest commit has fixes. |
| 8739 | ;; See https://github.com/elemental/Elemental/issues/254 |
| 8740 | (let ((commit "6eb15a0da2a4998bf1cf971ae231b78e06d989d9") |
| 8741 | (revision "0")) |
| 8742 | (package |
| 8743 | (name "elemental") |
| 8744 | (version (git-version "0.87.7" revision commit)) |
| 8745 | (source (origin |
| 8746 | (method git-fetch) |
| 8747 | (uri (git-reference |
| 8748 | (url "https://github.com/elemental/Elemental") |
| 8749 | (commit commit))) |
| 8750 | (file-name (git-file-name name version)) |
| 8751 | (sha256 |
| 8752 | (base32 |
| 8753 | "06xcs4ic60ndcf2hq19gr8yjwdsnphpcyhapab41rkw726z4lm7p")))) |
| 8754 | (build-system cmake-build-system) |
| 8755 | (arguments |
| 8756 | (list |
| 8757 | #:build-type "Release" ;default RelWithDebInfo not supported |
| 8758 | #:configure-flags |
| 8759 | #~(list "-DEL_DISABLE_PARMETIS:BOOL=YES" |
| 8760 | "-DEL_AVOID_COMPLEX_MPI:BOOL=NO" |
| 8761 | "-DEL_CACHE_WARNINGS:BOOL=YES" |
| 8762 | "-DEL_TESTS:BOOL=YES" |
| 8763 | "-DCMAKE_INSTALL_LIBDIR=lib" |
| 8764 | "-DGFORTRAN_LIB=gfortran") |
| 8765 | #:phases |
| 8766 | #~(modify-phases %standard-phases |
| 8767 | (add-before 'check 'mpi-setup |
| 8768 | #$%openmpi-setup) |
| 8769 | (add-before 'check 'setup-tests |
| 8770 | (lambda _ ;; Parallelism is done at the MPI layer. |
| 8771 | (setenv "OMP_NUM_THREADS" "1"))) |
| 8772 | (add-after 'install 'remove-tests |
| 8773 | (lambda _ |
| 8774 | ;; Tests are installed, with no easy configuration |
| 8775 | ;; switch to prevent this, so delete them. |
| 8776 | (delete-file-recursively |
| 8777 | (string-append #$output "/bin/test"))))))) |
| 8778 | (native-inputs |
| 8779 | (list gfortran)) |
| 8780 | (inputs |
| 8781 | (list `(,gfortran "lib") |
| 8782 | gmp |
| 8783 | metis |
| 8784 | mpc |
| 8785 | mpfr |
| 8786 | openmpi |
| 8787 | qd |
| 8788 | openblas)) |
| 8789 | (home-page "https://github.com/elemental/Elemental") |
| 8790 | (synopsis "Dense and sparse-direct linear algebra and optimization") |
| 8791 | (description "Elemental is a modern C++ library for distributed-memory |
| 8792 | dense and sparse-direct linear algebra, conic optimization, and lattice |
| 8793 | reduction.") |
| 8794 | (license license:bsd-2)))) |
| 8795 | |
| 8796 | (define-public mcrl2 |
| 8797 | (package |
| 8798 | (name "mcrl2") |
| 8799 | (version "202507.0") |
| 8800 | (source (origin |
| 8801 | (method url-fetch) |
| 8802 | (uri (string-append |
| 8803 | "https://www.mcrl2.org/download/release/mcrl2-" |
| 8804 | version ".tar.gz")) |
| 8805 | (sha256 |
| 8806 | (base32 |
| 8807 | "08w7v2dx1s164q3vc5lzf864nlxrf8s0kgsa26mmkgfqfqcwdgjj")))) |
| 8808 | (inputs |
| 8809 | (list boost glu mesa qtbase)) |
| 8810 | (build-system cmake-build-system) |
| 8811 | (arguments (list #:tests? #f)) |
| 8812 | (synopsis "Toolset for the mCRL2 formal specification language") |
| 8813 | (description |
| 8814 | "@dfn{mCRL2} (micro Common Representation Language 2) is a formal |
| 8815 | specification language for describing concurrent discrete event systems. Its |
| 8816 | toolset supports analysis and automatic verification, linearisation, simulation, |
| 8817 | state-space exploration and generation, and tools to optimise and analyse |
| 8818 | specifications. Also, state spaces can be manipulated, visualised and |
| 8819 | analysed.") |
| 8820 | (home-page "https://mcrl2.org") |
| 8821 | (license license:boost1.0))) |
| 8822 | |
| 8823 | (define-public mcrl2-minimal |
| 8824 | (package |
| 8825 | (inherit mcrl2) |
| 8826 | (name "mcrl2-minimal") |
| 8827 | (inputs |
| 8828 | (list boost)) |
| 8829 | (arguments |
| 8830 | (list #:tests? #f |
| 8831 | #:configure-flags #~(list "-DMCRL2_ENABLE_GUI_TOOLS=OFF"))))) |
| 8832 | |
| 8833 | (define-public tcalc |
| 8834 | (package |
| 8835 | (name "tcalc") |
| 8836 | (version "2.0") |
| 8837 | (source |
| 8838 | (origin |
| 8839 | (method url-fetch) |
| 8840 | (uri (string-append |
| 8841 | "https://drive.usercontent.google.com/download" |
| 8842 | "?id=1gICzFCnJEQk10n5ioqOVrSjHd4R_u0Eq")) |
| 8843 | (file-name (string-append "tcalc-" version ".tar.gz")) |
| 8844 | (sha256 |
| 8845 | (base32 |
| 8846 | "0jq806m4dqfia85nppfm75mml9w57g0cgv4cdw9bp3zymda83s0m")))) |
| 8847 | (build-system gnu-build-system) |
| 8848 | (arguments |
| 8849 | (list |
| 8850 | #:configure-flags #~(list "CFLAGS=-fcommon"))) |
| 8851 | (synopsis "The terminal calculator") |
| 8852 | (description |
| 8853 | "The terminal calculator is a small program to help users of the GNU/Linux |
| 8854 | terminal do calculations simply and quickly. The formula to be calculated can |
| 8855 | be fed to @command{tcalc} through the command line.") |
| 8856 | (home-page |
| 8857 | "https://sites.google.com/site/mohammedisam2000/tcalc-the-gnulinux-terminal-calculator") |
| 8858 | (license license:gpl3+))) |
| 8859 | |
| 8860 | (define-public tiny-bignum |
| 8861 | (let ((commit "1d7a1f9b8e77316187a6b3eae8e68d60a6f9a4d4")) |
| 8862 | (package |
| 8863 | (name "tiny-bignum") |
| 8864 | (version (git-version "0" "0" commit)) |
| 8865 | (source |
| 8866 | (origin |
| 8867 | (method git-fetch) |
| 8868 | (uri (git-reference |
| 8869 | (url "https://github.com/kokke/tiny-bignum-c") |
| 8870 | (commit commit))) |
| 8871 | (file-name (git-file-name "tiny-bignum" commit)) |
| 8872 | (sha256 |
| 8873 | (base32 "0vj71qlhlaa7d92bfar1kwqv6582dqrby8x3kdw0yzh82k2023g6")))) |
| 8874 | (build-system gnu-build-system) |
| 8875 | (arguments |
| 8876 | `(#:phases |
| 8877 | (modify-phases %standard-phases |
| 8878 | (delete 'configure) |
| 8879 | (add-after 'unpack 'patch-tests |
| 8880 | (lambda _ |
| 8881 | (substitute* "scripts/test_rand.py" |
| 8882 | (("\t") " ") |
| 8883 | (("\" % (\\w+)" _ symbol) (string-append "\" % int(" symbol ")"))) |
| 8884 | #t)) |
| 8885 | (replace 'check |
| 8886 | (lambda* (#:key tests? #:allow-other-keys) |
| 8887 | (when tests? |
| 8888 | (invoke "make" "test")) |
| 8889 | #t)) |
| 8890 | (replace 'install |
| 8891 | (lambda* (#:key outputs #:allow-other-keys) |
| 8892 | (let ((share (string-append (assoc-ref outputs "out") "/share")) |
| 8893 | (doc (string-append (assoc-ref outputs "out") "/doc"))) |
| 8894 | (mkdir-p share) |
| 8895 | (install-file "bn.c" share) |
| 8896 | (install-file "bn.h" share) |
| 8897 | (mkdir-p doc) |
| 8898 | (install-file "LICENSE" doc) |
| 8899 | (install-file "README.md" doc)) |
| 8900 | #t))))) |
| 8901 | (native-inputs |
| 8902 | `(("python" ,python-wrapper))) |
| 8903 | (home-page "https://github.com/kokke/tiny-bignum-c") |
| 8904 | (synopsis "Small portable multiple-precision unsigned integer arithmetic in C") |
| 8905 | (description |
| 8906 | "This library provides portable Arbitrary-precision unsigned integer |
| 8907 | arithmetic in C, for calculating with large numbers. Basic arithmetic (+, -, |
| 8908 | *, /, %) and bitwise operations (&, |, ^. <<, >>) plus increments, decrements |
| 8909 | and comparisons are supported.") |
| 8910 | (license license:unlicense)))) |
| 8911 | |
| 8912 | (define-public sundials |
| 8913 | (package |
| 8914 | (name "sundials") |
| 8915 | (version "7.1.1") |
| 8916 | (source |
| 8917 | (origin |
| 8918 | (method url-fetch) |
| 8919 | (uri (string-append "https://github.com/LLNL/sundials/releases/download/v" |
| 8920 | version "/sundials-" version ".tar.gz")) |
| 8921 | (sha256 |
| 8922 | (base32 |
| 8923 | "1fwlgbcdxz30dzsqw3y1b6ic1rhzfadghj7cq7yxsj14npgnwzga")))) |
| 8924 | (build-system cmake-build-system) |
| 8925 | (native-inputs |
| 8926 | (list pkg-config python-minimal-wrapper)) |
| 8927 | (inputs |
| 8928 | (list openblas suitesparse)) |
| 8929 | (arguments |
| 8930 | (list #:configure-flags |
| 8931 | #~(list "-DCMAKE_C_FLAGS=-O2 -g -fcommon" |
| 8932 | |
| 8933 | "-DSUNDIALS_INDEX_SIZE=32" |
| 8934 | ;; Incompatible with 32-bit indices. |
| 8935 | ;;"-DBUILD_FORTRAN_MODULE_INTERFACE:BOOL=ON" |
| 8936 | |
| 8937 | "-DEXAMPLES_ENABLE_C:BOOL=ON" |
| 8938 | "-DEXAMPLES_ENABLE_CXX:BOOL=ON" |
| 8939 | ;; Requires -DBUILD_FORTRAN_MODULE_INTERFACE:BOOL=ON. |
| 8940 | ;;"-DEXAMPLES_ENABLE_F2003:BOOL=ON" |
| 8941 | "-DEXAMPLES_INSTALL:BOOL=OFF" |
| 8942 | |
| 8943 | "-DENABLE_KLU:BOOL=ON" |
| 8944 | (string-append "-DKLU_INCLUDE_DIR=" |
| 8945 | (dirname |
| 8946 | (search-input-file %build-inputs |
| 8947 | "include/klu.h"))) |
| 8948 | (string-append "-DKLU_LIBRARY_DIR=" |
| 8949 | (dirname |
| 8950 | (search-input-file %build-inputs |
| 8951 | "lib/libklu.so")))))) |
| 8952 | (home-page "https://computation.llnl.gov/projects/sundials") |
| 8953 | (synopsis "Suite of nonlinear and differential/algebraic equation solvers") |
| 8954 | (description "SUNDIALS is a family of software packages implemented with |
| 8955 | the goal of providing robust time integrators and nonlinear solvers that can |
| 8956 | easily be incorporated into existing simulation codes.") |
| 8957 | (properties |
| 8958 | '((release-monitoring-url |
| 8959 | . "https://computing.llnl.gov/projects/sundials/sundials-software"))) |
| 8960 | (license license:bsd-3))) |
| 8961 | |
| 8962 | (define-public sundials-openmpi |
| 8963 | (package/inherit sundials |
| 8964 | (name "sundials-openmpi") |
| 8965 | (propagated-inputs |
| 8966 | (list openmpi |
| 8967 | ;; Support for the below requires MPI. |
| 8968 | hypre-openmpi |
| 8969 | petsc-openmpi)) |
| 8970 | (arguments |
| 8971 | (substitute-keyword-arguments arguments |
| 8972 | ((#:configure-flags flags #~()) |
| 8973 | #~(cons* "-DENABLE_MPI:BOOL=ON" |
| 8974 | "-DENABLE_HYPRE:BOOL=ON" |
| 8975 | (string-append "-DHYPRE_INCLUDE_DIR=" |
| 8976 | (dirname |
| 8977 | (search-input-file %build-inputs |
| 8978 | "include/HYPRE.h"))) |
| 8979 | (string-append "-DHYPRE_LIBRARY_DIR=" |
| 8980 | (dirname |
| 8981 | (search-input-file %build-inputs |
| 8982 | "lib/libHYPRE.so"))) |
| 8983 | "-DENABLE_PETSC:BOOL=ON" |
| 8984 | (string-append "-DPETSC_INCLUDE_DIRS=" |
| 8985 | (dirname |
| 8986 | (search-input-file %build-inputs |
| 8987 | "include/petsc.h"))) |
| 8988 | #$flags)) |
| 8989 | ((#:phases phases #~%standard-phases) |
| 8990 | #~(modify-phases #$phases |
| 8991 | (add-before 'check 'mpi-setup |
| 8992 | #$%openmpi-setup))))) |
| 8993 | (synopsis "SUNDIALS with MPI support"))) |
| 8994 | |
| 8995 | (define-public sundials-julia |
| 8996 | (package |
| 8997 | (inherit sundials) |
| 8998 | (name "sundials-julia") |
| 8999 | (version "5.2.0") |
| 9000 | (source |
| 9001 | (origin |
| 9002 | (method git-fetch) |
| 9003 | (uri (git-reference |
| 9004 | (url "https://github.com/LLNL/sundials") |
| 9005 | (commit (string-append "v" version)))) |
| 9006 | (file-name (git-file-name name version)) |
| 9007 | (sha256 |
| 9008 | (base32 |
| 9009 | "0nx4sqhmi126m14myzm7syv2053harav9snl0a247wnkcgs5rxrv")))) |
| 9010 | (inputs |
| 9011 | (modify-inputs inputs |
| 9012 | (prepend gfortran openblas))) |
| 9013 | (arguments |
| 9014 | '(#:configure-flags `("-DCMAKE_C_FLAGS=-O2 -g -fcommon" |
| 9015 | "-DSUNDIALS_INDEX_SIZE=32" |
| 9016 | "-DKLU_ENABLE:BOOL=ON" |
| 9017 | ,(string-append "-DKLU_INCLUDE_DIR=" |
| 9018 | (assoc-ref %build-inputs "suitesparse") |
| 9019 | "/include") |
| 9020 | ,(string-append "-DKLU_LIBRARY_DIR=" |
| 9021 | (assoc-ref %build-inputs "suitesparse") |
| 9022 | "/lib") |
| 9023 | "-DLAPACK_ENABLE:BOOL=ON"))) |
| 9024 | (synopsis "SUNDIALS with LAPACK support as required by julia-sundials-jll"))) |
| 9025 | |
| 9026 | (define-public combinatorial-blas |
| 9027 | (package |
| 9028 | (name "combinatorial-blas") |
| 9029 | (version "1.6.2") |
| 9030 | (source |
| 9031 | (origin |
| 9032 | (method url-fetch) |
| 9033 | (uri (string-append "http://eecs.berkeley.edu/~aydin/CombBLAS_FILES/" |
| 9034 | "CombBLAS_beta_" |
| 9035 | (match (string-split version #\.) |
| 9036 | ((major minor patch) |
| 9037 | (string-append major minor "_" patch))) ;e.g. "16_2" |
| 9038 | ".tgz")) |
| 9039 | (sha256 |
| 9040 | (base32 |
| 9041 | "0gzxgd2ybnh49h57rh47vrqnsyk11jn206j5kf9y7p5vksc79ffz")) |
| 9042 | (patches (search-patches "combinatorial-blas-awpm.patch" |
| 9043 | "combinatorial-blas-io-fix.patch")))) |
| 9044 | (build-system cmake-build-system) |
| 9045 | (inputs |
| 9046 | `(("mpi" ,openmpi) |
| 9047 | ("test-data" ,(origin |
| 9048 | (method url-fetch) |
| 9049 | (uri (string-append "https://people.eecs.berkeley.edu/~aydin/" |
| 9050 | "CombBLAS_FILES/testdata_combblas1.6.1.tgz")) |
| 9051 | (sha256 |
| 9052 | (base32 |
| 9053 | "01y2781cy3fww7znmidrp85mf8zx0c905w5vzvk1mgrmhhynim87")))))) |
| 9054 | (arguments |
| 9055 | `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES" |
| 9056 | "-DCMAKE_CXX_FLAGS=-DUSE_FUNNEL") |
| 9057 | #:parallel-tests? #f ;tests use 'mpiexec -n4' |
| 9058 | #:phases |
| 9059 | (modify-phases %standard-phases |
| 9060 | (add-after 'unpack 'fix-tests |
| 9061 | (lambda _ |
| 9062 | ;; Skip failing tests (SIGFPE and SIGSEGV). |
| 9063 | (substitute* "ReleaseTests/CMakeLists.txt" |
| 9064 | (("^.*SpAsgnTest.*$") "") |
| 9065 | (("^.*IndexingTest.*$") "")))) |
| 9066 | (add-before 'check 'mpi-setup |
| 9067 | ,%openmpi-setup) |
| 9068 | (add-before 'check 'test-setup |
| 9069 | (lambda* (#:key inputs #:allow-other-keys) |
| 9070 | (setenv "OMP_NUM_THREADS" "2") |
| 9071 | (invoke "tar" "xf" (assoc-ref inputs "test-data"))))))) |
| 9072 | (home-page "https://people.eecs.berkeley.edu/~aydin/CombBLAS/html/") |
| 9073 | (synopsis "Linear algebra primitives for graph analytics") |
| 9074 | (description "The Combinatorial BLAS (CombBLAS) is an extensible |
| 9075 | distributed-memory parallel graph library offering a small but powerful set of |
| 9076 | linear algebra primitives specifically targeting graph analytics.") |
| 9077 | (license (list |
| 9078 | license:gpl2+ ;include/psort/(funnel|sort)*.h |
| 9079 | license:x11 ;usort and psort |
| 9080 | license:bsd-3)))) ;CombBLAS and MersenneTwister.h |
| 9081 | |
| 9082 | (define-public dune-common |
| 9083 | (package |
| 9084 | (name "dune-common") |
| 9085 | (version "2.10.0") |
| 9086 | (source |
| 9087 | (origin |
| 9088 | (method url-fetch) |
| 9089 | (uri (string-append "https://dune-project.org/download/" |
| 9090 | version "/dune-common-" version ".tar.gz")) |
| 9091 | (sha256 |
| 9092 | (base32 |
| 9093 | "1pdgxlxb570fm7smk1zv9b3iq1wzjg6g0s4361xs2w5qrf6drh4l")) |
| 9094 | (patches (search-patches "dune-common-skip-failing-tests.patch")))) |
| 9095 | (build-system cmake-build-system) |
| 9096 | (arguments |
| 9097 | `(#:phases |
| 9098 | (modify-phases %standard-phases |
| 9099 | (add-after 'build 'build-tests |
| 9100 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9101 | (apply invoke "make" "build_tests" |
| 9102 | `(,@(if parallel-build? |
| 9103 | `("-j" ,(number->string (parallel-job-count))) |
| 9104 | '()) |
| 9105 | ,@make-flags))))))) |
| 9106 | (inputs |
| 9107 | (list gmp metis openblas python superlu)) |
| 9108 | (native-inputs |
| 9109 | (list gfortran pkg-config)) |
| 9110 | (home-page "https://dune-project.org/") |
| 9111 | (synopsis "Distributed and Unified Numerics Environment") |
| 9112 | (description "DUNE, the Distributed and Unified Numerics Environment is a |
| 9113 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with |
| 9114 | grid-based methods. It supports the easy implementation of methods like |
| 9115 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite |
| 9116 | Differences} (FD).") |
| 9117 | ;; GPL version 2 with "runtime exception" to make it behave like LGPLv2. |
| 9118 | (license license:gpl2))) |
| 9119 | |
| 9120 | (define-public dune-geometry |
| 9121 | (package |
| 9122 | (name "dune-geometry") |
| 9123 | (version "2.10.0") |
| 9124 | (source |
| 9125 | (origin |
| 9126 | (method url-fetch) |
| 9127 | (uri (string-append "https://dune-project.org/download/" |
| 9128 | version "/dune-geometry-" version ".tar.gz")) |
| 9129 | (sha256 |
| 9130 | (base32 |
| 9131 | "00vkidb931zvpq3nmw8ikyg8pr3jqisfq2qxwj9hqzj7634qms98")))) |
| 9132 | (build-system cmake-build-system) |
| 9133 | (arguments |
| 9134 | `(#:phases |
| 9135 | (modify-phases %standard-phases |
| 9136 | (add-after 'build 'build-tests |
| 9137 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9138 | (apply invoke "make" "build_tests" |
| 9139 | `(,@(if parallel-build? |
| 9140 | `("-j" ,(number->string (parallel-job-count))) |
| 9141 | '()) |
| 9142 | ,@make-flags))))))) |
| 9143 | (inputs |
| 9144 | (list dune-common |
| 9145 | ;; Optional |
| 9146 | openblas gmp python)) |
| 9147 | (native-inputs |
| 9148 | (list gfortran pkg-config)) |
| 9149 | (home-page "https://dune-project.org/") |
| 9150 | (synopsis "Distributed and Unified Numerics Environment") |
| 9151 | (description "DUNE, the Distributed and Unified Numerics Environment is a |
| 9152 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with |
| 9153 | grid-based methods. It supports the easy implementation of methods like |
| 9154 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite |
| 9155 | Differences} (FD). |
| 9156 | |
| 9157 | This package contains the basic DUNE geometry classes.") |
| 9158 | ;; GPL version 2 with "runtime exception" |
| 9159 | (license license:gpl2))) |
| 9160 | |
| 9161 | (define-public dune-uggrid |
| 9162 | (package |
| 9163 | (name "dune-uggrid") |
| 9164 | (version "2.10.0") |
| 9165 | (source |
| 9166 | (origin |
| 9167 | (method url-fetch) |
| 9168 | (uri (string-append "https://dune-project.org/download/" |
| 9169 | version "/dune-uggrid-" version ".tar.gz")) |
| 9170 | (sha256 |
| 9171 | (base32 |
| 9172 | "1wm1jy8ssfzpskhk7z34ahmw0q0iyna0dgph8kskv6j2i8v7skip")))) |
| 9173 | (build-system cmake-build-system) |
| 9174 | (arguments |
| 9175 | `(#:phases |
| 9176 | (modify-phases %standard-phases |
| 9177 | (add-after 'build 'build-tests |
| 9178 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9179 | (apply invoke "make" "build_tests" |
| 9180 | `(,@(if parallel-build? |
| 9181 | `("-j" ,(number->string (parallel-job-count))) |
| 9182 | '()) |
| 9183 | ,@make-flags))))))) |
| 9184 | (inputs |
| 9185 | (list dune-common)) |
| 9186 | (native-inputs |
| 9187 | (list gfortran pkg-config)) |
| 9188 | (home-page "https://dune-project.org/") |
| 9189 | (synopsis "Distributed and Unified Numerics Environment") |
| 9190 | (description "DUNE, the Distributed and Unified Numerics Environment is a |
| 9191 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with |
| 9192 | grid-based methods. It supports the easy implementation of methods like |
| 9193 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite |
| 9194 | Differences} (FD). |
| 9195 | |
| 9196 | This package contains the DUNE UG grid classes.") |
| 9197 | (license license:lgpl2.1))) |
| 9198 | |
| 9199 | (define-public dune-grid |
| 9200 | (package |
| 9201 | (name "dune-grid") |
| 9202 | (version "2.10.0") |
| 9203 | (source |
| 9204 | (origin |
| 9205 | (method url-fetch) |
| 9206 | (uri (string-append "https://dune-project.org/download/" |
| 9207 | version "/dune-grid-" version ".tar.gz")) |
| 9208 | (sha256 |
| 9209 | (base32 |
| 9210 | "0mh06g3sryx3s0d7zgzsz6j18vbzb0f46wq7aw6ahj2hswb7rsrg")))) |
| 9211 | (build-system cmake-build-system) |
| 9212 | (arguments |
| 9213 | `(#:phases |
| 9214 | (modify-phases %standard-phases |
| 9215 | (add-after 'build 'build-tests |
| 9216 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9217 | (apply invoke "make" "build_tests" |
| 9218 | `(,@(if parallel-build? |
| 9219 | `("-j" ,(number->string (parallel-job-count))) |
| 9220 | '()) |
| 9221 | ,@make-flags))))))) |
| 9222 | (inputs |
| 9223 | (list dune-common |
| 9224 | dune-geometry |
| 9225 | gmp |
| 9226 | metis |
| 9227 | openblas |
| 9228 | python)) |
| 9229 | (propagated-inputs |
| 9230 | (list dune-uggrid)) |
| 9231 | (native-inputs |
| 9232 | (list gfortran pkg-config)) |
| 9233 | (home-page "https://dune-project.org/") |
| 9234 | (synopsis "Distributed and Unified Numerics Environment") |
| 9235 | (description "DUNE, the Distributed and Unified Numerics Environment is a |
| 9236 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with |
| 9237 | grid-based methods. It supports the easy implementation of methods like |
| 9238 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite |
| 9239 | Differences} (FD). |
| 9240 | |
| 9241 | This package contains the basic DUNE grid classes.") |
| 9242 | ;; GPL version 2 with "runtime exception" |
| 9243 | (license license:gpl2))) |
| 9244 | |
| 9245 | (define-public dune-istl |
| 9246 | (package |
| 9247 | (name "dune-istl") |
| 9248 | (version "2.10.0") |
| 9249 | (source |
| 9250 | (origin |
| 9251 | (method url-fetch) |
| 9252 | (uri (string-append "https://dune-project.org/download/" |
| 9253 | version "/dune-istl-" version ".tar.gz")) |
| 9254 | (sha256 |
| 9255 | (base32 |
| 9256 | "0rk95rkj87gpb3gn40jl532rybs2lxkhn7g6b30m9kbzz7yfjfbc")))) |
| 9257 | (build-system cmake-build-system) |
| 9258 | (arguments |
| 9259 | `(#:phases |
| 9260 | (modify-phases %standard-phases |
| 9261 | ;; XXX: istl/test/matrixtest.cc includes <fenv.h> and fails to find |
| 9262 | ;; the stdlib types when the gfortran header is used. Remove gfortran |
| 9263 | ;; from CPLUS_INCLUDE_PATH as a workaround. |
| 9264 | (add-after 'set-paths 'hide-gfortran |
| 9265 | (lambda* (#:key inputs #:allow-other-keys) |
| 9266 | (let ((gfortran (assoc-ref inputs "gfortran"))) |
| 9267 | (setenv "CPLUS_INCLUDE_PATH" |
| 9268 | (string-join |
| 9269 | (delete (string-append gfortran "/include/c++") |
| 9270 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) |
| 9271 | ":")) |
| 9272 | #t))) |
| 9273 | (add-after 'build 'build-tests |
| 9274 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9275 | (apply invoke "make" "build_tests" |
| 9276 | `(,@(if parallel-build? |
| 9277 | `("-j" ,(number->string (parallel-job-count))) |
| 9278 | '()) |
| 9279 | ,@make-flags))))))) |
| 9280 | (inputs |
| 9281 | (list dune-common |
| 9282 | ;; Optional |
| 9283 | metis |
| 9284 | suitesparse |
| 9285 | superlu |
| 9286 | openblas |
| 9287 | gmp |
| 9288 | python)) |
| 9289 | (native-inputs |
| 9290 | (list gfortran pkg-config)) |
| 9291 | (home-page "https://dune-project.org/") |
| 9292 | (synopsis "Distributed and Unified Numerics Environment") |
| 9293 | (description "DUNE, the Distributed and Unified Numerics Environment is a |
| 9294 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with |
| 9295 | grid-based methods. |
| 9296 | |
| 9297 | This is the iterative solver template library which provides generic sparse |
| 9298 | matrix/vector classes and a variety of solvers based on these classes. A |
| 9299 | special feature is the use of templates to exploit the recursive block |
| 9300 | structure of finite element matrices at compile time. Available solvers |
| 9301 | include Krylov methods, (block-) incomplete decompositions and |
| 9302 | aggregation-based algebraic multigrid.") |
| 9303 | ;; GPL version 2 with "runtime exception" |
| 9304 | (license license:gpl2))) |
| 9305 | |
| 9306 | (define-public dune-localfunctions |
| 9307 | (package |
| 9308 | (name "dune-localfunctions") |
| 9309 | (version "2.10.0") |
| 9310 | (source |
| 9311 | (origin |
| 9312 | (method url-fetch) |
| 9313 | (uri (string-append "https://dune-project.org/download/" |
| 9314 | version "/dune-localfunctions-" version ".tar.gz")) |
| 9315 | (sha256 |
| 9316 | (base32 |
| 9317 | "0a5hyd7fps18178dq41nxa21h0i9ah6sw7di8qkc4i1rh052rzc1")))) |
| 9318 | (build-system cmake-build-system) |
| 9319 | (arguments |
| 9320 | `(#:phases |
| 9321 | (modify-phases %standard-phases |
| 9322 | ;; XXX: localfunctions/test/lagrangeshapefunctiontest.cc includes <fenv.h> |
| 9323 | ;; and fails to find the stdlib types when the gfortran header is used. |
| 9324 | ;; Hide gfortran from CPLUS_INCLUDE_PATH to ensure we get the GCC header. |
| 9325 | (add-after 'set-paths 'hide-gfortran |
| 9326 | (lambda* (#:key inputs #:allow-other-keys) |
| 9327 | (let ((gfortran (assoc-ref inputs "gfortran"))) |
| 9328 | (setenv "CPLUS_INCLUDE_PATH" |
| 9329 | (string-join |
| 9330 | (delete (string-append gfortran "/include/c++") |
| 9331 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) |
| 9332 | ":")) |
| 9333 | #t))) |
| 9334 | (add-after 'build 'build-tests |
| 9335 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9336 | (apply invoke "make" "build_tests" |
| 9337 | `(,@(if parallel-build? |
| 9338 | `("-j" ,(number->string (parallel-job-count))) |
| 9339 | '()) |
| 9340 | ,@make-flags))))))) |
| 9341 | (inputs |
| 9342 | (list dune-common |
| 9343 | dune-geometry |
| 9344 | ;; Optional |
| 9345 | metis |
| 9346 | superlu |
| 9347 | gmp)) |
| 9348 | (native-inputs |
| 9349 | (list gfortran pkg-config)) |
| 9350 | (home-page "https://dune-project.org/") |
| 9351 | (synopsis "Distributed and Unified Numerics Environment") ; TODO |
| 9352 | (description "This DUNE module provides interface and implementation for |
| 9353 | shape functions defined on the DUNE reference elements. In addition to the |
| 9354 | shape function, interpolation operators and special keys are provided which |
| 9355 | can be used to assemble global function spaces on finite-element grids. |
| 9356 | |
| 9357 | This package provides an interface and implementation for shape functions |
| 9358 | defined on the DUNE reference elements. In addition to the shape function, |
| 9359 | interpolation operators and special keys are provided which can be used to |
| 9360 | assemble global function spaces on finite-element grids.") |
| 9361 | ;; GPL version 2 with "runtime exception" |
| 9362 | (license license:gpl2))) |
| 9363 | |
| 9364 | (define-public dune-alugrid |
| 9365 | (package |
| 9366 | (name "dune-alugrid") |
| 9367 | (version "2.10.0") |
| 9368 | (source |
| 9369 | (origin |
| 9370 | (method git-fetch) |
| 9371 | (uri (git-reference |
| 9372 | (url "https://gitlab.dune-project.org/extensions/dune-alugrid.git") |
| 9373 | (commit (string-append "v" version)))) |
| 9374 | (file-name (git-file-name name version)) |
| 9375 | (sha256 |
| 9376 | (base32 |
| 9377 | "0289vqf9azhgqda04qa5prn201xnsd9i0r8gy6jn0g6wfy9bcpav")))) |
| 9378 | (build-system cmake-build-system) |
| 9379 | (arguments |
| 9380 | `(#:phases |
| 9381 | (modify-phases %standard-phases |
| 9382 | (add-after 'unpack 'patch-include |
| 9383 | (lambda _ |
| 9384 | (substitute* "dune/alugrid/test/test-alugrid.cc" |
| 9385 | (("doc/grids/gridfactory/testgrids") |
| 9386 | "doc/dune-grid/grids/gridfactory/testgrids")) |
| 9387 | #t)) |
| 9388 | (add-after 'build 'build-tests |
| 9389 | (lambda* (#:key inputs make-flags parallel-build? #:allow-other-keys) |
| 9390 | (setenv "CPLUS_INCLUDE_PATH" |
| 9391 | (string-append (assoc-ref inputs "dune-grid") "/share")) |
| 9392 | (apply invoke "make" "build_tests" |
| 9393 | `(,@(if parallel-build? |
| 9394 | `("-j" ,(number->string (parallel-job-count))) |
| 9395 | '()) |
| 9396 | ,@make-flags))))))) |
| 9397 | (inputs |
| 9398 | (list dune-common |
| 9399 | dune-geometry |
| 9400 | dune-grid |
| 9401 | ;; Optional |
| 9402 | metis |
| 9403 | openblas |
| 9404 | python |
| 9405 | superlu |
| 9406 | gmp |
| 9407 | zlib)) |
| 9408 | (native-inputs |
| 9409 | (list gfortran pkg-config)) |
| 9410 | (home-page "https://dune-project.org/") |
| 9411 | (synopsis "Distributed and Unified Numerics Environment") |
| 9412 | (description "ALUGrid is an adaptive, loadbalancing, unstructured |
| 9413 | implementation of the DUNE grid interface supporting either simplices or |
| 9414 | cubes.") |
| 9415 | (license license:gpl2+))) |
| 9416 | |
| 9417 | (define-public dune-subgrid |
| 9418 | ; dune-subgrid does not tag its releases. |
| 9419 | ; The following commit is the last commit on the releases/2.10 branch |
| 9420 | ; as of 2024-11-14. |
| 9421 | (let ((commit "e71cc9c2514356c7cd989f0c13661f10c37c58df")) |
| 9422 | (package |
| 9423 | (name "dune-subgrid") |
| 9424 | (version (git-version "2.10.0" "1" commit)) |
| 9425 | (source |
| 9426 | (origin |
| 9427 | (method git-fetch) |
| 9428 | (uri (git-reference |
| 9429 | (url "https://gitlab.dune-project.org/extensions/dune-subgrid") |
| 9430 | (commit commit))) |
| 9431 | (file-name (git-file-name name version)) |
| 9432 | (sha256 |
| 9433 | (base32 |
| 9434 | "1vahmj2r9r684n8rgnqqb8zhi3wibkxjsv1kql804azx71dslx0d")))) |
| 9435 | (build-system cmake-build-system) |
| 9436 | (arguments |
| 9437 | `(#:phases |
| 9438 | (modify-phases %standard-phases |
| 9439 | (add-after 'build 'build-tests |
| 9440 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9441 | (apply invoke "make" "build_tests" |
| 9442 | `(,@(if parallel-build? |
| 9443 | `("-j" ,(number->string (parallel-job-count))) |
| 9444 | '()) |
| 9445 | ,@make-flags))))))) |
| 9446 | (inputs |
| 9447 | (list dune-common |
| 9448 | dune-geometry |
| 9449 | dune-grid |
| 9450 | ;; Optional |
| 9451 | metis |
| 9452 | openblas |
| 9453 | gmp)) |
| 9454 | (native-inputs |
| 9455 | (list gfortran pkg-config)) |
| 9456 | (home-page "http://numerik.mi.fu-berlin.de/dune-subgrid/index.php") |
| 9457 | (synopsis "Distributed and Unified Numerics Environment") |
| 9458 | (description "The dune-subgrid module marks elements of |
| 9459 | another hierarchical dune grid. The set of marked elements can then be |
| 9460 | accessed as a hierarchical dune grid in its own right. Dune-Subgrid |
| 9461 | provides the full grid interface including adaptive mesh refinement.") |
| 9462 | (license license:gpl2+)))) |
| 9463 | |
| 9464 | (define-public dune-typetree |
| 9465 | (package |
| 9466 | (name "dune-typetree") |
| 9467 | (version "2.10.0") |
| 9468 | (source |
| 9469 | (origin |
| 9470 | (method url-fetch) |
| 9471 | (uri (string-append "https://dune-project.org/download/" |
| 9472 | version "/dune-typetree-" version ".tar.gz")) |
| 9473 | (sha256 |
| 9474 | (base32 |
| 9475 | "0k756c543r79jz51jfnvi6knnxv7y19xg69yb15b0hrv4gq015pf")))) |
| 9476 | (build-system cmake-build-system) |
| 9477 | (arguments |
| 9478 | `(#:phases |
| 9479 | (modify-phases %standard-phases |
| 9480 | (add-after 'build 'build-tests |
| 9481 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9482 | (apply invoke "make" "build_tests" |
| 9483 | `(,@(if parallel-build? |
| 9484 | `("-j" ,(number->string (parallel-job-count))) |
| 9485 | '()) |
| 9486 | ,@make-flags))))))) |
| 9487 | (inputs |
| 9488 | (list dune-common |
| 9489 | ;; Optional |
| 9490 | openblas |
| 9491 | python |
| 9492 | metis |
| 9493 | superlu |
| 9494 | gmp)) |
| 9495 | (native-inputs |
| 9496 | (list gfortran pkg-config)) |
| 9497 | (home-page "https://dune-project.org/") |
| 9498 | (synopsis "Distributed and Unified Numerics Environment") |
| 9499 | (description "TypeTree is a template library for constructing and |
| 9500 | operating on statically typed trees of objects.") |
| 9501 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. |
| 9502 | (license (list license:lgpl3+ license:gpl2)))) |
| 9503 | |
| 9504 | (define-public dune-functions |
| 9505 | (package |
| 9506 | (name "dune-functions") |
| 9507 | (version "2.10.0") |
| 9508 | (source |
| 9509 | (origin |
| 9510 | (method url-fetch) |
| 9511 | (uri (string-append "https://dune-project.org/download/" |
| 9512 | version "/dune-functions-" version ".tar.gz")) |
| 9513 | (sha256 |
| 9514 | (base32 |
| 9515 | "1v2yyiqacspa7fkz5pbhd9hcz8rk5bhyhlhwvr3jjgmniiy0x2hp")))) |
| 9516 | (build-system cmake-build-system) |
| 9517 | (arguments |
| 9518 | `(#:phases |
| 9519 | (modify-phases %standard-phases |
| 9520 | (add-after 'unpack 'disable-failing-tests |
| 9521 | (lambda _ |
| 9522 | (setenv "ARGS" |
| 9523 | ;; unable to load GMSH file in this test |
| 9524 | "--exclude-regex gridviewfunctionspacebasistest") |
| 9525 | #t)) |
| 9526 | (add-after 'build 'build-tests |
| 9527 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9528 | (apply invoke "make" "build_tests" |
| 9529 | `(,@(if parallel-build? |
| 9530 | `("-j" ,(number->string (parallel-job-count))) |
| 9531 | '()) |
| 9532 | ,@make-flags))))))) |
| 9533 | (inputs |
| 9534 | (list dune-common |
| 9535 | dune-istl |
| 9536 | dune-localfunctions |
| 9537 | dune-grid |
| 9538 | dune-geometry |
| 9539 | dune-typetree |
| 9540 | openblas |
| 9541 | metis |
| 9542 | python |
| 9543 | superlu |
| 9544 | gmp)) |
| 9545 | (native-inputs |
| 9546 | (list gfortran pkg-config)) |
| 9547 | (home-page "https://dune-project.org/") |
| 9548 | (synopsis "Distributed and Unified Numerics Environment") |
| 9549 | (description "The dune-functions module provides an abstraction layer for |
| 9550 | global finite element functions. Its two main concepts are functions |
| 9551 | implemented as callable objects, and bases of finite element spaces.") |
| 9552 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. |
| 9553 | (license (list license:lgpl3+ license:gpl2)))) |
| 9554 | |
| 9555 | (define-public dune-pdelab |
| 9556 | ;; This was the last commit on the releases/2.8 branch as of 2023-04-12, |
| 9557 | ;; unfortunately there was no tag for any 2.8 release. |
| 9558 | (let ((commit "d5dddb6b1c21b95e867ff53cca159ad676689f5c")) |
| 9559 | (package |
| 9560 | (name "dune-pdelab") |
| 9561 | (version (git-version "2.8.0" "0" commit)) |
| 9562 | (source |
| 9563 | (origin |
| 9564 | (method git-fetch) |
| 9565 | (uri (git-reference |
| 9566 | (url "https://gitlab.dune-project.org/pdelab/dune-pdelab") |
| 9567 | (commit commit))) |
| 9568 | (file-name (git-file-name name version)) |
| 9569 | (sha256 |
| 9570 | (base32 |
| 9571 | "0l2idjp59a6x46vdd30xhhsnv7chql0z7msdsyra2h6pqm6xiqxk")))) |
| 9572 | (build-system cmake-build-system) |
| 9573 | (arguments '(#:tests? #f)) ; XXX: the tests cannot be compiled |
| 9574 | (inputs |
| 9575 | (list dune-common |
| 9576 | dune-istl |
| 9577 | dune-localfunctions |
| 9578 | dune-geometry |
| 9579 | dune-grid |
| 9580 | dune-typetree |
| 9581 | dune-functions |
| 9582 | ;; Optional |
| 9583 | openblas |
| 9584 | eigen |
| 9585 | metis |
| 9586 | python |
| 9587 | superlu |
| 9588 | gmp)) |
| 9589 | (native-inputs |
| 9590 | (list gfortran pkg-config)) |
| 9591 | (home-page "https://dune-project.org/") |
| 9592 | (synopsis "Differential equations solver toolbox") |
| 9593 | (description "PDELab is a partial differential equations solver toolbox |
| 9594 | built on top of DUNE, the Distributed and Unified Numerics Environment.") |
| 9595 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. |
| 9596 | (license (list license:lgpl3+ license:gpl2))))) |
| 9597 | |
| 9598 | (define add-openmpi-to-dune-package |
| 9599 | (let ((dune-package? |
| 9600 | (lambda (p) (string-prefix? "dune-" (package-name p))))) |
| 9601 | (package-mapping |
| 9602 | (lambda (p) |
| 9603 | (if (dune-package? p) |
| 9604 | (package (inherit p) |
| 9605 | (name (string-append (package-name p) "-openmpi")) |
| 9606 | (inputs (modify-inputs inputs |
| 9607 | (append openmpi))) |
| 9608 | (arguments |
| 9609 | (substitute-keyword-arguments arguments |
| 9610 | ((#:phases phases '%standard-phases) |
| 9611 | `(modify-phases ,phases |
| 9612 | (add-before 'check 'mpi-setup |
| 9613 | ,%openmpi-setup))))) |
| 9614 | (synopsis (string-append (package-synopsis p) " (with MPI support)"))) |
| 9615 | p)) |
| 9616 | (negate dune-package?)))) |
| 9617 | |
| 9618 | (define-public dune-common-openmpi |
| 9619 | (add-openmpi-to-dune-package dune-common)) |
| 9620 | |
| 9621 | (define-public dune-geometry-openmpi |
| 9622 | (add-openmpi-to-dune-package dune-geometry)) |
| 9623 | |
| 9624 | (define-public dune-istl-openmpi |
| 9625 | (add-openmpi-to-dune-package dune-istl)) |
| 9626 | |
| 9627 | (define-public dune-typetree-openmpi |
| 9628 | (add-openmpi-to-dune-package dune-typetree)) |
| 9629 | |
| 9630 | (define-public dune-uggrid-openmpi |
| 9631 | (add-openmpi-to-dune-package dune-uggrid)) |
| 9632 | |
| 9633 | (define-public dune-grid-openmpi |
| 9634 | (add-openmpi-to-dune-package dune-grid)) |
| 9635 | |
| 9636 | (define-public dune-alugrid-openmpi |
| 9637 | (add-openmpi-to-dune-package dune-alugrid)) |
| 9638 | |
| 9639 | (define-public dune-subgrid-openmpi |
| 9640 | (add-openmpi-to-dune-package dune-subgrid)) |
| 9641 | |
| 9642 | (define-public dune-localfunctions-openmpi |
| 9643 | (add-openmpi-to-dune-package dune-localfunctions)) |
| 9644 | |
| 9645 | (define-public dune-functions-openmpi |
| 9646 | (add-openmpi-to-dune-package dune-functions)) |
| 9647 | |
| 9648 | (define-public dune-pdelab-openmpi |
| 9649 | (add-openmpi-to-dune-package dune-pdelab)) |
| 9650 | |
| 9651 | (define-public nauty |
| 9652 | (package |
| 9653 | (name "nauty") |
| 9654 | (version "2.9.3") |
| 9655 | (source |
| 9656 | (origin |
| 9657 | (method url-fetch) |
| 9658 | (uri (string-append |
| 9659 | "https://pallini.di.uniroma1.it/" |
| 9660 | "nauty" (string-join (string-split version #\.) "_") ".tar.gz")) |
| 9661 | (sha256 |
| 9662 | (base32 "0nqvri1jfi95xswrcvn9dkyriy7pkjry6nwqhdc0z2pq0jpfvi4z")))) |
| 9663 | (build-system gnu-build-system) |
| 9664 | (outputs '("out" "lib")) |
| 9665 | (arguments |
| 9666 | (list |
| 9667 | #:test-target "checks" |
| 9668 | #:configure-flags #~(list "--enable-generic") ;prevent -march-native |
| 9669 | #:phases |
| 9670 | #~(modify-phases %standard-phases |
| 9671 | (add-after 'unpack 'normalize-pkgconfig-files-location |
| 9672 | (lambda _ |
| 9673 | (substitute* "makefile.in" |
| 9674 | (("^(pkgconfigexecdir=).*" _ prefix) |
| 9675 | (string-append prefix "${libdir}/pkgconfig\n")))))))) |
| 9676 | (inputs (list gmp)) ;for sumlines |
| 9677 | (home-page "https://pallini.di.uniroma1.it/") |
| 9678 | (synopsis "Library for graph automorphisms") |
| 9679 | (description "@code{nauty} (No AUTomorphisms, Yes?) is a set of |
| 9680 | procedures for computing automorphism groups of graphs and digraphs. |
| 9681 | |
| 9682 | @code{nauty} computes graph information in the form of a set of |
| 9683 | generators, the size of the group, and the orbits of the group; it can |
| 9684 | also produce a canonical label. The @code{nauty} suite is written in |
| 9685 | C and comes with a command-line interface, a collection of |
| 9686 | command-line tools, and an Application Programming Interface (API). |
| 9687 | |
| 9688 | This package provides the static libraries required to run programs |
| 9689 | compiled against the nauty library.") |
| 9690 | (license license:asl2.0))) |
| 9691 | |
| 9692 | (define-public nodesoup |
| 9693 | (package |
| 9694 | (name "nodesoup") |
| 9695 | ;; Package has no release, using the latest commit. |
| 9696 | (properties '((commit . "3158ad082bb0cd1abee75418b12b35522dbca74f") |
| 9697 | (revision . "0"))) |
| 9698 | (version (git-version "0.1.0" ;CMakeLists.txt shows this version. |
| 9699 | (assoc-ref properties 'revision) |
| 9700 | (assoc-ref properties 'commit))) |
| 9701 | (source |
| 9702 | (origin |
| 9703 | (method git-fetch) |
| 9704 | (uri (git-reference |
| 9705 | (url "https://github.com/olvb/nodesoup") |
| 9706 | (commit (assoc-ref properties 'commit)))) |
| 9707 | (file-name (git-file-name name version)) |
| 9708 | (sha256 |
| 9709 | (base32 "0ahx04jh4743v84ckn670yc1qz62nqf7bb75fappnlxp03lyllml")))) |
| 9710 | (build-system cmake-build-system) |
| 9711 | (arguments |
| 9712 | (list #:tests? #f ;No tests provided by package. |
| 9713 | #:configure-flags |
| 9714 | #~(list "-DBUILD_DEMO=OFF" |
| 9715 | "-DBUILD_SHARED_LIBS=ON"))) |
| 9716 | (native-inputs (list pkg-config)) |
| 9717 | (inputs (list cairo)) |
| 9718 | (home-page "https://github.com/olvb/nodesoup") |
| 9719 | (synopsis "C++ implementation of Fruchterman-Reingold and Kamada Kawai algorithms") |
| 9720 | (description "This library implements the Fruchterman-Reingold force-directed |
| 9721 | graph layout algorithm. It applies repulsion between all vertex pairs (to avoid overlap) |
| 9722 | and attraction between connected vertices (to pull them together). Forces decay with |
| 9723 | distance, and a global temperature limits maximum displacement per iteration, causing the |
| 9724 | layout to sta0bilize gradually.") |
| 9725 | (license license:unlicense))) |
| 9726 | |
| 9727 | (define-public speedcrunch |
| 9728 | (package |
| 9729 | (name "speedcrunch") |
| 9730 | (version "0.12.0") |
| 9731 | (source |
| 9732 | (origin |
| 9733 | (method git-fetch) |
| 9734 | (uri (git-reference |
| 9735 | (url "https://bitbucket.org/heldercorreia/speedcrunch.git") |
| 9736 | (commit (string-append "release-" version)))) |
| 9737 | (file-name (git-file-name name version)) |
| 9738 | (sha256 |
| 9739 | (base32 |
| 9740 | "0vh7cd1915bjqzkdp3sk25ngy8cq624mkh8c53c5bnzk357kb0fk")))) |
| 9741 | (build-system qt-build-system) |
| 9742 | (inputs (list qtbase-5 qtwayland-5)) |
| 9743 | (native-inputs (list qttools-5)) |
| 9744 | (arguments |
| 9745 | `(#:phases |
| 9746 | (modify-phases %standard-phases |
| 9747 | (add-after 'unpack 'chdir-to-src |
| 9748 | (lambda _ (chdir "src") #t))))) |
| 9749 | (synopsis "High-precision scientific calculator") |
| 9750 | (description |
| 9751 | "SpeedCrunch is a high-precision scientific calculator. It features a |
| 9752 | syntax-highlighted scrollable display and is designed to be fully used via |
| 9753 | keyboard. Some distinctive features are auto-completion of functions and |
| 9754 | variables, a formula book, and quick insertion of constants from various |
| 9755 | fields of knowledge.") |
| 9756 | (home-page "https://speedcrunch.org/") |
| 9757 | (license license:gpl2+))) |
| 9758 | |
| 9759 | (define-public minisat |
| 9760 | ;; This is the last commit which is available upstream, no |
| 9761 | ;; release happened since 2010. |
| 9762 | (let ((commit "37dc6c67e2af26379d88ce349eb9c4c6160e8543") |
| 9763 | (revision "1")) |
| 9764 | (package |
| 9765 | (name "minisat") |
| 9766 | (version (string-append "2.2.0-" revision "." (string-take commit 7))) |
| 9767 | (source |
| 9768 | (origin |
| 9769 | (method git-fetch) |
| 9770 | (uri (git-reference |
| 9771 | (url "https://github.com/niklasso/minisat") |
| 9772 | (commit commit))) |
| 9773 | (file-name (string-append name "-" version "-checkout")) |
| 9774 | (sha256 |
| 9775 | (base32 |
| 9776 | "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq")) |
| 9777 | (patches |
| 9778 | (search-patches "minisat-friend-declaration.patch" |
| 9779 | "minisat-install.patch")))) |
| 9780 | (build-system gnu-build-system) |
| 9781 | (arguments |
| 9782 | '(#:make-flags (list (string-append "prefix=" %output)) |
| 9783 | #:tests? #f ;no check target |
| 9784 | #:phases |
| 9785 | (modify-phases %standard-phases |
| 9786 | (delete 'configure)))) |
| 9787 | (inputs |
| 9788 | `(("zlib:static" ,zlib "static") |
| 9789 | ("zlib" ,zlib))) |
| 9790 | (synopsis |
| 9791 | "Small, yet efficient, SAT solver") |
| 9792 | (description |
| 9793 | "MiniSat is a minimalistic, open-source SAT solver, developed to help |
| 9794 | researchers and developers alike to get started on SAT.") |
| 9795 | (home-page |
| 9796 | "http://minisat.se/MiniSat.html") |
| 9797 | (license license:expat)))) |
| 9798 | |
| 9799 | (define-public kissat |
| 9800 | (package |
| 9801 | (name "kissat") |
| 9802 | (version "4.0.4") |
| 9803 | (source |
| 9804 | (origin |
| 9805 | (method git-fetch) |
| 9806 | (uri (git-reference |
| 9807 | (url "https://github.com/arminbiere/kissat") |
| 9808 | (commit (string-append "rel-" version)))) |
| 9809 | (file-name (git-file-name name version)) |
| 9810 | (sha256 |
| 9811 | (base32 |
| 9812 | "1snimig4cp97p570nin2i38my72zvwypldyhr125i1z6cd9pa046")))) |
| 9813 | (build-system gnu-build-system) |
| 9814 | (inputs (list xz gzip lzip bzip2 p7zip)) |
| 9815 | (native-inputs (list drat-trim)) |
| 9816 | (arguments |
| 9817 | (list |
| 9818 | #:test-target "test" |
| 9819 | #:configure-flags #~(list "-shared") |
| 9820 | #:phases |
| 9821 | #~(modify-phases %standard-phases |
| 9822 | (add-after 'unpack 'patch-source |
| 9823 | (lambda* (#:key inputs #:allow-other-keys) |
| 9824 | (substitute* "test/testfile.c" |
| 9825 | ;; Don't check if /etc/passwd isn't writable. |
| 9826 | ;; When building in a container/chroot, this fails spuriously. |
| 9827 | ((".*/etc/passwd.*") "")) |
| 9828 | (substitute* "scripts/generate-build-header.sh" |
| 9829 | ;; by default BUILD includes the build date which |
| 9830 | ;; makes the build not reproducible. |
| 9831 | (("^BUILD=.*$") |
| 9832 | "BUILD=guix\n")) |
| 9833 | (substitute* "src/file.c" |
| 9834 | (("(bzip2|gzip|lzma|xz) -c" all cmd) |
| 9835 | (string-append (search-input-file inputs |
| 9836 | (string-append "bin/" cmd)) |
| 9837 | " -c")) |
| 9838 | (("7z ([ax])" all mode) |
| 9839 | (string-append (search-input-file inputs "bin/7z") |
| 9840 | " " mode)) |
| 9841 | ;; Since we hard-coded the paths, we no longer need to find |
| 9842 | ;; them. |
| 9843 | (("bool found = kissat_find_executable \\(name\\);") |
| 9844 | "bool found = true;")) |
| 9845 | (substitute* "test/testmain.c" |
| 9846 | ;; SIGINT is ignored inside invoke. |
| 9847 | (("^[ \t]*SIGNAL[ \t]*\\(SIGINT\\)") "")))) |
| 9848 | (replace 'configure |
| 9849 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 9850 | ;; The configure script does not support standard GNU options. |
| 9851 | (apply invoke "./configure" configure-flags))) |
| 9852 | (replace 'install |
| 9853 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 9854 | (let ((out (assoc-ref outputs "out"))) |
| 9855 | (install-file "build/kissat" (string-append out "/bin")) |
| 9856 | (install-file "build/libkissat.so" (string-append out "/lib")) |
| 9857 | (install-file "src/kissat.h" |
| 9858 | (string-append out "/include")))))))) |
| 9859 | (home-page "https://github.com/arminbiere/kissat") |
| 9860 | (synopsis "Bare-metal SAT solver") |
| 9861 | (description |
| 9862 | "Kissat is a bare-metal SAT-solver written in C. It is a port of CaDiCaL |
| 9863 | back to C with improved data structures, better scheduling of inprocessing and |
| 9864 | optimized algorithms and implementation.") |
| 9865 | (license license:expat))) |
| 9866 | |
| 9867 | (define-public aiger |
| 9868 | (package |
| 9869 | (name "aiger") |
| 9870 | (version "1.9.20") |
| 9871 | (source (origin |
| 9872 | (method git-fetch) |
| 9873 | (uri (git-reference |
| 9874 | (url "https://github.com/arminbiere/aiger") |
| 9875 | (commit (string-append "rel-" version)))) |
| 9876 | (file-name (git-file-name name version)) |
| 9877 | (sha256 |
| 9878 | (base32 |
| 9879 | "1bjm3362l6qskmfi0gyz2h30cr157xkv8yjivmm9iwl37chk22c2")))) |
| 9880 | (outputs (list "out" "static")) |
| 9881 | (build-system gnu-build-system) |
| 9882 | (arguments |
| 9883 | (list #:make-flags #~(list (string-append "CFLAGS=-g -O2")) |
| 9884 | #:phases |
| 9885 | #~(modify-phases %standard-phases |
| 9886 | (add-after 'unpack 'patch-source |
| 9887 | (lambda* (#:key inputs #:allow-other-keys) |
| 9888 | (substitute* "aiger.c" |
| 9889 | (("\"(gzip|xz)" all cmd) |
| 9890 | (string-append |
| 9891 | "\"" |
| 9892 | (search-input-file inputs (string-append "bin/" cmd))))))) |
| 9893 | (add-after 'unpack 'patch-build-files |
| 9894 | (lambda _ |
| 9895 | (substitute* "makefile.in" |
| 9896 | (("test -d .*") "true") |
| 9897 | (("/usr/local") #$output)))) |
| 9898 | (replace 'configure |
| 9899 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 9900 | (apply invoke "./configure.sh" configure-flags))) |
| 9901 | (add-after 'install 'install-static |
| 9902 | (lambda _ |
| 9903 | (apply invoke #$(ar-for-target) "rcs" "libaiger.a" |
| 9904 | (find-files "." "\\.o$")) |
| 9905 | (let* ((lib (string-append #$output:static "/lib")) |
| 9906 | (incl (string-append #$output:static "/include/aiger"))) |
| 9907 | (mkdir-p lib) |
| 9908 | (mkdir-p incl) |
| 9909 | (install-file "libaiger.a" lib) |
| 9910 | (for-each (lambda (f) (install-file f incl)) |
| 9911 | (find-files "." "\\.h$"))))) |
| 9912 | (replace 'check |
| 9913 | (lambda* (#:key tests? #:allow-other-keys) |
| 9914 | (when tests? |
| 9915 | (setenv "CC" #$(cc-for-target)) |
| 9916 | (invoke "make" "-f" "test.mk"))))))) |
| 9917 | (inputs (list gzip xz)) |
| 9918 | (home-page "https://fmv.jku.at/aiger") |
| 9919 | (synopsis "Utilities for And-Inverter Graphs") |
| 9920 | (description "AIGER is a format, library and set of utilities for |
| 9921 | @acronym{AIG, And-Inverter Graphs}s. The focus is on conversion utilities and a |
| 9922 | generic reader and writer API.") |
| 9923 | (license (list license:expat |
| 9924 | license:bsd-3)))) ; bliftoaig |
| 9925 | |
| 9926 | (define-public cudd |
| 9927 | (package |
| 9928 | (name "cudd") |
| 9929 | (version "3.0.0") |
| 9930 | (source (origin |
| 9931 | (method git-fetch) |
| 9932 | (uri (git-reference |
| 9933 | (url "https://github.com/cuddorg/cudd") |
| 9934 | (commit (string-append "cudd-" version)))) |
| 9935 | (file-name (git-file-name name version)) |
| 9936 | (sha256 |
| 9937 | (base32 |
| 9938 | "0hyw9q42ir92vcaa7bwv6f631n85rfsxp463rnmklniq1wf6dyn9")))) |
| 9939 | (build-system gnu-build-system) |
| 9940 | (arguments (list #:configure-flags #~(list "--enable-shared"))) |
| 9941 | (native-inputs |
| 9942 | (list gcc-13)) ;XXX: 1 test fails with gcc@14. |
| 9943 | ;; The original home-page was lost to time, so we reference the "unofficial" |
| 9944 | ;; Github mirror. For what it's worth, the author of the library appears to |
| 9945 | ;; have been involved with this mirror at some point in time. |
| 9946 | (home-page "https://github.com/cuddorg/cudd") |
| 9947 | (synopsis "Manipulate decision diagrams") |
| 9948 | (description "@acronym{CUDD, Colorado University Decision Diagrams} is a |
| 9949 | library for manipulating decision diagrams. It supports binary decision |
| 9950 | diagrams, algebraic decision diagrams, and zero-suppressed binary decision |
| 9951 | diagrams.") |
| 9952 | (license license:bsd-3))) |
| 9953 | |
| 9954 | (define-public libpoly |
| 9955 | (package |
| 9956 | (name "libpoly") |
| 9957 | (version "0.2.1") |
| 9958 | (source (origin |
| 9959 | (method git-fetch) |
| 9960 | (uri (git-reference |
| 9961 | (url "https://github.com/SRI-CSL/libpoly") |
| 9962 | (commit (string-append "v" version)))) |
| 9963 | (file-name (git-file-name name version)) |
| 9964 | (sha256 |
| 9965 | (base32 |
| 9966 | "1nyiddvxzziagz7zrl2in8k1mypaj8z7vmm633h9mk4iiy586ddq")))) |
| 9967 | (build-system cmake-build-system) |
| 9968 | (inputs (list gmp)) |
| 9969 | (native-inputs |
| 9970 | (list python-minimal-wrapper)) |
| 9971 | (home-page "https://github.com/SRI-CSL/libpoly") |
| 9972 | (synopsis "Manipulate polynomials") |
| 9973 | (description "LibPoly is a C library for manipulating polynomials to support |
| 9974 | symbolic reasoning engines that need to reason about polynomial constraints.") |
| 9975 | (license license:lgpl3+))) |
| 9976 | |
| 9977 | (define-public libtaylor |
| 9978 | ;; Project proves no release or tagged versions, use the latest commit. |
| 9979 | (let ((commit "88709f03efda5b81ff460ccef67d4fd0e7d050cc") |
| 9980 | (revision "0")) |
| 9981 | (package |
| 9982 | (name "libtaylor") |
| 9983 | (version (git-version "0" revision commit)) |
| 9984 | (source |
| 9985 | (origin |
| 9986 | (method git-fetch) |
| 9987 | (uri (git-reference |
| 9988 | (url "https://github.com/uekstrom/libtaylor") |
| 9989 | (commit commit))) |
| 9990 | (file-name (git-file-name name commit)) |
| 9991 | (sha256 |
| 9992 | (base32 "17gp97vqlpmigf1rf1f5s8lavcswfvpyvqnxxjpdrz5dw9f51y6f")))) |
| 9993 | (build-system cmake-build-system) |
| 9994 | (arguments |
| 9995 | '(#:phases |
| 9996 | (modify-phases %standard-phases |
| 9997 | (delete 'check) |
| 9998 | (add-after 'install 'check |
| 9999 | (lambda* (#:key tests? #:allow-other-keys #:rest args) |
| 10000 | (when tests? |
| 10001 | (apply (assoc-ref %standard-phases 'check) args))))))) |
| 10002 | (home-page "https://github.com/uekstrom/libtaylor") |
| 10003 | (synopsis "C++ library for automatic differentiation") |
| 10004 | (description |
| 10005 | "This is a header-only C++ library for calculating analytical |
| 10006 | derivatives and taylor expansions of composite functions.") |
| 10007 | (license license:expat)))) |
| 10008 | |
| 10009 | (define-public lingeling |
| 10010 | (package |
| 10011 | (name "lingeling") |
| 10012 | (version "1.0.0") |
| 10013 | (source (origin |
| 10014 | (method git-fetch) |
| 10015 | (uri (git-reference |
| 10016 | (url "https://github.com/arminbiere/lingeling") |
| 10017 | (commit (string-append "rel-" version)))) |
| 10018 | (file-name (git-file-name name version)) |
| 10019 | (sha256 |
| 10020 | (base32 |
| 10021 | "0hszkhyni7jcw580f41rrrnwz42x56sqvd8zpcjdagvdiag76lc1")))) |
| 10022 | (build-system gnu-build-system) |
| 10023 | (arguments |
| 10024 | (list #:test-target "test" |
| 10025 | #:modules `((ice-9 match) |
| 10026 | ,@%default-gnu-modules) |
| 10027 | #:configure-flags #~(list "--aiger=.") |
| 10028 | #:phases |
| 10029 | #~(modify-phases %standard-phases |
| 10030 | (add-after 'unpack 'unpack-aiger |
| 10031 | (lambda* (#:key inputs #:allow-other-keys) |
| 10032 | (invoke #$(ar-for-target) "x" |
| 10033 | (search-input-file inputs "lib/libaiger.a") |
| 10034 | "aiger.o") |
| 10035 | (copy-file |
| 10036 | (search-input-file inputs "include/aiger/aiger.h") |
| 10037 | "aiger.h"))) |
| 10038 | (add-after 'unpack 'hard-code-commit |
| 10039 | (lambda _ |
| 10040 | (substitute* "mkconfig.sh" |
| 10041 | (("`\\./getgitid`") "")))) |
| 10042 | (add-after 'unpack 'patch-source |
| 10043 | (lambda* (#:key inputs #:allow-other-keys) |
| 10044 | (substitute* (list "treengeling.c" "lgldimacs.c") |
| 10045 | (("\"(gunzip|xz|bzcat|7z)" all cmd) |
| 10046 | (string-append |
| 10047 | "\"" |
| 10048 | (search-input-file inputs (string-append "bin/" cmd))))))) |
| 10049 | (replace 'configure |
| 10050 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 10051 | (apply invoke "./configure.sh" configure-flags))) |
| 10052 | (replace 'install |
| 10053 | (lambda* (#:key outputs #:allow-other-keys) |
| 10054 | (let ((bin (string-append (assoc-ref outputs "out") |
| 10055 | "/bin"))) |
| 10056 | (mkdir-p bin) |
| 10057 | (for-each |
| 10058 | (lambda (file) |
| 10059 | (install-file file bin)) |
| 10060 | '("blimc" "ilingeling" "lglddtrace" "lglmbt" |
| 10061 | "lgluntrace" "lingeling" "plingeling" |
| 10062 | "treengeling"))))) |
| 10063 | (add-after 'install 'wrap-path |
| 10064 | (lambda* (#:key outputs #:allow-other-keys) |
| 10065 | (with-directory-excursion (string-append |
| 10066 | (assoc-ref outputs "out") |
| 10067 | "/bin") |
| 10068 | (for-each |
| 10069 | (lambda (file) |
| 10070 | (wrap-program |
| 10071 | file |
| 10072 | '("PATH" suffix |
| 10073 | #$(map (lambda (input) |
| 10074 | (file-append (this-package-input input) "/bin")) |
| 10075 | '("gzip" "bzip2" "xz" "p7zip"))))) |
| 10076 | ;; These programs use sprintf on buffers with magic |
| 10077 | ;; values to construct commands (yes, eww), so we |
| 10078 | ;; can't easily substitute* them. |
| 10079 | '("lglddtrace" "lgluntrace" "lingeling" "plingeling")))))))) |
| 10080 | (inputs (list `(,aiger "static") bash-minimal gzip bzip2 xz p7zip)) |
| 10081 | (home-page "http://fmv.jku.at/lingeling") |
| 10082 | (synopsis "SAT solver") |
| 10083 | (description "This package provides a range of SAT solvers, including |
| 10084 | the sequential @command{lingeling} and its parallel variants |
| 10085 | @command{plingeling} and @command{treengeling}. A bounded model checker is |
| 10086 | also included.") |
| 10087 | (license license:expat))) |
| 10088 | |
| 10089 | (define-public cadical |
| 10090 | (package |
| 10091 | (name "cadical") |
| 10092 | (version "2.2.1") |
| 10093 | (source (origin |
| 10094 | (method git-fetch) |
| 10095 | (uri (git-reference |
| 10096 | (url "https://github.com/arminbiere/cadical") |
| 10097 | (commit (string-append "rel-" version)))) |
| 10098 | (file-name (git-file-name name version)) |
| 10099 | (sha256 |
| 10100 | (base32 "09p4nm8jyvhnsgpmbawzlk8b932k33s922a2rxm77sy8s31mm13m")))) |
| 10101 | (build-system gnu-build-system) |
| 10102 | (arguments |
| 10103 | (list #:test-target "test" |
| 10104 | #:configure-flags #~(list "-shared") |
| 10105 | #:modules `(((guix build copy-build-system) #:prefix copy:) |
| 10106 | (guix build gnu-build-system) |
| 10107 | (guix build utils) |
| 10108 | (ice-9 regex)) |
| 10109 | #:imported-modules %copy-build-system-modules |
| 10110 | #:phases |
| 10111 | #~(modify-phases %standard-phases |
| 10112 | ;; By default, cadical defines the DATE macro to have a $(date) |
| 10113 | ;; value. This makes the build not reproducible. If the macro |
| 10114 | ;; is not defined it uses __DATE__ and __TIME__, which we patch |
| 10115 | ;; to return a fixed date. Thus, achieving a reproducible build. |
| 10116 | ;; |
| 10117 | ;; An upstream patch for respecting SOURCE_DATE_EPOCH is pending. |
| 10118 | ;; See also <https://github.com/arminbiere/cadical/pull/164>. |
| 10119 | (add-after 'unpack 'no-build-date |
| 10120 | (lambda _ |
| 10121 | (substitute* "scripts/make-build-header.sh" |
| 10122 | (("\\[ x\"\\$DATE\" = x\" \" \\]") "true")))) |
| 10123 | (replace 'configure |
| 10124 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 10125 | (apply invoke "./configure" configure-flags))) |
| 10126 | (replace 'install |
| 10127 | (lambda args |
| 10128 | (apply |
| 10129 | (assoc-ref copy:%standard-phases 'install) |
| 10130 | #:install-plan |
| 10131 | `(("build" "bin" #:include ("cadical" "mobical")) |
| 10132 | ("build" "lib" #:include-regexp ("libcadical\\.(a|so)$")) |
| 10133 | ("src" "include" #:include ("cadical.h" "cadical.hpp")) |
| 10134 | ;; Internal headers used by cadiback. |
| 10135 | ("src" "include/cadical" #:include-regexp ("\\.hpp$"))) |
| 10136 | args)))))) |
| 10137 | (home-page "https://github.com/arminbiere/cadical") |
| 10138 | (synopsis "SAT solver") |
| 10139 | (description "This package provides a SAT solver based on conflict-driven |
| 10140 | clause learning.") |
| 10141 | (license license:expat))) |
| 10142 | |
| 10143 | (define-public cadical-2.1 |
| 10144 | (package |
| 10145 | (inherit cadical) |
| 10146 | (name "cadical") |
| 10147 | (version "2.1.3") |
| 10148 | (source (origin |
| 10149 | (method git-fetch) |
| 10150 | (uri (git-reference |
| 10151 | (url "https://github.com/arminbiere/cadical") |
| 10152 | (commit (string-append "rel-" version)))) |
| 10153 | (file-name (git-file-name name version)) |
| 10154 | (patches (search-patches "cadical-add-shared-library.patch")) |
| 10155 | (sha256 (base32 |
| 10156 | "1gl0xd6zyxb127w8k0mps9m2izaqb7im7j91by4lkknmm7xhwyav")))) |
| 10157 | (arguments (substitute-keyword-arguments (package-arguments cadical) |
| 10158 | ((#:configure-flags _) |
| 10159 | #~(list)) |
| 10160 | ((#:phases phases) |
| 10161 | #~(modify-phases #$phases |
| 10162 | (add-before 'configure 'set-shared-flags |
| 10163 | (lambda _ |
| 10164 | (setenv "CXXFLAGS" "-DPIC -fPIC"))) |
| 10165 | (replace 'check |
| 10166 | (lambda args |
| 10167 | ;; Tests are incorrectly linked upstream. |
| 10168 | ;; Since we don't install them, just work around this in the |
| 10169 | ;; check phase. |
| 10170 | (setenv "LD_LIBRARY_PATH" |
| 10171 | (string-append (getcwd) "/build")) |
| 10172 | (apply (assoc-ref %standard-phases |
| 10173 | 'check) args) |
| 10174 | (unsetenv "LD_LIBRARY_PATH"))))))))) |
| 10175 | |
| 10176 | (define-public cadiback |
| 10177 | (let ((commit "789329d8fcda851085ed72f1b07d8c3f46243b8a") |
| 10178 | (revision "1")) |
| 10179 | (package |
| 10180 | (name "cadiback") |
| 10181 | ;; Note: version taken from VERSION file |
| 10182 | (version (git-version "0.2.1" revision commit)) |
| 10183 | (source (origin |
| 10184 | (method git-fetch) |
| 10185 | (uri (git-reference |
| 10186 | (url "https://github.com/arminbiere/cadiback") |
| 10187 | (commit commit))) |
| 10188 | (file-name (git-file-name name version)) |
| 10189 | (sha256 |
| 10190 | (base32 "137jxf9g7c1979pcgcqgfff1mqk5hs41a84780px8gpcrh469cks")))) |
| 10191 | (build-system gnu-build-system) |
| 10192 | (arguments |
| 10193 | (list #:test-target "test" |
| 10194 | #:modules `(((guix build copy-build-system) #:prefix copy:) |
| 10195 | (guix build gnu-build-system) |
| 10196 | (guix build utils) |
| 10197 | (ice-9 regex)) |
| 10198 | #:imported-modules %copy-build-system-modules |
| 10199 | #:phases |
| 10200 | #~(modify-phases %standard-phases |
| 10201 | (add-after 'unpack 'patch-build-files |
| 10202 | (lambda* (#:key inputs #:allow-other-keys) |
| 10203 | (substitute* "configure" |
| 10204 | (("\\$CADICAL/src") "$CADICAL/include/cadical") |
| 10205 | (("\\$CADICAL/build") "$CADICAL/lib")) |
| 10206 | (substitute* "generate" |
| 10207 | (("\\[ -d .git \\]" all) (string-append ": " all)) |
| 10208 | (("GITID=.*") (string-append "GITID=\"" #$commit "\""))) |
| 10209 | (substitute* "makefile.in" |
| 10210 | (("\\.\\./cadical/build") |
| 10211 | (dirname |
| 10212 | (search-input-file inputs "lib/libcadical.a"))) |
| 10213 | (("\\.\\./cadical/src") |
| 10214 | (search-input-directory inputs "include/cadical"))))) |
| 10215 | (replace 'configure |
| 10216 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 10217 | (setenv "CADICAL" #$(this-package-input "cadical")) |
| 10218 | (apply invoke "./configure" configure-flags))) |
| 10219 | (replace 'install |
| 10220 | (lambda args |
| 10221 | (apply |
| 10222 | (assoc-ref copy:%standard-phases 'install) |
| 10223 | #:install-plan |
| 10224 | `(("." "bin" #:include ("cadiback"))) |
| 10225 | args)))))) |
| 10226 | (inputs (list cadical)) |
| 10227 | (home-page "https://github.com/arminbiere/cadiback") |
| 10228 | (synopsis "Backbone extractor for cadical") |
| 10229 | (description "This package provides a tool to determine the backbone of |
| 10230 | a satisfiable formula. The backbone is the set of literals that are set to |
| 10231 | true in all models.") |
| 10232 | (license license:expat)))) |
| 10233 | |
| 10234 | (define cadiback-for-cryptominisat |
| 10235 | (let ((commit "ea65a9442fc2604ee5f4ffd0f0fdd0bf481d5b42") |
| 10236 | (revision "1")) |
| 10237 | (package |
| 10238 | (inherit cadiback) |
| 10239 | (name "cadiback-for-cryptominisat") |
| 10240 | (version (git-version "0.2.1" revision commit)) |
| 10241 | (source (origin |
| 10242 | (method git-fetch) |
| 10243 | (uri (git-reference |
| 10244 | (url "https://github.com/meelgroup/cadiback") |
| 10245 | (commit commit))) |
| 10246 | (file-name (git-file-name name version)) |
| 10247 | (sha256 |
| 10248 | (base32 "1zznrlj4zp1mc7s4pfw11aq773q2lr9yl6pph630zg5mqijaim5g")))) |
| 10249 | (arguments |
| 10250 | (substitute-keyword-arguments arguments |
| 10251 | ((#:phases phases) |
| 10252 | #~(modify-phases #$phases |
| 10253 | (add-after 'patch-build-files 'fix-prefix |
| 10254 | (lambda _ |
| 10255 | (substitute* "makefile.in" |
| 10256 | (("/usr") #$output)))) |
| 10257 | (replace 'install |
| 10258 | (lambda args |
| 10259 | (mkdir-p (string-append #$output "/include")) |
| 10260 | (mkdir-p (string-append #$output "/lib")) |
| 10261 | (apply (assoc-ref %standard-phases 'install) args)))))))))) |
| 10262 | |
| 10263 | (define-public louvain-community |
| 10264 | (let ((commit "681a711a530ded0b25af72ee4881d453a80ac8ac") |
| 10265 | (revision "2")) |
| 10266 | (package |
| 10267 | (name "louvain-community") |
| 10268 | (version (git-version "1.0.0" revision commit)) |
| 10269 | (source (origin |
| 10270 | (method git-fetch) |
| 10271 | (uri (git-reference |
| 10272 | (url "https://github.com/meelgroup/louvain-community") |
| 10273 | (commit commit))) |
| 10274 | (file-name (git-file-name name version)) |
| 10275 | (sha256 |
| 10276 | (base32 |
| 10277 | "1ria6s5p7iw86mq1arbrhlbadll1k79j9y5c1bdg76zdwjfs17cs")))) |
| 10278 | (build-system cmake-build-system) |
| 10279 | (arguments |
| 10280 | (list #:tests? #f ; tests appear to require missing files |
| 10281 | #:phases |
| 10282 | #~(modify-phases %standard-phases |
| 10283 | (add-after 'unpack 'encode-git-hash |
| 10284 | (lambda _ |
| 10285 | (substitute* "CMakeLists.txt" |
| 10286 | (("GIT-hash-notfound") #$commit)))) |
| 10287 | (add-after 'unpack 'no-tune-native |
| 10288 | (lambda _ |
| 10289 | (substitute* "CMakeLists.txt" |
| 10290 | (("-mtune=native") "")))) |
| 10291 | ;; Refer to the library in ${LOUVAIN_COMMUNITIES_LIBRARIES} by |
| 10292 | ;; full path. This ensures that we find references to it in |
| 10293 | ;; software using this library via CMake. |
| 10294 | ;; |
| 10295 | ;; CMake expects module to set this variable to a full path. |
| 10296 | ;; See <https://cmake.org/cmake/help/v4.3/module/SelectLibraryConfigurations.html#command:select_library_configurations>. |
| 10297 | (add-after 'unpack 'cmake-lib-full-path |
| 10298 | (lambda* (#:key outputs #:allow-other-keys) |
| 10299 | (substitute* "louvain_communitiesConfig.cmake.in" |
| 10300 | (("louvain_communities") |
| 10301 | (string-append |
| 10302 | (assoc-ref outputs "out") |
| 10303 | "/lib/liblouvain_communities.so")))))))) |
| 10304 | (native-inputs (list python)) |
| 10305 | (home-page "https://github.com/meelgroup/louvain-community") |
| 10306 | (synopsis "Multi-criteria community detection") |
| 10307 | (description "This package provides a C++ implementation of the Louvain |
| 10308 | community detection algorithm.") |
| 10309 | (properties '((tunable? . #t))) |
| 10310 | (license license:lgpl3+)))) |
| 10311 | |
| 10312 | (define-public cryptominisat |
| 10313 | (package |
| 10314 | (name "cryptominisat") |
| 10315 | (version "5.11.22") |
| 10316 | (source |
| 10317 | (origin |
| 10318 | (method git-fetch) |
| 10319 | (uri (git-reference |
| 10320 | (url "https://github.com/msoos/cryptominisat") |
| 10321 | (commit version))) |
| 10322 | (file-name (git-file-name name version)) |
| 10323 | (sha256 |
| 10324 | (base32 |
| 10325 | "1c85gfqvy90yhh9jwmiiz2bz4i86prgpfyx1gbzl42hn2ixkcjgm")) |
| 10326 | (modules '((guix build utils))) |
| 10327 | (snippet |
| 10328 | #~(begin |
| 10329 | (substitute* "src/backbone.cpp" |
| 10330 | (("\"\\.\\./cadiback/cadiback\\.h\"") "<cadiback.h>")))))) |
| 10331 | (build-system cmake-build-system) |
| 10332 | (arguments |
| 10333 | (list |
| 10334 | #:build-type "Release" |
| 10335 | #:configure-flags #~(list "-DENABLE_TESTING=ON" "-DSTATS=ON") |
| 10336 | #:phases |
| 10337 | #~(modify-phases %standard-phases |
| 10338 | (add-after 'unpack 'patch-source |
| 10339 | (lambda* (#:key inputs #:allow-other-keys) |
| 10340 | (substitute* "CMakeLists.txt" |
| 10341 | (("add_subdirectory\\(utils/lingeling-ala\\)") "")) |
| 10342 | ;; Transitively included in vendored gtest.h. Fixed in |
| 10343 | ;; upstream: |
| 10344 | ;; https://github.com/msoos/cryptominisat/pull/686 |
| 10345 | (substitute* "tests/assump_test.cpp" |
| 10346 | (("#include <vector>") |
| 10347 | "#include <vector>\n#include <algorithm>")) |
| 10348 | (substitute* "tests/CMakeLists.txt" |
| 10349 | (("add_subdirectory\\(\\$\\{GTEST_PREFIX\\} gtest\\)") |
| 10350 | "find_package(GTest REQUIRED)") |
| 10351 | (("add_subdirectory\\(\\$\\{PROJECT_SOURCE_DIR\\}/utils/.*\\)") |
| 10352 | ""))))))) |
| 10353 | (inputs (list boost |
| 10354 | cadical |
| 10355 | cadiback-for-cryptominisat |
| 10356 | gmp |
| 10357 | louvain-community |
| 10358 | python |
| 10359 | python-numpy |
| 10360 | sqlite |
| 10361 | zlib)) |
| 10362 | (native-inputs (list googletest lingeling python python-wrapper python-lit)) |
| 10363 | (synopsis "Incremental SAT solver") |
| 10364 | (description |
| 10365 | "CryptoMiniSat is an incremental SAT solver with both command line and |
| 10366 | library (C++, C, Python) interfaces. The command-line interface takes a |
| 10367 | @acronym{CNF, Conjunctive Normal Form} as an input in the DIMACS format with |
| 10368 | the extension of XOR clauses. The library interfaces mimic this and also |
| 10369 | allow incremental solving, including assumptions.") |
| 10370 | (home-page "https://github.com/msoos/cryptominisat") |
| 10371 | (license license:expat))) |
| 10372 | |
| 10373 | (define-public libqalculate |
| 10374 | (package |
| 10375 | (name "libqalculate") |
| 10376 | (version "5.11.0") |
| 10377 | (source |
| 10378 | (origin |
| 10379 | (method git-fetch) |
| 10380 | (uri (git-reference |
| 10381 | (url "https://github.com/Qalculate/libqalculate/") |
| 10382 | (commit (string-append "v" version)))) |
| 10383 | (file-name (git-file-name name version)) |
| 10384 | (sha256 |
| 10385 | (base32 "0kmjgssrwm9djn8pb44vyajzrzxsmxzkjrdz2hvbslfql9ykc04p")))) |
| 10386 | (build-system gnu-build-system) |
| 10387 | (native-inputs |
| 10388 | (list autoconf |
| 10389 | automake |
| 10390 | doxygen |
| 10391 | gettext-minimal |
| 10392 | libtool |
| 10393 | pkg-config)) |
| 10394 | (inputs |
| 10395 | (list gmp |
| 10396 | mpfr |
| 10397 | libxml2 |
| 10398 | curl |
| 10399 | icu4c |
| 10400 | gnuplot |
| 10401 | libiconv |
| 10402 | readline)) |
| 10403 | (home-page "https://qalculate.github.io/") |
| 10404 | (synopsis "Multi-purpose calculator CLI and library") |
| 10405 | (description |
| 10406 | "Qalculate! is a multi-purpose calculator; this package contains its |
| 10407 | command line interface @code{qalc} and library @code{libqalculate}. Features |
| 10408 | include: |
| 10409 | @itemize |
| 10410 | @item arbitrary precision and interval arithmetic |
| 10411 | @item currency conversion |
| 10412 | @item physical constants |
| 10413 | @item plotting via gnuplot |
| 10414 | @item symbolic calculations (including integrals and equations) |
| 10415 | @item uncertainty propagation |
| 10416 | @item unit calculations and conversions |
| 10417 | @item user-defined functions |
| 10418 | @end itemize") |
| 10419 | (license license:gpl2+))) |
| 10420 | |
| 10421 | (define-public qalculate-gtk |
| 10422 | (package |
| 10423 | (name "qalculate-gtk") |
| 10424 | (version "5.11.0") |
| 10425 | (source |
| 10426 | (origin |
| 10427 | (method git-fetch) |
| 10428 | (uri (git-reference |
| 10429 | (url "https://github.com/Qalculate/qalculate-gtk/") |
| 10430 | (commit (string-append "v" version)))) |
| 10431 | (file-name (git-file-name name version)) |
| 10432 | (sha256 |
| 10433 | (base32 "03ppnhkzbvr8xzl2b6lsxd3i0lrhvch3blzp5g54pr6k9yjdnl0i")))) |
| 10434 | (build-system glib-or-gtk-build-system) |
| 10435 | (native-inputs |
| 10436 | (list pkg-config |
| 10437 | intltool |
| 10438 | automake |
| 10439 | autoconf |
| 10440 | libtool |
| 10441 | file)) |
| 10442 | (inputs |
| 10443 | (list gmp |
| 10444 | mpfr |
| 10445 | libqalculate |
| 10446 | libxml2 |
| 10447 | glib |
| 10448 | gtk+)) |
| 10449 | (home-page "https://qalculate.github.io/") |
| 10450 | (synopsis "Qalculate! desktop calculator (GTK interface)") |
| 10451 | (description "@code{qalculate-gtk} is the GTK frontend for the Qalculate! |
| 10452 | multi-purpose calculator.") |
| 10453 | (license license:gpl2+))) |
| 10454 | |
| 10455 | (define-public qalculate-qt |
| 10456 | (package |
| 10457 | (name "qalculate-qt") |
| 10458 | (version "5.11.0") |
| 10459 | (source |
| 10460 | (origin |
| 10461 | (method git-fetch) |
| 10462 | (uri (git-reference |
| 10463 | (url "https://github.com/Qalculate/qalculate-qt") |
| 10464 | (commit (string-append "v" version)))) |
| 10465 | (file-name (git-file-name name version)) |
| 10466 | (sha256 |
| 10467 | (base32 "1gy344widrbmvfk9v8yx349afiqqyfmm12cajhf99v74kw1xivz6")))) |
| 10468 | (build-system gnu-build-system) |
| 10469 | (arguments |
| 10470 | (list #:tests? #f ; There are no tests. |
| 10471 | #:imported-modules |
| 10472 | `(,@%default-gnu-imported-modules ,@%qt-build-system-modules) |
| 10473 | #:phases |
| 10474 | #~(modify-phases %standard-phases |
| 10475 | (replace 'configure |
| 10476 | (lambda* (#:key inputs #:allow-other-keys) |
| 10477 | (substitute* "qalculate-qt.pro" |
| 10478 | (("/usr/local") #$output) |
| 10479 | (("\\$\\$LRELEASE") |
| 10480 | (string-append |
| 10481 | (search-input-file inputs "bin/lrelease")))) |
| 10482 | (invoke "qmake"))) |
| 10483 | (add-after 'install 'qt-wrap |
| 10484 | (lambda args |
| 10485 | (apply (assoc-ref |
| 10486 | (@ (guix build qt-build-system) %standard-phases) |
| 10487 | 'qt-wrap) |
| 10488 | #:qtbase #$(this-package-input "qtbase") args)))))) |
| 10489 | (native-inputs (list pkg-config qttools)) |
| 10490 | (inputs (list gmp |
| 10491 | libqalculate |
| 10492 | mpfr |
| 10493 | qtbase)) |
| 10494 | (home-page "https://qalculate.github.io") |
| 10495 | (synopsis "Qalculate! desktop calculator (Qt interface)") |
| 10496 | (description "@code{qalculate-qt} is the Qt frontend for the Qalculate! |
| 10497 | multi-purpose calculator.") |
| 10498 | (license license:gpl2+))) |
| 10499 | |
| 10500 | (define-public numdiff |
| 10501 | (package |
| 10502 | (name "numdiff") |
| 10503 | (version "5.9.0") |
| 10504 | (source |
| 10505 | (origin |
| 10506 | (method url-fetch) |
| 10507 | (uri (string-append "mirror://savannah/numdiff/numdiff-" |
| 10508 | version ".tar.gz")) |
| 10509 | (sha256 |
| 10510 | (base32 |
| 10511 | "1vzmjh8mhwwysn4x4m2vif7q2k8i19x8azq7pzmkwwj4g48lla47")))) |
| 10512 | (build-system gnu-build-system) |
| 10513 | (arguments |
| 10514 | '(#:tests? #f ; There are no tests. |
| 10515 | #:phases |
| 10516 | (modify-phases %standard-phases |
| 10517 | (add-before 'compress-documentation 'delete-precompressed-info-file |
| 10518 | (lambda _ |
| 10519 | (delete-file (string-append (assoc-ref %outputs "out") |
| 10520 | "/share/info/numdiff.info.gz")) |
| 10521 | #t))))) |
| 10522 | (home-page "https://nongnu.org/numdiff/") |
| 10523 | (synopsis "Compare files with numeric fields") |
| 10524 | (description |
| 10525 | "Numdiff compares files line by line and field by field, ignoring small |
| 10526 | numeric differences and differences in numeric formats.") |
| 10527 | (license license:gpl3+))) |
| 10528 | |
| 10529 | (define-public why3 |
| 10530 | (package |
| 10531 | (name "why3") |
| 10532 | (version "1.7.2") |
| 10533 | (source (origin |
| 10534 | (method git-fetch) |
| 10535 | (uri (git-reference |
| 10536 | (url "https://gitlab.inria.fr/why3/why3") |
| 10537 | (commit version))) |
| 10538 | (file-name (git-file-name name version)) |
| 10539 | (sha256 |
| 10540 | (base32 |
| 10541 | "0fq8wg8ji2v2ssz1d681glmk8glps1irnmdlhqfklaggx01hlf4p")))) |
| 10542 | (build-system ocaml-build-system) |
| 10543 | (arguments |
| 10544 | (list #:phases |
| 10545 | #~(modify-phases %standard-phases |
| 10546 | (add-before 'configure 'bootstrap |
| 10547 | (lambda _ |
| 10548 | (invoke "./autogen.sh") |
| 10549 | (setenv "CONFIG_SHELL" (which "sh")) |
| 10550 | (substitute* "configure" |
| 10551 | (("#! /bin/sh") (string-append "#!" (which "sh"))) |
| 10552 | ;; find ocaml-num in the correct directory |
| 10553 | (("\\$DIR/nums.cma") "$DIR/num.cma") |
| 10554 | (("\\$DIR/num.cmi") "$DIR/core/num.cmi")))) |
| 10555 | (add-after 'configure 'fix-makefile |
| 10556 | (lambda _ |
| 10557 | (substitute* "Makefile" |
| 10558 | ;; find ocaml-num in the correct directory |
| 10559 | (("site-lib/num") "site-lib")))) |
| 10560 | (add-after 'install 'install-lib |
| 10561 | (lambda _ |
| 10562 | (invoke "make" "byte") |
| 10563 | (invoke "make" "install-lib")))))) |
| 10564 | (native-inputs (list autoconf |
| 10565 | automake |
| 10566 | coq |
| 10567 | ocaml |
| 10568 | ocaml-findlib |
| 10569 | which)) |
| 10570 | (propagated-inputs (list camlzip |
| 10571 | lablgtk3 |
| 10572 | ocaml-graph |
| 10573 | ocaml-lablgtk3-sourceview3 |
| 10574 | ocaml-menhir |
| 10575 | ocaml-ppx-deriving |
| 10576 | ocaml-ppx-sexp-conv |
| 10577 | ocaml-num |
| 10578 | ocaml-re |
| 10579 | ocaml-sexplib |
| 10580 | ocaml-zarith)) |
| 10581 | (inputs (list coq-flocq |
| 10582 | emacs-minimal |
| 10583 | zlib)) |
| 10584 | (home-page "https://why3.lri.fr") |
| 10585 | (synopsis "Deductive program verification") |
| 10586 | (description "Why3 provides a language for specification and programming, |
| 10587 | called WhyML, and relies on external theorem provers, both automated and |
| 10588 | interactive, to discharge verification conditions. Why3 comes with a standard |
| 10589 | library of logical theories (integer and real arithmetic, Boolean operations, |
| 10590 | sets and maps, etc.) and basic programming data structures (arrays, queues, |
| 10591 | hash tables, etc.). A user can write WhyML programs directly and get |
| 10592 | correct-by-construction OCaml programs through an automated extraction |
| 10593 | mechanism. WhyML is also used as an intermediate language for the verification |
| 10594 | of C, Java, or Ada programs.") |
| 10595 | (license license:lgpl2.1))) |
| 10596 | |
| 10597 | (define-public frama-c |
| 10598 | (package |
| 10599 | (name "frama-c") |
| 10600 | (version "29.0") |
| 10601 | (source (origin |
| 10602 | (method url-fetch) |
| 10603 | (uri (string-append "https://frama-c.com/download/frama-c-" |
| 10604 | version "-Copper.tar.gz")) |
| 10605 | (sha256 |
| 10606 | (base32 |
| 10607 | "14vlvynp3yfmnkixm676c1ip0jlkiqjzmrp9f9c990zzs2wb7yyj")))) |
| 10608 | (build-system dune-build-system) |
| 10609 | (arguments |
| 10610 | (list #:phases |
| 10611 | #~(modify-phases %standard-phases |
| 10612 | (add-before 'build 'set-env |
| 10613 | (lambda _ |
| 10614 | (setenv "CC" "gcc"))) |
| 10615 | (add-after 'install 'wrap-programs |
| 10616 | (lambda _ |
| 10617 | (let ((ocamlpath |
| 10618 | `(,(string-append #$output "/lib/ocaml/site-lib") |
| 10619 | ,@(search-path-as-string->list |
| 10620 | (getenv "OCAMLPATH"))))) |
| 10621 | (for-each |
| 10622 | (lambda (program) |
| 10623 | (wrap-program (string-append #$output "/bin/" program) |
| 10624 | `("OCAMLPATH" ":" prefix ,ocamlpath))) |
| 10625 | '("frama-c" "frama-c-gui")))))))) |
| 10626 | (inputs |
| 10627 | (list bash-minimal gmp zlib)) |
| 10628 | (propagated-inputs (list |
| 10629 | graphviz |
| 10630 | lablgtk3 |
| 10631 | ocaml-graph |
| 10632 | ocaml-odoc |
| 10633 | ocaml-lablgtk3-sourceview3 |
| 10634 | ocaml-yaml |
| 10635 | ocaml-yojson |
| 10636 | ocaml-zarith |
| 10637 | ocaml-ppx-deriving |
| 10638 | ocaml-ppx-deriving-yojson |
| 10639 | ocaml-ppx-deriving-yaml |
| 10640 | ocaml-ppx-import |
| 10641 | ocaml-unionfind |
| 10642 | why3)) |
| 10643 | (native-inputs (list dune-site time ocaml-menhir ocaml-graph)) |
| 10644 | (native-search-paths |
| 10645 | (list (search-path-specification |
| 10646 | (variable "FRAMAC_SHARE") |
| 10647 | (files '("share/frama-c")) |
| 10648 | (separator #f)) |
| 10649 | (search-path-specification |
| 10650 | (variable "FRAMAC_LIB") |
| 10651 | (files '("lib/frama-c")) |
| 10652 | (separator #f)))) |
| 10653 | (home-page "https://frama-c.com") |
| 10654 | (synopsis "C source code analysis platform") |
| 10655 | (description "Frama-C is an extensible and collaborative platform dedicated |
| 10656 | to source-code analysis of C software. The Frama-C analyzers assist you in |
| 10657 | various source-code-related activities, from the navigation through unfamiliar |
| 10658 | projects up to the certification of critical software.") |
| 10659 | (license license:lgpl2.1+))) |
| 10660 | |
| 10661 | (define-public blitz |
| 10662 | (package |
| 10663 | (name "blitz") |
| 10664 | (version "1.0.2") |
| 10665 | (source |
| 10666 | (origin |
| 10667 | (method git-fetch) |
| 10668 | (uri (git-reference |
| 10669 | (url "https://github.com/blitzpp/blitz") |
| 10670 | (commit version))) |
| 10671 | (file-name (git-file-name name version)) |
| 10672 | (sha256 |
| 10673 | (base32 "0c88gc72j3zggyk4yrrip6i0v7xkx97l140vpy3xhxs2i7xy1461")))) |
| 10674 | (build-system cmake-build-system) |
| 10675 | (arguments |
| 10676 | (list |
| 10677 | #:configure-flags #~(list "-DBUILD_DOC=ON") |
| 10678 | #:modules '((guix build cmake-build-system) |
| 10679 | ((guix build gnu-build-system) #:prefix gnu:) |
| 10680 | (guix build utils)) |
| 10681 | #:phases |
| 10682 | #~(modify-phases %standard-phases |
| 10683 | (add-after 'build 'build-doc |
| 10684 | (lambda _ |
| 10685 | (invoke "make" "-j" (number->string (parallel-job-count)) |
| 10686 | "blitz-doc"))) |
| 10687 | (replace 'check |
| 10688 | (lambda* (#:rest args) |
| 10689 | (apply (assoc-ref gnu:%standard-phases 'check) |
| 10690 | ;; The default "check" target also includes examples and |
| 10691 | ;; benchmarks. |
| 10692 | #:test-target "check-testsuite" args)))))) |
| 10693 | (native-inputs |
| 10694 | (list python texinfo)) |
| 10695 | (synopsis "C++ template class library for multidimensional arrays") |
| 10696 | (description "Blitz++ is a C++ template class library that provides |
| 10697 | high-performance multidimensional array containers for scientific computing.") |
| 10698 | (home-page "https://github.com/blitzpp/blitz") |
| 10699 | (license (list license:artistic2.0 |
| 10700 | license:bsd-3 |
| 10701 | license:lgpl3+)))) |
| 10702 | |
| 10703 | (define-public fxdiv |
| 10704 | ;; There is currently no tag in this repo. |
| 10705 | (let ((commit "63058eff77e11aa15bf531df5dd34395ec3017c8") |
| 10706 | (version "0.0") |
| 10707 | (revision "1")) |
| 10708 | (package |
| 10709 | (name "fxdiv") |
| 10710 | (version (git-version version revision commit)) |
| 10711 | (home-page "https://github.com/Maratyszcza/FXdiv") |
| 10712 | (source (origin |
| 10713 | (method git-fetch) |
| 10714 | (uri (git-reference (url home-page) (commit commit))) |
| 10715 | (file-name (git-file-name name version)) |
| 10716 | (sha256 |
| 10717 | (base32 |
| 10718 | "0zwzh8gmbx4m6b18s5nf13b0dk5yjkd1fs8f421bl7fz5f9gjd9f")) |
| 10719 | (patches (search-patches "fxdiv-system-libraries.patch")))) |
| 10720 | (build-system cmake-build-system) |
| 10721 | (inputs |
| 10722 | (list googletest-1.8 googlebenchmark)) |
| 10723 | (synopsis |
| 10724 | "C++ library for division via fixed-point multiplication by inverse") |
| 10725 | (description |
| 10726 | "On modern CPUs and GPUs, integer division is several times slower than |
| 10727 | multiplication. FXdiv implements an algorithm to replace an integer division |
| 10728 | with a multiplication and two shifts. This algorithm improves performance |
| 10729 | when an application performs repeated divisions by the same divisor.") |
| 10730 | (license license:expat)))) |
| 10731 | |
| 10732 | (define-public fp16 |
| 10733 | ;; There is currently no tag in this repo. |
| 10734 | (let ((commit "0a92994d729ff76a58f692d3028ca1b64b145d91") |
| 10735 | (version "0.0") |
| 10736 | (revision "1")) |
| 10737 | (package |
| 10738 | (name "fp16") |
| 10739 | (version (git-version version revision commit)) |
| 10740 | (home-page "https://github.com/Maratyszcza/FP16") |
| 10741 | (source (origin |
| 10742 | (method git-fetch) |
| 10743 | (uri (git-reference (url home-page) (commit commit))) |
| 10744 | (file-name (git-file-name name version)) |
| 10745 | (sha256 |
| 10746 | (base32 |
| 10747 | "05mm4vrxsac35hjf5djif9r6rdxj9ippg97ia3p6q6b8lrp7srwv")) |
| 10748 | (patches (search-patches "fp16-implicit-double.patch" |
| 10749 | "fp16-system-libraries.patch")))) |
| 10750 | (build-system cmake-build-system) |
| 10751 | (arguments |
| 10752 | (list |
| 10753 | #:imported-modules |
| 10754 | (append %cmake-build-system-modules |
| 10755 | %pyproject-build-system-modules) |
| 10756 | #:modules |
| 10757 | `(((guix build pyproject-build-system) #:select (site-packages)) |
| 10758 | (guix build cmake-build-system) |
| 10759 | (guix build utils)) |
| 10760 | #:phases |
| 10761 | #~(modify-phases %standard-phases |
| 10762 | (add-after 'install 'move-python-files |
| 10763 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 10764 | ;; Python files get installed to $includedir (!). |
| 10765 | ;; Move them to the usual Python site directory. |
| 10766 | (let* ((include (string-append #$output "/include")) |
| 10767 | (site (site-packages inputs outputs)) |
| 10768 | (target (string-append site "/fp16"))) |
| 10769 | (mkdir-p target) |
| 10770 | (for-each (lambda (file) |
| 10771 | (rename-file file |
| 10772 | (string-append target "/" |
| 10773 | (basename file)))) |
| 10774 | (find-files include "\\.py$")))))))) |
| 10775 | (native-inputs (list python-wrapper)) |
| 10776 | (inputs (list psimd googletest-1.8 googlebenchmark)) |
| 10777 | (synopsis "C++ library for half-precision floating point formats") |
| 10778 | (description |
| 10779 | "This header-only C++ library implements conversion to and from |
| 10780 | half-precision floating point formats.") |
| 10781 | (license license:expat)))) |
| 10782 | |
| 10783 | (define-public fparser |
| 10784 | (package |
| 10785 | (name "fparser") |
| 10786 | (version "4.5.1") |
| 10787 | (source |
| 10788 | (origin |
| 10789 | (method git-fetch) |
| 10790 | (uri (git-reference |
| 10791 | (url "https://github.com/thliebig/fparser") |
| 10792 | (commit "e625e262620036a52d1dc9abc122d2bf67397e40"))) |
| 10793 | (file-name (git-file-name name version)) |
| 10794 | (sha256 |
| 10795 | (base32 "11gkdqcbk26bwrn5si6vmbd0gsni5kg56j32jhmp2j4h1jrww54k")))) |
| 10796 | (arguments |
| 10797 | (list |
| 10798 | #:tests? #f)) ;No tests |
| 10799 | (build-system cmake-build-system) |
| 10800 | (home-page "http://warp.povusers.org/FunctionParser/") |
| 10801 | (synopsis "Function parser library for C++") |
| 10802 | (description |
| 10803 | "FunctionParser is a C++ library for parsing and evaluating mathematical expressions. |
| 10804 | This package is based on a maintained fork of |
| 10805 | @url{http://warp.povusers.org/FunctionParser/, the original project}.") |
| 10806 | (license license:lgpl3))) |
| 10807 | |
| 10808 | (define-public soplex |
| 10809 | (package |
| 10810 | (name "soplex") |
| 10811 | (version "8.0.1") |
| 10812 | (source |
| 10813 | (origin |
| 10814 | (method git-fetch) |
| 10815 | (uri (git-reference |
| 10816 | (url "https://github.com/scipopt/soplex") |
| 10817 | (commit (string-append "v" version)))) |
| 10818 | (file-name (git-file-name name version)) |
| 10819 | (sha256 |
| 10820 | (base32 "1j0xqm99pdvj6l52q4wk96aj0vnq3xgm2gdyli4g8gfb1g1m9p9l")))) |
| 10821 | (build-system cmake-build-system) |
| 10822 | (arguments |
| 10823 | (list |
| 10824 | #:configure-flags |
| 10825 | #~(list "-DPAPILO=OFF"))) |
| 10826 | (inputs (list boost gmp mpfr zlib)) |
| 10827 | (home-page "https://soplex.zib.de/") |
| 10828 | (synopsis "Sequential object-oriented simPlex linear programming solver") |
| 10829 | (description |
| 10830 | "SoPlex is an optimization package for solving linear |
| 10831 | programming problems (LPs) based on an advanced implementation of the primal |
| 10832 | and dual revised simplex algorithm. It provides special support for the exact |
| 10833 | solution of LPs with rational input data. It can be used as a standalone |
| 10834 | solver reading MPS or LP format files via a command line interface as well as |
| 10835 | embedded into other programs via a C++ class library.") |
| 10836 | (license license:asl2.0))) |
| 10837 | |
| 10838 | (define-public scip |
| 10839 | (package |
| 10840 | (name "scip") |
| 10841 | (version "10.0.1") |
| 10842 | (source |
| 10843 | (origin |
| 10844 | (method git-fetch) |
| 10845 | (uri (git-reference |
| 10846 | (url "https://github.com/scipopt/scip") |
| 10847 | (commit (string-append "v" version)))) |
| 10848 | (file-name (git-file-name name version)) |
| 10849 | (sha256 |
| 10850 | (base32 "01j0m7fzr8xcwpsd3zfqrbqw8rw2169rlp0qb6srdx5ablkcdcv1")))) |
| 10851 | (build-system cmake-build-system) |
| 10852 | (arguments |
| 10853 | (list |
| 10854 | #:build-type "Release" |
| 10855 | #:parallel-tests? #f |
| 10856 | #:configure-flags |
| 10857 | #~(list "-DPAPILO=OFF" |
| 10858 | "-DZIMPL=OFF" |
| 10859 | "-DAMPL=ON" |
| 10860 | "-DLAPACK=ON" |
| 10861 | "-DIPOPT=OFF" |
| 10862 | (string-append |
| 10863 | "-DSOPLEX_DIR=" #$(this-package-input "soplex"))))) |
| 10864 | (inputs (list boost |
| 10865 | gmp |
| 10866 | lapack |
| 10867 | mpfr |
| 10868 | readline |
| 10869 | soplex |
| 10870 | zlib)) |
| 10871 | (native-inputs (list perl python-minimal-wrapper)) |
| 10872 | (home-page "https://www.scipopt.org/") |
| 10873 | (synopsis "Solving constraint integer programs") |
| 10874 | (description |
| 10875 | "SCIP is a solver for mixed integer programming (MIP) and mixed |
| 10876 | integer nonlinear programming (MINLP). It is a framework for constraint |
| 10877 | integer programming and branch-cut-and-price, allowing total control |
| 10878 | of the solution process and access to detailed information down to the |
| 10879 | internals of the solver.") |
| 10880 | (license license:asl2.0))) |
| 10881 | |
| 10882 | (define-public or-tools |
| 10883 | (package |
| 10884 | (name "or-tools") |
| 10885 | (version "9.15") |
| 10886 | (source |
| 10887 | (origin |
| 10888 | (method git-fetch) |
| 10889 | (uri (git-reference |
| 10890 | (url "https://github.com/google/or-tools") |
| 10891 | (commit (string-append "v" version)))) |
| 10892 | (file-name (git-file-name name version)) |
| 10893 | (sha256 |
| 10894 | (base32 "0hb608s6c7aiyr8vaj0gi0jf45z39wvwvrgfq8x5dzgyzy06zszp")))) |
| 10895 | (build-system cmake-build-system) |
| 10896 | (arguments |
| 10897 | (list |
| 10898 | #:tests? #f ;TODO: requires protobuf-matchers |
| 10899 | #:configure-flags |
| 10900 | #~(list "-DBUILD_CXX=ON" |
| 10901 | "-DBUILD_DEPS=OFF" |
| 10902 | "-DBUILD_DOTNET=OFF" |
| 10903 | "-DBUILD_EXAMPLES=OFF" |
| 10904 | "-DBUILD_JAVA=OFF" |
| 10905 | "-DBUILD_PYTHON=OFF" |
| 10906 | "-DBUILD_SAMPLES=OFF" |
| 10907 | "-DBUILD_SHARED_LIBS=ON" |
| 10908 | "-DUSE_COINOR=OFF" |
| 10909 | "-DUSE_CPLEX=OFF" |
| 10910 | "-DUSE_GLPK=ON" |
| 10911 | "-DUSE_HIGHS=OFF" |
| 10912 | "-DUSE_SCIP=ON" |
| 10913 | (string-append "-DSCIP_DIR=" #$(this-package-input "scip"))))) |
| 10914 | (native-inputs |
| 10915 | (list benchmark |
| 10916 | googletest |
| 10917 | pkg-config |
| 10918 | python-minimal-wrapper)) |
| 10919 | (inputs |
| 10920 | (list abseil-cpp |
| 10921 | eigen |
| 10922 | glpk |
| 10923 | gmp |
| 10924 | mpfr |
| 10925 | protobuf-6 |
| 10926 | re2-next |
| 10927 | scip |
| 10928 | zlib)) |
| 10929 | (home-page "https://developers.google.com/optimization") |
| 10930 | (synopsis "Software suite for combinatorial optimization") |
| 10931 | (description |
| 10932 | "OR-Tools is a C++ portable software suite, tuned for solving |
| 10933 | combinatorial optimization problems in vehicle routing, flows, integer, linear |
| 10934 | and constraint programming.") |
| 10935 | (license license:asl2.0))) |
| 10936 | |
| 10937 | (define-public scilab |
| 10938 | (package |
| 10939 | (name "scilab") |
| 10940 | (version "2025.1.0") |
| 10941 | (source |
| 10942 | (origin |
| 10943 | (method git-fetch) |
| 10944 | (uri (git-reference |
| 10945 | (url "https://gitlab.com/scilab/scilab") |
| 10946 | (commit version))) |
| 10947 | (file-name (git-file-name name version)) |
| 10948 | (sha256 |
| 10949 | (base32 |
| 10950 | "1db23hla27lfrf1qvk3p4465qqizxb1a6qkjh4k6rzdxgvxdbxng")) |
| 10951 | (patches (search-patches "scilab-better-compiler-detection.patch" |
| 10952 | "scilab-tbx_build_help.patch")) |
| 10953 | (modules '((guix build utils) |
| 10954 | (ice-9 ftw))) |
| 10955 | (snippet |
| 10956 | #~(begin |
| 10957 | ;; Delete everything except for scilab itself: |
| 10958 | (for-each (lambda (file) |
| 10959 | (unless (member file '("." ".." "scilab")) |
| 10960 | (delete-file-recursively file))) |
| 10961 | (scandir ".")) |
| 10962 | (for-each (lambda (file) |
| 10963 | (unless (member file '("." "..")) |
| 10964 | (rename-file (string-append "scilab/" file) file))) |
| 10965 | (scandir "scilab")) |
| 10966 | |
| 10967 | ;; Some clean-up in scilab: |
| 10968 | (for-each delete-file-recursively |
| 10969 | '("scilab" |
| 10970 | "config" |
| 10971 | "libs/GetWindowsVersion" |
| 10972 | "Visual-Studio-settings")) |
| 10973 | (for-each delete-file |
| 10974 | (append |
| 10975 | (list "aclocal.m4" |
| 10976 | "configure" |
| 10977 | "m4/ax_cxx_compile_stdcxx.m4" |
| 10978 | "m4/lib-ld.m4" |
| 10979 | "m4/libtool.m4" |
| 10980 | "m4/ltoptions.m4" |
| 10981 | "m4/ltsugar.m4" |
| 10982 | "m4/ltversion.m4" |
| 10983 | "m4/lt~obsolete.m4" |
| 10984 | "m4/pkg.m4" |
| 10985 | "Scilab.sln") |
| 10986 | (find-files "." "^Makefile\\.in$") |
| 10987 | (find-files "." "\\.bat$"))) |
| 10988 | |
| 10989 | ;; And finally some files in the modules directory: |
| 10990 | (for-each |
| 10991 | (lambda (file) |
| 10992 | (delete-file |
| 10993 | (string-append "modules/dynamic_link/src/scripts/" file))) |
| 10994 | '("aclocal.m4" |
| 10995 | "configure" |
| 10996 | "compile" |
| 10997 | "config.guess" |
| 10998 | "config.sub" |
| 10999 | "depcomp" |
| 11000 | "install-sh" |
| 11001 | "ltmain.sh" |
| 11002 | "missing")) |
| 11003 | (delete-file-recursively "modules/dynamic_link/src/scripts/m4") |
| 11004 | (for-each delete-file |
| 11005 | '("modules/ast/src/cpp/parse/scanscilab.cpp" |
| 11006 | "modules/ast/src/cpp/parse/bison/parsescilab.output" |
| 11007 | "modules/ast/includes/parse/parsescilab.hxx" |
| 11008 | "modules/ast/src/cpp/parse/parsescilab.cpp")))))) |
| 11009 | (build-system gnu-build-system) |
| 11010 | (native-inputs |
| 11011 | (list autoconf-2.71 |
| 11012 | autoconf-archive |
| 11013 | automake |
| 11014 | bison |
| 11015 | coreutils-minimal |
| 11016 | eigen |
| 11017 | flex |
| 11018 | gfortran |
| 11019 | libtool |
| 11020 | ocaml |
| 11021 | ocaml-findlib |
| 11022 | pkg-config)) |
| 11023 | (inputs (list `(,pcre "bin") |
| 11024 | `(,pcre "out") |
| 11025 | arpack-ng |
| 11026 | bash-minimal |
| 11027 | curl |
| 11028 | fftw |
| 11029 | gettext-minimal |
| 11030 | hdf5 |
| 11031 | libarchive |
| 11032 | libx11 |
| 11033 | libxml2 |
| 11034 | matio |
| 11035 | ocaml-num |
| 11036 | openblas |
| 11037 | rapidjson |
| 11038 | readline |
| 11039 | suitesparse |
| 11040 | tcl |
| 11041 | tk)) |
| 11042 | (arguments |
| 11043 | (let* ((tcl (this-package-input "tcl")) |
| 11044 | (tk (this-package-input "tk"))) |
| 11045 | (list |
| 11046 | #:configure-flags |
| 11047 | #~(list |
| 11048 | "--enable-relocatable" |
| 11049 | "--disable-static-system-lib" |
| 11050 | "--enable-build-parser" |
| 11051 | ;; Disable all java code. |
| 11052 | "--without-gui" |
| 11053 | "--without-javasci" |
| 11054 | "--disable-build-help" |
| 11055 | "--with-external-scirenderer" |
| 11056 | ;; Tcl and Tk library locations. |
| 11057 | (string-append "--with-tcl-include=" #$tcl "/include") |
| 11058 | (string-append "--with-tcl-library=" #$tcl "/lib") |
| 11059 | (string-append "--with-tk-include=" #$tk "/include") |
| 11060 | (string-append "--with-tk-library=" #$tk "/lib") |
| 11061 | (string-append "--with-eigen-include=" |
| 11062 | (search-input-directory %build-inputs "include/eigen3")) |
| 11063 | ;; Find and link to the OCaml Num package |
| 11064 | "OCAMLC=ocamlfind ocamlc -package num" |
| 11065 | "OCAMLOPT=ocamlfind ocamlopt -package num -linkpkg") |
| 11066 | #:phases |
| 11067 | #~(modify-phases %standard-phases |
| 11068 | ;; The Num library is specified with the OCAMLC and |
| 11069 | ;; OCAMLOPT variables above. |
| 11070 | (add-after 'unpack 'fix-ocaml-num |
| 11071 | (lambda _ |
| 11072 | (substitute* |
| 11073 | '("modules/scicos/Makefile.modelica.am" |
| 11074 | "modules/scicos/src/translator/makefile.mak" |
| 11075 | "modules/scicos/src/modelica_compiler/makefile.mak") |
| 11076 | (("nums\\.cmx?a") "")))) |
| 11077 | ;; See https://gitlab.com/scilab/scilab/-/issues/17462 |
| 11078 | (add-after 'unpack 'fix-call-scilab-examples |
| 11079 | (lambda _ |
| 11080 | (substitute* |
| 11081 | (find-files "modules/call_scilab/examples" "\\.c$") |
| 11082 | (("StartScilab\\((.*), NULL\\)" all args) |
| 11083 | (string-append "StartScilab(" args ", 0)"))))) |
| 11084 | (add-after 'unpack 'fix-linking |
| 11085 | (lambda _ |
| 11086 | (substitute* "modules/Makefile.am" |
| 11087 | (("libscilab_cli_la_LDFLAGS = .*\\)" all) |
| 11088 | (string-append all " -lcurl"))))) |
| 11089 | (add-after 'unpack 'set-version |
| 11090 | (lambda _ |
| 11091 | (substitute* "modules/core/includes/version.h.in" |
| 11092 | (("branch-[a-z0-9\\.]*") ; version |
| 11093 | #$(version-major+minor (package-version this-package)))))) |
| 11094 | (add-after 'unpack 'restrain-to-scilab-cli |
| 11095 | (lambda _ |
| 11096 | ;; Install only scilab-cli.desktop |
| 11097 | (substitute* "desktop/Makefile.am" |
| 11098 | (("desktop_DATA =") |
| 11099 | "desktop_DATA = scilab-cli.desktop\nDUMMY =")) |
| 11100 | ;; Replace scilab with scilab-cli for tests. |
| 11101 | (substitute* "Makefile.incl.am" |
| 11102 | (("scilab-bin") "scilab-cli-bin") |
| 11103 | (("scilab -nwni") "scilab-cli") |
| 11104 | ;; Do not install tests, demos and examples. |
| 11105 | ;; This saves up to 140 Mo in the final output. |
| 11106 | (("(TESTS|DEMOS|EXAMPLES)_DIR=.*" all kind) |
| 11107 | (string-append kind "_DIR="))))) |
| 11108 | (add-before 'check 'disable-failing-tests |
| 11109 | (lambda _ |
| 11110 | (substitute* "Makefile" |
| 11111 | (("TESTS = .*") |
| 11112 | "TESTS =\n")) |
| 11113 | (substitute* "modules/functions_manager/Makefile" |
| 11114 | (("check:.*") |
| 11115 | "check:\n")) |
| 11116 | (substitute* "modules/types/Makefile" |
| 11117 | (("\\$\\(MAKE\\) \\$\\(AM_MAKEFLAGS\\) check-am") |
| 11118 | "")))) |
| 11119 | ;; These generated files are assumed to be present during |
| 11120 | ;; the build. |
| 11121 | (add-after 'bootstrap 'bootstrap-dynamic_link-scripts |
| 11122 | (lambda _ |
| 11123 | (with-directory-excursion "modules/dynamic_link/src/scripts" |
| 11124 | ((assoc-ref %standard-phases 'bootstrap)) |
| 11125 | (substitute* "compilerDetection.sh" |
| 11126 | (("PATHTOCONFIGURE=.*") |
| 11127 | "PATHTOCONFIGURE=${BASH_SOURCE[0]%/*}/\n") |
| 11128 | (("PROGNAME.*") "\n"))))) |
| 11129 | (add-before 'build 'pre-build |
| 11130 | (lambda* (#:key inputs #:allow-other-keys) |
| 11131 | ;; Fix scilab script. |
| 11132 | (substitute* "bin/scilab" |
| 11133 | (("/bin/ls") |
| 11134 | (search-input-file inputs "bin/ls"))) |
| 11135 | ;; Fix core.start. |
| 11136 | (substitute* "modules/core/etc/core.start" |
| 11137 | (("'SCI/modules") |
| 11138 | "SCI+'/modules")))) |
| 11139 | ;; Prevent race condition |
| 11140 | (add-after 'pre-build 'build-parsers |
| 11141 | (lambda* (#:key (make-flags #~'()) #:allow-other-keys) |
| 11142 | (with-directory-excursion "modules/ast" |
| 11143 | (apply invoke "make" |
| 11144 | "src/cpp/parse/parsescilab.cpp" |
| 11145 | "src/cpp/parse/scanscilab.cpp" |
| 11146 | make-flags)))) |
| 11147 | ;; The startup script is mostly there to define the following env |
| 11148 | ;; variables properly. We can do this with guix directly. |
| 11149 | (add-after 'install 'rewrap-scilab-cli |
| 11150 | (lambda _ |
| 11151 | (define (bin path) (string-append #$output "/bin/" path)) |
| 11152 | (delete-file (bin "scilab-cli")) |
| 11153 | (wrap-program (bin "scilab-cli-bin") |
| 11154 | `("SCI" = (,(string-append #$output "/share/scilab"))) |
| 11155 | `("LD_LIBRARY_PATH" ":" prefix |
| 11156 | (,(string-append #$output "/lib/scilab"))) |
| 11157 | `("TCL_LIBRARY" = (,(string-append #$tcl "/lib"))) |
| 11158 | `("TK_LIBRARY" = (,(string-append #$tk "/lib")))) |
| 11159 | (copy-file (bin "scilab-cli-bin") (bin "scilab-cli")) |
| 11160 | (copy-file (bin ".scilab-cli-bin-real") (bin "scilab-cli-bin")) |
| 11161 | (delete-file (bin ".scilab-cli-bin-real")) |
| 11162 | (substitute* (bin "scilab-cli") |
| 11163 | ;; Also set SCIHOME to sensible XDG base dirs value. |
| 11164 | (("\\.scilab-cli-bin-real\"") |
| 11165 | (string-append |
| 11166 | "scilab-cli-bin\" -scihome " |
| 11167 | "\"${XDG_STATE_HOME:-$HOME/.local/state}/scilab/" |
| 11168 | #$(package-version this-package) "\"")) |
| 11169 | (("export SCI=") |
| 11170 | "unset LANGUAGE\nexport SCI=")))) |
| 11171 | (add-after 'rewrap-scilab-cli 'sanity-check |
| 11172 | (lambda _ |
| 11173 | (setenv "HOME" (getcwd)) |
| 11174 | (invoke (string-append #$output "/bin/scilab-cli") |
| 11175 | "-e" "\"quit;\""))))))) |
| 11176 | (home-page "https://www.scilab.org/") |
| 11177 | (synopsis "Software for engineers and scientists") |
| 11178 | (description "This package provides the non-graphical version of the Scilab |
| 11179 | software for engineers and scientists. Scilab is used for signal processing, |
| 11180 | statistical analysis, image enhancement, fluid dynamics simulations, numerical |
| 11181 | optimization, and modeling, simulation of explicit and implicit dynamical |
| 11182 | systems and symbolic manipulations.") |
| 11183 | (license (list license:gpl2 license:bsd-3)))) |
| 11184 | |
| 11185 | (define-public ruy |
| 11186 | (let ((commit "caa244343de289f913c505100e6a463d46c174de") |
| 11187 | (version "0") |
| 11188 | (revision "1")) |
| 11189 | (package |
| 11190 | (name "ruy") |
| 11191 | (version (git-version version revision commit)) |
| 11192 | (source (origin |
| 11193 | (method git-fetch) |
| 11194 | (uri (git-reference |
| 11195 | (url "https://github.com/google/ruy") |
| 11196 | (commit commit))) |
| 11197 | (file-name (git-file-name name version)) |
| 11198 | (sha256 |
| 11199 | (base32 |
| 11200 | "0j2g90nzam4h52zwx2vpanj8m17068cfb1zi4hcy0pyk52kb11dy")))) |
| 11201 | (build-system cmake-build-system) |
| 11202 | (arguments |
| 11203 | (list |
| 11204 | #:configure-flags |
| 11205 | #~(list "-DRUY_FIND_CPUINFO=ON" |
| 11206 | ;; Needed to make sure code is relocatable for use in |
| 11207 | ;; tensorflow. |
| 11208 | "-DCMAKE_CXX_FLAGS=-fPIC "))) |
| 11209 | (inputs (list cpuinfo)) |
| 11210 | (native-inputs (list googletest-1.12)) |
| 11211 | (home-page "https://github.com/google/ruy") |
| 11212 | (synopsis "Matrix multiplication library") |
| 11213 | (description |
| 11214 | "Ruy is a matrix multiplication library. Its focus is to cover the |
| 11215 | matrix multiplication needs of neural network inference engines. Its initial |
| 11216 | user has been TensorFlow Lite, where it is used by default on the ARM CPU |
| 11217 | architecture.") |
| 11218 | (license license:asl2.0)))) |
| 11219 | |
| 11220 | (define-public bliss |
| 11221 | (package |
| 11222 | (name "bliss") |
| 11223 | (version "0.77") |
| 11224 | (source (origin |
| 11225 | (method url-fetch) |
| 11226 | (uri (string-append |
| 11227 | "https://users.aalto.fi/~tjunttil/bliss/downloads/bliss-" |
| 11228 | version ".zip")) |
| 11229 | (sha256 |
| 11230 | (base32 |
| 11231 | "193jb63kdwfas2cf61xj3fgkvhb6v2mnbwwpr0jas3zk6j0bkj5c")))) |
| 11232 | (build-system cmake-build-system) |
| 11233 | (arguments |
| 11234 | (list |
| 11235 | ;; There are no tests |
| 11236 | #:tests? #f |
| 11237 | #:configure-flags #~(list "-DUSE_GMP=ON") ; Used by igraph |
| 11238 | #:phases |
| 11239 | #~(modify-phases %standard-phases |
| 11240 | ;; Ensure that GMP is used, otherwise the BigNum type changes. |
| 11241 | (add-after 'unpack 'define-use-gmp |
| 11242 | (lambda _ |
| 11243 | (substitute* "src/bignum.hh" |
| 11244 | (("#pragma once.*" all) |
| 11245 | (string-append all "#define BLISS_USE_GMP"))))) |
| 11246 | ;; Move headers under the bliss/ prefix. This is a Guix choice, |
| 11247 | ;; since there are no upstream installation instructions and the |
| 11248 | ;; header names are sufficiently generic to cause confusions with |
| 11249 | ;; other packages (e.g. "heap.hh"). |
| 11250 | (add-after 'define-use-gmp 'move-headers |
| 11251 | (lambda _ |
| 11252 | (substitute* (find-files "src") |
| 11253 | (("#include \"(.*)\"" _ path) |
| 11254 | (string-append "#include <bliss/" path ">"))) |
| 11255 | (mkdir-p "include/bliss") |
| 11256 | (for-each |
| 11257 | (lambda (file) |
| 11258 | (rename-file file |
| 11259 | (string-append "include/bliss/" (basename file)))) |
| 11260 | (find-files "src" "\\.(h|hh)$")) |
| 11261 | (substitute* "Doxyfile" |
| 11262 | (("INPUT *=.*") "INPUT = bliss")))) |
| 11263 | (add-after 'move-headers 'patch-cmake |
| 11264 | (lambda _ |
| 11265 | (let ((port (open-file "CMakeLists.txt" "a"))) |
| 11266 | (display |
| 11267 | (apply |
| 11268 | string-append |
| 11269 | ;; Install the executable and the shared library. |
| 11270 | "install(TARGETS bliss)\n" |
| 11271 | "install(TARGETS bliss-executable)\n" |
| 11272 | "install(DIRECTORY include/bliss DESTINATION include)\n" |
| 11273 | "target_link_libraries(bliss PUBLIC ${GMP_LIBRARIES})\n" |
| 11274 | ;; Missing include directories. |
| 11275 | (map |
| 11276 | (lambda (name) |
| 11277 | (string-append |
| 11278 | "target_include_directories(" name " PUBLIC\n" |
| 11279 | "${CMAKE_CURRENT_SOURCE_DIR}/include" |
| 11280 | " ${GMP_INCLUDE_DIR})\n")) |
| 11281 | '("bliss" "bliss_static" "bliss-executable"))) |
| 11282 | port) |
| 11283 | (close-port port)))) |
| 11284 | (add-after 'build 'build-doc |
| 11285 | (lambda _ |
| 11286 | (mkdir "doc") |
| 11287 | (with-directory-excursion "doc" |
| 11288 | (let ((srcdir (string-append "../../bliss-" #$version))) |
| 11289 | (copy-recursively (string-append srcdir "/include/bliss") |
| 11290 | "bliss") |
| 11291 | (invoke "doxygen" (string-append srcdir "/Doxyfile")))))) |
| 11292 | (add-after 'install 'install-doc |
| 11293 | (lambda _ |
| 11294 | (copy-recursively |
| 11295 | "doc/html" (string-append #$output "/share/doc/" |
| 11296 | #$name "-" #$version "/html"))))))) |
| 11297 | (native-inputs (list doxygen graphviz unzip)) |
| 11298 | (propagated-inputs (list gmp)) |
| 11299 | (home-page "https://users.aalto.fi/~tjunttil/bliss/index.html") |
| 11300 | (synopsis "Tool for computing automorphism groups and canonical labelings of graphs") |
| 11301 | (description "@code{bliss} is a library for computing automorphism groups |
| 11302 | +and canonical forms of graphs. It has both a command line user interface as |
| 11303 | +well as C++ and C programming language APIs.") |
| 11304 | (license license:lgpl3))) |
| 11305 | |
| 11306 | (define-public python-mathics-scanner |
| 11307 | ;; TODO: Package name has been changed upstream, as seen in pyproject.toml: |
| 11308 | ;; name = "Mathics3_Scanner" |
| 11309 | ;; See: <https://codeberg.org/guix/guix/issues/11317>. |
| 11310 | (package |
| 11311 | (name "python-mathics-scanner") |
| 11312 | (version "10.0.1") |
| 11313 | (source |
| 11314 | (origin |
| 11315 | (method git-fetch) |
| 11316 | (uri (git-reference |
| 11317 | (url "https://github.com/Mathics3/Mathics3-scanner") |
| 11318 | (commit version))) |
| 11319 | (file-name (git-file-name name version)) |
| 11320 | (sha256 |
| 11321 | (base32 |
| 11322 | "1ma9bdla9na2cc8g9b1jsnhnvs6jmai9dwqr4fzk5w3c2ykjd5vd")))) |
| 11323 | (build-system pyproject-build-system) |
| 11324 | (arguments |
| 11325 | (list |
| 11326 | #:phases |
| 11327 | #~(modify-phases %standard-phases |
| 11328 | (add-after 'unpack 'make-json-tables |
| 11329 | (lambda _ |
| 11330 | ;; Generate JSON character/operator tables (character-tables.json, |
| 11331 | ;; operators.json) which are pre-generated in the PyPI tarball |
| 11332 | ;; but not in git. The Makefile runs this script before |
| 11333 | ;; 'make dist'. Unlike in mathics-core, running the script here |
| 11334 | ;; works because it writes to its own source tree being built; |
| 11335 | ;; in mathics-core, the script tries to write to the installed |
| 11336 | ;; python-mathics-scanner package which is not allowed. |
| 11337 | (invoke "bash" "./admin-tools/make-JSON-tables.sh")))))) |
| 11338 | (propagated-inputs (list python-chardet python-click python-pyyaml)) |
| 11339 | (native-inputs (list python-pytest python-setuptools)) |
| 11340 | (home-page "https://mathics.org/") |
| 11341 | (synopsis |
| 11342 | "Character tables and tokenizer for Mathics and the Wolfram language") |
| 11343 | (description |
| 11344 | "This package provides character tables and a tokenizer for Mathics and |
| 11345 | the Wolfram language.") |
| 11346 | (license license:gpl3+))) |
| 11347 | |
| 11348 | (define-public python-mathics-pygments |
| 11349 | ;; TODO: Package name has been changed upstream, as seen in pyproject.toml: |
| 11350 | ;; name = "Mathics3_pygments" |
| 11351 | ;; See: <https://codeberg.org/guix/guix/issues/11317>. |
| 11352 | (package |
| 11353 | (name "python-mathics-pygments") |
| 11354 | (version "10.0.0") |
| 11355 | (source |
| 11356 | (origin |
| 11357 | (method git-fetch) |
| 11358 | (uri (git-reference |
| 11359 | (url "https://github.com/Mathics3/Mathics3-pygments") |
| 11360 | (commit version))) |
| 11361 | (file-name (git-file-name name version)) |
| 11362 | (sha256 |
| 11363 | (base32 "0j290iagz0k17rzjj09wa7jwmkhdqps21z8z8cliy2hnybx4zlkj")))) |
| 11364 | (build-system pyproject-build-system) |
| 11365 | (native-inputs |
| 11366 | (list python-pytest |
| 11367 | python-setuptools)) |
| 11368 | (propagated-inputs |
| 11369 | (list python-mathics-scanner |
| 11370 | python-pygments)) |
| 11371 | (home-page "https://mathics.org/") |
| 11372 | (synopsis "Wolfram language lexer for Pygments") |
| 11373 | (description |
| 11374 | "This package provides a Wolfram language lexer for Pygments.") |
| 11375 | (license license:expat))) |
| 11376 | |
| 11377 | (define-public python-mathics-core |
| 11378 | ;; TODO: Package name has been changed upstream, as seen in pyproject.toml: |
| 11379 | ;; name = "Mathics3" |
| 11380 | ;; See: <https://codeberg.org/guix/guix/issues/11317>. |
| 11381 | (package |
| 11382 | (name "python-mathics-core") |
| 11383 | (version "10.0.1") |
| 11384 | (source |
| 11385 | (origin |
| 11386 | (method git-fetch) |
| 11387 | (uri (git-reference |
| 11388 | (url "https://github.com/Mathics3/mathics-core") |
| 11389 | (commit version))) |
| 11390 | (file-name (git-file-name name version)) |
| 11391 | (sha256 |
| 11392 | (base32 "1wglm61i050g2sam8zrlqyav7m22jq0vkcq9wzi5364661lgh5a9")))) |
| 11393 | (arguments |
| 11394 | (list |
| 11395 | #:phases |
| 11396 | #~(modify-phases %standard-phases |
| 11397 | (add-before 'build 'set-home |
| 11398 | (lambda _ |
| 11399 | (setenv "HOME" "/tmp"))) |
| 11400 | (add-before 'check 'prepare-locales |
| 11401 | (lambda _ |
| 11402 | ;; Otherwise 210 tests fail because the real output would use |
| 11403 | ;; unicode arrow characters. With this, only 18 (symbolic) |
| 11404 | ;; tests fail. |
| 11405 | (setenv "MATHICS_CHARACTER_ENCODING" "ASCII")))))) |
| 11406 | (build-system pyproject-build-system) |
| 11407 | (native-inputs (list python-pytest python-setuptools)) |
| 11408 | (inputs (list llvm)) |
| 11409 | (propagated-inputs |
| 11410 | (list python-dateutil |
| 11411 | python-mathics-scanner |
| 11412 | python-mpmath |
| 11413 | python-numpy |
| 11414 | python-palettable |
| 11415 | python-pillow |
| 11416 | python-pint |
| 11417 | python-pympler |
| 11418 | python-requests |
| 11419 | python-scipy |
| 11420 | python-sympy |
| 11421 | python-timed-threads)) |
| 11422 | (synopsis "Computer algebra system") |
| 11423 | (home-page "https://mathics.org/") |
| 11424 | (description |
| 11425 | "This package provides a @acronym{Computer Algebra System, CAS}, an |
| 11426 | alternative to Wolfram Mathematica. |
| 11427 | |
| 11428 | However, it contains just the Mathics3 Kernel: Python modules for WL Built-in |
| 11429 | functions, variables, core primitives, e.g., Symbol, a parser to create |
| 11430 | Expressions, and an evaluator to execute them.") |
| 11431 | (license license:gpl3))) |
| 11432 | |
| 11433 | (define-public python-mathicsscript |
| 11434 | ;; TODO: Package name has been changed upstream, as seen in pyproject.toml: |
| 11435 | ;; name = "Mathics3-Frontend-CLI" |
| 11436 | ;; See: <https://codeberg.org/guix/guix/issues/11317>. |
| 11437 | (package |
| 11438 | (name "python-mathicsscript") |
| 11439 | (version "10.0.0") |
| 11440 | (source |
| 11441 | (origin |
| 11442 | (method url-fetch) |
| 11443 | (uri (pypi-uri "mathicsscript" version)) |
| 11444 | (sha256 |
| 11445 | (base32 "0krgcbvnkan60bsj87w6qhm450cwy84m50bx0031r2pprh4dbb5f")))) |
| 11446 | (build-system pyproject-build-system) |
| 11447 | (arguments |
| 11448 | `(#:tests? #f ;XXX: 1 of 3 failed |
| 11449 | #:phases |
| 11450 | (modify-phases %standard-phases |
| 11451 | (add-before 'build 'set-home-env |
| 11452 | (lambda _ |
| 11453 | (setenv "HOME" "/tmp")))))) |
| 11454 | (propagated-inputs (list python-click |
| 11455 | python-colorama |
| 11456 | python-columnize |
| 11457 | python-mathics-pygments |
| 11458 | python-mathics-scanner |
| 11459 | python-mathics-core |
| 11460 | python-networkx |
| 11461 | python-prompt-toolkit |
| 11462 | python-pygments |
| 11463 | python-term-background)) |
| 11464 | (native-inputs (list python-pytest python-setuptools)) |
| 11465 | (home-page "https://mathics.org/") |
| 11466 | (synopsis "Command-line interface to Mathics3") |
| 11467 | (description "This package provides a command-line interface to |
| 11468 | Mathics3.") |
| 11469 | (license license:gpl3))) |
| 11470 | |
| 11471 | (define-public python-mathics-django |
| 11472 | ;; TODO: Package name has been changed upstream, as seen in pyproject.toml: |
| 11473 | ;; name = "Mathics3-Frontend-django" |
| 11474 | ;; See: <https://codeberg.org/guix/guix/issues/11317>. |
| 11475 | (package |
| 11476 | (name "python-mathics-django") |
| 11477 | (version "10.0.0") |
| 11478 | (source |
| 11479 | (origin |
| 11480 | (method git-fetch) |
| 11481 | (uri (git-reference |
| 11482 | (url "https://github.com/Mathics3/Mathics3-Frontend-django") |
| 11483 | (commit version))) |
| 11484 | (file-name (git-file-name name version)) |
| 11485 | (sha256 |
| 11486 | (base32 "0320h1cp390gm0gjs3isjkcmksgbjvla9wd0ysmqjx3f106xvr5j")))) |
| 11487 | (build-system pyproject-build-system) |
| 11488 | (arguments |
| 11489 | `(#:phases |
| 11490 | (modify-phases %standard-phases |
| 11491 | (delete 'check) |
| 11492 | (add-after 'build 'check |
| 11493 | (lambda _ |
| 11494 | (setenv "PYTHONPATH" (getcwd)) |
| 11495 | (setenv "DJANGO_SETTINGS_MODULE" "mathics_django.settings") |
| 11496 | (invoke "django-admin" "test")))))) |
| 11497 | (propagated-inputs (list python-django |
| 11498 | python-mathics-scanner |
| 11499 | python-mathics-core |
| 11500 | python-matplotlib |
| 11501 | python-networkx |
| 11502 | python-pygments |
| 11503 | python-requests)) |
| 11504 | (native-inputs (list python-pytest python-setuptools python-wheel)) |
| 11505 | (home-page "https://mathics.org/") |
| 11506 | (synopsis "A Django front end for Mathics3.") |
| 11507 | (description "This package provides a Django front end for Mathics3.") |
| 11508 | (license license:gpl3))) |
| 11509 | |
| 11510 | (define-public python-mathics3-notebook-frontends |
| 11511 | (package |
| 11512 | (name "python-mathics3-notebook-frontends") |
| 11513 | (version "1.0.0") |
| 11514 | (source |
| 11515 | (origin |
| 11516 | (method git-fetch) |
| 11517 | (uri (git-reference |
| 11518 | (url "https://github.com/Mathics3/Mathics3-notebook-frontends") |
| 11519 | (commit version))) |
| 11520 | (file-name (git-file-name name version)) |
| 11521 | (sha256 |
| 11522 | (base32 "16fhjb1kcv9wa3b95zcakrvsr96qw75qikwdcnjiz6jncn9dli2n")))) |
| 11523 | (build-system pyproject-build-system) |
| 11524 | (arguments |
| 11525 | (list #:tests? #f)) ; no tests |
| 11526 | (native-inputs |
| 11527 | (list python-setuptools)) |
| 11528 | (propagated-inputs |
| 11529 | (list python-chardet |
| 11530 | python-charset-normalizer |
| 11531 | python-mathics-core |
| 11532 | python-requests |
| 11533 | python-urllib3)) |
| 11534 | (home-page "https://mathics.org/") |
| 11535 | (synopsis "Mathics frontend for Jupyter Notebook") |
| 11536 | (description |
| 11537 | "This package provides a Mathics3 frontend for @url{https://jupyter.org/, |
| 11538 | Jupyter Notebook} and @url{https://marimo.io/, Marimo}.") |
| 11539 | (license license:gpl3+))) |
| 11540 | |
| 11541 | (define-public lie |
| 11542 | (package |
| 11543 | (name "lie") |
| 11544 | (version "2.2.2") |
| 11545 | ;; Original: <http://www-math.univ-poitiers.fr/~maavl/LiE/conLiE.tar.gz> |
| 11546 | ;; This source has the license file added as allowed on |
| 11547 | ;; <http://www-math.univ-poitiers.fr/~maavl/LiE/>. |
| 11548 | (source |
| 11549 | (origin |
| 11550 | (method git-fetch) |
| 11551 | (uri (git-reference |
| 11552 | (url "https://github.com/daym/LiE") |
| 11553 | (commit (string-append "v" version)))) |
| 11554 | (file-name (git-file-name name version)) |
| 11555 | (sha256 |
| 11556 | (base32 "0qb9y08mdl2wr77lf61wv4xks429sw99xacb9gh91w242z0nbcqn")))) |
| 11557 | (build-system gnu-build-system) |
| 11558 | (arguments |
| 11559 | `(#:parallel-build? #f |
| 11560 | ;; There are test input files under progs/--but no expected results. |
| 11561 | #:tests? #f |
| 11562 | #:phases |
| 11563 | (modify-phases %standard-phases |
| 11564 | (replace 'configure |
| 11565 | (lambda* (#:key outputs #:allow-other-keys) |
| 11566 | (substitute* "make_lie" |
| 11567 | (("`/bin/pwd`") |
| 11568 | (string-append (assoc-ref outputs "out") |
| 11569 | "/bin"))))) |
| 11570 | (add-after 'install 'install-lie-program |
| 11571 | (lambda* (#:key outputs #:allow-other-keys) |
| 11572 | (for-each |
| 11573 | (lambda (name) |
| 11574 | (install-file name |
| 11575 | (string-append (assoc-ref outputs "out") |
| 11576 | "/bin"))) |
| 11577 | '("lie" "Lie.exe"))))))) |
| 11578 | (native-inputs |
| 11579 | (list bison)) |
| 11580 | (inputs |
| 11581 | (list readline)) |
| 11582 | (synopsis "Lie group computer algebra module") |
| 11583 | (description "This package provides a computer algebra module for Lie |
| 11584 | groups. Documentation is available on |
| 11585 | @url{http://www-math.univ-poitiers.fr/~maavl/pdf/LiE-manual.pdf}.") |
| 11586 | (home-page "http://www-math.univ-poitiers.fr/~maavl/LiE/") |
| 11587 | ;; <http://www-math.univ-poitiers.fr/~maavl/LiE/> says LGPL. |
| 11588 | (license license:lgpl3+))) |
| 11589 | |
| 11590 | (define-public exprtk |
| 11591 | (package |
| 11592 | (name "exprtk") |
| 11593 | (version "0.0.3") |
| 11594 | (source |
| 11595 | (origin |
| 11596 | (method git-fetch) |
| 11597 | (uri (git-reference |
| 11598 | (url "https://github.com/ArashPartow/exprtk") |
| 11599 | (commit version))) |
| 11600 | (file-name (git-file-name name version)) |
| 11601 | (sha256 |
| 11602 | (base32 "0pszh11w29nc256qhil51g3635n06ncf0ihg7g4h86jrhqsk7183")))) |
| 11603 | (build-system copy-build-system) |
| 11604 | (arguments |
| 11605 | '(#:install-plan '(("exprtk.hpp" "include/")))) |
| 11606 | (synopsis "C++ Mathematical Expression Parsing And Evaluation Library") |
| 11607 | (description "ExprTk is a C++ headers only library for mathematical |
| 11608 | expression parsing and evaluation.") |
| 11609 | (home-page "https://www.partow.net/programming/exprtk/index.html") |
| 11610 | (license license:expat))) |
| 11611 | |
| 11612 | (define-public highs |
| 11613 | (package |
| 11614 | (name "highs") |
| 11615 | (version "1.15.1") |
| 11616 | (source |
| 11617 | (origin |
| 11618 | (method git-fetch) |
| 11619 | (uri (git-reference |
| 11620 | (url "https://github.com/ERGO-Code/HiGHS") |
| 11621 | (commit (string-append "v" version)))) |
| 11622 | (file-name (git-file-name name version)) |
| 11623 | (sha256 |
| 11624 | (base32 "11hh958jvfqrc7rm3xcwx2p71i49cb4cyafajlmkr8xzyb00y851")))) |
| 11625 | (build-system cmake-build-system) |
| 11626 | (home-page "https://highs.dev") |
| 11627 | (synopsis "High performance software for linear optimization") |
| 11628 | (description |
| 11629 | "HiGHS provides serial and parallel solvers for large-scale sparse |
| 11630 | linear programming (LP), mixed-integer programming (MIP), and quadratic |
| 11631 | programming (QP) models.") |
| 11632 | (license license:expat))) |
| 11633 | |
| 11634 | (define-public trilinos-zoltan |
| 11635 | (package |
| 11636 | (name "trilinos-zoltan") |
| 11637 | (version "16.1.0") |
| 11638 | (source |
| 11639 | (origin |
| 11640 | (method git-fetch) |
| 11641 | (uri (git-reference (url "https://github.com/trilinos/Trilinos") |
| 11642 | (commit (string-append "trilinos-release-" |
| 11643 | (string-replace-substring |
| 11644 | version "." "-"))))) |
| 11645 | (file-name (git-file-name "trilinos" version)) |
| 11646 | (sha256 (base32 "1snn8vzxwrk9qsvv9wsv4zf99cvcja4shgjpsavp893v9gvgp2gm")))) |
| 11647 | (build-system cmake-build-system) |
| 11648 | (inputs (list openmpi |
| 11649 | perl |
| 11650 | python |
| 11651 | python-wrapper |
| 11652 | tcsh |
| 11653 | pt-scotch |
| 11654 | zlib)) |
| 11655 | (arguments |
| 11656 | (list |
| 11657 | #:configure-flags |
| 11658 | #~(list "-DTrilinos_ENABLE_Zoltan=ON" |
| 11659 | "-DBUILD_SHARED_LIBS=ON" |
| 11660 | "-DTPL_ENABLE_MPI=ON" |
| 11661 | "-DTPL_ENABLE_METIS=OFF" |
| 11662 | "-DTPL_ENABLE_Scotch=ON" |
| 11663 | "-DTPL_ENABLE_Zlib=ON" |
| 11664 | "-DTrilinos_ENABLE_Fortran=OFF" |
| 11665 | "-DZoltan_ENABLE_TESTS=ON" |
| 11666 | ;; disable failing tests |
| 11667 | "-DZoltan_ch_brack2_3_zoltan_parallel_DISABLE=ON" |
| 11668 | "-DZoltan_ch_grid20x19_zoltan_parallel_DISABLE=ON" |
| 11669 | "-DZoltan_hg_felix_zoltan_parallel_DISABLE=ON" |
| 11670 | "-DZoltan_hg_ibm03_zoltan_parallel_DISABLE=ON" |
| 11671 | "-DZoltan_ch_degenerate_zoltan_parallel_DISABLE=ON" |
| 11672 | "-DZoltan_ch_degenerateAA_zoltan_parallel_DISABLE=ON" |
| 11673 | "-DZoltan_ch_ewgt_scotch_parallel_DISABLE=ON" |
| 11674 | "-DZoltan_ch_hammond_zoltan_parallel_DISABLE=ON" |
| 11675 | "-DZoltan_ch_hammond_scotch_parallel_DISABLE=ON" |
| 11676 | "-DZoltan_ch_hammond2_zoltan_parallel_DISABLE=ON" |
| 11677 | "-DZoltan_ch_hughes_zoltan_parallel_DISABLE=ON" |
| 11678 | "-DZoltan_ch_simple_scotch_parallel_DISABLE=ON" |
| 11679 | "-DZoltan_hg_cage10_zoltan_parallel_DISABLE=ON" |
| 11680 | "-DZoltan_ch_vwgt_scotch_parallel_DISABLE=ON"))) |
| 11681 | (home-page "https://trilinos.github.io/") |
| 11682 | (synopsis |
| 11683 | "Parallel partitioning, load balancing and data-management services") |
| 11684 | (description |
| 11685 | "The Zoltan library is a collection of data management services for parallel, |
| 11686 | unstructured, adaptive, and dynamic applications. It simplifies the |
| 11687 | load-balancing, data movement, unstructured communication, and memory usage |
| 11688 | difficulties that arise in dynamic applications such as adaptive |
| 11689 | finite-element methods, particle methods, and crash simulations. Zoltan's |
| 11690 | data-structure neutral design also lets a wide range of applications use it |
| 11691 | without imposing restrictions on application data structures. Its object-based |
| 11692 | interface provides a simple and inexpensive way for application developers to |
| 11693 | use the library and researchers to make new capabilities available under a |
| 11694 | common interface. |
| 11695 | ") |
| 11696 | (license license:bsd-3))) |
| 11697 | |
| 11698 | (define-public xdmf |
| 11699 | (package |
| 11700 | (name "xdmf") |
| 11701 | ;; Project does not publish releases / tags |
| 11702 | (properties '((commit . "04a84bab0eb1568e0f1a27c8fb60c6931efda003") |
| 11703 | (revision . "0"))) |
| 11704 | (version (git-version "3.0.0" |
| 11705 | (assoc-ref properties 'revision) |
| 11706 | (assoc-ref properties 'commit))) |
| 11707 | (source |
| 11708 | (origin |
| 11709 | (method git-fetch) |
| 11710 | (uri (git-reference |
| 11711 | (url "https://gitlab.kitware.com/xdmf/xdmf") |
| 11712 | (commit (assoc-ref properties 'commit)))) |
| 11713 | (file-name (git-file-name name version)) |
| 11714 | (patches |
| 11715 | (search-patches "xdmf-3.0.0-hdf5.patch")) |
| 11716 | (sha256 |
| 11717 | (base32 "06k4vibkvgxlzkn06x470aq5q18p7yhql8awrpdz3czys3z8i288")))) |
| 11718 | (build-system cmake-build-system) |
| 11719 | (arguments |
| 11720 | (list #:tests? #f)) ;has no tests |
| 11721 | (inputs |
| 11722 | (list boost hdf5 libxml2)) |
| 11723 | (home-page "https://www.xdmf.org/index.html") |
| 11724 | (synopsis "XDMF library") |
| 11725 | (description |
| 11726 | "This package provides the eXtensible Data Model and Format (XDMF) C++ |
| 11727 | library.") |
| 11728 | (license license:bsd-4))) |