| 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 toolkits) |
| 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 cobra |
| 411 | (package |
| 412 | (name "cobra") |
| 413 | (version "1.0.1") |
| 414 | (source (origin |
| 415 | (method git-fetch) |
| 416 | (uri (git-reference |
| 417 | (url "https://github.com/trailofbits/CoBRA") |
| 418 | (commit (string-append "v" version)))) |
| 419 | (file-name (git-file-name name version)) |
| 420 | (sha256 |
| 421 | (base32 "1f66503kl9gl3wnr4ibs43bkmgrh8zphxj1pfb9vf7czrb14zaww")))) |
| 422 | (build-system cmake-build-system) |
| 423 | (arguments (list #:configure-flags #~(list "-DUSE_EXTERNAL_LLVM=ON" |
| 424 | "-DCOBRA_BUILD_TESTS=ON") |
| 425 | ;; Skip heavy test cases. |
| 426 | #:test-exclude "(SiM|GAM)BADataset.*")) |
| 427 | (inputs (list abseil-cpp google-highway llvm z3)) |
| 428 | (native-inputs (list googletest)) |
| 429 | (home-page "https://github.com/trailofbits/CoBRA") |
| 430 | (synopsis "Coefficient-based reconstruction of arithmetic") |
| 431 | (description "CoBRA is a mixed boolean-arithmetic expression simplifier |
| 432 | aimed at deobfuscation.") |
| 433 | (license license:asl2.0))) |
| 434 | |
| 435 | (define-public coda |
| 436 | (package |
| 437 | (name "coda") |
| 438 | (version "2.25.6") |
| 439 | (source |
| 440 | (origin |
| 441 | (method git-fetch) |
| 442 | (uri (git-reference |
| 443 | (url "https://github.com/stcorp/coda") |
| 444 | (commit version))) |
| 445 | (file-name (git-file-name name version)) |
| 446 | (sha256 |
| 447 | (base32 "1876bx0cpxb6di5r08wxwjrxl50zhh5f8d740xgjsfmw9s7kk4j5")) |
| 448 | (modules '((guix build utils))) |
| 449 | (snippet |
| 450 | ;; Make sure we don't use the bundled software. |
| 451 | #~(begin |
| 452 | (substitute* "Makefile.am" |
| 453 | (("libexpat_internal\\.la libpcre2_internal\\.la libz_internal\\.la") |
| 454 | "")) |
| 455 | (with-directory-excursion "libcoda" |
| 456 | (for-each delete-file-recursively '("zlib" "pcre2" "expat"))))))) |
| 457 | (build-system gnu-build-system) |
| 458 | (arguments |
| 459 | (list #:configure-flags #~(list "--with-hdf5" "--enable-python" |
| 460 | "LIBS= -lz -lpcre2-posix -lexpat"))) |
| 461 | (native-inputs |
| 462 | (list autoconf |
| 463 | automake |
| 464 | bison |
| 465 | flex |
| 466 | gfortran |
| 467 | libtool |
| 468 | python |
| 469 | python-numpy)) |
| 470 | (inputs |
| 471 | (list zlib |
| 472 | pcre |
| 473 | pcre2 |
| 474 | expat |
| 475 | hdf5)) |
| 476 | (synopsis "Common interface to various earth observation data formats") |
| 477 | (description |
| 478 | "The Common Data Access toolbox (CODA) provides a set of interfaces for |
| 479 | reading remote sensing data from earth observation data files. It consists of |
| 480 | command line applications and interfaces to the C, Fortran, Python, and Java |
| 481 | programming languages.") |
| 482 | (home-page "https://stcorp.nl/coda") |
| 483 | (license license:gpl2+))) |
| 484 | |
| 485 | (define-public cvc5 |
| 486 | (package |
| 487 | (name "cvc5") |
| 488 | (version "1.4.2") |
| 489 | (source |
| 490 | (origin |
| 491 | (method git-fetch) |
| 492 | (uri (git-reference |
| 493 | (url "https://github.com/cvc5/cvc5/") |
| 494 | (commit (string-append "cvc5-" version)))) |
| 495 | (file-name (git-file-name name version)) |
| 496 | (sha256 |
| 497 | (base32 "1g0zy3vn5bj2lz3f2yi8fqansr195zdcn5rs29znilp76rhrh6hs")))) |
| 498 | (build-system cmake-build-system) |
| 499 | (arguments |
| 500 | (list |
| 501 | #:build-type "Production" |
| 502 | #:configure-flags |
| 503 | ;; Keep the flags in sync with the options set by `./configure --best`. |
| 504 | ;; See <https://github.com/cvc5/cvc5/blob/cvc5-1.3.3/configure.sh#L216-L222>. |
| 505 | #~(list "-DBUILD_SHARED_LIBS=1" |
| 506 | "-DENABLE_GPL=ON" |
| 507 | "-DUSE_EDITLINE=ON" |
| 508 | "-DUSE_CLN=ON" |
| 509 | "-DUSE_POLY=ON" |
| 510 | "-DENABLE_IPO=ON" |
| 511 | "-DUSE_CRYPTOMINISAT=ON") |
| 512 | #:phases |
| 513 | #~(modify-phases %standard-phases |
| 514 | ;; Guix's libedit package does not require -ltinfo. |
| 515 | (add-after 'unpack 'remove-tinfo |
| 516 | (lambda _ |
| 517 | (substitute* "cmake/FindEditline.cmake" |
| 518 | ((" tinfo") |
| 519 | "")))) |
| 520 | ;; The 'check phase requires test programs build using 'build-tests'. |
| 521 | (add-before 'check 'build-tests |
| 522 | (lambda* (#:key tests? #:allow-other-keys) |
| 523 | (when tests? |
| 524 | (invoke "cmake" "--build" "." "--target" "build-tests"))))))) |
| 525 | (inputs (list cadical-2.1 |
| 526 | cln |
| 527 | cryptominisat |
| 528 | gmp |
| 529 | libedit |
| 530 | libpoly |
| 531 | symfpu)) |
| 532 | (native-inputs (list pkg-config |
| 533 | python-minimal |
| 534 | python-tomli |
| 535 | python-pyparsing |
| 536 | python-pexpect)) |
| 537 | (home-page "https://cvc5.github.io/") |
| 538 | (synopsis "Satisfiability modulo theories solver") |
| 539 | (description |
| 540 | "cvc5 is a solver for @acronym{SMT, satisfiability modulo theories} |
| 541 | problems. It processes input in the standard SMT-LIB format.") |
| 542 | (license (list license:expat license:bsd-3)))) |
| 543 | |
| 544 | (define-public go-github-com-cpmech-gosl |
| 545 | (package |
| 546 | (name "go-github-com-cpmech-gosl") |
| 547 | (version "1.2.12") |
| 548 | (source |
| 549 | (origin |
| 550 | (method git-fetch) |
| 551 | (uri (git-reference |
| 552 | (url "https://github.com/cpmech/gosl") |
| 553 | (commit (string-append "v" version)))) |
| 554 | (file-name (git-file-name name version)) |
| 555 | (sha256 |
| 556 | (base32 "1gfx8wqfrxsssprdf3ccgm60nv65dgsygwrx0a1ajga3lzp6iw2d")))) |
| 557 | (build-system go-build-system) |
| 558 | (arguments |
| 559 | (list |
| 560 | #:skip-build? #t |
| 561 | #:import-path "github.com/cpmech/gosl" |
| 562 | #:test-flags #~(list "-vet=off") |
| 563 | #:phases |
| 564 | #~(modify-phases %standard-phases |
| 565 | ;; Adapt la flags for Guix libraries. |
| 566 | (add-after 'unpack 'patch-la-flags |
| 567 | (lambda* (#:key import-path #:allow-other-keys) |
| 568 | (substitute* (string-append "src/" import-path "/la/flags.go") |
| 569 | (("_seq") ""))))))) |
| 570 | (propagated-inputs |
| 571 | (list fftw |
| 572 | gfortran |
| 573 | (list gfortran "lib") |
| 574 | lapack |
| 575 | metis |
| 576 | mumps |
| 577 | openblas |
| 578 | suitesparse)) |
| 579 | (home-page "https://github.com/cpmech/gosl") |
| 580 | (synopsis "Go Scientific Library") |
| 581 | (description |
| 582 | "Gosl is a set of tools for developing scientific simulations using the |
| 583 | Go programing language. It provides numerical methods and solvers for |
| 584 | differential equations but also present some functions for @acronym{Fast |
| 585 | Fourier Transforms, FFT}, the generation of random numbers, probability |
| 586 | distributions, and computational geometry. |
| 587 | |
| 588 | Gosl includes the following Go packages: |
| 589 | |
| 590 | @itemize |
| 591 | @item @code{chk} - to check numerical results and for unit testing |
| 592 | @item @code{fun} - special functions, DFT, FFT, Bessel, elliptical integrals, |
| 593 | orthogonal polynomials, interpolators |
| 594 | @item @code{gm} - geometry algorithms and structures |
| 595 | @item @code{hb} - pseudo hierarchical binary (hb) data file format |
| 596 | @item @code{io} - input/output, including printing to the terminal and |
| 597 | handling files |
| 598 | @item @code{la} - linear algebra: vector, matrix, efficient sparse solvers, |
| 599 | eigenvalues, decompositions |
| 600 | @item @code{num} - fundamental numerical methods such as root solvers, |
| 601 | non-linear solvers, numerical derivatives, and quadrature |
| 602 | @item @code{ode} - solvers for ordinary differential equations |
| 603 | @item @code{opt} - numerical optimization: Interior Point, Conjugate |
| 604 | Gradients, Powell, Grad Descent |
| 605 | @item @code{pde} - solvers for partial differential equations (FDM, Spectral, |
| 606 | FEM) |
| 607 | @item @code{rnd} - random numbers and probability distributions |
| 608 | @item @code{utl} - to generate series (e.g., linspace) and other functions as |
| 609 | in pylab/matlab/octave |
| 610 | @end itemize") |
| 611 | (license license:bsd-3))) |
| 612 | |
| 613 | (define-public qdldl |
| 614 | (package |
| 615 | (name "qdldl") |
| 616 | (version "0.1.9") |
| 617 | (source |
| 618 | (origin |
| 619 | (method git-fetch) |
| 620 | (uri (git-reference |
| 621 | (url "https://github.com/osqp/qdldl") |
| 622 | (commit (string-append "v" version)))) |
| 623 | (file-name (git-file-name name version)) |
| 624 | (sha256 |
| 625 | (base32 "0vm9a51ar5kz4lmz01ydkk757ppzjnxy49rjbm56rwj65smp26d5")))) |
| 626 | (build-system cmake-build-system) |
| 627 | (arguments |
| 628 | (list #:configure-flags #~(list "-DQDLDL_UNITTESTS=ON"))) |
| 629 | (home-page "https://github.com/osqp/qdldl") |
| 630 | (synopsis "LDL factorisation routine") |
| 631 | (description |
| 632 | "This package provides a free |
| 633 | @url{https://en.wikipedia.org/wiki/Cholesky_decomposition#LDL_decomposition, |
| 634 | @acronym{LDL, Lower-Diagonal-Lower}} factorisation routine for quasi-definite |
| 635 | linear systems: @code{Ax=b}.") |
| 636 | (license license:asl2.0))) |
| 637 | |
| 638 | (define-public qhull |
| 639 | (package |
| 640 | (name "qhull") |
| 641 | (version "2020.2") |
| 642 | (source (origin |
| 643 | (method url-fetch) |
| 644 | (uri (string-append "http://www.qhull.org/download/qhull-" |
| 645 | (car (string-split version #\.)) |
| 646 | "-src-8.0.2.tgz")) |
| 647 | (sha256 |
| 648 | (base32 |
| 649 | "0zlbhg0lb6j60188c2xhcrvviskr079552icjldqhy1jhgmxghmm")))) |
| 650 | (build-system cmake-build-system) |
| 651 | (arguments |
| 652 | `(#:configure-flags '("-DLINK_APPS_SHARED=ON" |
| 653 | "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"))) |
| 654 | (synopsis "Calculate convex hulls and related structures") |
| 655 | (description |
| 656 | "@code{Qhull} computes the convex hull, Delaunay triangulation, Voronoi |
| 657 | diagram, halfspace intersection about a point, furthest-site Delaunay |
| 658 | triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, |
| 659 | 3-d, 4-d, and higher dimensions. @code{Qhull} implements the Quickhull |
| 660 | algorithm for computing the convex hull. It handles roundoff errors from |
| 661 | floating point arithmetic. It computes volumes, surface areas, and |
| 662 | approximations to the convex hull. |
| 663 | |
| 664 | @code{Qhull} does not support triangulation of non-convex surfaces, mesh |
| 665 | generation of non-convex objects, medium-sized inputs in 9-D and higher, alpha |
| 666 | shapes, weighted Voronoi diagrams, Voronoi volumes, or constrained Delaunay |
| 667 | triangulations.") |
| 668 | (home-page "http://qhull.org") |
| 669 | (license (license:non-copyleft "file://COPYING.txt" |
| 670 | "See COPYING in the distribution.")))) |
| 671 | |
| 672 | (define-public qrupdate-ng |
| 673 | (package |
| 674 | (name "qrupdate-ng") |
| 675 | (version "1.3.0") |
| 676 | (source |
| 677 | (origin |
| 678 | (method git-fetch) |
| 679 | (uri (git-reference |
| 680 | (url "https://gitlab.mpi-magdeburg.mpg.de/koehlerm/qrupdate-ng") |
| 681 | (commit (string-append "v" version)))) |
| 682 | (file-name (git-file-name name version)) |
| 683 | (sha256 |
| 684 | (base32 "0x7wfib9v7fbq963dqqyimp7039g4nw3ycyzxmvxff47zp3azr4v")))) |
| 685 | (build-system cmake-build-system) |
| 686 | (inputs |
| 687 | (list gfortran openblas)) |
| 688 | (synopsis "Fortran library implementing matrix decomposition algorithms") |
| 689 | (description |
| 690 | "@code{Qrupdate-ng} is a Fortran library for fast updating of QR, |
| 691 | Cholesky, and LU decompositions. It supports the follwoing matrix |
| 692 | decompositions: |
| 693 | @enumerate |
| 694 | @item QR rank-1 update (`qr1up`) |
| 695 | @item QR column insert (`qrinc`) |
| 696 | @item QR column delete (`qrdec`) |
| 697 | @item QR column shift (`qrshc`) |
| 698 | @item QR row insert (`qrinr`) |
| 699 | @item QR row delete (`qrder`) |
| 700 | @item Cholesky rank-1 update (`ch1up`) |
| 701 | @item Cholesky rank-1 downdate (`ch1dn`) |
| 702 | @item Cholesky symmetric insert (`chinx`) |
| 703 | @item Cholesky symmetric insert (`chdex`) |
| 704 | @item Cholesky symmetric shift (`chshx`) |
| 705 | @item LU rank-1 update (`lu1up`) |
| 706 | @item LU pivoted rank-1 update (`lup1up`) |
| 707 | @end enumerate\n.") |
| 708 | (home-page "https://gitlab.mpi-magdeburg.mpg.de/koehlerm/qrupdate-ng") |
| 709 | (license license:gpl3+))) |
| 710 | |
| 711 | (define-public units |
| 712 | (package |
| 713 | (name "units") |
| 714 | (version "2.27") |
| 715 | (source (origin |
| 716 | (method url-fetch) |
| 717 | (uri (string-append "mirror://gnu/units/units-" version |
| 718 | ".tar.gz")) |
| 719 | (sha256 (base32 |
| 720 | "045ymd24906ng4m5l7zlpnk89sr92rx9wx46x7p0hz1fcw4xpfz1")))) |
| 721 | (build-system gnu-build-system) |
| 722 | (inputs |
| 723 | (list bash-minimal ;for wrap-program |
| 724 | readline |
| 725 | python-wrapper ;for 'units_cur' script |
| 726 | python-requests)) |
| 727 | (arguments |
| 728 | `(#:phases (modify-phases %standard-phases |
| 729 | (add-after 'install 'wrap-units_cur |
| 730 | (lambda* (#:key outputs #:allow-other-keys) |
| 731 | (let* ((out (assoc-ref outputs "out")) |
| 732 | (bin (string-append out "/bin"))) |
| 733 | (wrap-program (string-append bin "/units_cur") |
| 734 | `("GUIX_PYTHONPATH" ":" prefix |
| 735 | ,(search-path-as-string->list |
| 736 | (getenv "GUIX_PYTHONPATH")))))))))) |
| 737 | (synopsis "Conversion between thousands of scales") |
| 738 | (description |
| 739 | "GNU Units converts numeric quantities between units of measure. It |
| 740 | can handle scale changes through adaptive usage of standard scale |
| 741 | prefixes (micro-, kilo-, etc.). It can also handle nonlinear |
| 742 | conversions such as Fahrenheit to Celsius. Its interpreter is powerful |
| 743 | enough to be used effectively as a scientific calculator.") |
| 744 | (license license:gpl3+) |
| 745 | (home-page "https://www.gnu.org/software/units/"))) |
| 746 | |
| 747 | (define-public ddsmt |
| 748 | (package |
| 749 | (name "ddsmt") |
| 750 | (version "2.0.6") |
| 751 | (source |
| 752 | (origin |
| 753 | (method git-fetch) |
| 754 | (uri (git-reference |
| 755 | (url "https://github.com/ddsmt/ddSMT") |
| 756 | (commit (string-append "v" version)))) |
| 757 | (file-name (git-file-name name version)) |
| 758 | (sha256 |
| 759 | (base32 "0dj8dwzq6ix7yrifq8mahnwvd0b78hpfjy2vdm534avyb5jyv083")) |
| 760 | (patches (search-patches "ddsmt-console-script-loading.patch")))) |
| 761 | (build-system pyproject-build-system) |
| 762 | (arguments |
| 763 | (list |
| 764 | #:phases |
| 765 | #~(modify-phases %standard-phases |
| 766 | ;; Don't execute git(1) to determine the version. |
| 767 | (add-after 'unpack 'set-version-without-git |
| 768 | (lambda _ |
| 769 | (call-with-output-file "ddsmt/version.py" |
| 770 | (lambda (port) |
| 771 | (format port "VERSION = ~s~%" #$version))))) |
| 772 | ;; See <https://github.com/ddsmt/ddSMT/pull/40>. |
| 773 | (add-after 'unpack 'fix-import-path |
| 774 | (lambda _ |
| 775 | (substitute* "setup.cfg" |
| 776 | (("ddsmt:__main__.main") |
| 777 | "ddsmt.__main__:main")))) |
| 778 | (add-after 'unpack 'reference-gprof2dot-by-path |
| 779 | (lambda* (#:key inputs #:allow-other-keys) |
| 780 | (substitute* "ddsmt/debug_utils.py" |
| 781 | (("'gprof2dot'") |
| 782 | (format #f "'~a'" (search-input-file inputs "bin/gprof2dot"))))))))) |
| 783 | (inputs (list gprof2dot)) |
| 784 | (native-inputs (list python-pytest python-setuptools)) |
| 785 | (home-page "https://github.com/ddsmt/ddSMT") |
| 786 | (synopsis "Delta debugger for SMT-LIBv2 files") |
| 787 | (description |
| 788 | "This package provides a delta debugger for input in the |
| 789 | SMT-LIB language and its dialects and extensions. It serves as an input |
| 790 | minimizer for SMT-LIB(-like) input that triggers interesting behavior for |
| 791 | a given command.") |
| 792 | (license license:expat))) |
| 793 | |
| 794 | (define-public double-conversion |
| 795 | (package |
| 796 | (name "double-conversion") |
| 797 | (version "3.1.5") |
| 798 | (home-page "https://github.com/google/double-conversion") |
| 799 | (source (origin |
| 800 | (method git-fetch) |
| 801 | (uri (git-reference (url home-page) |
| 802 | (commit (string-append "v" version)))) |
| 803 | (file-name (git-file-name name version)) |
| 804 | (sha256 |
| 805 | (base32 |
| 806 | "0csy4pjw1p8rp6g5qxi2h0ychhhp1fldv7gb761627fs2mclw9gv")))) |
| 807 | (build-system cmake-build-system) |
| 808 | (arguments |
| 809 | '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) |
| 810 | (synopsis "Conversion routines for IEEE doubles") |
| 811 | (description |
| 812 | "The double-conversion library provides binary-decimal and decimal-binary |
| 813 | routines for IEEE doubles. The library consists of efficient conversion |
| 814 | routines that have been extracted from the V8 JavaScript engine.") |
| 815 | (license license:bsd-3))) |
| 816 | |
| 817 | (define-public dionysus |
| 818 | (package |
| 819 | (name "dionysus") |
| 820 | (version "1.4.0") |
| 821 | (source (origin |
| 822 | (method url-fetch) |
| 823 | (uri (string-append "mirror://gnu/dionysus/dionysus-" version |
| 824 | ".tar.xz")) |
| 825 | (sha256 |
| 826 | (base32 |
| 827 | "194pzs1mlsj4ww6v37qq3961h5hckm5h805cv0r14xj3g9wfx2sk")))) |
| 828 | (build-system gnu-build-system) |
| 829 | (inputs (list tcl)) ;for 'tclsh' |
| 830 | (synopsis "Local search for universal constants and scientific values") |
| 831 | (description |
| 832 | "GNU Dionysus is a convenient system for quickly retrieving the values of |
| 833 | mathematical constants used in science and engineering. Values can be |
| 834 | searched using a simple command-line tool, choosing from three databases: |
| 835 | universal constants, atomic numbers, and constants related to |
| 836 | semiconductors.") |
| 837 | (license license:gpl3+) |
| 838 | (home-page "https://www.gnu.org/software/dionysus/"))) |
| 839 | |
| 840 | (define-public dozenal |
| 841 | ;; There is no recent release, so use the latest commit. |
| 842 | (let ((revision "1") |
| 843 | (commit "328bc03ad544179f2cccda36763358c4216f188e")) |
| 844 | (package |
| 845 | (name "dozenal") |
| 846 | (version (git-version "12010904-3" revision commit)) |
| 847 | (source |
| 848 | (origin |
| 849 | (method git-fetch) |
| 850 | (uri (git-reference |
| 851 | (url "https://codeberg.org/dgoodmaniii/dozenal") |
| 852 | (commit commit))) |
| 853 | (file-name (git-file-name name version)) |
| 854 | (sha256 |
| 855 | (base32 |
| 856 | "0knwfwjqdv854l5ny7csdpvp7r0md6a2k43a1l2lkyw9k3cglpph")))) |
| 857 | (build-system gnu-build-system) |
| 858 | (arguments |
| 859 | (list |
| 860 | ;; Some test scripts are included, but no makefile-driven |
| 861 | ;; tests, and they are all quite manual to run and check. |
| 862 | #:tests? #f |
| 863 | ;; Running with `make -j' causes the build to fail. This is likely |
| 864 | ;; because this project uses the "recursive make" structure, where |
| 865 | ;; each subdirectory contains its own make file, which is called by |
| 866 | ;; the top-level makefile. |
| 867 | #:parallel-build? #f |
| 868 | #:make-flags |
| 869 | #~(list (string-append "prefix=" #$output)) |
| 870 | #:phases |
| 871 | #~(modify-phases %standard-phases |
| 872 | (add-after 'unpack 'chdir |
| 873 | (lambda _ |
| 874 | (chdir "dozenal"))) |
| 875 | (add-after 'chdir 'patch-lua-references |
| 876 | (lambda _ |
| 877 | (let ((lua-name (strip-store-file-name |
| 878 | #$(this-package-input "lua")))) |
| 879 | (substitute* '("dozcal/Makefile" |
| 880 | "dozlua/Makefile") |
| 881 | (("lua52") |
| 882 | (string-take lua-name |
| 883 | (string-rindex lua-name #\.))))))) |
| 884 | (delete 'configure) |
| 885 | (add-before 'install 'make-bin-dir |
| 886 | (lambda _ |
| 887 | (mkdir-p (string-append #$output "/bin")))) |
| 888 | (add-after 'install 'install-html-docs |
| 889 | (lambda _ |
| 890 | (invoke "make" |
| 891 | (string-append "prefix=" #$output) |
| 892 | "installhtml"))) |
| 893 | (add-after 'install-html-docs 'split-outputs |
| 894 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 895 | (for-each |
| 896 | (lambda (prog) |
| 897 | (let ((orig (string-append #$output "/bin/" prog)) |
| 898 | (dst (string-append #$output:gui "/bin/" prog)) |
| 899 | (man-orig (string-append #$output |
| 900 | "/share/man/man1/" |
| 901 | prog ".1")) |
| 902 | (man-dst (string-append #$output:gui |
| 903 | "/share/man/man1/" |
| 904 | prog ".1"))) |
| 905 | (mkdir-p (dirname dst)) |
| 906 | (rename-file orig dst) |
| 907 | (mkdir-p (dirname man-dst)) |
| 908 | (rename-file man-orig man-dst))) |
| 909 | '("xdozdc" "gdozdc")) |
| 910 | (wrap-program (string-append #$output:gui "/bin/" "gdozdc") |
| 911 | `("PATH" = (,(string-append #$output "/bin"))) |
| 912 | `("PERL5LIB" = (,(getenv "PERL5LIB"))))))))) |
| 913 | (outputs '("out" "gui")) |
| 914 | (native-inputs (list groff pkg-config)) |
| 915 | (inputs (list bash-minimal ;for wrap-program |
| 916 | libhdate |
| 917 | lua |
| 918 | ncurses |
| 919 | perl |
| 920 | perl-tk |
| 921 | perl-par |
| 922 | xforms)) |
| 923 | (synopsis "Suite of dozenal programs") |
| 924 | (description |
| 925 | "The dozenal suite is a set of programs designed to assist with working |
| 926 | in the dozenal (also called \"duodecimal\" or \"base twelve\") system. It |
| 927 | includes number converters (dozenal-to-decimal and decimal-to-dozenal), an RPN |
| 928 | calculator, a graphical calculator, a metric system converter (works with |
| 929 | imperial, U.S. customary, SI metric, and the dozenal TGM), a pretty-printer |
| 930 | for dozenal numbers, a date-and-time program, and a dozenal calendar programs, |
| 931 | complete with events and to-dos.") |
| 932 | (home-page "https://codeberg.org/dgoodmaniii/dozenal") |
| 933 | (license license:gpl3+)))) |
| 934 | |
| 935 | (define-public drat-trim |
| 936 | (package |
| 937 | (name "drat-trim") |
| 938 | (version "05.22.2023") |
| 939 | (source |
| 940 | (origin |
| 941 | (method git-fetch) |
| 942 | (uri (git-reference |
| 943 | (url "https://github.com/marijnheule/drat-trim") |
| 944 | (commit (string-append "v" version)))) |
| 945 | (file-name (git-file-name name version)) |
| 946 | (sha256 |
| 947 | (base32 "084miqj57xr7c74y649acm5xjkddpjn4ybfh469jcbakzp8w0pdi")))) |
| 948 | (build-system gnu-build-system) |
| 949 | (arguments |
| 950 | (list |
| 951 | #:tests? #f ;no tests |
| 952 | #:make-flags |
| 953 | #~(list (string-join |
| 954 | (list "FLAGS=-DLONGTYPE" |
| 955 | ;; _POSIX_C_SOURCE required for getc_unlocked(3). |
| 956 | "-D_POSIX_C_SOURCE=200809") |
| 957 | " ")) |
| 958 | #:phases |
| 959 | #~(modify-phases %standard-phases |
| 960 | (add-after 'unpack 'always-pass-flags |
| 961 | (lambda _ |
| 962 | (substitute* "Makefile" |
| 963 | ;; Ensure that drat-trim and gapless target also respect FLAGS. |
| 964 | (("-std=c99 -O2") |
| 965 | "-std=c99 $(FLAGS) -O2")))) |
| 966 | (delete 'configure) ;no configure script |
| 967 | (replace 'install |
| 968 | (lambda* (#:key outputs #:allow-other-keys) |
| 969 | (let* ((bin (string-append #$output "/bin"))) |
| 970 | (for-each (lambda (exec) |
| 971 | (install-file exec bin)) |
| 972 | '("drat-trim" |
| 973 | "lrat-check")))))))) |
| 974 | (synopsis "Proof checker for unsatisfiability of propositional formulas") |
| 975 | (description |
| 976 | "The proof checker DRAT-trim can be used to check whether a propositional |
| 977 | formula in the DIMACS format is unsatisfiable. Given a propositional formula and |
| 978 | a clausal proof, DRAT-trim validates that the proof is a certificate of |
| 979 | unsatisfiability of the formula.") |
| 980 | (home-page "https://www.cs.utexas.edu/~marijn/drat-trim/") |
| 981 | (license license:expat))) |
| 982 | |
| 983 | (define-public dsfmt |
| 984 | (package |
| 985 | (name "dsfmt") |
| 986 | (version "2.2.3") |
| 987 | (source |
| 988 | (origin |
| 989 | (method url-fetch) |
| 990 | (uri |
| 991 | (string-append |
| 992 | "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/" |
| 993 | "dSFMT-src-" version ".tar.gz")) |
| 994 | (sha256 |
| 995 | (base32 |
| 996 | "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42")) |
| 997 | (modules '((guix build utils))) |
| 998 | ;; Don't distribute html documentation with bundled jquery. |
| 999 | (snippet |
| 1000 | '(begin |
| 1001 | (delete-file-recursively "html") #t)) |
| 1002 | ;; Add patches borrowed from Julia. |
| 1003 | (patches |
| 1004 | (list |
| 1005 | (origin |
| 1006 | (method url-fetch) |
| 1007 | (uri (string-append |
| 1008 | "https://raw.githubusercontent.com/JuliaLang/julia/" |
| 1009 | "v1.3.0/deps/patches/dSFMT.c.patch")) |
| 1010 | (sha256 (base32 |
| 1011 | "09mhv11bms8jsmkmdqvlcgljwhzw3b6n9nncpi2b6dla9798hw2y")) |
| 1012 | (file-name "dSFMT.c.patch")) |
| 1013 | (origin |
| 1014 | (method url-fetch) |
| 1015 | (uri (string-append |
| 1016 | "https://raw.githubusercontent.com/JuliaLang/julia/" |
| 1017 | "v1.3.0/deps/patches/dSFMT.h.patch")) |
| 1018 | (sha256 (base32 |
| 1019 | "1py5rd0yxic335lzka23f6x2dhncrpizpyrk57gi2f28c0p98y5n")) |
| 1020 | (file-name "dSFMT.h.patch")))))) |
| 1021 | (build-system gnu-build-system) |
| 1022 | (arguments |
| 1023 | `(#:phases |
| 1024 | (modify-phases %standard-phases |
| 1025 | (delete 'configure) ; no configure script |
| 1026 | (replace 'build |
| 1027 | ;; Upstream Makefile does not build a shared library. Borrow from Julia |
| 1028 | ;; https://github.com/JuliaLang/julia/blob/v1.3.0/deps/dsfmt.mk |
| 1029 | (lambda _ |
| 1030 | (invoke |
| 1031 | "gcc" "-DNDEBUG" "-DDSFMT_MEXP=19937" |
| 1032 | "-fPIC" "-DDSFMT_DO_NOT_USE_OLD_NAMES" |
| 1033 | "-O3" "-finline-functions" "-fomit-frame-pointer" |
| 1034 | "-fno-strict-aliasing" "--param" "max-inline-insns-single=1800" |
| 1035 | "-Wmissing-prototypes" "-Wall" "-std=c99" "-shared" "dSFMT.c" |
| 1036 | "-o" "libdSFMT.so"))) |
| 1037 | (replace 'install ; no "install" target |
| 1038 | (lambda* (#:key outputs #:allow-other-keys) |
| 1039 | (let* ((out (assoc-ref outputs "out")) |
| 1040 | (lib (string-append out "/lib")) |
| 1041 | (inc (string-append out "/include")) |
| 1042 | (doc (string-append out "/share/doc/" ,name "-" ,version))) |
| 1043 | (install-file "libdSFMT.so" lib) |
| 1044 | (install-file "dSFMT.h" inc) |
| 1045 | (install-file "LICENSE.txt" doc) |
| 1046 | #t)))))) |
| 1047 | (synopsis "Double precision SIMD-oriented Fast Mersenne Twister") |
| 1048 | (description |
| 1049 | "The dSMFT package speeds up Fast Mersenne Twister generation by avoiding |
| 1050 | the expensive conversion of integer to double (floating point). dSFMT directly |
| 1051 | generates double precision floating point pseudorandom numbers which have the |
| 1052 | IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985) |
| 1053 | format. dSFMT is only available on the CPUs which use IEEE 754 format double |
| 1054 | precision floating point numbers.") |
| 1055 | (home-page "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/") |
| 1056 | (license license:bsd-3))) |
| 1057 | |
| 1058 | (define-public gsl |
| 1059 | (package |
| 1060 | (name "gsl") |
| 1061 | (version "2.8") |
| 1062 | (source (origin |
| 1063 | (method url-fetch) |
| 1064 | (uri (string-append "mirror://gnu/gsl/gsl-" |
| 1065 | version ".tar.gz")) |
| 1066 | (sha256 |
| 1067 | (base32 |
| 1068 | "141i8ag2qazyqqk17bfr2l7mr1asxm1da7avi5a66b332pnyx6ba")))) |
| 1069 | (outputs '("out" "static" "debug")) |
| 1070 | (build-system gnu-build-system) |
| 1071 | (arguments |
| 1072 | (list #:phases |
| 1073 | #~(modify-phases %standard-phases |
| 1074 | #$@(cond |
| 1075 | ((and (target-riscv64?) |
| 1076 | (%current-target-system)) |
| 1077 | #~((add-after 'unpack 'force-bootstrap |
| 1078 | (lambda _ |
| 1079 | ;; gsl ships with an old configure script that does not |
| 1080 | ;; support riscv64. Regenerate it. |
| 1081 | (delete-file "configure"))))) |
| 1082 | |
| 1083 | ((or (string-prefix? "aarch64" (%current-system)) |
| 1084 | (string-prefix? "powerpc" (%current-system))) |
| 1085 | ;; Some sparse matrix tests are failing on AArch64 and PowerPC: |
| 1086 | ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html |
| 1087 | #~((add-before 'check 'disable-failing-tests |
| 1088 | (lambda _ |
| 1089 | (substitute* "spmatrix/test.c" |
| 1090 | ((".*test_complex.*") |
| 1091 | "\n")))))) |
| 1092 | |
| 1093 | ((string-prefix? "i686" (%current-system)) |
| 1094 | ;; There are rounding issues with these tests on i686: |
| 1095 | ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html |
| 1096 | ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html |
| 1097 | ;; https://codeberg.org/guix/guix/issues/1234#issuecomment-5874172 |
| 1098 | #~((add-before 'check 'disable-failing-tests |
| 1099 | (lambda _ |
| 1100 | (substitute* "spmatrix/test.c" |
| 1101 | ((".*test_all.*") "\n") |
| 1102 | ((".*test_float.*") "\n") |
| 1103 | ((".*test_complex.*") "\n")) |
| 1104 | |
| 1105 | (substitute* "specfunc/test_legendre.c" |
| 1106 | ((".*= test_legendre_schmidt.*") "\n")) |
| 1107 | |
| 1108 | ;; XXX: These tests abort with: |
| 1109 | ;; gsl: cholesky.c:645: ERROR: matrix is not positive definite |
| 1110 | (substitute* '("multifit_nlinear/test.c" |
| 1111 | "multilarge_nlinear/test.c") |
| 1112 | (("gsl_ieee_env_setup.*" all) |
| 1113 | (string-append "exit (77);\n" all))))))) |
| 1114 | |
| 1115 | (else #~())) |
| 1116 | (add-after 'install 'move-static-library |
| 1117 | (lambda* (#:key outputs #:allow-other-keys) |
| 1118 | (let ((static (string-append (assoc-ref outputs |
| 1119 | "static") |
| 1120 | "/lib/")) |
| 1121 | (out (string-append (assoc-ref outputs "out") |
| 1122 | "/lib/"))) |
| 1123 | (mkdir-p static) |
| 1124 | (rename-file (string-append out "libgsl.a") |
| 1125 | (string-append static "libgsl.a")) |
| 1126 | (rename-file (string-append out "libgslcblas.a") |
| 1127 | (string-append static "libgslcblas.a")))))))) |
| 1128 | (native-inputs |
| 1129 | (if (and (target-riscv64?) |
| 1130 | (%current-target-system)) |
| 1131 | (list autoconf automake libtool) |
| 1132 | '())) |
| 1133 | (home-page "https://www.gnu.org/software/gsl/") |
| 1134 | (synopsis "Numerical library for C and C++") |
| 1135 | (description |
| 1136 | "The GNU Scientific Library is a library for numerical analysis in C |
| 1137 | and C++. It includes a wide range of mathematical routines, with over 1000 |
| 1138 | functions in total. Subject areas covered by the library include: |
| 1139 | differential equations, linear algebra, Fast Fourier Transforms and random |
| 1140 | numbers.") |
| 1141 | |
| 1142 | ;; Linear algebra routines should benefit from SIMD optimizations. |
| 1143 | (properties `((tunable? . #t))) |
| 1144 | |
| 1145 | (license license:gpl3+))) |
| 1146 | |
| 1147 | (define-public sleef |
| 1148 | (package |
| 1149 | (name "sleef") |
| 1150 | (version "3.6.1") |
| 1151 | (source |
| 1152 | (origin |
| 1153 | (method git-fetch) |
| 1154 | (uri (git-reference |
| 1155 | (url "https://github.com/shibatch/sleef") |
| 1156 | (commit version))) |
| 1157 | (file-name (git-file-name name version)) |
| 1158 | (sha256 |
| 1159 | (base32 "14y1zf621zp0333vs29pc7pcc31gsrrs3q49b6qmd1kz6c7a7fp2")))) |
| 1160 | (build-system cmake-build-system) |
| 1161 | (arguments |
| 1162 | (list |
| 1163 | #:build-type "Release" |
| 1164 | #:configure-flags |
| 1165 | #~(list "-DSLEEF_BUILD_SHARED_LIBS=ON"))) |
| 1166 | (inputs |
| 1167 | (list fftw gmp mpfr openssl)) |
| 1168 | (home-page "https://sleef.org/") |
| 1169 | (synopsis "SIMD library for evaluating elementary functions and DFT") |
| 1170 | (description |
| 1171 | "SLEEF (SIMD Library for Evaluating Elementary Functions) is a library that |
| 1172 | implements vectorized versions of all C99 real floating point math functions. |
| 1173 | It can utilize SIMD instructions that are available on modern processors.") |
| 1174 | (license (list license:boost1.0 ;sleef |
| 1175 | license:cc-by4.0)))) ;simplex algorithm |
| 1176 | |
| 1177 | (define-public glpk |
| 1178 | (package |
| 1179 | (name "glpk") |
| 1180 | (version "5.0") |
| 1181 | (source |
| 1182 | (origin |
| 1183 | (method url-fetch) |
| 1184 | (uri (string-append "mirror://gnu/glpk/glpk-" |
| 1185 | version ".tar.gz")) |
| 1186 | (sha256 |
| 1187 | (base32 |
| 1188 | "05bgxidxj8d9xdp82niy7cy36w181cxq7p8vc3y2ixshpgp1642a")))) |
| 1189 | (build-system gnu-build-system) |
| 1190 | (inputs |
| 1191 | (list gmp)) |
| 1192 | (arguments |
| 1193 | `(#:configure-flags '("--with-gmp" |
| 1194 | "--disable-static"))) |
| 1195 | (home-page "https://www.gnu.org/software/glpk/") |
| 1196 | (synopsis "GNU Linear Programming Kit, supporting the MathProg language") |
| 1197 | (description |
| 1198 | "GLPK is a C library for solving large-scale linear programming (LP), |
| 1199 | mixed integer programming (MIP), and other related problems. It supports the |
| 1200 | GNU MathProg modeling language, a subset of the AMPL language, and features a |
| 1201 | translator for the language. In addition to the C library, a stand-alone |
| 1202 | LP/MIP solver is included in the package.") |
| 1203 | (license license:gpl3+))) |
| 1204 | |
| 1205 | (define-public linasm |
| 1206 | (package |
| 1207 | (name "linasm") |
| 1208 | (version "1.13") |
| 1209 | (source (origin |
| 1210 | (method git-fetch) |
| 1211 | (uri (git-reference |
| 1212 | (url "https://git.code.sf.net/p/linasm/linasm") |
| 1213 | (commit (string-append "v" version "(stable)")))) |
| 1214 | (file-name (git-file-name name version)) |
| 1215 | (sha256 |
| 1216 | (base32 |
| 1217 | "11095bxjxsq3a9apvyi1kpddwkg9b2hc5ga65qhrdxzvdsrjhaaq")))) |
| 1218 | (build-system gnu-build-system) |
| 1219 | (arguments |
| 1220 | (list |
| 1221 | #:tests? #false ;there are none |
| 1222 | #:make-flags |
| 1223 | #~(list (string-append "prefix=" #$output)) |
| 1224 | #:phases |
| 1225 | '(modify-phases %standard-phases |
| 1226 | (delete 'configure)))) |
| 1227 | (supported-systems '("x86_64-linux")) |
| 1228 | (home-page "https://sourceforge.net/projects/linasm/") |
| 1229 | (synopsis "Collection of fast and optimized assembly libraries for x86-64") |
| 1230 | (description |
| 1231 | "LinAsm is collection of very fast and SIMD optimized assembly written |
| 1232 | libraries for x86-64. |
| 1233 | |
| 1234 | It implements many common and widely used algorithms for array manipulations: |
| 1235 | searching, sorting, arithmetic and vector operations, unit conversions; fast |
| 1236 | mathematical and statistic functions; numbers and time converting algorithms; |
| 1237 | @dfn{finite impulse response} (FIR) digital filters; spectrum analysis |
| 1238 | algorithms, Fast Hartley transformation; CPU cache friendly functions and |
| 1239 | extremely fast @dfn{abstract data types} (ADT) such as hash tables b-trees, |
| 1240 | and much more.") |
| 1241 | (license license:lgpl3+))) |
| 1242 | |
| 1243 | (define-public gfan |
| 1244 | (package |
| 1245 | (name "gfan") |
| 1246 | (version "0.7") |
| 1247 | (source |
| 1248 | (origin |
| 1249 | (method url-fetch) |
| 1250 | (uri (string-append "https://users-math.au.dk/jensen/software" |
| 1251 | "/gfan/gfan" version ".tar.gz")) |
| 1252 | (sha256 |
| 1253 | (base32 "17lqripnsdb5hn7nnhgn4siajgh1jh9nkaplca3akm74w5bkg0xb")))) |
| 1254 | (build-system gnu-build-system) |
| 1255 | (arguments |
| 1256 | (list |
| 1257 | #:make-flags #~(list (string-append "PREFIX=" #$output) |
| 1258 | (string-append "CC=" #$(cc-for-target)) |
| 1259 | (string-append "CXX=" #$(cxx-for-target))) |
| 1260 | #:phases #~(modify-phases %standard-phases |
| 1261 | (delete 'configure) |
| 1262 | ;; cddlib is distributed with the 'cddlib' header name, |
| 1263 | ;; but gfan expects it to be named 'cdd'. Substitute |
| 1264 | ;; the include headers to make gfan find it. |
| 1265 | (add-after 'unpack 'fix-cdd-reference |
| 1266 | (lambda _ |
| 1267 | (substitute* '("src/lp_cdd.cpp" |
| 1268 | "src/gfanlib_zcone.cpp" |
| 1269 | "src/app_librarytest.cpp") |
| 1270 | (("#include \"cdd") "#include \"cddlib"))))))) |
| 1271 | (inputs (list cddlib gmp)) |
| 1272 | (home-page "https://users-math.au.dk/jensen/software/gfan/gfan.html") |
| 1273 | (synopsis "Compute Gröbner fans and tropical varieties") |
| 1274 | (description "Gfan is a software package for computing Gröbner fans and |
| 1275 | tropical varieties.") |
| 1276 | ;; homepage/gfan.html: "Gfan is distributed under the terms of the GPL |
| 1277 | ;; license version 2 or 3 as desired" |
| 1278 | (license license:gpl2))) |
| 1279 | |
| 1280 | (define-public 4ti2 |
| 1281 | (package |
| 1282 | (name "4ti2") |
| 1283 | (version "1.6.12") |
| 1284 | (source |
| 1285 | (origin |
| 1286 | (method url-fetch) |
| 1287 | (uri (string-append "https://github.com/4ti2/4ti2/releases/download/" |
| 1288 | "Release_" |
| 1289 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) |
| 1290 | version) |
| 1291 | "/4ti2-" version ".tar.gz")) |
| 1292 | (sha256 |
| 1293 | (base32 "1p82sjwsbyg418jfb1wzff1x10h4yhxgnqnsvz33k3x121k2cwjw")))) |
| 1294 | (build-system gnu-build-system) |
| 1295 | (native-inputs |
| 1296 | (list (@ (gnu packages base) which))) ; for the tests |
| 1297 | (inputs |
| 1298 | (list glpk gmp)) |
| 1299 | (home-page "https://4ti2.github.io") |
| 1300 | (synopsis "Mathematical tool suite for problems on linear spaces") |
| 1301 | (description |
| 1302 | "4ti2 implements algorithms for solving algebraic, geometric and |
| 1303 | combinatorial problems on linear spaces. Among others, it solves systems |
| 1304 | of linear equations, computes extreme rays of polyhedral cones, solves |
| 1305 | integer programming problems and computes Markov bases for statistics.") |
| 1306 | (license license:gpl2+))) |
| 1307 | |
| 1308 | (define-public sympow |
| 1309 | (package |
| 1310 | (name "sympow") |
| 1311 | (version "2.023.7") |
| 1312 | (source |
| 1313 | (origin |
| 1314 | (method git-fetch) |
| 1315 | (uri (git-reference |
| 1316 | (url "https://gitlab.com/rezozer/forks/sympow") |
| 1317 | (commit (string-append "v" version)))) |
| 1318 | (file-name (git-file-name name version)) |
| 1319 | (sha256 |
| 1320 | (base32 |
| 1321 | "0ilnxygkj4g5arjiyd16k00cvnjlqs0cpc8hk64kbqhl877mm5i9")))) |
| 1322 | (build-system gnu-build-system) |
| 1323 | (arguments |
| 1324 | (list #:tests? #f ; no tests |
| 1325 | #:phases #~(modify-phases %standard-phases |
| 1326 | (replace 'configure |
| 1327 | (lambda* (#:key inputs #:allow-other-keys) |
| 1328 | (substitute* "Configure" |
| 1329 | (("/bin/sh") (search-input-file inputs "/bin/bash"))) |
| 1330 | (setenv "PREFIX" #$output) |
| 1331 | (setenv "VARPREFIX" #$output) |
| 1332 | (invoke "bash" "./Configure")))))) |
| 1333 | (native-inputs (list bash-minimal coreutils help2man pari-gp which)) |
| 1334 | (home-page "https://gitlab.com/rezozer/forks/sympow") |
| 1335 | (synopsis "Symmetric power elliptic curve L-functions") |
| 1336 | (description "SYMPOW is a mathematical program to compute special values |
| 1337 | of symmetric power elliptic curve L-functions; it can compute up to about 64 |
| 1338 | digits of precision.") |
| 1339 | ;; bsd-2 with extra stipulation that users be informed of sympow's |
| 1340 | ;; "less restrictive license" if it's included in a program with a more |
| 1341 | ;; restrictive license. However, since sympow includes fpu.c which is |
| 1342 | ;; gpl2+ the whole package can only be distributed via GPL anyway. |
| 1343 | ;; See also <https://gitlab.com/rezozer/forks/sympow/-/issues/7>. |
| 1344 | (license (license:non-copyleft "file:///COPYING" |
| 1345 | "See COPYING in the distribution.")))) |
| 1346 | |
| 1347 | (define-public cddlib |
| 1348 | (package |
| 1349 | (name "cddlib") |
| 1350 | (version "0.94m") |
| 1351 | (source |
| 1352 | (origin |
| 1353 | (method git-fetch) |
| 1354 | (uri (git-reference |
| 1355 | (url "https://github.com/cddlib/cddlib") |
| 1356 | (commit version))) |
| 1357 | (file-name (git-file-name name version)) |
| 1358 | (sha256 |
| 1359 | (base32 |
| 1360 | "09s8323h5w9j6mpl1yc6lm770dkskfxd2ayyafkcjllmnncxzfa0")))) |
| 1361 | (build-system gnu-build-system) |
| 1362 | (inputs |
| 1363 | (list gmp)) |
| 1364 | (native-inputs |
| 1365 | (list autoconf |
| 1366 | automake |
| 1367 | libtool |
| 1368 | (texlive-local-tree |
| 1369 | (list texlive-amsfonts |
| 1370 | texlive-graphics |
| 1371 | texlive-l3backend |
| 1372 | texlive-l3backend)))) |
| 1373 | (arguments |
| 1374 | (list #:configure-flags |
| 1375 | #~(list (string-append "--docdir=" #$output |
| 1376 | "/share/doc/" #$name "-" #$version)))) |
| 1377 | (home-page "https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html") |
| 1378 | (synopsis "Library for convex hulls and extreme rays of polyhedra") |
| 1379 | (description |
| 1380 | "The C-library cddlib implements the Double Description Method of |
| 1381 | Motzkin et al. for generating all vertices (i.e. extreme points) and extreme |
| 1382 | rays of a general convex polyhedron given by a system of linear inequalities |
| 1383 | in arbitrary dimension. It can also be used for the converse operation of |
| 1384 | computing convex hulls.") |
| 1385 | (license license:gpl2+))) |
| 1386 | |
| 1387 | (define-public lrslib |
| 1388 | (package |
| 1389 | (name "lrslib") |
| 1390 | (version "7.2") |
| 1391 | (source |
| 1392 | (origin |
| 1393 | (method url-fetch) |
| 1394 | (uri (string-append "http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/" |
| 1395 | "lrslib-0" |
| 1396 | (string-delete #\. version) ".tar.gz")) |
| 1397 | (sha256 |
| 1398 | (base32 |
| 1399 | "1w1jsnfgny8cihndr5gfm99pvwp48qsvxkqfsi2q87gd3m57aj7w")))) |
| 1400 | (build-system gnu-build-system) |
| 1401 | (inputs |
| 1402 | (list gmp)) |
| 1403 | (arguments |
| 1404 | `(#:tests? #f ; no check phase |
| 1405 | #:make-flags `("CC=gcc" |
| 1406 | ,(string-append "prefix=" (assoc-ref %outputs "out")) |
| 1407 | "all-shared") |
| 1408 | #:phases |
| 1409 | (modify-phases %standard-phases |
| 1410 | (replace 'configure |
| 1411 | (lambda _ |
| 1412 | (substitute* "makefile" |
| 1413 | (("-L \\.") "-L . -Wl,-rpath='$$ORIGIN/../lib'")) |
| 1414 | #t))))) |
| 1415 | (home-page "http://cgm.cs.mcgill.ca/~avis/C/lrs.html") |
| 1416 | (synopsis "Convex hulls of polyhedra with exact arithmetic") |
| 1417 | (description |
| 1418 | "The C code of lrslib implements the reverse search algorithm for |
| 1419 | vertex enumeration and convex hull problems. Its input file format is |
| 1420 | compatible with cddlib. All computations are done exactly in either |
| 1421 | multiple precision or fixed integer arithmetic. Output is not stored |
| 1422 | in memory, so even problems with very large output sizes can sometimes |
| 1423 | be solved.") |
| 1424 | (license license:gpl2+))) |
| 1425 | |
| 1426 | (define-public libcerf |
| 1427 | (package |
| 1428 | (name "libcerf") |
| 1429 | (version "1.14") |
| 1430 | (source |
| 1431 | (origin |
| 1432 | (method git-fetch) |
| 1433 | (uri (git-reference |
| 1434 | (url "https://jugit.fz-juelich.de/mlz/libcerf") |
| 1435 | (commit (string-append "v" version)))) |
| 1436 | (file-name (git-file-name name version)) |
| 1437 | (sha256 |
| 1438 | (base32 "1ic2q7kvxpqmgxlishygvx8d00i4wn51vkq4fyac44ahhf6c3kwd")))) |
| 1439 | (build-system cmake-build-system) |
| 1440 | (native-inputs |
| 1441 | (list perl)) |
| 1442 | (home-page "https://jugit.fz-juelich.de/mlz/libcerf") |
| 1443 | (synopsis "Library for complex error functions") |
| 1444 | (description |
| 1445 | "@code{libcerf} is a self-contained numeric library that provides an |
| 1446 | efficient and accurate implementation of complex error functions, along with |
| 1447 | Dawson, Faddeeva, and Voigt functions.") |
| 1448 | (license license:expat))) |
| 1449 | |
| 1450 | (define-public vinci |
| 1451 | (package |
| 1452 | (name "vinci") |
| 1453 | (version "1.0.5") |
| 1454 | (source |
| 1455 | (origin |
| 1456 | (method url-fetch) |
| 1457 | (uri (string-append "https://www.math.u-bordeaux.fr/~aenge/software/" |
| 1458 | "vinci/vinci-" version ".tar.gz")) |
| 1459 | (sha256 |
| 1460 | (base32 |
| 1461 | "1aq0qc1y27iw9grhgnyji3290wwfznsrk3sg6ynqpxwjdda53h4m")))) |
| 1462 | (build-system gnu-build-system) |
| 1463 | (inputs |
| 1464 | (list lrslib)) |
| 1465 | (arguments |
| 1466 | `(#:tests? #f ; no check phase |
| 1467 | #:phases |
| 1468 | (modify-phases %standard-phases |
| 1469 | (replace 'configure |
| 1470 | ;; register the lrs location in the config file |
| 1471 | (lambda* (#:key inputs #:allow-other-keys) |
| 1472 | (let* ((lrs (assoc-ref inputs "lrslib")) |
| 1473 | (lrsexec (string-append lrs "/bin/lrs"))) |
| 1474 | (substitute* "vinci.h" |
| 1475 | (("#define LRS_EXEC \"lrs\"") |
| 1476 | (string-append "#define LRS_EXEC \"" lrsexec "\"")))) |
| 1477 | #t)) |
| 1478 | (replace 'install |
| 1479 | (lambda* (#:key outputs #:allow-other-keys) |
| 1480 | (let* ((out (assoc-ref outputs "out")) |
| 1481 | (bin (string-append out "/bin"))) |
| 1482 | (install-file "vinci" bin)) |
| 1483 | #t))))) |
| 1484 | (home-page |
| 1485 | "https://www.math.u-bordeaux.fr/~aenge/?category=software&page=vinci") |
| 1486 | (synopsis "Volume computation for polytopes") |
| 1487 | (description |
| 1488 | "Vinci implements a number of volume computation algorithms for convex |
| 1489 | polytopes in arbitrary dimension. The polytopes can be given by their |
| 1490 | V-representation (as the convex hull of a finite number of vertices), by |
| 1491 | their H-representation (as the bounded intersection of a finite number of |
| 1492 | halfspaces) or by their double description with both representations.") |
| 1493 | (license license:gpl2+))) |
| 1494 | |
| 1495 | (define-public arpack-ng |
| 1496 | (package |
| 1497 | (name "arpack-ng") |
| 1498 | (version "3.9.1") |
| 1499 | (home-page "https://github.com/opencollab/arpack-ng") |
| 1500 | (source (origin |
| 1501 | (method git-fetch) |
| 1502 | (uri (git-reference (url home-page) (commit version))) |
| 1503 | (file-name (git-file-name name version)) |
| 1504 | (sha256 |
| 1505 | (base32 |
| 1506 | "0bbw6a48py9fjlif2n4x75skyjskq2hghffjqzm85wnsnsjdlaqw")))) |
| 1507 | (build-system cmake-build-system) |
| 1508 | (arguments |
| 1509 | '(#:configure-flags '("-DICB=ON"))) |
| 1510 | (native-inputs |
| 1511 | (list pkg-config)) |
| 1512 | (inputs |
| 1513 | (list eigen openblas gfortran)) |
| 1514 | (synopsis "Fortran subroutines for solving eigenvalue problems") |
| 1515 | (description |
| 1516 | "ARPACK-NG is a collection of Fortran77 subroutines designed to solve |
| 1517 | large scale eigenvalue problems.") |
| 1518 | (license (license:non-copyleft "file://COPYING" |
| 1519 | "See COPYING in the distribution.")))) |
| 1520 | |
| 1521 | (define-public arpack-ng-openmpi |
| 1522 | (package (inherit arpack-ng) |
| 1523 | (name "arpack-ng-openmpi") |
| 1524 | (inputs |
| 1525 | (modify-inputs inputs |
| 1526 | (prepend openmpi))) |
| 1527 | (arguments |
| 1528 | (substitute-keyword-arguments arguments |
| 1529 | ((#:configure-flags _ #~()) |
| 1530 | #~'("-DMPI=ON")) |
| 1531 | ((#:phases phases #~%standard-phases) |
| 1532 | #~(modify-phases #$phases |
| 1533 | (add-before 'check 'mpi-setup |
| 1534 | #$%openmpi-setup))))) |
| 1535 | (synopsis "Fortran subroutines for solving eigenvalue problems with MPI"))) |
| 1536 | |
| 1537 | (define-public lapack |
| 1538 | (package |
| 1539 | (name "lapack") |
| 1540 | (version "3.12.1") |
| 1541 | (source |
| 1542 | (origin |
| 1543 | (method git-fetch) |
| 1544 | (uri (git-reference |
| 1545 | (url "https://github.com/Reference-LAPACK/lapack/") |
| 1546 | (commit (string-append "v" version)))) |
| 1547 | (file-name (git-file-name name version)) |
| 1548 | (sha256 |
| 1549 | (base32 |
| 1550 | "19387ifv5kplnggw5fgz4nzspmqi11wnwzap2knwxgrvknysrwj9")))) |
| 1551 | (build-system cmake-build-system) |
| 1552 | (home-page "https://www.netlib.org/lapack/") |
| 1553 | (inputs (list gfortran python-wrapper)) |
| 1554 | (arguments |
| 1555 | `(#:configure-flags (list |
| 1556 | "-DBUILD_SHARED_LIBS:BOOL=YES" |
| 1557 | "-DCBLAS=ON" |
| 1558 | "-DLAPACKE=ON" |
| 1559 | ;; Build the 'LAPACKE_clatms' functions. |
| 1560 | "-DLAPACKE_WITH_TMG=ON"))) |
| 1561 | (synopsis "Library for numerical linear algebra") |
| 1562 | (description |
| 1563 | "LAPACK is a Fortran 90 library for solving the most commonly occurring |
| 1564 | problems in numerical linear algebra.") |
| 1565 | (license (license:non-copyleft "file://LICENSE" |
| 1566 | "See LICENSE in the distribution.")) |
| 1567 | (properties '((tunable? . #t))))) |
| 1568 | |
| 1569 | (define-public lis |
| 1570 | (package |
| 1571 | (name "lis") |
| 1572 | (version "2.1.8") |
| 1573 | (source (origin |
| 1574 | (method url-fetch) |
| 1575 | (uri (string-append "https://www.ssisc.org/lis/dl/lis-" |
| 1576 | version ".zip")) |
| 1577 | (sha256 |
| 1578 | (base32 "0nh2593xkcdv1c3gmj7i64ca393nn0ngqfl522yiwbidh9dvd1nl")))) |
| 1579 | (build-system gnu-build-system) |
| 1580 | (arguments |
| 1581 | (list |
| 1582 | #:configure-flags #~(list "--enable-fortran" |
| 1583 | "--enable-f90" |
| 1584 | "--enable-openmp" |
| 1585 | "--enable-complex" |
| 1586 | "--disable-sse2" ;; XXX: tuning |
| 1587 | "--enable-shared") |
| 1588 | #:phases |
| 1589 | #~(modify-phases %standard-phases |
| 1590 | (add-after 'install 'install-doc |
| 1591 | (lambda _ |
| 1592 | (let* ((share (string-append #$output "/share")) |
| 1593 | (docdir (string-append share "/doc/lis-" #$version)) |
| 1594 | (mandir (string-append share "/man"))) |
| 1595 | (copy-recursively "doc/man" mandir) |
| 1596 | ;; TODO: Build the manuals ourselves |
| 1597 | (install-file "doc/lis-ug-en.pdf" docdir) |
| 1598 | (install-file "doc/lis-ug-ja.pdf" docdir))))))) |
| 1599 | (inputs (list openmpi)) |
| 1600 | (native-inputs (list gfortran unzip)) |
| 1601 | (home-page "https://www.ssisc.org/lis") |
| 1602 | (synopsis "Solve discretized linear equations and eigenvalue problems") |
| 1603 | (description "Lis is a parallel software library for solving discretized |
| 1604 | linear equations and eigenvalue problems that arise in the numerical solution |
| 1605 | of partial differential equations using iterative methods.") |
| 1606 | (license license:bsd-3))) |
| 1607 | |
| 1608 | (define-public clapack |
| 1609 | (package |
| 1610 | (name "clapack") |
| 1611 | (version "3.2.1") |
| 1612 | (source |
| 1613 | (origin |
| 1614 | (method url-fetch) |
| 1615 | (uri (string-append "http://www.netlib.org/clapack/clapack-" |
| 1616 | version "-CMAKE.tgz")) |
| 1617 | (sha256 |
| 1618 | (base32 |
| 1619 | "0nnap9q1mv14g57dl3vkvxrdr10k5w7zzyxs6rgxhia8q8mphgqb")))) |
| 1620 | (build-system cmake-build-system) |
| 1621 | (arguments |
| 1622 | (list |
| 1623 | #:configure-flags |
| 1624 | #~(list (string-append "-DCMAKE_C_FLAGS=-fcommon -O2" |
| 1625 | " -Wno-error=implicit-function-declaration")) |
| 1626 | #:phases |
| 1627 | #~(modify-phases %standard-phases |
| 1628 | ;; These tests use a lot of stack variables and segfault without |
| 1629 | ;; lifting resource limits. |
| 1630 | (add-after 'unpack 'disable-broken-tests |
| 1631 | (lambda _ |
| 1632 | (substitute* "TESTING/CMakeLists.txt" |
| 1633 | (("add_lapack_test.* xeigtstz\\)") "")))) |
| 1634 | (replace 'install |
| 1635 | (lambda _ |
| 1636 | (let ((libdir (string-append #$output "/lib")) |
| 1637 | (f2cinc (string-append #$output "/include/libf2c"))) |
| 1638 | (mkdir-p f2cinc) |
| 1639 | (display (getcwd)) |
| 1640 | (for-each (lambda (file) |
| 1641 | (install-file file libdir)) |
| 1642 | '("SRC/liblapack.a" |
| 1643 | "F2CLIBS/libf2c/libf2c.a" |
| 1644 | "TESTING/MATGEN/libtmglib.a" |
| 1645 | "BLAS/SRC/libblas.a")) |
| 1646 | (for-each (lambda (file) |
| 1647 | (install-file file f2cinc)) |
| 1648 | (cons "F2CLIBS/libf2c/arith.h" |
| 1649 | (find-files (string-append |
| 1650 | "../clapack-" |
| 1651 | #$version "-CMAKE/F2CLIBS/libf2c") |
| 1652 | "\\.h$"))) |
| 1653 | (copy-recursively (string-append "../clapack-" |
| 1654 | #$version "-CMAKE/INCLUDE") |
| 1655 | (string-append #$output "/include")))))))) |
| 1656 | (home-page "https://www.netlib.org/clapack/") |
| 1657 | (synopsis "Numerical linear algebra library for C") |
| 1658 | (description |
| 1659 | "The CLAPACK library was built using a Fortran to C conversion utility |
| 1660 | called f2c. The entire Fortran 77 LAPACK library is run through f2c to obtain |
| 1661 | C code, and then modified to improve readability. CLAPACK's goal is to |
| 1662 | provide LAPACK for someone who does not have access to a Fortran compiler.") |
| 1663 | (license (license:non-copyleft "file://LICENSE" |
| 1664 | "See LICENSE in the distribution.")))) |
| 1665 | |
| 1666 | (define-public scalapack |
| 1667 | (package |
| 1668 | (name "scalapack") |
| 1669 | (version "2.2.2") |
| 1670 | (source |
| 1671 | (origin |
| 1672 | (method git-fetch) |
| 1673 | (uri (git-reference |
| 1674 | (url "https://github.com/Reference-ScaLAPACK/scalapack") |
| 1675 | (commit (string-append "v" version)))) |
| 1676 | (file-name (git-file-name name version)) |
| 1677 | (sha256 |
| 1678 | (base32 |
| 1679 | "0abs4j9iknd3qiyaj06gh00iyki71c2lzpmyv21ncv7f7vy1ccr8")))) |
| 1680 | (build-system cmake-build-system) |
| 1681 | (inputs |
| 1682 | `(("mpi" ,openmpi) |
| 1683 | ("fortran" ,gfortran) |
| 1684 | ("lapack" ,openblas))) ;for testing only |
| 1685 | (arguments |
| 1686 | `(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES") |
| 1687 | #:phases (modify-phases %standard-phases |
| 1688 | (add-before 'check 'mpi-setup |
| 1689 | ,%openmpi-setup) |
| 1690 | (add-after 'unpack 'skip-faulty-tests |
| 1691 | (lambda _ |
| 1692 | ;; FIXME: Skip two tests that fail to complete. See |
| 1693 | ;; <https://github.com/amd/scalapack/commit/d3b6248b26f615b118ff4d72a00b3028f59a47f6>. |
| 1694 | (substitute* "TESTING/CMakeLists.txt" |
| 1695 | (("^add_test\\(x[cz]heevr.*" all) |
| 1696 | (string-append "# " all "\n"))))) |
| 1697 | (add-before 'configure 'fix-gcc14-errors |
| 1698 | (lambda _ |
| 1699 | (setenv "CFLAGS" |
| 1700 | (string-append |
| 1701 | "-g -O2 -DNDEBUG" |
| 1702 | " -Wno-error=implicit-function-declaration"))))))) |
| 1703 | (home-page "https://www.netlib.org/scalapack/") |
| 1704 | (synopsis "Library for scalable numerical linear algebra") |
| 1705 | (description |
| 1706 | "ScaLAPACK is a Fortran 90 library of high-performance linear algebra |
| 1707 | routines on parallel distributed memory machines. ScaLAPACK solves dense and |
| 1708 | banded linear systems, least squares problems, eigenvalue problems, and |
| 1709 | singular value problems.") |
| 1710 | (license (license:non-copyleft "file://LICENSE" |
| 1711 | "See LICENSE in the distribution.")))) |
| 1712 | |
| 1713 | (define-public feedgnuplot |
| 1714 | (package |
| 1715 | (name "feedgnuplot") |
| 1716 | (version "1.60") |
| 1717 | (home-page "https://github.com/dkogan/feedgnuplot") |
| 1718 | (source (origin |
| 1719 | (method git-fetch) |
| 1720 | (uri (git-reference |
| 1721 | (url home-page) |
| 1722 | (commit (string-append "v" version)))) |
| 1723 | (file-name (git-file-name name version)) |
| 1724 | (sha256 |
| 1725 | (base32 |
| 1726 | "0403hwlian2s431m36qdzcczhvfjvh7128m64hmmwbbrgh0n7md7")))) |
| 1727 | (build-system perl-build-system) |
| 1728 | (arguments |
| 1729 | `(#:phases |
| 1730 | (modify-phases %standard-phases |
| 1731 | (add-before 'check 'adjust-tests |
| 1732 | (lambda _ |
| 1733 | (substitute* "t/plots.t" |
| 1734 | ;; XXX: The vnlog tests uses 'echo' with escaped strings, |
| 1735 | ;; but does not enable escape interpretation. |
| 1736 | (("echo -n ") |
| 1737 | "echo -ne ")))) |
| 1738 | (add-after 'install 'install-documentation |
| 1739 | (lambda* (#:key outputs #:allow-other-keys) |
| 1740 | (let* ((out (assoc-ref outputs "out")) |
| 1741 | (doc (string-append out "/share/doc/feedgnuplot"))) |
| 1742 | (mkdir-p doc) |
| 1743 | (invoke "pod2html" "--title=feedgnuplot" "bin/feedgnuplot" |
| 1744 | "--outfile" (string-append doc "/feedgnuplot.html"))))) |
| 1745 | (add-after 'install 'wrap |
| 1746 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1747 | (let* ((out (assoc-ref outputs "out")) |
| 1748 | (gnuplot (search-input-file inputs "/bin/gnuplot")) |
| 1749 | ;; XXX: We need List::MoreUtils as well as its supporting |
| 1750 | ;; (propagated) modules; for now just refer to labels. |
| 1751 | (modules '("perl-list-moreutils" "perl-exporter-tiny")) |
| 1752 | (PERL5LIB (string-join |
| 1753 | (map (lambda (input) |
| 1754 | (string-append (assoc-ref inputs input) |
| 1755 | "/lib/perl5/site_perl")) |
| 1756 | modules) |
| 1757 | ":"))) |
| 1758 | (wrap-program (string-append out "/bin/feedgnuplot") |
| 1759 | `("PERL5LIB" ":" suffix (,PERL5LIB)) |
| 1760 | `("PATH" ":" suffix (,(dirname gnuplot)))))))))) |
| 1761 | (inputs |
| 1762 | (list bash-minimal gnuplot perl-list-moreutils vnlog)) |
| 1763 | (native-inputs |
| 1764 | ;; For tests. |
| 1765 | (list perl-ipc-run perl-string-shellquote)) |
| 1766 | (synopsis "Pipe-oriented plotting tool") |
| 1767 | (description |
| 1768 | "@command{feedgnuplot} is a tool to plot realtime and stored data |
| 1769 | from the command line, using @command{gnuplot}. It can read data from |
| 1770 | a pipe or file, make a variety of transformations, and render the result |
| 1771 | in the terminal or with an external viewer.") |
| 1772 | (license license:gpl1+))) ;any version |
| 1773 | |
| 1774 | (define-public giza |
| 1775 | (package |
| 1776 | (name "giza") |
| 1777 | (version "2.0.0") |
| 1778 | (source |
| 1779 | (origin |
| 1780 | (method git-fetch) |
| 1781 | (uri (git-reference |
| 1782 | (url "https://github.com/danieljprice/giza") |
| 1783 | (commit (string-append "v" version)))) |
| 1784 | (file-name (git-file-name name version)) |
| 1785 | (sha256 |
| 1786 | (base32 "0c5p7vhbbwmk8cgmnhzpdmpc9b1wdwbi024xdjg8hlm68dbrwrzg")))) |
| 1787 | (build-system gnu-build-system) |
| 1788 | (arguments |
| 1789 | (list |
| 1790 | #:phases |
| 1791 | #~(modify-phases %standard-phases |
| 1792 | (add-before 'check 'start-xorg-server |
| 1793 | (lambda* (#:key inputs #:allow-other-keys) |
| 1794 | (system "Xvfb :99 -screen 0 1920x1080x24 &") |
| 1795 | (setenv "DISPLAY" ":99"))) |
| 1796 | ;; Tests are interactive, see |
| 1797 | ;; <https://github.com/danieljprice/giza/blob/v2.0.0/.github/workflows/build.yml#L52>. |
| 1798 | (replace 'check |
| 1799 | (lambda* (#:key tests? #:allow-other-keys) |
| 1800 | (when tests? |
| 1801 | (invoke "sh" "-c" "yes '' | make check"))))))) |
| 1802 | (native-inputs |
| 1803 | (list perl |
| 1804 | pkg-config |
| 1805 | xorg-server-for-tests)) |
| 1806 | (inputs |
| 1807 | (list cairo |
| 1808 | freetype |
| 1809 | gfortran)) |
| 1810 | (home-page "https://danieljprice.github.io/giza/") |
| 1811 | (synopsis "Scientific plotting library for C/Fortran") |
| 1812 | (description |
| 1813 | "Giza is a lightweight scientific plotting library built on top of |
| 1814 | @code{cairo} that provides uniform output to multiple devices.") |
| 1815 | (license license:gpl2+))) |
| 1816 | |
| 1817 | (define-public giza-1 |
| 1818 | (package |
| 1819 | (inherit giza) |
| 1820 | (name "giza") |
| 1821 | (version "1.5.0") |
| 1822 | (source |
| 1823 | (origin |
| 1824 | (method git-fetch) |
| 1825 | (uri (git-reference |
| 1826 | (url "https://github.com/danieljprice/giza") |
| 1827 | (commit (string-append "v" version)))) |
| 1828 | (file-name (git-file-name name version)) |
| 1829 | (sha256 |
| 1830 | (base32 "1qair5j6rq17hwvyxl6k2n4hkvgjw5wczmfzn7qh7kcv3qpg9p5l")))))) |
| 1831 | |
| 1832 | (define-public gnuplot |
| 1833 | (package |
| 1834 | (name "gnuplot") |
| 1835 | (version "6.0.1") |
| 1836 | (source (origin |
| 1837 | (method url-fetch) |
| 1838 | (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/" |
| 1839 | version "/gnuplot-" |
| 1840 | version ".tar.gz")) |
| 1841 | (sha256 |
| 1842 | (base32 "16ipf7m2c2v1cldp3kwxbjj6db6bzy0rkrpp4kzhh61a3866cnp8")))) |
| 1843 | (build-system gnu-build-system) |
| 1844 | (native-inputs |
| 1845 | (list pkg-config (texlive-local-tree))) |
| 1846 | (inputs |
| 1847 | (list cairo gd libcerf lua pango readline)) |
| 1848 | (arguments |
| 1849 | (list #:configure-flags |
| 1850 | #~(list "--with-qt=no" |
| 1851 | (string-append "--with-texdir=" #$output |
| 1852 | "/share/texmf-dist/tex/latex/gnuplot")) |
| 1853 | ;; Plot on a dumb terminal during tests. |
| 1854 | #:make-flags #~'("GNUTERM=dumb"))) |
| 1855 | (home-page "http://www.gnuplot.info") |
| 1856 | (synopsis "Command-line driven graphing utility") |
| 1857 | (description "Gnuplot is a portable command-line driven graphing |
| 1858 | utility. It was originally created to allow scientists and students to |
| 1859 | visualize mathematical functions and data interactively, but has grown to |
| 1860 | support many non-interactive uses such as web scripting. It is also used as a |
| 1861 | plotting engine by third-party applications like Octave.") |
| 1862 | ;; X11 Style with the additional restriction that derived works may only be |
| 1863 | ;; distributed as patches to the original. |
| 1864 | (license (license:fsf-free |
| 1865 | "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright")))) |
| 1866 | |
| 1867 | (define-public hmat |
| 1868 | (package |
| 1869 | (name "hmat") |
| 1870 | (version "1.10.0") |
| 1871 | (source (origin |
| 1872 | (method git-fetch) |
| 1873 | (uri (git-reference |
| 1874 | (url "https://github.com/jeromerobert/hmat-oss") |
| 1875 | (commit version))) |
| 1876 | (file-name (git-file-name name version)) |
| 1877 | (sha256 |
| 1878 | (base32 |
| 1879 | "1cdaq5j2gknar7hcycll1ra9f0pqvri1bqsj0nf21kc4j2ynaw8s")))) |
| 1880 | (build-system cmake-build-system) |
| 1881 | (arguments |
| 1882 | ;; Examples are the tests. |
| 1883 | (list #:configure-flags #~(list "-DBUILD_EXAMPLES=ON"))) |
| 1884 | (inputs (list openblas)) |
| 1885 | (home-page "https://github.com/jeromerobert/hmat-oss") |
| 1886 | (synopsis "Hierarchical matrix library") |
| 1887 | (description "@code{hmat-oss} is hierarchical matrix library written in |
| 1888 | C++ with a C API. It contains a LU and LLt solver, and a few other things.") |
| 1889 | (license license:gpl2+))) |
| 1890 | |
| 1891 | (define-public cminpack |
| 1892 | (package |
| 1893 | (name "cminpack") |
| 1894 | (version "1.3.13") |
| 1895 | (source (origin |
| 1896 | (method git-fetch) |
| 1897 | (uri (git-reference |
| 1898 | (url "https://github.com/devernay/cminpack") |
| 1899 | (commit (string-append "v" version)))) |
| 1900 | (file-name (git-file-name name version)) |
| 1901 | (sha256 |
| 1902 | (base32 |
| 1903 | "0apnph1j9hbr6vx3idcc6lhm19gwmqw4xi435g7dwnj9rgnyydlx")))) |
| 1904 | (build-system cmake-build-system) |
| 1905 | (arguments |
| 1906 | (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"))) |
| 1907 | (home-page "https://github.com/devernay/cminpack") |
| 1908 | (synopsis "C/C++ rewrite of the MINPACK software") |
| 1909 | (description |
| 1910 | "This is a C version of the minpack minimization package. It has been |
| 1911 | derived from the fortran code using f2c and some limited manual editing. |
| 1912 | Extern C linkage permits the package routines to be called from C++.") |
| 1913 | (license (license:non-copyleft ; original minpack license |
| 1914 | "https://github.com/certik/minpack/blob/master/LICENSE")))) |
| 1915 | |
| 1916 | (define-public bonmin |
| 1917 | (package |
| 1918 | (name "bonmin") |
| 1919 | (version "1.8.9") |
| 1920 | (source (origin |
| 1921 | (method git-fetch) |
| 1922 | (uri (git-reference |
| 1923 | (url "https://github.com/coin-or/Bonmin") |
| 1924 | (commit (string-append "releases/" version)))) |
| 1925 | (file-name (git-file-name name version)) |
| 1926 | (sha256 |
| 1927 | (base32 |
| 1928 | "153kj4wx386609g21hw3cv5yxps62qqrc64zwb9ryd2xad1w1a4y")))) |
| 1929 | (build-system gnu-build-system) |
| 1930 | (native-inputs (list gfortran pkg-config)) |
| 1931 | (inputs (list cbc ipopt openblas)) |
| 1932 | (home-page "https://coin-or.github.io/Bonmin/") |
| 1933 | (synopsis "Basic Open-source Nonlinear Mixed INteger programming") |
| 1934 | (description "Bonmin is a code for solving general MINLP (Mixed Integer |
| 1935 | NonLinear Programming) problems. It builds on top of Cbc and Ipopt.") |
| 1936 | (license license:epl1.0))) |
| 1937 | |
| 1938 | (define-public pagmo |
| 1939 | (package |
| 1940 | (name "pagmo") |
| 1941 | (version "2.19.1") |
| 1942 | (source (origin |
| 1943 | (method git-fetch) |
| 1944 | (uri (git-reference |
| 1945 | (url "https://github.com/esa/pagmo2") |
| 1946 | (commit (string-append "v" version)))) |
| 1947 | (file-name (git-file-name name version)) |
| 1948 | (sha256 |
| 1949 | (base32 |
| 1950 | "1xx7f06idfhkh4qijh5rcxnldyac2pqb29j09w7k2b2h91xkgnl9")))) |
| 1951 | (build-system cmake-build-system) |
| 1952 | (arguments |
| 1953 | (list #:configure-flags #~(list "-DPAGMO_BUILD_TESTS=ON" |
| 1954 | "-DPAGMO_WITH_EIGEN3=ON"))) |
| 1955 | ;; Eigen is optional, enables some extra features. |
| 1956 | (inputs (list boost eigen onetbb)) |
| 1957 | (home-page "https://esa.github.io/pagmo2/") |
| 1958 | (synopsis |
| 1959 | "Platform to perform parallel computations of optimisation tasks") |
| 1960 | (description "@code{pagmo} is a C++ scientific library for massively |
| 1961 | parallel optimization. It is built around the idea of providing a unified |
| 1962 | interface to optimization algorithms and to optimization problems and to make |
| 1963 | their deployment in massively parallel environments easy.") |
| 1964 | ;; Pagmo only supports 64-bit x86, ARM and PowerPC: |
| 1965 | ;; https://esa.github.io/pagmo2/install.html |
| 1966 | (supported-systems '("x86_64-linux" "aarch64-linux" "armhf-linux" |
| 1967 | "powerpc64le-linux")) |
| 1968 | ;; Dual licensed, user choice. |
| 1969 | (license (list license:lgpl3+ license:gpl3+)))) |
| 1970 | |
| 1971 | (define-public arccon |
| 1972 | (package |
| 1973 | (name "arccon") |
| 1974 | (version "1.2.0") |
| 1975 | (source |
| 1976 | (origin |
| 1977 | (method git-fetch) |
| 1978 | (uri (git-reference |
| 1979 | (url "https://github.com/arcaneframework/framework") |
| 1980 | (commit (string-append "arccon-v" version)))) |
| 1981 | (file-name (git-file-name name version)) |
| 1982 | (sha256 |
| 1983 | (base32 "0zvj863plifp4rs3wzq5z18vh7z3bh7zy90cvn12b6n0jbpfdpg3")))) |
| 1984 | (build-system cmake-build-system) |
| 1985 | (arguments |
| 1986 | (list |
| 1987 | #:tests? #f |
| 1988 | #:phases |
| 1989 | #~(modify-phases %standard-phases |
| 1990 | (add-before 'configure 'chdir-arccon |
| 1991 | (lambda _ |
| 1992 | (chdir "arccon")))))) |
| 1993 | (home-page "https://github.com/arcaneframework/framework") |
| 1994 | (synopsis "Arcane Framework's CMake build libraries") |
| 1995 | (description "Arccon is part of the Arcane framework, providing core |
| 1996 | functionality for the Arcane development platform.") |
| 1997 | (license license:asl2.0))) |
| 1998 | |
| 1999 | (define-public arccore |
| 2000 | (package |
| 2001 | (name "arccore") |
| 2002 | (version "2.5.0.0") |
| 2003 | (source |
| 2004 | (origin |
| 2005 | (method git-fetch) |
| 2006 | (uri (git-reference |
| 2007 | (url "https://github.com/arcaneframework/framework") |
| 2008 | (commit (string-append "arccore-v" version)))) |
| 2009 | (file-name (git-file-name name version)) |
| 2010 | (sha256 |
| 2011 | (base32 "0cxqwhhs3zafiqnrjs28y60xg14jifg2xdycpr7l2291hyh6r7ra")))) |
| 2012 | (build-system cmake-build-system) |
| 2013 | (native-inputs (list arccon pkg-config googletest)) |
| 2014 | (inputs (list glib openmpi)) |
| 2015 | (arguments |
| 2016 | (list |
| 2017 | #:configure-flags |
| 2018 | #~(list "-DBUILD_SHARED_LIBS=TRUE" "-DARCCORE_USE_MPI=TRUE" |
| 2019 | "-DARCCORE_WANT_TEST=TRUE") |
| 2020 | #:phases |
| 2021 | #~(modify-phases %standard-phases |
| 2022 | (add-before 'configure 'chdir-arccore |
| 2023 | (lambda _ |
| 2024 | (chdir "arccore")))))) |
| 2025 | (home-page "https://github.com/arcaneframework/framework") |
| 2026 | (synopsis "Arcane Framework's base functionalities for simulation code") |
| 2027 | (description |
| 2028 | "Arcane is a development environment for parallel numerical calculation |
| 2029 | code. It supports the architectural aspects of a calculation code, such as data |
| 2030 | structures for meshing and parallelism, as well as more environment-related aspects |
| 2031 | such as dataset configuration.") |
| 2032 | (license license:asl2.0))) |
| 2033 | |
| 2034 | (define-public hdf5-1.8 |
| 2035 | (package |
| 2036 | (name "hdf5") |
| 2037 | (version "1.8.23") |
| 2038 | (source |
| 2039 | (origin |
| 2040 | (method url-fetch) |
| 2041 | (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" |
| 2042 | "hdf5-" (version-major+minor version) |
| 2043 | "/hdf5-" version "/src/hdf5-" |
| 2044 | version ".tar.bz2") |
| 2045 | (string-append "https://support.hdfgroup.org/ftp/HDF5/" |
| 2046 | "current" |
| 2047 | (match (string-split version #\.) |
| 2048 | ((major minor _ ...) |
| 2049 | (string-append major minor))) |
| 2050 | "/src/hdf5-" version ".tar.bz2"))) |
| 2051 | (sha256 |
| 2052 | (base32 "0km65mr6dgk4ia2dqr1b9dzw9qg15j5z35ymbys9cnny51z1zb39")) |
| 2053 | (patches (search-patches "hdf5-config-date.patch")))) |
| 2054 | (build-system gnu-build-system) |
| 2055 | (inputs |
| 2056 | (list zlib)) |
| 2057 | (native-inputs |
| 2058 | (list gfortran perl)) ;part of the test machinery needs Perl |
| 2059 | (outputs '("out" ; core library |
| 2060 | "fortran")) ; fortran interface |
| 2061 | (arguments |
| 2062 | `(;; Some of the users, notably Flann, need the C++ interface. |
| 2063 | #:configure-flags '("--enable-cxx" |
| 2064 | "--enable-fortran" |
| 2065 | "--enable-fortran2003" |
| 2066 | |
| 2067 | ;; Build a thread-safe library. Unfortunately, |
| 2068 | ;; 'configure' invites you to either turn off C++, |
| 2069 | ;; Fortran, and the high-level interface (HL), or |
| 2070 | ;; to pass '--enable-unsupported'. Debian |
| 2071 | ;; packagers chose to pass '--enable-unsupported' |
| 2072 | ;; and we follow their lead here. |
| 2073 | "--enable-threadsafe" |
| 2074 | "--with-pthread" |
| 2075 | "--enable-unsupported") |
| 2076 | ;; Use -fPIC to allow the R bindings to link with the static libraries. |
| 2077 | ;; Declare warnings as non-errors to fix build with gcc@14 |
| 2078 | #:make-flags |
| 2079 | (list "CFLAGS=-g -O2 -fPIC -Wno-error=incompatible-pointer-types" |
| 2080 | "CXXFLAGS=-g -O2 -fPIC") |
| 2081 | #:phases |
| 2082 | (modify-phases %standard-phases |
| 2083 | (add-before 'configure 'patch-configure |
| 2084 | (lambda* (#:key outputs #:allow-other-keys) |
| 2085 | (substitute* "configure" |
| 2086 | (("/bin/mv") "mv")) |
| 2087 | (substitute* "fortran/src/Makefile.in" |
| 2088 | (("libhdf5_fortran_la_LDFLAGS =") |
| 2089 | (string-append "libhdf5_fortran_la_LDFLAGS = -Wl,-rpath=" |
| 2090 | (assoc-ref outputs "fortran") "/lib"))) |
| 2091 | (substitute* "hl/fortran/src/Makefile.in" |
| 2092 | (("libhdf5hl_fortran_la_LDFLAGS =") |
| 2093 | (string-append "libhdf5hl_fortran_la_LDFLAGS = -Wl,-rpath=" |
| 2094 | (assoc-ref outputs "fortran") "/lib"))))) |
| 2095 | (add-after 'configure 'patch-settings |
| 2096 | (lambda _ |
| 2097 | ;; libhdf5.settings contains the full path of the |
| 2098 | ;; compilers used, and its contents are included in |
| 2099 | ;; libhdf5.so. We truncate the hashes to avoid |
| 2100 | ;; unnecessary store references to those compilers: |
| 2101 | (substitute* "src/libhdf5.settings" |
| 2102 | (("(/gnu/store/)([a-zA-Z0-9]*)" all prefix hash) |
| 2103 | (string-append prefix (string-take hash 10) "...")) |
| 2104 | ;; Don't record the build-time kernel version to make the |
| 2105 | ;; settings file reproducible. |
| 2106 | (("Uname information:.*") |
| 2107 | "Uname information: Linux\n")))) |
| 2108 | (add-after 'install 'patch-references |
| 2109 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2110 | (let ((bin (string-append (assoc-ref outputs "out") "/bin")) |
| 2111 | (zlib (assoc-ref inputs "zlib"))) |
| 2112 | (substitute* (find-files bin "h5p?cc") |
| 2113 | (("-lz" lib) |
| 2114 | (string-append "-L" zlib "/lib " lib)))))) |
| 2115 | (add-after 'install 'split |
| 2116 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2117 | ;; Move all fortran-related files |
| 2118 | (let* ((out (assoc-ref outputs "out")) |
| 2119 | (bin (string-append out "/bin")) |
| 2120 | (lib (string-append out "/lib")) |
| 2121 | (inc (string-append out "/include")) |
| 2122 | (ex (string-append out "/share/hdf5_examples/fortran")) |
| 2123 | (fort (assoc-ref outputs "fortran")) |
| 2124 | (fbin (string-append fort "/bin")) |
| 2125 | (flib (string-append fort "/lib")) |
| 2126 | (finc (string-append fort "/include")) |
| 2127 | (fex (string-append fort "/share/hdf5_examples/fortran"))) |
| 2128 | (mkdir-p fbin) |
| 2129 | (mkdir-p flib) |
| 2130 | (mkdir-p finc) |
| 2131 | (mkdir-p fex) |
| 2132 | ;; Note: When built with --enable-parallel, the 'h5fc' file |
| 2133 | ;; doesn't exist, hence this condition. |
| 2134 | (when (file-exists? (string-append bin "/h5fc")) |
| 2135 | (rename-file (string-append bin "/h5fc") |
| 2136 | (string-append fbin "/h5fc"))) |
| 2137 | (for-each (lambda (file) |
| 2138 | (rename-file file |
| 2139 | (string-append flib "/" (basename file)))) |
| 2140 | (find-files lib ".*fortran.*")) |
| 2141 | (for-each (lambda (file) |
| 2142 | (rename-file file |
| 2143 | (string-append finc "/" (basename file)))) |
| 2144 | (find-files inc ".*mod")) |
| 2145 | (for-each (lambda (file) |
| 2146 | (rename-file file |
| 2147 | (string-append fex "/" (basename file)))) |
| 2148 | (find-files ex ".*")) |
| 2149 | (delete-file-recursively ex))))))) |
| 2150 | (home-page "https://www.hdfgroup.org") |
| 2151 | (synopsis "Management suite for extremely large and complex data") |
| 2152 | (description "HDF5 is a suite that makes possible the management of |
| 2153 | extremely large and complex data collections.") |
| 2154 | (license (license:x11-style |
| 2155 | "https://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING")))) |
| 2156 | |
| 2157 | (define-public hdf5-1.10 |
| 2158 | (package |
| 2159 | (inherit hdf5-1.8) |
| 2160 | (version "1.10.9") |
| 2161 | (source |
| 2162 | (origin |
| 2163 | (method url-fetch) |
| 2164 | (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" |
| 2165 | "hdf5-" (version-major+minor version) |
| 2166 | "/hdf5-" version "/src/hdf5-" |
| 2167 | version ".tar.bz2") |
| 2168 | (string-append "https://support.hdfgroup.org/ftp/HDF5/" |
| 2169 | "current" |
| 2170 | (apply string-append |
| 2171 | (take (string-split version #\.) 2)) |
| 2172 | "/src/hdf5-" version ".tar.bz2"))) |
| 2173 | (sha256 |
| 2174 | (base32 "14gih7kmjx4h3lc7pg4fwcl28hf1qqkf2x7rljpxqvzkjrqbxi00")) |
| 2175 | (patches (search-patches "hdf5-config-date.patch")))))) |
| 2176 | |
| 2177 | (define-public hdf5 |
| 2178 | (package |
| 2179 | (name "hdf5") |
| 2180 | (version "1.14.6") |
| 2181 | (outputs '("out" "doc")) |
| 2182 | (source |
| 2183 | (origin |
| 2184 | (method git-fetch) |
| 2185 | (uri (git-reference |
| 2186 | (url "https://github.com/HDFGroup/hdf5") |
| 2187 | (commit (string-append "hdf5_" version)))) |
| 2188 | (file-name (git-file-name name version)) |
| 2189 | (sha256 |
| 2190 | (base32 |
| 2191 | "1f7yv0xra465c3qy8c79fzddib653wzj5dsakb0bs02nwp3xm54q")) |
| 2192 | (modules '((guix build utils))) |
| 2193 | (snippet |
| 2194 | '(for-each |
| 2195 | delete-file |
| 2196 | (append |
| 2197 | (find-files "." "Makefile\\.in$") |
| 2198 | (find-files "java/lib" "\\.jar$") |
| 2199 | (list "aclocal.m4" |
| 2200 | "bin/compile" |
| 2201 | "bin/config.guess" |
| 2202 | "bin/config.sub" |
| 2203 | "bin/depcomp" |
| 2204 | "bin/install-sh" |
| 2205 | "bin/ltmain.sh" |
| 2206 | "bin/missing" |
| 2207 | "bin/test-driver" |
| 2208 | "configure" |
| 2209 | "HDF5Examples/aclocal.m4" |
| 2210 | "HDF5Examples/compile" |
| 2211 | "HDF5Examples/configure" |
| 2212 | "HDF5Examples/depcomp" |
| 2213 | "HDF5Examples/missing" |
| 2214 | "HDF5Examples/test-driver" |
| 2215 | "hl/src/H5LTanalyze.c" |
| 2216 | "hl/src/H5LTparse.c" |
| 2217 | "hl/src/H5LTparse.h" |
| 2218 | "hl/tools/gif2h5/testfiles/ex_image2.h5" |
| 2219 | "hl/tools/gif2h5/testfiles/h52giftst.h5" |
| 2220 | "m4/ax_prog_doxygen.m4" |
| 2221 | "m4/libtool.m4" |
| 2222 | "m4/lt~obsolete.m4" |
| 2223 | "m4/ltoptions.m4" |
| 2224 | "m4/ltsugar.m4" |
| 2225 | "m4/ltversion.m4" |
| 2226 | "src/H5config.h.in" |
| 2227 | "src/H5Edefin.h" |
| 2228 | "src/H5Einit.h" |
| 2229 | "src/H5Epubgen.h" |
| 2230 | "src/H5Eterm.h" |
| 2231 | "src/H5overflow.h" |
| 2232 | "src/H5version.h")))))) |
| 2233 | (build-system cmake-build-system) |
| 2234 | (arguments |
| 2235 | (list |
| 2236 | ;; Some of the users, notably Flann, need the C++ interface. |
| 2237 | #:configure-flags |
| 2238 | #~(list |
| 2239 | "-DBUILD_STATIC_LIBS=OFF" |
| 2240 | "-DHDF5_INSTALL_CMAKE_DIR=lib/cmake" |
| 2241 | "-DHDF5_BUILD_CPP_LIB=ON" |
| 2242 | "-DHDF5_BUILD_FORTRAN=ON" |
| 2243 | ;; Build a thread-safe library. Unfortunately, CMakeLists.txt |
| 2244 | ;; invites you to either turn off C++, Fortran, and the high-level |
| 2245 | ;; interface (HL), or to enable 'ALLOW_UNSUPPORTED'. Debian |
| 2246 | ;; packagers chose to pass '--enable-unsupported' to the 'configure' |
| 2247 | ;; script and we follow their lead here. |
| 2248 | "-DHDF5_ENABLE_THREADSAFE=ON" |
| 2249 | "-DALLOW_UNSUPPORTED=ON" |
| 2250 | "-DHDF5_BUILD_DOC=ON") |
| 2251 | #:phases |
| 2252 | #~(modify-phases %standard-phases |
| 2253 | ;; XXX: src/H5private.h includes <fenv.h> and fails to find the |
| 2254 | ;; stdlib types when the gfortran header is used. Remove gfortran |
| 2255 | ;; from CPLUS_INCLUDE_PATH as a workaround. |
| 2256 | (add-after 'set-paths 'hide-gfortran |
| 2257 | (lambda _ |
| 2258 | (let ((gfortran #$(this-package-native-input "gfortran"))) |
| 2259 | (setenv "CPLUS_INCLUDE_PATH" |
| 2260 | (string-join |
| 2261 | (delete (string-append gfortran "/include/c++") |
| 2262 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) |
| 2263 | ":"))))) |
| 2264 | (add-after 'unpack 'make-gen-deterministic |
| 2265 | (lambda _ |
| 2266 | (substitute* "bin/make_err" |
| 2267 | (("keys %major" all) |
| 2268 | (string-append "sort " all)) |
| 2269 | (("while.*each \\(%section\\).*") |
| 2270 | (string-append |
| 2271 | "foreach $sect_name (sort keys %section) {\n" |
| 2272 | " $sect_desc = $section{$sect_name};\n"))))) |
| 2273 | (add-after 'unpack 'generate-flexbison |
| 2274 | (lambda _ |
| 2275 | (invoke "bash" "bin/genparser" "hl/src"))) |
| 2276 | (add-after 'unpack 'patch-trace-shebang |
| 2277 | (lambda _ |
| 2278 | (for-each patch-shebang |
| 2279 | (find-files "bin" (lambda (file stat) |
| 2280 | (executable-file? file)))))) |
| 2281 | ;; This is a known issue on i686, see |
| 2282 | ;; https://github.com/HDFGroup/hdf5/issues/4926 |
| 2283 | (add-after 'unpack 'fix-fortran-i686-test |
| 2284 | (lambda _ |
| 2285 | (substitute* "fortran/test/tH5R.F90" |
| 2286 | (((string-append |
| 2287 | "CALL h5rget_obj_name_f\\(C_LOC\\(ref_ptr\\(2\\)\\)," |
| 2288 | " \"\", error, name_len=buf_size \\)")) |
| 2289 | (string-append |
| 2290 | "CALL h5rget_obj_name_f(C_LOC(ref_ptr(2))," |
| 2291 | " \"xxxxxxxxxxxxxx\", error, name_len=buf_size)"))))) |
| 2292 | (add-after 'unpack 'generate-headers |
| 2293 | (lambda _ |
| 2294 | (invoke "perl" "bin/make_err" "src/H5err.txt") |
| 2295 | (invoke "perl" "bin/make_vers" "src/H5vers.txt") |
| 2296 | (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) |
| 2297 | ;; Remove references to GCC/GFortran/binutils in order to decrease |
| 2298 | ;; package size. |
| 2299 | (add-before 'generate-headers 'remove-referencess |
| 2300 | (lambda _ |
| 2301 | (substitute* '("src/libhdf5.settings.cmake.in" |
| 2302 | "src/H5build_settings.cmake.c.in") |
| 2303 | (("@CMAKE_AR@") "ar") |
| 2304 | (("@CMAKE_RANLIB@") "ranlib") |
| 2305 | (("@CMAKE_C_COMPILER@") "gcc") |
| 2306 | (("@CMAKE_CXX_COMPILER") "g++") |
| 2307 | (("@CMAKE_Fortran_COMPILER@") "gfortran")) |
| 2308 | (substitute* '("src/libhdf5.settings.autotools.in" |
| 2309 | "src/H5build_settings.autotools.c.in") |
| 2310 | (("@AR@") "ar") |
| 2311 | (("@RANLIB@") "ranlib") |
| 2312 | (("@CXX_VERSION@") "g++") |
| 2313 | (("@@CC_VERSION@") "gcc") |
| 2314 | (("@FC_VERSION@") "gfortran")))) |
| 2315 | (add-after 'install 'remove-gcc-references |
| 2316 | (lambda _ |
| 2317 | (substitute* (map (lambda (f) |
| 2318 | (string-append #$output "/" f)) |
| 2319 | '("bin/h5hlcc" |
| 2320 | "bin/h5hlc++" |
| 2321 | "bin/h5cc" |
| 2322 | "bin/h5c++")) |
| 2323 | (("/gnu/store/[a-z0-9]*-gcc-[0-9.]*/bin/") |
| 2324 | "")))) |
| 2325 | (add-after 'install 'remove-gfortran-references |
| 2326 | (lambda _ |
| 2327 | (substitute* (map (lambda (f) |
| 2328 | (string-append #$output "/" f)) |
| 2329 | '("bin/h5hlfc" |
| 2330 | "bin/h5fc")) |
| 2331 | (("/gnu/store/[a-z0-9]*-gfortran-[0-9.]*/bin/") |
| 2332 | "")))) |
| 2333 | (add-after 'install 'move-html-documentation |
| 2334 | (lambda _ |
| 2335 | (mkdir-p (string-append #$output:doc "/share")) |
| 2336 | (rename-file (string-append #$output "/share/html") |
| 2337 | (string-append #$output:doc "/share/html"))))))) |
| 2338 | (inputs (list libaec zlib)) |
| 2339 | (native-inputs |
| 2340 | (list bison |
| 2341 | doxygen |
| 2342 | flex |
| 2343 | gfortran |
| 2344 | graphviz |
| 2345 | ;; Needed to generate some headers and for tests |
| 2346 | perl |
| 2347 | which)) |
| 2348 | (home-page "https://www.hdfgroup.org") |
| 2349 | (synopsis "Management suite for extremely large and complex data") |
| 2350 | (description "HDF5 is a suite that makes possible the management of |
| 2351 | extremely large and complex data collections.") |
| 2352 | (license (license:x11-style |
| 2353 | "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) |
| 2354 | |
| 2355 | (define-public hdf5-java |
| 2356 | (package |
| 2357 | (name "hdf5-java") |
| 2358 | (version (package-version hdf5)) |
| 2359 | (source (package-source hdf5)) |
| 2360 | (build-system cmake-build-system) |
| 2361 | (arguments |
| 2362 | (list |
| 2363 | #:configure-flags |
| 2364 | #~(list "-DHDF5_BUILD_JAVA=ON" |
| 2365 | "-DHDF5_BUILD_TOOLS=OFF") |
| 2366 | #:modules |
| 2367 | '((guix build cmake-build-system) |
| 2368 | ((guix build ant-build-system) #:prefix ant:) |
| 2369 | (guix build utils)) |
| 2370 | #:imported-modules |
| 2371 | `((guix build ant-build-system) |
| 2372 | ,@%cmake-build-system-modules) |
| 2373 | #:phases |
| 2374 | #~(modify-phases %standard-phases |
| 2375 | (add-after 'unpack 'unbundle |
| 2376 | (lambda* (#:key inputs #:allow-other-keys) |
| 2377 | (let ((simple |
| 2378 | (search-input-file |
| 2379 | inputs "/lib/m2/org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar")) |
| 2380 | (api |
| 2381 | (search-input-file |
| 2382 | inputs "/lib/m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar")) |
| 2383 | (nop |
| 2384 | (search-input-file |
| 2385 | inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar")) |
| 2386 | (junit |
| 2387 | (search-input-file |
| 2388 | inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar")) |
| 2389 | (hamcrest |
| 2390 | (search-input-file |
| 2391 | inputs "/lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"))) |
| 2392 | (substitute* "CMakeLists.txt" |
| 2393 | (("(set *\\(HDF5_JAVA_LOGGING_JAR ).*" _ orig) |
| 2394 | (string-append orig api ")\n")) |
| 2395 | (("(set *\\(HDF5_JAVA_LOGGING_NOP_JAR ).*" _ orig) |
| 2396 | (string-append orig nop ")\n")) |
| 2397 | (("(set *\\(HDF5_JAVA_LOGGING_SIMPLE_JAR ).*" _ orig) |
| 2398 | (string-append orig simple ")\n"))) |
| 2399 | ;; Do not install copies of external libraries |
| 2400 | (substitute* "java/CMakeLists.txt" |
| 2401 | ((".*HDF5_JAVA_LOGGING.*_JAR.*") "")) |
| 2402 | (substitute* "java/test/CMakeLists.txt" |
| 2403 | (("\\$\\{HDF5_JAVA_LIB_DIR\\}/junit\\.jar") |
| 2404 | junit) |
| 2405 | (("\\$\\{HDF5_JAVA_LIB_DIR\\}/hamcrest-core\\.jar") |
| 2406 | hamcrest)) |
| 2407 | (substitute* '("java/test/junit.sh.in" |
| 2408 | "HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in" |
| 2409 | "HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in" |
| 2410 | "HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in" |
| 2411 | "HDF5Examples/JAVA/TUTR/runExample.sh.in") |
| 2412 | (("^LIST_JAR_TESTFILES=\"" m) |
| 2413 | (string-append m hamcrest "\n" |
| 2414 | junit "\n" |
| 2415 | api "\n" |
| 2416 | simple "\n")) |
| 2417 | (("^\\$HDFLIB_HOME/.*") "") |
| 2418 | (("\"\\$BLDLIBDIR\"/junit.jar") |
| 2419 | junit) |
| 2420 | (("\"\\$BLDLIBDIR\"/hamcrest-core.jar") |
| 2421 | hamcrest) |
| 2422 | (("\"\\$BLDLIBDIR\"/slf4j-api-2.0.6.jar") |
| 2423 | api) |
| 2424 | (("\"\\$BLDLIBDIR\"/slf4j-simple-2.0.6.jar") |
| 2425 | simple) |
| 2426 | (("/usr/bin/test") |
| 2427 | (search-input-file inputs "/bin/test")) |
| 2428 | (("/usr/bin/uname") |
| 2429 | (search-input-file inputs "/bin/uname"))) |
| 2430 | (substitute* (find-files "java/test/testfiles/" ".*\\.txt$") |
| 2431 | (("JUnit version 4.13.2") |
| 2432 | "JUnit version 4.12-SNAPSHOT"))))) |
| 2433 | (add-after 'unpack 'patch-trace-shebang |
| 2434 | (lambda _ |
| 2435 | (for-each patch-shebang |
| 2436 | (find-files "bin" (lambda (file stat) |
| 2437 | (executable-file? file)))))) |
| 2438 | (add-after 'unpack 'generate-flexbison |
| 2439 | (lambda _ |
| 2440 | (invoke "bash" "bin/genparser" "hl/src"))) |
| 2441 | (add-after 'unpack 'generate-headers |
| 2442 | (lambda _ |
| 2443 | (invoke "perl" "bin/make_err" "src/H5err.txt") |
| 2444 | (invoke "perl" "bin/make_vers" "src/H5vers.txt") |
| 2445 | (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) |
| 2446 | (add-after 'install 'strip-jar-timestamps |
| 2447 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) |
| 2448 | (native-inputs |
| 2449 | (modify-inputs (package-native-inputs hdf5) |
| 2450 | (prepend `(,icedtea "jdk")) |
| 2451 | (prepend java-hamcrest-core) |
| 2452 | (prepend java-junit) |
| 2453 | (prepend java-slf4j-nop) |
| 2454 | (prepend java-slf4j-simple) |
| 2455 | (prepend (@ (gnu packages compression) zip)) |
| 2456 | (delete "gfortran"))) |
| 2457 | (inputs |
| 2458 | (list java-slf4j-api |
| 2459 | libjpeg-turbo |
| 2460 | zlib)) |
| 2461 | (home-page "https://www.hdfgroup.org") |
| 2462 | (synopsis "Java interface for the HDF5 library") |
| 2463 | (description "The Java HDF5 Interface (JHI5) uses the Java Native |
| 2464 | Interface to wrap the HDF5 library, which is implemented in C.") |
| 2465 | (license (package-license hdf5)))) |
| 2466 | |
| 2467 | (define-public hdf5-parallel-openmpi |
| 2468 | (package/inherit hdf5 |
| 2469 | (name "hdf5-parallel-openmpi") |
| 2470 | (inputs (modify-inputs inputs |
| 2471 | (prepend openmpi))) |
| 2472 | (arguments |
| 2473 | (substitute-keyword-arguments arguments |
| 2474 | ((#:configure-flags flags '()) |
| 2475 | #~(append (filter (lambda (flag) |
| 2476 | (not |
| 2477 | (or (string-prefix? "-DHDF5_ENABLE_THREADSAFE" flag) |
| 2478 | (string-prefix? "-DHDF5_BUILD_CPP_LIB" flag) |
| 2479 | (string-prefix? "-DALLOW_UNSUPPORTED" flag)))) |
| 2480 | #$flags) |
| 2481 | (list "-DBUILD_SHARED_LIBS=ON" |
| 2482 | "-DHDF5_BUILD_CPP_LIB=OFF" |
| 2483 | "-DHDF5_ENABLE_PARALLEL=ON" |
| 2484 | "-DHDF5_ENABLE_THREADSAFE=OFF"))) |
| 2485 | ((#:phases phases) |
| 2486 | #~(modify-phases #$phases |
| 2487 | (add-after 'build 'mpi-setup |
| 2488 | #$%openmpi-setup) |
| 2489 | (add-after 'unpack 'skip-sloppy-tests |
| 2490 | (lambda _ |
| 2491 | ;; XXX: The three tests below often fail for no clear reason |
| 2492 | ;; (timeout or actual failure). Comment them out (there's one |
| 2493 | ;; test per line in this file). |
| 2494 | (substitute* "testpar/CMakeLists.txt" |
| 2495 | (("(t_pmulti_dset|t_shapesame|t_filters_parallel)" _ test) |
| 2496 | (string-append "# " test "\n"))))) |
| 2497 | (replace 'remove-gcc-references |
| 2498 | (lambda _ |
| 2499 | (substitute* (map (lambda (f) |
| 2500 | (string-append #$output "/" f)) |
| 2501 | '("bin/h5hlcc" |
| 2502 | "bin/h5cc")) |
| 2503 | (("/gnu/store/[a-z0-9]*-gcc-[0-9.]*/bin/") |
| 2504 | "")))))))) |
| 2505 | (propagated-inputs |
| 2506 | (list openmpi)) |
| 2507 | (synopsis "Management suite for data with parallel IO support"))) |
| 2508 | |
| 2509 | (define-public hdf5-blosc |
| 2510 | (package |
| 2511 | (name "hdf5-blosc") |
| 2512 | (version "1.0.1") |
| 2513 | (source |
| 2514 | (origin |
| 2515 | (method git-fetch) |
| 2516 | (uri (git-reference |
| 2517 | (url "https://github.com/Blosc/hdf5-blosc") |
| 2518 | (commit (string-append "v" version)))) |
| 2519 | (file-name (git-file-name name version)) |
| 2520 | (sha256 |
| 2521 | (base32 "0kq09w2mz8i735p3zfnsdqdvay0086ls0cb621ckfxq42pr3gkm4")))) |
| 2522 | (build-system cmake-build-system) |
| 2523 | (arguments |
| 2524 | `(#:configure-flags |
| 2525 | (list (string-append "-DBLOSC_INSTALL_DIR=" |
| 2526 | (assoc-ref %build-inputs "c-blosc")) |
| 2527 | (string-append "-DPLUGIN_INSTALL_PATH=" |
| 2528 | (assoc-ref %outputs "out") |
| 2529 | "/hdf5/lib/plugin")) |
| 2530 | #:phases |
| 2531 | (modify-phases %standard-phases |
| 2532 | (add-after 'unpack 'do-not-build-blosc |
| 2533 | (lambda _ |
| 2534 | (substitute* "CMakeLists.txt" |
| 2535 | (("set\\(BLOSC_INSTALL_DIR.*") "") |
| 2536 | (("ExternalProject_Add\\(project_blosc") "message(")) |
| 2537 | #t))))) |
| 2538 | (inputs |
| 2539 | (list c-blosc hdf5)) |
| 2540 | (home-page "https://github.com/Blosc/hdf5-blosc") |
| 2541 | (synopsis "Filter for HDF5 using the Blosc compressor") |
| 2542 | (description "This is a filter for HDF5 that uses the Blosc compressor; by |
| 2543 | installing this filter, you can read and write HDF5 files with |
| 2544 | Blosc-compressed datasets.") |
| 2545 | (license license:expat))) |
| 2546 | |
| 2547 | (define-public hdf5-blosc-parallel-openmpi |
| 2548 | (package/inherit hdf5-blosc |
| 2549 | (name "hdf5-blosc-parallel-openmpi") |
| 2550 | (inputs |
| 2551 | (list c-blosc hdf5-parallel-openmpi)) |
| 2552 | (synopsis "HDF5-Blosc with parallel IO support"))) |
| 2553 | |
| 2554 | (define-public highfive |
| 2555 | (package |
| 2556 | (name "highfive") |
| 2557 | (version "2.10.1") |
| 2558 | (source |
| 2559 | (origin |
| 2560 | (method git-fetch) |
| 2561 | (uri (git-reference |
| 2562 | (url "https://github.com/BlueBrain/HighFive") |
| 2563 | (commit (string-append "v" version)))) |
| 2564 | (file-name (git-file-name name version)) |
| 2565 | (sha256 |
| 2566 | (base32 "1yp9bah6prhy31p2xbj4yv7p0p1k0ifjhb0z9i36ki3zx5nsgzrn")))) |
| 2567 | (build-system cmake-build-system) |
| 2568 | (arguments |
| 2569 | (list |
| 2570 | #:configure-flags |
| 2571 | #~(list "-DHIGHFIVE_EXAMPLES=OFF" |
| 2572 | ;; TODO: maybe build with hdf5-parallel-openmpi |
| 2573 | ;; "-DHIGHFIVE_PARALLEL_HDF5=ON" |
| 2574 | "-DHIGHFIVE_UNIT_TESTS=ON" |
| 2575 | "-GNinja"))) |
| 2576 | (native-inputs |
| 2577 | (list boost-1.83 |
| 2578 | catch2 |
| 2579 | ninja)) |
| 2580 | (inputs |
| 2581 | (list hdf5)) |
| 2582 | (home-page "https://bluebrain.github.io/HighFive/") |
| 2583 | (synopsis "Header-only C++ HDF5 interface") |
| 2584 | (description |
| 2585 | "HighFive is a header-only C++11 friendly interface for @code{libhdf5}. |
| 2586 | It supports STL vector/string, @code{Boost::UBLAS}, @code{Boost::Multi-array} |
| 2587 | and Xtensor; and handles C++ from/to HDF5 with automatic type |
| 2588 | mapping. HighFive does not require additional libraries.") |
| 2589 | ;; Boost Software License (BSL) - Version 1.0 - August 17th, 2003 |
| 2590 | (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt" |
| 2591 | "Some components have other similar licences.")))) |
| 2592 | |
| 2593 | (define-public itex2mml |
| 2594 | (package |
| 2595 | (name "itex2mml") |
| 2596 | (version "1.6.1") |
| 2597 | (source (origin |
| 2598 | (method url-fetch) |
| 2599 | (uri (string-append "https://golem.ph.utexas.edu" |
| 2600 | "/~distler/blog/files/itexToMML-" |
| 2601 | version |
| 2602 | ".tar.gz")) |
| 2603 | (sha256 |
| 2604 | (base32 |
| 2605 | "0pz51c0hfh2mg8xli0wj7hf92s3b7yf5r4114g8z8722lcm5gwiy")) |
| 2606 | (snippet |
| 2607 | #~(begin |
| 2608 | (use-modules (guix build utils)) |
| 2609 | (delete-file-recursively "itex-binaries"))))) |
| 2610 | (build-system gnu-build-system) |
| 2611 | (native-inputs |
| 2612 | (list bison |
| 2613 | flex)) |
| 2614 | (arguments |
| 2615 | (list |
| 2616 | #:make-flags #~(list (string-append "BINDIR=" #$output "/bin/") |
| 2617 | (string-append "CC=" #$(cc-for-target))) |
| 2618 | #:tests? #f ;; there are none |
| 2619 | #:phases |
| 2620 | #~(modify-phases %standard-phases |
| 2621 | (delete 'configure) |
| 2622 | (add-before 'build 'chdir |
| 2623 | (lambda args |
| 2624 | (chdir "itex-src"))) |
| 2625 | (add-before 'install 'make-bindir |
| 2626 | (lambda args |
| 2627 | (mkdir-p (string-append #$output "/bin")))) |
| 2628 | (add-after 'install 'install-doc |
| 2629 | (lambda* (#:key outputs #:allow-other-keys) |
| 2630 | (let* ((doc-prefix (or (assoc-ref outputs "doc") |
| 2631 | #$output)) |
| 2632 | (itex2mml+version (strip-store-file-name #$output)) |
| 2633 | (doc-dir (string-append doc-prefix |
| 2634 | "/share/doc/" |
| 2635 | itex2mml+version))) |
| 2636 | (install-file "../README" doc-dir))))))) |
| 2637 | (home-page "https://golem.ph.utexas.edu/~distler/blog/itex2MML.html") |
| 2638 | (synopsis "LaTeX to XHTML/MathML converter") |
| 2639 | (description |
| 2640 | "The @command{itex2MML} utility is a stream filter. It takes text with |
| 2641 | embedded itex equations, converts the itex equations to MathML, and outputs |
| 2642 | the resulting text.") |
| 2643 | (license (list license:lgpl2.0+ license:gpl2+ license:mpl1.1)))) |
| 2644 | |
| 2645 | (define-public itpp |
| 2646 | (package |
| 2647 | (name "itpp") |
| 2648 | (version "4.3.1") |
| 2649 | (source (origin |
| 2650 | (method url-fetch) |
| 2651 | (uri (string-append "mirror://sourceforge/itpp/itpp/" |
| 2652 | version "/itpp-" |
| 2653 | version ".tar.gz")) |
| 2654 | (sha256 |
| 2655 | (base32 |
| 2656 | "14ddy2xnb6sgp4hiax9v5sv4pr4l4dd4ps76nfha3nrpr1ikhcqm")))) |
| 2657 | (build-system cmake-build-system) |
| 2658 | (arguments |
| 2659 | (list |
| 2660 | #:tests? #f ; Tests require googletest *sources* |
| 2661 | #:phases |
| 2662 | #~(modify-phases %standard-phases |
| 2663 | (add-after 'install 'delete-formulas-log |
| 2664 | ;; Contains date and timing information which is unreproducible, |
| 2665 | ;; and should not be needed when using the package |
| 2666 | (lambda _ |
| 2667 | (delete-file |
| 2668 | (string-append #$output "/share/doc/itpp/html/_formulas.log")))) |
| 2669 | (add-after 'unpack 'set-man-page-date |
| 2670 | (lambda _ |
| 2671 | (substitute* "itpp-config.1.cmake.in" |
| 2672 | ((".PACKAGE_DATE.") "2012-04-18")))) |
| 2673 | (add-before 'build 'set-force-source-date |
| 2674 | ;; for reproducible dates, texlive needs this to respect respect |
| 2675 | ;; SOURCE_DATE_EPOCH |
| 2676 | (lambda _ |
| 2677 | (setenv "FORCE_SOURCE_DATE" "1")))))) |
| 2678 | (inputs (list fftw lapack openblas)) |
| 2679 | ;; FIXME: Even though the fonts are available dvips complains: |
| 2680 | ;; "Font cmmi10 not found; characters will be left blank." |
| 2681 | (native-inputs (list (texlive-local-tree) ghostscript doxygen)) |
| 2682 | (home-page "https://itpp.sourceforge.net") |
| 2683 | (synopsis "C++ library of maths, signal processing and communication classes") |
| 2684 | (description "IT++ is a C++ library of mathematical, signal processing and |
| 2685 | communication classes and functions. Its main use is in simulation of |
| 2686 | communication systems and for performing research in the area of |
| 2687 | communications. The kernel of the library consists of generic vector and |
| 2688 | matrix classes, and a set of accompanying routines. Such a kernel makes IT++ |
| 2689 | similar to MATLAB, GNU Octave or SciPy.") |
| 2690 | (license license:gpl3+))) |
| 2691 | |
| 2692 | (define-public netcdf |
| 2693 | (package |
| 2694 | (name "netcdf") |
| 2695 | (version "4.9.2") |
| 2696 | (source |
| 2697 | (origin |
| 2698 | (method url-fetch) |
| 2699 | (uri (string-append |
| 2700 | "https://downloads.unidata.ucar.edu/netcdf-c/" version |
| 2701 | "/netcdf-c-" version ".tar.gz")) |
| 2702 | (sha256 |
| 2703 | (base32 |
| 2704 | "0j3c3amzvsd8bd52dqgqa8gkgl7n36qf0yahyl4kz5mrpnxvl4fg")) |
| 2705 | (modules '((guix build utils))) |
| 2706 | (snippet |
| 2707 | ;; Make sure this variable is defined only once. Failing to do so |
| 2708 | ;; would break builds of 'netcdf-parallel-openmpi' with a |
| 2709 | ;; multiple-definition link error with GCC 10. |
| 2710 | '(substitute* "ncdump/ocprint.c" |
| 2711 | (("^int ocdebug") "static int ocdebug"))) |
| 2712 | (patches (search-patches "netcdf-date-time.patch")))) |
| 2713 | (build-system gnu-build-system) |
| 2714 | (native-inputs |
| 2715 | (list doxygen |
| 2716 | graphviz |
| 2717 | m4 |
| 2718 | unzip)) |
| 2719 | (inputs |
| 2720 | (list curl |
| 2721 | bzip2 |
| 2722 | hdf5 |
| 2723 | libaec |
| 2724 | libjpeg-turbo |
| 2725 | libxml2 |
| 2726 | zlib |
| 2727 | zstd)) |
| 2728 | (arguments |
| 2729 | (list #:configure-flags |
| 2730 | #~(list "--disable-dap-remote-tests" |
| 2731 | ;; XXX: ... docs/internal.md' does not exist |
| 2732 | ;; "--enable-doxygen" |
| 2733 | "--enable-dot" |
| 2734 | "--enable-netcdf-4" |
| 2735 | #$@(if (or (target-x86-32?) (target-arm32?)) |
| 2736 | '("CFLAGS=-Wno-error=incompatible-pointer-types") |
| 2737 | '()) |
| 2738 | (string-append "--with-plugin-dir=" #$output "/lib/hdf5-plugins")) |
| 2739 | #:phases |
| 2740 | #~(modify-phases %standard-phases |
| 2741 | (add-after 'unpack 'fix-tests |
| 2742 | (lambda* (#:key inputs #:allow-other-keys) |
| 2743 | ;; Network access is required for these tests. |
| 2744 | (substitute* (list "ncdap_test/Makefile.am" |
| 2745 | "ncdap_test/Makefile.in") |
| 2746 | (("testurl.sh") "")) |
| 2747 | (substitute* "nczarr_test/Makefile.in" |
| 2748 | (("/bin/bash") |
| 2749 | (search-input-file inputs "bin/bash"))) |
| 2750 | ;; This test fails on 32 bit platforms. |
| 2751 | #$@(if (or (target-x86-32?) (target-arm32?)) |
| 2752 | '((substitute* '("ncdump/tst_netcdf4_4.sh" |
| 2753 | "ncdump/tst_nccopy4.sh") |
| 2754 | (("#!/bin/sh" m) (string-append m "\nexit 0\n"))) |
| 2755 | (substitute* "ncdump/Makefile.in" |
| 2756 | (("tst_netcdf4_4.log") ""))) |
| 2757 | '()))) |
| 2758 | (add-before 'configure 'fix-source-date |
| 2759 | (lambda _ |
| 2760 | ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build |
| 2761 | ;; environment, `date -u -d ${SOURCE_DATE_EPOCH}` will evaluate |
| 2762 | ;; to '1st hour of the current day', and therefore makes the |
| 2763 | ;; package not reproducible. |
| 2764 | (substitute* "./configure" |
| 2765 | (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"") |
| 2766 | "date --date='@0'")))) |
| 2767 | (add-after 'configure 'patch-settings |
| 2768 | (lambda _ |
| 2769 | ;; libnetcdf.settings contains the full filename of the compilers |
| 2770 | ;; used to build the library. We truncate the hashes of those |
| 2771 | ;; filenames to avoid unnecessary references to the corresponding |
| 2772 | ;; store items. |
| 2773 | (substitute* "libnetcdf.settings" |
| 2774 | (("(/gnu/store/)([0-9A-Za-z]*)" all prefix hash) |
| 2775 | (string-append prefix |
| 2776 | (string-take hash 10) "..."))))) |
| 2777 | (add-before 'check 'fix-test-rcmerge |
| 2778 | (lambda _ |
| 2779 | ;; Set HOME, to fix the test-rcmerge test. |
| 2780 | (setenv "HOME" "/tmp")))) |
| 2781 | |
| 2782 | #:parallel-tests? #f)) ;various race conditions |
| 2783 | (home-page "https://www.unidata.ucar.edu/software/netcdf/") |
| 2784 | (synopsis "Library for scientific data") |
| 2785 | (description "NetCDF is an interface for scientific data access and a |
| 2786 | software library that provides an implementation of the interface. The netCDF |
| 2787 | library defines a machine-independent format for representing scientific data. |
| 2788 | Together, the interface, library, and format support the creation, access, and |
| 2789 | sharing of scientific data.") |
| 2790 | (license (license:x11-style "file://COPYRIGHT")))) |
| 2791 | |
| 2792 | (define-public netcdf-parallel-openmpi |
| 2793 | (package/inherit netcdf |
| 2794 | (name "netcdf-parallel-openmpi") |
| 2795 | (inputs (modify-inputs inputs |
| 2796 | (append openmpi pnetcdf) |
| 2797 | (replace "hdf5" hdf5-parallel-openmpi))) |
| 2798 | ;; TODO: Replace pkg-config references in nc-config with absolute references |
| 2799 | (arguments |
| 2800 | (substitute-keyword-arguments arguments |
| 2801 | ((#:configure-flags flags) |
| 2802 | #~(cons* "CC=mpicc" |
| 2803 | "CXX=mpicxx" |
| 2804 | "--enable-parallel-tests" |
| 2805 | ;; Enable support of CDF-1, 2 and 5 formats. |
| 2806 | "--enable-pnetcdf" |
| 2807 | ;; NetCDF supports both parallel and shared library building |
| 2808 | ;; See https://docs.unidata.ucar.edu/nug/current/getting_and_building_netcdf.html#build_parallel |
| 2809 | "--enable-shared" |
| 2810 | "--with-pic" |
| 2811 | #$flags)) |
| 2812 | ((#:phases phases #~%standard-phases) |
| 2813 | #~(modify-phases #$phases |
| 2814 | (add-after 'build 'mpi-setup |
| 2815 | #$%openmpi-setup))))))) |
| 2816 | |
| 2817 | (define-public netcdf-fortran |
| 2818 | (package |
| 2819 | (name "netcdf-fortran") |
| 2820 | (version "4.5.3") |
| 2821 | (source (origin |
| 2822 | (method url-fetch) |
| 2823 | (uri (string-append |
| 2824 | "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-" |
| 2825 | version ".tar.gz")) |
| 2826 | (sha256 |
| 2827 | (base32 |
| 2828 | "0x4acvfhbsx1q79dkkwrwbgfhm0w5ngnp4zj5kk92s1khihmqfhj")))) |
| 2829 | (build-system gnu-build-system) |
| 2830 | (arguments |
| 2831 | `(#:configure-flags '("FCFLAGS=-fallow-argument-mismatch" |
| 2832 | "FFLAGS=-fallow-argument-mismatch") |
| 2833 | #:parallel-tests? #f)) |
| 2834 | (inputs |
| 2835 | (list libaec hdf5 netcdf)) |
| 2836 | (native-inputs |
| 2837 | (list gfortran)) |
| 2838 | (synopsis "Fortran interface for the netCDF library") |
| 2839 | (description (package-description netcdf)) |
| 2840 | (home-page (package-home-page netcdf)) |
| 2841 | (license (package-license netcdf)))) |
| 2842 | |
| 2843 | (define-public netcdf-cxx4 |
| 2844 | (package |
| 2845 | (name "netcdf-cxx4") |
| 2846 | (version "4.3.1") |
| 2847 | (source |
| 2848 | (origin |
| 2849 | (method git-fetch) |
| 2850 | (uri (git-reference |
| 2851 | (url "https://github.com/Unidata/netcdf-cxx4") |
| 2852 | (commit (string-append "v" version)))) |
| 2853 | (file-name (git-file-name name version)) |
| 2854 | (sha256 |
| 2855 | (base32 "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr")))) |
| 2856 | (build-system cmake-build-system) |
| 2857 | (arguments |
| 2858 | `(#:phases (modify-phases %standard-phases |
| 2859 | (add-before 'configure 'patch-configure |
| 2860 | (lambda _ |
| 2861 | (substitute* "libnetcdf-cxx.settings.in" |
| 2862 | ;; Don't record the build-time host, time and gcc path to make the |
| 2863 | ;; settings file reproducible. |
| 2864 | (("@CONFIG_DATE@") |
| 2865 | "Not set (Guix build)") |
| 2866 | (("@host_cpu@-@host_vendor@-@host_os@") |
| 2867 | "Linux") |
| 2868 | (("@CC_VERSION@") |
| 2869 | "gcc")) |
| 2870 | ;; The filter tests fail with 'Caught unexpected exception'. |
| 2871 | (substitute* "cxx4/CMakeLists.txt" |
| 2872 | (("add_bin_test\\(cxx4 test_filter\\)") |
| 2873 | "")) |
| 2874 | (substitute* "examples/CMakeLists.txt" |
| 2875 | (("add_sh_test\\(examples tst_filter\\)") |
| 2876 | "")))) |
| 2877 | (add-after 'install 'clear-reference-to-compiler |
| 2878 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2879 | ;; Do not retain a reference to GCC and other build only inputs. |
| 2880 | (let ((out (assoc-ref outputs "out"))) |
| 2881 | (substitute* (string-append out "/bin/ncxx4-config") |
| 2882 | (("cc=([[:graph:]]+)/bin/gcc") |
| 2883 | "cc=\"gcc") |
| 2884 | (("cxx=([[:graph:]]+)/bin/c\\+\\+") |
| 2885 | "cxx=\"c++")))))) |
| 2886 | #:configure-flags (list (string-append "-DHDF5_C_LIBRARY_hdf5=" |
| 2887 | (search-input-file |
| 2888 | %build-inputs |
| 2889 | "/lib/libhdf5.so"))))) |
| 2890 | (inputs (list hdf5)) |
| 2891 | (propagated-inputs (list netcdf)) ;include/netcdf includes netcdf.h |
| 2892 | (home-page "https://github.com/Unidata/netcdf-cxx4") |
| 2893 | (synopsis "NetCDF C++ interface") |
| 2894 | (description |
| 2895 | "This package provides a C++ interface to the NetCDF library for |
| 2896 | scientific data storage.") |
| 2897 | (license license:bsd-3))) |
| 2898 | |
| 2899 | (define-public netcdf-cxx4-parallel-openmpi |
| 2900 | (package |
| 2901 | (inherit netcdf-cxx4) |
| 2902 | (name "netcdf-cxx4-parallel-openmpi") |
| 2903 | (synopsis "NetCDF C++ interface (with MPI support)") |
| 2904 | (inputs (modify-inputs inputs |
| 2905 | (replace "hdf5" hdf5-parallel-openmpi))) |
| 2906 | (propagated-inputs (modify-inputs propagated-inputs |
| 2907 | (replace "netcdf" netcdf-parallel-openmpi))))) |
| 2908 | |
| 2909 | (define-public n2p2 |
| 2910 | (package |
| 2911 | (name "n2p2") |
| 2912 | (version "2.3.0") |
| 2913 | (source (origin |
| 2914 | (method git-fetch) |
| 2915 | (uri (git-reference |
| 2916 | (url "https://github.com/CompPhysVienna/n2p2") |
| 2917 | (commit (string-append "v" version)))) |
| 2918 | (file-name (git-file-name name version)) |
| 2919 | (sha256 |
| 2920 | (base32 |
| 2921 | "01090j477gh9zk7wj416fvv1hxdnnxwhzy67bn96a04zhnayzkkj")))) |
| 2922 | (build-system gnu-build-system) |
| 2923 | (arguments |
| 2924 | `(#:make-flags '("MODE=shared" "-C" "src") |
| 2925 | #:phases |
| 2926 | (modify-phases %standard-phases |
| 2927 | (add-after 'unpack 'post-unpack |
| 2928 | (lambda* (#:key inputs #:allow-other-keys) |
| 2929 | (substitute* "src/makefile" |
| 2930 | (("shell") "bash")) |
| 2931 | (substitute* "src/makefile.gnu" |
| 2932 | (("PROJECT_EIGEN=/usr/include/eigen3") |
| 2933 | (string-append "PROJECT_EIGEN=" |
| 2934 | (assoc-ref inputs "eigen") "/include/eigen3"))) |
| 2935 | (substitute* "src/makefile.gnu" |
| 2936 | (("-lblas") |
| 2937 | (string-append "-L" (assoc-ref inputs "openblas") |
| 2938 | "/lib -lopenblas")) |
| 2939 | (("-march=native") |
| 2940 | "")) |
| 2941 | (substitute* "src/application/makefile" |
| 2942 | (("LDFLAGS=") |
| 2943 | "LDFLAGS=-Wl,-rpath='$$ORIGIN/../lib' ")))) |
| 2944 | (delete 'configure) |
| 2945 | (delete 'check) |
| 2946 | (replace 'install |
| 2947 | (lambda* (#:key outputs #:allow-other-keys) |
| 2948 | (let* ((out (assoc-ref outputs "out")) |
| 2949 | (bindir (string-append out "/bin")) |
| 2950 | (libdir (string-append out "/lib")) |
| 2951 | (incdir (string-append out "/include"))) |
| 2952 | (for-each (lambda (f) (install-file f bindir)) |
| 2953 | (find-files "bin" "^nnp-")) |
| 2954 | (for-each (lambda (f) (install-file f libdir)) |
| 2955 | (find-files "lib" ".")) |
| 2956 | (for-each (lambda (f) (install-file f incdir)) |
| 2957 | (find-files "include" "\\.h$")))))))) |
| 2958 | (inputs |
| 2959 | (list openmpi gsl openblas eigen)) |
| 2960 | (synopsis "Neural network potentials for chemistry and physics") |
| 2961 | (description "This package contains software that will allow you to use |
| 2962 | existing neural network potential parameterizations to predict energies and |
| 2963 | forces (with standalone tools but also in conjunction with the MD software |
| 2964 | LAMMPS). In addition it is possible to train new neural network potentials |
| 2965 | with the provided training tools.") |
| 2966 | (home-page "https://compphysvienna.github.io/n2p2/") |
| 2967 | (properties '((tunable? . #t))) ;to benefit from SIMD code in Eigen |
| 2968 | (license license:gpl3+))) |
| 2969 | |
| 2970 | (define-public nlopt |
| 2971 | (package |
| 2972 | (name "nlopt") |
| 2973 | (version "2.10.0") |
| 2974 | (source (origin |
| 2975 | (method git-fetch) |
| 2976 | (uri (git-reference |
| 2977 | (url "https://github.com/stevengj/nlopt/") |
| 2978 | (commit (string-append "v" version)))) |
| 2979 | (file-name (git-file-name name version)) |
| 2980 | (sha256 |
| 2981 | (base32 "04257r7a1bjmm6hznf9v6fimz2p93dk745sf89wmxzhg3rh0ak44")) |
| 2982 | (patches |
| 2983 | (search-patches "nlopt_CMake-Assume-working-c-compiler-597.patch")))) |
| 2984 | (build-system cmake-build-system) |
| 2985 | (arguments |
| 2986 | `(#:configure-flags |
| 2987 | (list "-DNLOPT_TESTS=ON") |
| 2988 | #:phases |
| 2989 | (modify-phases %standard-phases |
| 2990 | (add-before 'configure 'set-libnlopt-file-name |
| 2991 | (lambda* (#:key outputs #:allow-other-keys) |
| 2992 | ;; Make sure the Scheme module refers to the library by its |
| 2993 | ;; absolute file name. |
| 2994 | (let ((out (assoc-ref outputs "out"))) |
| 2995 | (substitute* "src/swig/nlopt-guile.i" |
| 2996 | (("\"nlopt_guile\"") |
| 2997 | (format #f "~s" |
| 2998 | `(format #f "~anlopt_guile" |
| 2999 | (if (getenv "NLOPT_UNINSTALLED") |
| 3000 | "" |
| 3001 | ,(format #f "~a/lib/guile/3.0/extensions/" out)))))) |
| 3002 | (setenv "NLOPT_UNINSTALLED" "1"))))))) |
| 3003 | (inputs (list guile-3.0 octave-cli)) |
| 3004 | (native-inputs (list pkg-config python python-numpy swig-4.0)) |
| 3005 | (home-page "http://ab-initio.mit.edu/wiki/") |
| 3006 | (synopsis "Library for nonlinear optimization") |
| 3007 | (description "NLopt is a library for nonlinear optimization, providing a |
| 3008 | common interface for a number of different free optimization routines available |
| 3009 | online as well as original implementations of various other algorithms.") |
| 3010 | (license license:lgpl2.1+))) |
| 3011 | |
| 3012 | (define-public ipopt |
| 3013 | (package |
| 3014 | (name "ipopt") |
| 3015 | (version "3.13.4") |
| 3016 | (source (origin |
| 3017 | (method git-fetch) |
| 3018 | (uri (git-reference |
| 3019 | (url "https://github.com/coin-or/Ipopt") |
| 3020 | (commit (string-append "releases/" version)))) |
| 3021 | (file-name (git-file-name name version)) |
| 3022 | (sha256 |
| 3023 | (base32 |
| 3024 | "08gznhwhqv1x4baksz350ih8q16r5rd0k8vals6078m3h94khr4b")))) |
| 3025 | (build-system gnu-build-system) |
| 3026 | (arguments |
| 3027 | '(#:configure-flags (list "--with-lapack=-lopenblas") |
| 3028 | #:phases (modify-phases %standard-phases |
| 3029 | (add-after 'install 'add--L-flags-in-ipopt.pc |
| 3030 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 3031 | ;; The '.pc' file lists '-llapack -lblas' in "Libs"; |
| 3032 | ;; move it to "Libs.private" where it belongs, and add a |
| 3033 | ;; '-L' flag for LAPACK. |
| 3034 | (let ((out (assoc-ref outputs "out")) |
| 3035 | (lapack (assoc-ref inputs "lapack"))) |
| 3036 | (substitute* (string-append out "/lib/pkgconfig/" |
| 3037 | "ipopt.pc") |
| 3038 | (("Libs: (.*)-llapack -lblas(.*)$" _ before after) |
| 3039 | (string-append "Libs: " before " " after "\n" |
| 3040 | "Libs.private: " before |
| 3041 | "-L" openblas "/lib -lopenblas" |
| 3042 | after "\n"))) |
| 3043 | #t)))))) |
| 3044 | (native-inputs |
| 3045 | (list gfortran pkg-config)) |
| 3046 | (inputs |
| 3047 | ;; TODO: Maybe add dependency on COIN-MUMPS, ASL, and HSL. |
| 3048 | (list openblas)) ;for both libblas and liblapack |
| 3049 | (home-page "https://www.coin-or.org") |
| 3050 | (synopsis "Large-scale nonlinear optimizer") |
| 3051 | (description |
| 3052 | "The Interior Point Optimizer (IPOPT) is a software package for |
| 3053 | large-scale nonlinear optimization. It provides C++, C, and Fortran |
| 3054 | interfaces.") |
| 3055 | (license license:epl2.0))) |
| 3056 | |
| 3057 | (define-public nomad-optimizer |
| 3058 | (package |
| 3059 | (name "nomad-optimizer") |
| 3060 | (version "4.3.1") |
| 3061 | (source |
| 3062 | (origin |
| 3063 | (method git-fetch) |
| 3064 | (uri (git-reference |
| 3065 | (url "https://github.com/bbopt/nomad/") |
| 3066 | (commit (string-append "v." version)))) |
| 3067 | (file-name (git-file-name name version)) |
| 3068 | (sha256 |
| 3069 | (base32 "08bxdvx8p5qzdw331xa5irc1896as4q5hajsid7f3qcxjm4nq4v3")))) |
| 3070 | (build-system cmake-build-system) |
| 3071 | (native-inputs |
| 3072 | (list openmpi)) |
| 3073 | (arguments |
| 3074 | (list |
| 3075 | ;; Cannot build Python interface because it is incompatible with OpenMP |
| 3076 | ;; support, which is enabled by default. |
| 3077 | #:configure-flags |
| 3078 | #~(list "-DBUILD_TESTS=ON" |
| 3079 | "-DBUILD_INTERFACE_C=ON") |
| 3080 | #:phases |
| 3081 | #~(modify-phases %standard-phases |
| 3082 | (add-after 'unpack 'fix-tests |
| 3083 | (lambda _ |
| 3084 | (substitute* "examples/CMakeLists.txt" |
| 3085 | ;; This test passes only sometimes. |
| 3086 | ;; See https://github.com/bbopt/nomad/issues/72. |
| 3087 | (("^ +add_subdirectory\\(\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/advanced/library/PSDMads\\)\n") |
| 3088 | "")) |
| 3089 | (make-file-writable |
| 3090 | "examples/advanced/library/exampleSuggestAndObserve/cache0.txt") |
| 3091 | ;; Fix the tests so they run in out-of-source builds. |
| 3092 | (substitute* |
| 3093 | '("examples/basic/library/COCO/CMakeLists.txt" |
| 3094 | "examples/basic/library/example1/CMakeLists.txt" |
| 3095 | "examples/basic/library/example2/CMakeLists.txt" |
| 3096 | "examples/basic/library/example3/CMakeLists.txt" |
| 3097 | "examples/basic/library/example4/CMakeLists.txt" |
| 3098 | "examples/basic/library/single_obj_parallel/CMakeLists.txt" |
| 3099 | "examples/advanced/library/FixedVariable/CMakeLists.txt" |
| 3100 | "examples/advanced/library/NMonly/CMakeLists.txt" |
| 3101 | "examples/advanced/library/PSDMads/CMakeLists.txt" |
| 3102 | "examples/advanced/library/Restart/CMakeLists.txt" |
| 3103 | "examples/advanced/library/Restart_VNS/CMakeLists.txt" |
| 3104 | "examples/advanced/library/c_api/example1/CMakeLists.txt" |
| 3105 | "examples/advanced/library/c_api/example2/CMakeLists.txt" |
| 3106 | "examples/advanced/library/exampleSuggestAndObserve/CMakeLists.txt") |
| 3107 | ;; The runExampleTest.sh script is run with WORKING_DIRECTORY |
| 3108 | ;; set to CMAKE_CURRENT_SOURCE_DIR. |
| 3109 | ;; Other scripts invoked by that script (for example |
| 3110 | ;; examples/advanced/batch/SuggestAndObserve/loopSuggestAndObserve.sh) |
| 3111 | ;; are in that same directory, but compiled examples are |
| 3112 | ;; located in CMAKE_CURRENT_BINARY_DIR. |
| 3113 | (("(COMMAND \\$\\{CMAKE_BINARY_DIR\\}/examples/runExampleTest\\.sh )\\.(/.*)" |
| 3114 | _ command test) |
| 3115 | (string-append command "${CMAKE_CURRENT_BINARY_DIR}" test))) |
| 3116 | (let ((builddir (string-append (getcwd) "/../build"))) |
| 3117 | (let ((dir "examples/advanced/library/FixedVariable")) |
| 3118 | (substitute* (string-append dir "/fixedVariable.cpp") |
| 3119 | (("^( +std::string sExe = ).*" _ prefix) |
| 3120 | (string-append prefix "\"" builddir "/" dir "/ufl.exe" "\";\n")))) |
| 3121 | ;; The BB_EXE and SURROGATE_EXE paths are interpreted relative |
| 3122 | ;; to the configuration file provided to NOMAD. |
| 3123 | ;; However, the configuration files are all in the source tree |
| 3124 | ;; rather than in the build tree (unlike the compiled |
| 3125 | ;; executables). |
| 3126 | (let ((fix-exe-path (lambda* (dir #:optional |
| 3127 | (file "param.txt") |
| 3128 | (exe-opt "BB_EXE")) |
| 3129 | (substitute* (string-append dir "/" file) |
| 3130 | (((string-append "^" exe-opt " +")) |
| 3131 | ;; The $ prevents NOMAD from prefixing |
| 3132 | ;; the executable with the path of the |
| 3133 | ;; parent directory of the configuration |
| 3134 | ;; file NOMAD was provided with as |
| 3135 | ;; argument (param.txt or some such). |
| 3136 | (string-append exe-opt " $" |
| 3137 | builddir "/" dir "/")))))) |
| 3138 | (for-each |
| 3139 | (lambda (dir) |
| 3140 | (substitute* (string-append dir "/CMakeLists.txt") |
| 3141 | ;; The install phase has not yet run. |
| 3142 | (("(COMMAND.*)\\$\\{CMAKE_INSTALL_PREFIX\\}/bin/nomad\\b" |
| 3143 | _ prefix) |
| 3144 | (string-append prefix "${CMAKE_BINARY_DIR}/src/nomad"))) |
| 3145 | (if (equal? dir "examples/basic/batch/single_obj_MPIparallel") |
| 3146 | (substitute* (string-append dir "/param.txt") |
| 3147 | (("^BB_EXE +'\\$.*mpirun \\$-np \\$4 ") |
| 3148 | (string-append "BB_EXE '$" (which "mpirun") " $" |
| 3149 | builddir "/" dir "/"))) |
| 3150 | (fix-exe-path dir)) |
| 3151 | (when (equal? dir "examples/basic/batch/surrogate_sort") |
| 3152 | (fix-exe-path dir "param.txt" "SURROGATE_EXE")) |
| 3153 | (when (equal? dir "examples/advanced/batch/FixedVariable") |
| 3154 | (fix-exe-path dir "param1.txt") |
| 3155 | (fix-exe-path dir "param2.txt") |
| 3156 | (fix-exe-path dir "param3.txt") |
| 3157 | (fix-exe-path dir "param10.txt"))) |
| 3158 | '("examples/basic/batch/coco_bbob-constrained" |
| 3159 | "examples/basic/batch/example1" |
| 3160 | "examples/basic/batch/example2" |
| 3161 | "examples/basic/batch/example3" |
| 3162 | "examples/basic/batch/multi_obj" |
| 3163 | "examples/basic/batch/multi_obj2" |
| 3164 | "examples/basic/batch/single_obj" |
| 3165 | "examples/basic/batch/single_obj_MPIparallel" |
| 3166 | "examples/basic/batch/single_obj_parallel" |
| 3167 | "examples/basic/batch/surrogate_sort" |
| 3168 | "examples/advanced/batch/FixedVariable" |
| 3169 | "examples/advanced/batch/LHonly")))))) |
| 3170 | (add-before 'configure 'mpi-setup |
| 3171 | #$%openmpi-setup)))) |
| 3172 | (home-page "https://www.gerad.ca/nomad/") |
| 3173 | (synopsis "Nonlinear optimization by mesh-adaptive direct search") |
| 3174 | (description |
| 3175 | "NOMAD is a C++ implementation of the mesh-adaptive direct search (MADS) |
| 3176 | algorithm, designed for difficult blackbox optimization problems. These |
| 3177 | problems occur when the functions defining the objective and constraints are |
| 3178 | the result of costly computer simulations.") |
| 3179 | (license license:lgpl3+))) |
| 3180 | |
| 3181 | (define-public cbc |
| 3182 | (package |
| 3183 | (name "cbc") |
| 3184 | (version "2.10.5") |
| 3185 | (source (origin |
| 3186 | (method url-fetch) |
| 3187 | (uri (string-append "https://www.coin-or.org/download/source/" |
| 3188 | "Cbc/Cbc-" version ".tgz")) |
| 3189 | (sha256 |
| 3190 | (base32 |
| 3191 | "0wk9vr6zc62gw71v7gnra5wxqlcljcgbhm5lasx236v791b986ns")) |
| 3192 | (modules '((guix build utils))) |
| 3193 | (snippet |
| 3194 | ;; Make sure we don't use the bundled software. |
| 3195 | '(delete-file-recursively "ThirdParty")))) |
| 3196 | (build-system gnu-build-system) |
| 3197 | (native-inputs |
| 3198 | (list gfortran pkg-config)) |
| 3199 | (inputs |
| 3200 | (list openblas)) |
| 3201 | (home-page "https://www.coin-or.org") |
| 3202 | (synopsis "Branch-and-cut solver") |
| 3203 | (description |
| 3204 | "Cbc (Coin-or branch and cut) is a mixed integer linear programming |
| 3205 | solver written in C++. It can be used as a library or as a standalone |
| 3206 | executable.") |
| 3207 | (license license:epl1.0))) |
| 3208 | |
| 3209 | (define-public clp |
| 3210 | (package |
| 3211 | (name "clp") |
| 3212 | (version "1.17.6") |
| 3213 | (source (origin |
| 3214 | (method url-fetch) |
| 3215 | (uri (string-append "https://www.coin-or.org/download/source/" |
| 3216 | "Clp/Clp-" version ".tgz")) |
| 3217 | (sha256 |
| 3218 | (base32 |
| 3219 | "0ap1f0lxppa6pnbc4bg7ih7a96avwaki482nig8w5fr3vg9wvkzr")) |
| 3220 | (modules '((guix build utils))) |
| 3221 | (snippet |
| 3222 | ;; Make sure we don't use the bundled software. |
| 3223 | '(begin |
| 3224 | (delete-file-recursively "ThirdParty") |
| 3225 | #t)))) |
| 3226 | (build-system gnu-build-system) |
| 3227 | (native-inputs |
| 3228 | (list gfortran pkg-config)) |
| 3229 | (inputs |
| 3230 | (list openblas)) |
| 3231 | (home-page "https://www.coin-or.org") |
| 3232 | (synopsis "Linear programming solver") |
| 3233 | (description |
| 3234 | "CLP is a high quality linear programming solver. Its main strengths are |
| 3235 | its dual and primal Simplex algorithms. It also has a barrier algorithm for |
| 3236 | linear and quadratic objectives. There are limited facilities for nonlinear |
| 3237 | and quadratic objectives using the Simplex algorithm.") |
| 3238 | (license license:epl1.0))) |
| 3239 | |
| 3240 | (define-public python-cylp |
| 3241 | (package |
| 3242 | (name "python-cylp") |
| 3243 | (version "0.94.0") |
| 3244 | (source |
| 3245 | (origin |
| 3246 | (method git-fetch) |
| 3247 | (uri (git-reference |
| 3248 | (url "https://github.com/coin-or/cylp") |
| 3249 | (commit (string-append "v" version)))) |
| 3250 | (file-name (git-file-name name version)) |
| 3251 | (sha256 |
| 3252 | (base32 "0rgqmwvmpdzl6ygwy3nm33vpphl2ldzpqj0xakh9hg1ccaa3fs6l")))) |
| 3253 | (build-system pyproject-build-system) |
| 3254 | (arguments |
| 3255 | (list |
| 3256 | ;; tests: 52 passed, 55 warnings |
| 3257 | #:test-flags |
| 3258 | ;; XXX: All tests in this file are SEGFAULT, see: |
| 3259 | ;; <https://codeberg.org/guix/guix/issues/2912>. |
| 3260 | #~(list "--ignore=cylp/py/test_PySolve.py" |
| 3261 | "--ignore=cylp/tests/test_CyClpSimplex.py" |
| 3262 | "--ignore=cylp/tests/test_QP.py" |
| 3263 | ;; All tests are failed. |
| 3264 | "--ignore=cylp/tests/test_MIP.py") |
| 3265 | #:phases |
| 3266 | #~(modify-phases %standard-phases |
| 3267 | (add-after 'unpack 'numpy-compatibility |
| 3268 | ;; XXX: See: <https://github.com/coin-or/CyLP/issues/227>. |
| 3269 | ;; |
| 3270 | ;; AttributeError: module 'numpy' has no attribute |
| 3271 | ;; 'float'. `np.float` was a deprecated alias for the builtin |
| 3272 | ;; `float`. To avoid this error in existing code, use `float` by |
| 3273 | ;; itself. Doing this will not modify any behavior and is safe. If |
| 3274 | ;; you specifically wanted the numpy scalar type, use `np.float64` |
| 3275 | ;; here. The aliases was originally deprecated in NumPy 1.20; for |
| 3276 | ;; more details and guidance see the original release note at: |
| 3277 | ;; https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations |
| 3278 | (lambda _ |
| 3279 | (substitute* '("cylp/py/utils/sparseUtil.py" |
| 3280 | "cylp/tests/test_sparseUtil.py") |
| 3281 | (("np.float") "float")))) |
| 3282 | ;; XXX: Adding "--pyargs" option, changing test directory, and |
| 3283 | ;; removing local source did not work; rebuilding extensions takes |
| 3284 | ;; some time but it's only thing which worked to enable tests. |
| 3285 | (add-before 'check 'pre-check |
| 3286 | (lambda* (#:key tests? #:allow-other-keys) |
| 3287 | (if tests? |
| 3288 | (invoke "python" "setup.py" "build_ext" "--inplace"))))))) |
| 3289 | (native-inputs |
| 3290 | (list pkg-config |
| 3291 | python-cython |
| 3292 | python-pytest |
| 3293 | python-setuptools)) |
| 3294 | (inputs |
| 3295 | (list cbc)) |
| 3296 | (propagated-inputs |
| 3297 | (list python-numpy |
| 3298 | python-scipy)) |
| 3299 | (home-page "https://github.com/coin-or/cylp") |
| 3300 | (synopsis "Python interface for CLP, CBC, and CGL") |
| 3301 | (description |
| 3302 | "CyLP is a Python interface to COIN-OR’s Linear and mixed-integer program |
| 3303 | solvers (CLP, CBC, and CGL). CyLP’s unique feature is that you can use it to |
| 3304 | alter the solution process of the solvers from within Python. For example, |
| 3305 | you may define cut generators, branch-and-bound strategies, and primal/dual |
| 3306 | Simplex pivot rules completely in Python.") |
| 3307 | (license license:epl2.0))) |
| 3308 | |
| 3309 | (define-public gecode |
| 3310 | (let* ((commit "f7f0d7c273d6844698f01cec8229ebe0b66a016a") |
| 3311 | (version (git-version "6.2.0" "1" commit))) |
| 3312 | (package |
| 3313 | (name "gecode") |
| 3314 | (version version) |
| 3315 | (source |
| 3316 | (origin |
| 3317 | (method git-fetch) |
| 3318 | (uri (git-reference |
| 3319 | (url "https://github.com/Gecode/gecode") |
| 3320 | (commit commit))) |
| 3321 | (file-name (git-file-name name version)) |
| 3322 | (sha256 |
| 3323 | (base32 |
| 3324 | "16gzwa64w90vifaflmii515rsrqclf2y7nziq621m4ad9cjgcixj")) |
| 3325 | (modules '((guix build utils))) |
| 3326 | ;; delete generated sources |
| 3327 | (snippet '(for-each delete-file |
| 3328 | '("gecode/kernel/var-imp.hpp" |
| 3329 | "gecode/kernel/var-type.hpp"))))) |
| 3330 | (outputs '("out" "examples")) |
| 3331 | (build-system gnu-build-system) |
| 3332 | (arguments |
| 3333 | (list |
| 3334 | #:configure-flags #~(list (string-append "GLDFLAGS=-Wl,-rpath=" |
| 3335 | #$output "/lib") |
| 3336 | "--enable-examples=no") |
| 3337 | #:modules '((guix build gnu-build-system) |
| 3338 | (guix build utils) |
| 3339 | (ice-9 rdelim) |
| 3340 | (ice-9 popen)) |
| 3341 | #:phases |
| 3342 | #~(modify-phases %standard-phases |
| 3343 | (add-before 'configure 'patch-msc-and-version |
| 3344 | (lambda* (#:key outputs #:allow-other-keys) |
| 3345 | (let ((out (assoc-ref outputs "out"))) |
| 3346 | (substitute* "tools/flatzinc/gecode.msc.in" |
| 3347 | (("\\.\\./../..") out) |
| 3348 | (("\\.\\.") |
| 3349 | (string-append out "/share/minizinc"))) |
| 3350 | (substitute* "configure" |
| 3351 | (("(PACKAGE_[^0-9]*)[0-9\\.]+" all match) |
| 3352 | (string-append match #$version)))))) |
| 3353 | (add-after 'build 'build-examples |
| 3354 | (lambda _ |
| 3355 | (invoke "make" "compileexamples"))) |
| 3356 | ;; The Makefile disrespects GLDFLAGS for some reason, |
| 3357 | ;; so we have to patch it ourselves. |
| 3358 | (add-after 'install 'fix-rpath |
| 3359 | (lambda _ |
| 3360 | (let ((libdir (string-append #$output "/lib"))) |
| 3361 | (for-each |
| 3362 | (lambda (file) |
| 3363 | (let* ((pipe (open-pipe* OPEN_READ "patchelf" |
| 3364 | "--print-rpath" file)) |
| 3365 | (line (read-line pipe))) |
| 3366 | (and (zero? (close-pipe pipe)) |
| 3367 | (invoke "patchelf" "--set-rpath" |
| 3368 | (string-append libdir ":" line) |
| 3369 | file)))) |
| 3370 | (find-files libdir ".*\\.so$"))))) |
| 3371 | (add-after 'install 'install-examples |
| 3372 | (lambda* (#:key outputs #:allow-other-keys) |
| 3373 | (let* ((examples (assoc-ref outputs "examples")) |
| 3374 | (bindir (format #f "bindir=~a/bin" examples))) |
| 3375 | (invoke "make" "installexamples" bindir))))))) |
| 3376 | (native-inputs (list patchelf perl sed)) |
| 3377 | (home-page "https://www.gecode.org") |
| 3378 | (synopsis "Toolkit for developing constraint-based systems") |
| 3379 | (description |
| 3380 | "Gecode is a C++ toolkit for developing constraint-based systems |
| 3381 | and applications. It provides a modular and extensible solver.") |
| 3382 | (license license:expat)))) |
| 3383 | |
| 3384 | (define-public libfixmath |
| 3385 | (let ((commit "1416c9979635c69f344d3c1de84b3246001a6540") |
| 3386 | (revision "1")) |
| 3387 | (package |
| 3388 | (name "libfixmath") |
| 3389 | (version (git-version "0" revision commit)) |
| 3390 | (source (origin |
| 3391 | (method git-fetch) |
| 3392 | (uri (git-reference |
| 3393 | (url "https://github.com/PetteriAimonen/libfixmath") |
| 3394 | (commit commit))) |
| 3395 | (file-name (git-file-name name version)) |
| 3396 | (sha256 |
| 3397 | (base32 |
| 3398 | "1vnpycw30rq3xwqyvj20l7pnw74dc4f27304i0918igsrdsjw501")))) |
| 3399 | (build-system cmake-build-system) |
| 3400 | (arguments |
| 3401 | (list |
| 3402 | #:phases |
| 3403 | #~(modify-phases %standard-phases |
| 3404 | (replace 'install |
| 3405 | (lambda _ |
| 3406 | (let ((includes (string-append #$output "/include/libfixmath")) |
| 3407 | (lib (string-append #$output "/lib"))) |
| 3408 | (mkdir-p includes) |
| 3409 | (for-each (lambda (file) |
| 3410 | (install-file file includes)) |
| 3411 | (find-files "../source" "\\.h(pp)?$")) |
| 3412 | (for-each (lambda (file) |
| 3413 | (install-file file lib)) |
| 3414 | (find-files "." "\\.a$")))))))) |
| 3415 | (home-page "https://code.google.com/archive/p/libfixmath/") |
| 3416 | (synopsis "Cross platform fixed point maths library") |
| 3417 | (description "This library implements the @file{math.h} functions in |
| 3418 | fixed point (16.16) format.") |
| 3419 | (license license:expat)))) |
| 3420 | |
| 3421 | (define-public glucose |
| 3422 | (package |
| 3423 | (name "glucose") |
| 3424 | (version "4.2.1") |
| 3425 | (source |
| 3426 | (origin |
| 3427 | (method git-fetch) |
| 3428 | (uri (git-reference |
| 3429 | (url "https://github.com/audemard/glucose") |
| 3430 | (commit version))) |
| 3431 | (file-name (git-file-name name version)) |
| 3432 | (sha256 |
| 3433 | (base32 "0zrn4hnkf8k95dc3s3acydl1bqkr8a0axw56g7n562lx7zj7sd62")) |
| 3434 | (modules '((guix build utils))) |
| 3435 | (snippet |
| 3436 | ;; Remove code related to the parallel version as non-free; |
| 3437 | ;; from parallel/Main.cc: |
| 3438 | ;; "The parallel version of Glucose (all files modified |
| 3439 | ;; since Glucose 3.0 releases, 2013) cannot be used in any |
| 3440 | ;; competitive event" |
| 3441 | '(begin |
| 3442 | (delete-file-recursively "parallel") |
| 3443 | (substitute* "CMakeLists.txt" |
| 3444 | (("^add_library\\(glucosep.*$") |
| 3445 | "") |
| 3446 | (("^add_executable\\(glucose-syrup.*$") |
| 3447 | "") |
| 3448 | (("^target_link_libraries\\(glucose-syrup.*$") |
| 3449 | "")))))) |
| 3450 | (build-system cmake-build-system) |
| 3451 | (arguments |
| 3452 | (list |
| 3453 | #:tests? #f ;there are no tests |
| 3454 | #:configure-flags |
| 3455 | #~(list "-DBUILD_SHARED_LIBS=ON" |
| 3456 | (string-append "-DCMAKE_BUILD_RPATH=" #$output "/lib")) |
| 3457 | #:phases |
| 3458 | #~(modify-phases %standard-phases |
| 3459 | (replace 'install |
| 3460 | (lambda _ |
| 3461 | (install-file "libglucose.so" |
| 3462 | (string-append #$output "/lib")) |
| 3463 | (install-file "glucose-simp" |
| 3464 | (string-append #$output "/bin")) |
| 3465 | ;; Add a symbolic link with the customary name used until |
| 3466 | ;; the parallel version was written, and which is expected |
| 3467 | ;; by Sage. |
| 3468 | (symlink "glucose-simp" |
| 3469 | (string-append #$output "/bin/glucose"))))))) |
| 3470 | (inputs (list zlib)) |
| 3471 | (home-page "https://www.labri.fr/perso/lsimon/research/glucose/") |
| 3472 | (synopsis "SAT Solver") |
| 3473 | (description |
| 3474 | "Glucose is a SAT solver based on a scoring scheme introduced |
| 3475 | in 2009 for the clause learning mechanism of so called “Modern” SAT solvers. |
| 3476 | It is designed to be parallel.") |
| 3477 | (license license:expat))) |
| 3478 | |
| 3479 | (define-public libflame |
| 3480 | ;; The latest release (5.2.0) dates back to 2019. Use a newer one, which |
| 3481 | ;; among other things provides extra LAPACK symbols, such as 'dgemlq_' |
| 3482 | ;; (needed by LAPACKe). |
| 3483 | (let ((commit "70c19e770ead0ae846c59b59216deb16d236b40c") |
| 3484 | (revision "0")) |
| 3485 | (package |
| 3486 | (name "libflame") |
| 3487 | (version (git-version "5.2.0" revision commit)) |
| 3488 | (outputs '("out" "static")) |
| 3489 | (home-page "https://github.com/flame/libflame") |
| 3490 | (source (origin |
| 3491 | (method git-fetch) |
| 3492 | (uri (git-reference (url home-page) (commit commit))) |
| 3493 | (file-name (git-file-name name version)) |
| 3494 | (sha256 |
| 3495 | (base32 |
| 3496 | "0rk8ln5p4yybsws6p60w0vkxbqp53jddv90brlgf60mk6lv51sxl")))) |
| 3497 | (build-system gnu-build-system) |
| 3498 | (arguments |
| 3499 | (list #:configure-flags |
| 3500 | ;; Sensible defaults: https://github.com/flame/libflame/issues/28 |
| 3501 | #~(list "--enable-dynamic-build" |
| 3502 | "--enable-max-arg-list-hack" |
| 3503 | "--enable-lapack2flame" |
| 3504 | "--enable-verbose-make-output" |
| 3505 | "--enable-multithreading=pthreads" ; Openblas isn't built with openmp. |
| 3506 | #$@(if (target-x86?) |
| 3507 | #~("--enable-vector-intrinsics=sse") |
| 3508 | #~()) |
| 3509 | "--enable-supermatrix" |
| 3510 | "--enable-memory-alignment=16" |
| 3511 | "--enable-ldim-alignment") |
| 3512 | #:make-flags #~(list "FC=gfortran -fPIC") |
| 3513 | #:phases |
| 3514 | #~(modify-phases %standard-phases |
| 3515 | (add-after 'unpack 'patch-/usr/bin/env-bash |
| 3516 | (lambda _ |
| 3517 | (substitute* "build/config.mk.in" |
| 3518 | (("/usr/bin/env bash") |
| 3519 | (which "bash"))))) |
| 3520 | (replace 'check |
| 3521 | (lambda* (#:key tests? #:allow-other-keys) |
| 3522 | (substitute* "test/Makefile" |
| 3523 | (("LIBBLAS .*") |
| 3524 | "LIBBLAS = -lopenblas\n") |
| 3525 | (("LIBLAPACK .*") |
| 3526 | "LIBLAPACK = -lopenblas\n")) |
| 3527 | (when tests? |
| 3528 | (with-directory-excursion "test" |
| 3529 | (mkdir "obj") |
| 3530 | (invoke "make") |
| 3531 | (invoke "./test_libflame.x"))))) |
| 3532 | (add-after 'install 'install-static |
| 3533 | (lambda* (#:key outputs #:allow-other-keys) |
| 3534 | (let ((out (assoc-ref outputs "out")) |
| 3535 | (static (assoc-ref outputs "static"))) |
| 3536 | (mkdir-p (string-append static "/lib")) |
| 3537 | (rename-file (string-append out |
| 3538 | "/lib/libflame.a") |
| 3539 | (string-append static |
| 3540 | "/lib/libflame.a")) |
| 3541 | (install-file (string-append out |
| 3542 | "/include/FLAME.h") |
| 3543 | (string-append static "/include")))))))) |
| 3544 | (inputs (list gfortran)) |
| 3545 | (native-inputs (list openblas perl python-wrapper)) |
| 3546 | (synopsis "High-performance library for @acronym{DLA, dense linear algebra} computations") |
| 3547 | (description "@code{libflame} is a portable library for dense matrix |
| 3548 | computations, providing much of the functionality present in LAPACK, developed |
| 3549 | by current and former members of the @acronym{SHPC, Science of High-Performance |
| 3550 | Computing} group in the @url{https://www.ices.utexas.edu/, Institute for |
| 3551 | Computational Engineering and Sciences} at The University of Texas at Austin. |
| 3552 | @code{libflame} includes a compatibility layer, @code{lapack2flame}, which |
| 3553 | includes a complete LAPACK implementation.") |
| 3554 | (license license:bsd-3)))) |
| 3555 | |
| 3556 | (define-public hpcombi |
| 3557 | (package |
| 3558 | (name "hpcombi") |
| 3559 | (version "1.1.0") |
| 3560 | (source (origin |
| 3561 | (method git-fetch) |
| 3562 | (uri (git-reference |
| 3563 | (url "https://github.com/libsemigroups/hpcombi") |
| 3564 | (commit (string-append "v" version)))) |
| 3565 | (file-name (git-file-name name version)) |
| 3566 | (sha256 |
| 3567 | (base32 |
| 3568 | "0xxqjz4lba57vn65m2k5jxrz0v7y6jwnhxwg6njd4vrafv5w17yv")))) |
| 3569 | (native-inputs |
| 3570 | (list catch2)) |
| 3571 | (build-system cmake-build-system) |
| 3572 | (home-page "https://libsemigroups.github.io/HPCombi/") |
| 3573 | (synopsis "Fast combinatorics in C++ using SSE/AVX instruction sets") |
| 3574 | (description "HPCombi is a C++17 header-only library using the SSE and AVX |
| 3575 | instruction sets, and some equivalents, for very fast manipulation of |
| 3576 | combinatorial objects such as transformations, permutations, and boolean |
| 3577 | matrices of small size.") |
| 3578 | (license license:gpl3+))) |
| 3579 | |
| 3580 | (define-public scasp |
| 3581 | (package |
| 3582 | (name "scasp") |
| 3583 | (version "1.1.4") |
| 3584 | (source (origin |
| 3585 | (method git-fetch) |
| 3586 | (uri (git-reference |
| 3587 | (url "https://github.com/SWI-Prolog/sCASP") |
| 3588 | (commit (string-append "V" version)))) |
| 3589 | (file-name (git-file-name name version)) |
| 3590 | (sha256 |
| 3591 | (base32 |
| 3592 | "1m4fs1ywich9cwj55miqp5zxs7c1fw9wvy7lcj5rkrgcanks5qk4")))) |
| 3593 | (build-system copy-build-system) |
| 3594 | (arguments |
| 3595 | (list |
| 3596 | #:install-plan #~`(("scasp" "bin/") |
| 3597 | ("prolog" "lib/swipl/library")) |
| 3598 | #:modules `((guix build copy-build-system) |
| 3599 | ((guix build gnu-build-system) #:prefix gnu:) |
| 3600 | (guix build utils) |
| 3601 | (ice-9 regex)) |
| 3602 | #:phases |
| 3603 | #~(modify-phases %standard-phases |
| 3604 | (add-before 'install 'build (assoc-ref gnu:%standard-phases 'build)) |
| 3605 | (add-after 'build 'check (assoc-ref gnu:%standard-phases 'check))))) |
| 3606 | (native-inputs (list swi-prolog)) |
| 3607 | (home-page "https://github.com/SWI-Prolog/sCASP") |
| 3608 | (synopsis "Interpreter for ASP programs with constraints") |
| 3609 | (description "@code{s(CASP)} is a top-down interpreter for ASP programs |
| 3610 | with constraints.") |
| 3611 | (license license:asl2.0))) |
| 3612 | |
| 3613 | (define-public scs |
| 3614 | (package |
| 3615 | (name "scs") |
| 3616 | (version "3.2.10") |
| 3617 | (source |
| 3618 | (origin |
| 3619 | (method git-fetch) |
| 3620 | (uri (git-reference |
| 3621 | (url "https://github.com/cvxgrp/scs") |
| 3622 | (commit version))) |
| 3623 | (file-name (git-file-name name version)) |
| 3624 | (sha256 |
| 3625 | (base32 "00csacax6gh3cj39044iijsy6gkz0d1ac805z13qkllfs6bsvchy")))) |
| 3626 | (build-system cmake-build-system) |
| 3627 | (inputs |
| 3628 | (list lapack |
| 3629 | openblas)) |
| 3630 | (home-page "https://osqp.org/") |
| 3631 | (synopsis "Splitting Conic Solver") |
| 3632 | (description |
| 3633 | "SCS (splitting conic solver) is a numerical optimization package for |
| 3634 | solving large-scale convex cone problems.") |
| 3635 | (license license:expat))) |
| 3636 | |
| 3637 | (define-public ceres |
| 3638 | (package |
| 3639 | (name "ceres-solver") |
| 3640 | (version "2.0.0") |
| 3641 | (home-page "http://ceres-solver.org/") |
| 3642 | (source (origin |
| 3643 | (method url-fetch) |
| 3644 | (uri (string-append home-page "ceres-solver-" |
| 3645 | version ".tar.gz")) |
| 3646 | (sha256 |
| 3647 | (base32 |
| 3648 | "00vng9vnmdb1qga01m0why90m0041w7bn6kxa2h4m26aflfqla8h")))) |
| 3649 | (build-system cmake-build-system) |
| 3650 | (arguments |
| 3651 | ;; TODO: Build HTML user documentation and install separately. |
| 3652 | '(#:configure-flags '("-DBUILD_EXAMPLES=OFF" |
| 3653 | "-DBUILD_SHARED_LIBS=ON") |
| 3654 | |
| 3655 | #:phases (modify-phases %standard-phases |
| 3656 | (add-before 'configure 'set-library-directory |
| 3657 | (lambda _ |
| 3658 | ;; Install libraries to lib/, not lib64/. |
| 3659 | (substitute* "CMakeLists.txt" |
| 3660 | (("set\\(LIB_SUFFIX \"64\"\\)") |
| 3661 | "set(LIB_SUFFIX \"\")"))))))) |
| 3662 | (native-inputs (list pkg-config)) |
| 3663 | ;; These inputs need to be propagated to satisfy dependent packages. |
| 3664 | (propagated-inputs (list eigen gflags glog)) |
| 3665 | (inputs (list openblas suitesparse)) |
| 3666 | (synopsis "C++ library for solving large optimization problems") |
| 3667 | (description |
| 3668 | "Ceres Solver is a C++ library for modeling and solving large, |
| 3669 | complicated optimization problems. It is a feature rich, mature and |
| 3670 | performant library which has been used in production since 2010. Ceres Solver |
| 3671 | can solve two kinds of problems: |
| 3672 | @enumerate |
| 3673 | @item non-linear least squares problems with bounds constraints; |
| 3674 | @item general unconstrained optimization problems. |
| 3675 | @end enumerate\n") |
| 3676 | (license license:bsd-3) |
| 3677 | |
| 3678 | ;; Mark as tunable to take advantage of SIMD code in Eigen. |
| 3679 | (properties `((tunable? . #t))))) |
| 3680 | |
| 3681 | (define-public ceres-solver-benchmarks |
| 3682 | (package |
| 3683 | (inherit ceres) |
| 3684 | (name "ceres-solver-benchmarks") |
| 3685 | (arguments |
| 3686 | '(#:modules ((ice-9 popen) |
| 3687 | (ice-9 rdelim) |
| 3688 | (guix build utils) |
| 3689 | (guix build cmake-build-system)) |
| 3690 | |
| 3691 | #:phases (modify-phases %standard-phases |
| 3692 | (delete 'configure) |
| 3693 | (replace 'build |
| 3694 | (lambda* (#:key outputs #:allow-other-keys) |
| 3695 | (let* ((out (assoc-ref outputs "out")) |
| 3696 | (bin (string-append out "/bin"))) |
| 3697 | (define flags |
| 3698 | (string-tokenize |
| 3699 | (read-line (open-pipe* OPEN_READ |
| 3700 | "pkg-config" "eigen3" |
| 3701 | "--cflags")))) |
| 3702 | |
| 3703 | (define (compile-file top-dir) |
| 3704 | (lambda (file) |
| 3705 | (let ((source (string-append file ".cc"))) |
| 3706 | (format #t "building '~a'...~%" file) |
| 3707 | (apply invoke "c++" "-fopenmp" "-O2" "-g" "-DNDEBUG" |
| 3708 | source "-lceres" "-lbenchmark" "-lglog" |
| 3709 | "-pthread" |
| 3710 | "-o" (string-append bin "/" file) |
| 3711 | "-I" top-dir flags)))) |
| 3712 | |
| 3713 | (mkdir-p bin) |
| 3714 | (with-directory-excursion "internal/ceres" |
| 3715 | (for-each (compile-file "..") |
| 3716 | '("schur_eliminator_benchmark" |
| 3717 | "small_blas_gemm_benchmark" |
| 3718 | "small_blas_gemv_benchmark")) |
| 3719 | (with-directory-excursion "autodiff_benchmarks" |
| 3720 | ((compile-file "../..") "autodiff_benchmarks")))))) |
| 3721 | (delete 'check) |
| 3722 | (delete 'install)))) |
| 3723 | (inputs (modify-inputs inputs |
| 3724 | (prepend googlebenchmark ceres))) |
| 3725 | (synopsis "Benchmarks of the Ceres optimization problem solver"))) |
| 3726 | |
| 3727 | (define-public octave-minimal |
| 3728 | (package |
| 3729 | (name "octave-minimal") |
| 3730 | (version "11.3.0") |
| 3731 | (source |
| 3732 | (origin |
| 3733 | (method url-fetch) |
| 3734 | (uri (string-append "mirror://gnu/octave/octave-" version ".tar.xz")) |
| 3735 | (sha256 |
| 3736 | (base32 |
| 3737 | "1q8jbrpvydqgp5bvy491nmiv6zm12mjzxd7wybsd3ridkcag701b")))) |
| 3738 | (build-system gnu-build-system) |
| 3739 | (arguments |
| 3740 | (list |
| 3741 | #:configure-flags |
| 3742 | #~(list (string-append "--with-shell=" |
| 3743 | (assoc-ref %build-inputs "bash") |
| 3744 | "/bin/sh")) |
| 3745 | #:phases |
| 3746 | #~(modify-phases %standard-phases |
| 3747 | (add-before 'check 'set-home |
| 3748 | (lambda _ |
| 3749 | (setenv "HOME" (getenv "TMPDIR"))))))) |
| 3750 | (inputs |
| 3751 | (list alsa-lib |
| 3752 | arpack-ng |
| 3753 | bdb |
| 3754 | curl |
| 3755 | fftw |
| 3756 | fftwf |
| 3757 | glpk |
| 3758 | ;; TODO: libjpeg-turbo is indirectly required through libtiff. In |
| 3759 | ;; the next rebuild cycle, add an absolute reference for -ljpeg in |
| 3760 | ;; libtiff.la instead of having to provide it here. |
| 3761 | libjpeg-turbo |
| 3762 | hdf5 |
| 3763 | libsndfile |
| 3764 | libxft |
| 3765 | openblas |
| 3766 | pcre |
| 3767 | portaudio |
| 3768 | qhull |
| 3769 | qrupdate-ng |
| 3770 | rapidjson |
| 3771 | readline |
| 3772 | suitesparse |
| 3773 | sundials |
| 3774 | zlib)) |
| 3775 | (native-inputs |
| 3776 | (list gfortran |
| 3777 | pkg-config |
| 3778 | perl |
| 3779 | zip)) |
| 3780 | ;; Octave code uses this variable to detect directories holding multiple CA |
| 3781 | ;; certificates to verify peers with. This is required for the networking |
| 3782 | ;; functions that require encryption to work properly. |
| 3783 | (native-search-paths |
| 3784 | (list (search-path-specification |
| 3785 | (variable "CURLOPT_CAPATH") |
| 3786 | (files '("etc/ssl/certs"))))) |
| 3787 | (home-page "https://www.gnu.org/software/octave/") |
| 3788 | (synopsis |
| 3789 | "High-level language for numerical computation (mininal, no graphics)") |
| 3790 | (description "GNU Octave is a high-level interpreted language that is |
| 3791 | specialized for numerical computations. It can be used for both linear and |
| 3792 | non-linear applications and it provides great support for visualizing results. |
| 3793 | Work may be performed both at the interactive command-line as well as via |
| 3794 | script files.") |
| 3795 | (license license:gpl3+))) |
| 3796 | |
| 3797 | ;; For a fully featured Octave, users are strongly recommended also to install |
| 3798 | ;; the following packages: less, ghostscript. |
| 3799 | (define-public octave-cli |
| 3800 | (package |
| 3801 | (inherit octave-minimal) |
| 3802 | (name "octave-cli") |
| 3803 | (arguments |
| 3804 | (substitute-keyword-arguments arguments |
| 3805 | ((#:phases phases) |
| 3806 | #~(modify-phases #$phases |
| 3807 | (add-after 'configure 'configure-makeinfo |
| 3808 | (lambda* (#:key inputs #:allow-other-keys) |
| 3809 | (substitute* "libinterp/corefcn/help.h" |
| 3810 | (("\"makeinfo\"") |
| 3811 | (format #f "~s" |
| 3812 | (search-input-file inputs "bin/makeinfo")))))))))) |
| 3813 | (native-inputs |
| 3814 | (modify-inputs native-inputs |
| 3815 | (prepend |
| 3816 | ;; The following inputs are not actually used in the build process. |
| 3817 | ;; However, the ./configure gratuitously tests for their existence and |
| 3818 | ;; assumes that programs not present at build time are also not, and |
| 3819 | ;; can never be, available at run time! If these inputs are therefore |
| 3820 | ;; not present, support for them will be built out. However, Octave |
| 3821 | ;; will still run without them, albeit without the features they |
| 3822 | ;; provide. |
| 3823 | less |
| 3824 | ghostscript |
| 3825 | texinfo))) |
| 3826 | (inputs |
| 3827 | (modify-inputs inputs |
| 3828 | (prepend fltk fontconfig freetype gl2ps glu graphicsmagick))) |
| 3829 | (synopsis "High-level language for numerical computation (no GUI)"))) |
| 3830 | |
| 3831 | (define-public octave |
| 3832 | (package (inherit octave-cli) |
| 3833 | (name "octave") |
| 3834 | (arguments |
| 3835 | (substitute-keyword-arguments arguments |
| 3836 | ((#:modules modules %default-gnu-modules) |
| 3837 | `((guix build qt-utils) ,@modules)) |
| 3838 | ((#:imported-modules imported-modules %default-gnu-imported-modules) |
| 3839 | `((guix build qt-utils) ,@imported-modules)) |
| 3840 | ((#:phases phases) |
| 3841 | #~(modify-phases #$phases |
| 3842 | (add-after 'install 'wrap-qt |
| 3843 | (lambda* (#:key inputs #:allow-other-keys) |
| 3844 | (for-each (lambda (path) |
| 3845 | (wrap-qt-program |
| 3846 | (string-append "../" path) ;relative to bin |
| 3847 | #:output #$output #:inputs inputs)) |
| 3848 | (with-directory-excursion #$output |
| 3849 | (find-files "libexec" "^octave-gui$"))))))))) |
| 3850 | (native-inputs |
| 3851 | (modify-inputs native-inputs |
| 3852 | (prepend qttools-5 ;for qthelpgenerator |
| 3853 | qttools ;for lrelease |
| 3854 | (texlive-local-tree (list texlive-epsf))))) ;for texi2dvi |
| 3855 | (inputs |
| 3856 | (modify-inputs inputs |
| 3857 | (prepend qscintilla-qt6 qtbase qtwayland qt5compat))) |
| 3858 | (synopsis "High-level language for numerical computation (with GUI)"))) |
| 3859 | |
| 3860 | (define-public opencascade-occt |
| 3861 | (package |
| 3862 | (name "opencascade-occt") |
| 3863 | (version "7.9.3") |
| 3864 | (properties |
| 3865 | '((release-tag-prefix . "^V") |
| 3866 | (release-tag-version-delimiter . "_"))) |
| 3867 | (source |
| 3868 | (origin |
| 3869 | (method git-fetch) |
| 3870 | (uri (git-reference |
| 3871 | (url "https://git.dev.opencascade.org/repos/occt.git") |
| 3872 | (commit |
| 3873 | (string-append "V" |
| 3874 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) |
| 3875 | version))))) |
| 3876 | (file-name (git-file-name name version)) |
| 3877 | (sha256 |
| 3878 | (base32 "1wmrbr5yar3iz1c80h6diyqigd8hv05j7wral2kkrbvhzpwjd7k6")) |
| 3879 | (snippet |
| 3880 | #~(begin |
| 3881 | (use-modules (guix build utils)) |
| 3882 | ;; Remove files specific to non-free operating systems. |
| 3883 | (delete-file-recursively "samples/ios") |
| 3884 | (delete-file-recursively "samples/mfc") |
| 3885 | (delete-file-recursively "samples/qt/FuncDemo") |
| 3886 | ;; Remove references to deleted files. |
| 3887 | (substitute* "dox/FILES_HTML.txt" |
| 3888 | ((".*standard.*") "" ) |
| 3889 | ((".*UIKitSample.*") "")))))) |
| 3890 | (build-system cmake-build-system) |
| 3891 | (arguments |
| 3892 | (list |
| 3893 | ;; There is no test target for make. OCCT provides an |
| 3894 | ;; 'Automated Testing System', which may be accessed after |
| 3895 | ;; installation via the draw.sh script. draw.sh is located in |
| 3896 | ;; the bin directory. For details see: |
| 3897 | ;; https://dev.opencascade.org/doc/occt-7.3.0/overview/html/\ |
| 3898 | ;; occt_dev_guides__tests.html |
| 3899 | #:tests? #f |
| 3900 | #:configure-flags |
| 3901 | #~(list "-DCMAKE_CXX_FLAGS=-fpermissive" ;from unsigned char* to char* |
| 3902 | "-DUSE_DRACO:BOOL=ON" |
| 3903 | "-DUSE_FREEIMAGE:BOOL=ON" |
| 3904 | "-DUSE_RAPIDJSON:BOOL=ON" |
| 3905 | "-DUSE_TBB:BOOL=ON" |
| 3906 | "-DUSE_VTK:BOOL=ON" |
| 3907 | "-DBUILD_DOC_Overview:BOOL=OFF" |
| 3908 | "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" |
| 3909 | "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" |
| 3910 | "-UCMAKE_INSTALL_LIBDIR"))) |
| 3911 | (native-inputs (list doxygen fontconfig)) |
| 3912 | (inputs |
| 3913 | (list draco |
| 3914 | freetype |
| 3915 | freeimage |
| 3916 | glu |
| 3917 | libxext |
| 3918 | libxi |
| 3919 | libxmu |
| 3920 | mesa |
| 3921 | onetbb |
| 3922 | rapidjson |
| 3923 | tcl |
| 3924 | tk |
| 3925 | vtk)) |
| 3926 | ;; TODO: build Overview documentation and add 'doc' output. |
| 3927 | (home-page "https://dev.opencascade.org") |
| 3928 | (synopsis "Libraries for 3D modeling and numerical simulation") |
| 3929 | (description |
| 3930 | "Open CASCADE is a set of libraries for the development of applications |
| 3931 | dealing with 3D CAD data or requiring industrial 3D capabilities. It includes |
| 3932 | C++ class libraries providing services for 3D surface and solid modeling, CAD |
| 3933 | data exchange, and visualization. It is used for development of specialized |
| 3934 | software dealing with 3D models in design (CAD), manufacturing (CAM), |
| 3935 | numerical simulation (CAE), measurement equipment (CMM), and quality |
| 3936 | control (CAQ) domains. |
| 3937 | |
| 3938 | This is the certified version of the Open Cascade Technology (OCCT) library.") |
| 3939 | (license (list ;; OCCT library: |
| 3940 | license:lgpl2.1; with an exception for the use of header |
| 3941 | ; files, see OCCT_LGPL_EXCEPTION.txt. |
| 3942 | ;; Files src/OpenGl/glext.h, adm/cmake/cotire.cmake and |
| 3943 | ;; src/OpenGl/OpenGl_HaltonSampler.hxx: |
| 3944 | license:expat |
| 3945 | ;; Files src/ExprIntrp/ExprIntrp.tab.* and |
| 3946 | ;; src/StepFile/step.tab.*: |
| 3947 | license:gpl3+ ; with Bison 2.2 exception. |
| 3948 | ;; File src/NCollection/NCollection_UtfIterator.lxx: |
| 3949 | (license:non-copyleft |
| 3950 | "https://www.unicode.org/license.html") |
| 3951 | ;; File src/NCollection/NCollection_StdAllocator.hxx: |
| 3952 | license:public-domain)))) |
| 3953 | |
| 3954 | (define-public fast-downward |
| 3955 | (package |
| 3956 | (name "fast-downward") |
| 3957 | (version "23.06.0") |
| 3958 | (source (origin |
| 3959 | (method git-fetch) |
| 3960 | (uri (git-reference |
| 3961 | (url "https://github.com/aibasel/downward") |
| 3962 | (commit (string-append "release-" version)))) |
| 3963 | (file-name (git-file-name name version)) |
| 3964 | (sha256 |
| 3965 | (base32 "1xrgnvbkzkdf6srbrlsnf4qrgp0f1lkk7yxf34ynna0w49l468d4")))) |
| 3966 | (build-system cmake-build-system) |
| 3967 | (arguments |
| 3968 | (list |
| 3969 | #:tests? #f ; no tests |
| 3970 | #:phases |
| 3971 | #~(modify-phases %standard-phases |
| 3972 | (add-after 'unpack 'fix-driver |
| 3973 | (lambda* (#:key outputs #:allow-other-keys) |
| 3974 | (substitute* "driver/run_components.py" |
| 3975 | ;; strip gratuitous "bin" |
| 3976 | (("os\\.path\\.join\\((.*), \"bin\"\\)" all keep) |
| 3977 | (string-append "os.path.join(" keep ")"))))) |
| 3978 | (add-before 'configure 'chdir |
| 3979 | (lambda _ (chdir "src"))) |
| 3980 | (replace 'install |
| 3981 | (lambda* (#:key outputs #:allow-other-keys) |
| 3982 | (let* ((out (assoc-ref outputs "out")) |
| 3983 | (dest (string-append out "/libexec/fast-downward" |
| 3984 | "/builds/release"))) |
| 3985 | (mkdir-p dest) |
| 3986 | (with-directory-excursion "bin" |
| 3987 | (install-file "downward" dest) |
| 3988 | (copy-recursively "translate" |
| 3989 | (string-append dest "/translate")))))) |
| 3990 | (add-after 'install 'install-driver |
| 3991 | (lambda* (#:key outputs #:allow-other-keys) |
| 3992 | (with-directory-excursion ".." |
| 3993 | (let* ((out (assoc-ref outputs "out")) |
| 3994 | (bin (string-append out "/bin/fast-downward")) |
| 3995 | (dest (string-append out "/libexec/fast-downward"))) |
| 3996 | (copy-recursively "driver" |
| 3997 | (string-append dest "/driver")) |
| 3998 | (mkdir-p (dirname bin)) |
| 3999 | (copy-file "fast-downward.py" bin) |
| 4000 | (wrap-program bin |
| 4001 | `("PYTHONPATH" prefix (,dest)))))))))) |
| 4002 | (inputs (list bash-minimal python)) |
| 4003 | (home-page "https://www.fast-downward.org/") |
| 4004 | (synopsis "Domain-independent classical planning system") |
| 4005 | (description "Fast Downward is a portfolio-based planning system that |
| 4006 | supports the propositional fragment of PDDL2.2.") |
| 4007 | (license license:gpl3+))) |
| 4008 | |
| 4009 | (define-public gmsh |
| 4010 | (package |
| 4011 | (name "gmsh") |
| 4012 | (version "4.15.2") |
| 4013 | (source |
| 4014 | (origin |
| 4015 | (method git-fetch) |
| 4016 | (uri (git-reference |
| 4017 | (url "https://gitlab.onelab.info/gmsh/gmsh.git") |
| 4018 | (commit |
| 4019 | (string-append "gmsh_" |
| 4020 | (string-replace-substring version "." "_"))))) |
| 4021 | (file-name (git-file-name name version)) |
| 4022 | (sha256 |
| 4023 | (base32 "1z5fl1im7mss5w8c8ngbhj5wbx0b8knmwg5hfdg036yb0x5pdc4j")) |
| 4024 | (modules '((guix build utils))) |
| 4025 | (snippet |
| 4026 | '(delete-file-recursively "contrib/metis")))) |
| 4027 | (build-system cmake-build-system) |
| 4028 | (arguments |
| 4029 | (list |
| 4030 | #:configure-flags |
| 4031 | #~(list "-DENABLE_SYSTEM_CONTRIB:BOOL=ON" |
| 4032 | "-DENABLE_BUILD_SHARED:BOOL=ON" |
| 4033 | "-DENABLE_BUILD_DYNAMIC:BOOL=ON") |
| 4034 | #:imported-modules (append %cmake-build-system-modules |
| 4035 | %pyproject-build-system-modules) |
| 4036 | #:modules '(((guix build pyproject-build-system) #:select (site-packages)) |
| 4037 | (guix build cmake-build-system) |
| 4038 | (guix build utils)) |
| 4039 | #:phases |
| 4040 | #~(modify-phases %standard-phases |
| 4041 | (add-after 'unpack 'patch-paths |
| 4042 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 4043 | ;; Use the standard Guix site-package path for |
| 4044 | ;; installation of the Python API. |
| 4045 | (substitute* "CMakeLists.txt" |
| 4046 | (("include\\(GNUInstallDirs\\)\n") |
| 4047 | (string-append "include(GNUInstallDirs)\n" |
| 4048 | " set(GMSH_PY_LIB " |
| 4049 | (site-packages inputs outputs) ")\n")) |
| 4050 | (("\\$\\{GMSH\\_PY\\} DESTINATION \\$\\{GMSH\\_LIB\\}") |
| 4051 | "${GMSH_PY} DESTINATION ${GMSH_PY_LIB}")) |
| 4052 | ;; Find the shared library. |
| 4053 | (let ((libgmsh (string-append #$output |
| 4054 | "/lib/libgmsh.so"))) |
| 4055 | (substitute* "api/gmsh.py" |
| 4056 | (("find_library\\(\"gmsh\"\\)") |
| 4057 | (simple-format #f "\"~a\"" libgmsh))))))))) |
| 4058 | (inputs |
| 4059 | (list fltk |
| 4060 | fontconfig |
| 4061 | glu |
| 4062 | gmp |
| 4063 | hdf5 |
| 4064 | libx11 |
| 4065 | libxext |
| 4066 | libxft |
| 4067 | mesa |
| 4068 | metis |
| 4069 | openblas |
| 4070 | opencascade-occt)) |
| 4071 | (native-inputs |
| 4072 | (list python-wrapper)) |
| 4073 | (home-page "https://gmsh.info/") |
| 4074 | (synopsis "3D finite element grid generator") |
| 4075 | (description "Gmsh is a 3D finite element grid generator with a built-in |
| 4076 | CAD engine and post-processor. Its design goal is to provide a fast, light |
| 4077 | and user-friendly meshing tool with parametric input and advanced |
| 4078 | visualization capabilities. Gmsh is built around four modules: geometry, |
| 4079 | mesh, solver and post-processing. The specification of any input to these |
| 4080 | modules is done either interactively using the graphical user interface or in |
| 4081 | ASCII text files using Gmsh's own scripting language.") |
| 4082 | (license license:gpl2+))) |
| 4083 | |
| 4084 | (define-public veusz |
| 4085 | ;; TODO: Maybe move to (gnu packages plotutils) |
| 4086 | (package |
| 4087 | (name "veusz") |
| 4088 | (version "4.2.1") |
| 4089 | (source |
| 4090 | (origin |
| 4091 | (method git-fetch) |
| 4092 | (uri (git-reference |
| 4093 | (url "https://github.com/veusz/veusz") |
| 4094 | (commit (string-append "veusz-" version)))) |
| 4095 | (file-name (git-file-name name version)) |
| 4096 | (sha256 |
| 4097 | (base32 "1wcqrzcp1h95qca25w0mrzrvq6sifvndmn2223ak0b4p1dssq1l1")))) |
| 4098 | (build-system pyproject-build-system) |
| 4099 | (arguments |
| 4100 | (list |
| 4101 | ;; TODO: When run with custom test backend "tests/runselftest.py": |
| 4102 | ;; <...> |
| 4103 | ;; qt.qpa.plugin: Could not load the Qt platform plugin |
| 4104 | ;; "xcb" in "" even though it was found. This application failed to |
| 4105 | ;; start because no Qt platform plugin could be |
| 4106 | ;; initialized. Reinstalling the application may fix this problem. |
| 4107 | #:tests? #f |
| 4108 | #:imported-modules (append %qt-build-system-modules |
| 4109 | %pyproject-build-system-modules) |
| 4110 | #:modules '((guix build pyproject-build-system) |
| 4111 | ((guix build qt-build-system) #:prefix qt:) |
| 4112 | (guix build utils)) |
| 4113 | #:phases |
| 4114 | #~(modify-phases %standard-phases |
| 4115 | ;; Veusz uses python's site-packages to look for pyqt6_include_dir. |
| 4116 | (add-after 'unpack 'fix-pyqt6-include-dir |
| 4117 | (lambda _ |
| 4118 | (substitute* "pyqt_setuptools.py" |
| 4119 | (("get_path\\('platlib'\\)") |
| 4120 | (format #f "~s" |
| 4121 | (string-append |
| 4122 | #$(this-package-input "python-pyqt") |
| 4123 | "/lib/python" |
| 4124 | #$(version-major+minor |
| 4125 | (package-version python-wrapper)) |
| 4126 | "/site-packages")))))) |
| 4127 | (add-after 'wrap 'qt-wrap |
| 4128 | (lambda args |
| 4129 | (apply (assoc-ref qt:%standard-phases 'qt-wrap) |
| 4130 | `(,@args #:qtbase #$(this-package-input "qtbase")))))))) |
| 4131 | (native-inputs |
| 4132 | (list pkg-config |
| 4133 | python-setuptools |
| 4134 | qttools)) |
| 4135 | (inputs |
| 4136 | (list bash-minimal |
| 4137 | ghostscript ;optional, for EPS/PS output |
| 4138 | python-dbus |
| 4139 | python-numpy |
| 4140 | python-pyqt-6 |
| 4141 | qtbase |
| 4142 | qtsvg |
| 4143 | qtwayland |
| 4144 | ;; |
| 4145 | ;; These are extra requirements which are listed for the reference, |
| 4146 | ;; try not to include them directly and install on demand to reduce |
| 4147 | ;; closure size and relax module cycles (maths<-->astronomy, |
| 4148 | ;; maths<-->python-science). |
| 4149 | ;; |
| 4150 | ;; [optional] |
| 4151 | ;; python-astropy |
| 4152 | ;; python-pyemf3 ;not packaged |
| 4153 | ;; python-iminuit |
| 4154 | python-h5py)) ;for HDF5 data |
| 4155 | (home-page "https://veusz.github.io/") |
| 4156 | (synopsis "Scientific plotting package") |
| 4157 | (description |
| 4158 | "Veusz is a scientific plotting and graphing program with a graphical |
| 4159 | user interface, designed to produce publication-ready 2D and 3D plots. In |
| 4160 | addition it can be used as a module in Python for plotting. It supports |
| 4161 | vector and bitmap output, including PDF, Postscript, SVG and EMF.") |
| 4162 | (license license:gpl2+))) |
| 4163 | |
| 4164 | (define-public voro++ |
| 4165 | (package |
| 4166 | (name "voro++") |
| 4167 | (version "0.4.6") |
| 4168 | (source |
| 4169 | (origin |
| 4170 | (method git-fetch) |
| 4171 | (uri (git-reference |
| 4172 | (url "https://github.com/chr1shr/voro") |
| 4173 | (commit (string-append "v" version)))) |
| 4174 | (file-name (git-file-name name version)) |
| 4175 | (sha256 |
| 4176 | (base32 "0rxyb662w9y3xadyxz2x7gvc7mafbhl13szdc55fsk5sygpdlkv5")))) |
| 4177 | (build-system gnu-build-system) |
| 4178 | (arguments |
| 4179 | (list |
| 4180 | #:make-flags #~(list (string-append "PREFIX=" #$output)) |
| 4181 | #:phases |
| 4182 | #~(modify-phases %standard-phases |
| 4183 | (delete 'configure) ;no configure |
| 4184 | (replace 'check |
| 4185 | ;; There is no test suite but the project provides a verity of |
| 4186 | ;; examples to check performance, target "all" build each example |
| 4187 | ;; (basic, walls, custom, extra, degenerate, and interface), see |
| 4188 | ;; detailed description in "examples/README". |
| 4189 | ;; |
| 4190 | ;; Running timing example only: |
| 4191 | ;; These codes and scripts can be used to test the code's |
| 4192 | ;; performance. The program timing_test.cc creates a container |
| 4193 | ;; with 100000 particles, and then times the computation of all |
| 4194 | ;; the cells in the container, using the dummy function |
| 4195 | ;; compute_all_cells(). |
| 4196 | (lambda* (#:key tests? #:allow-other-keys) |
| 4197 | (when tests? |
| 4198 | (with-directory-excursion "examples/timing" |
| 4199 | (invoke "perl" "timing_test.pl")))))))) |
| 4200 | (native-inputs |
| 4201 | (list perl)) |
| 4202 | (home-page "https://math.lbl.gov/voro++/") |
| 4203 | (synopsis "C++ library for the computation of the Voronoi diagram") |
| 4204 | (description |
| 4205 | "Voro++ is a software library for carrying out three-dimensional |
| 4206 | computations of the Voronoi tessellation. A distinguishing feature of the |
| 4207 | Voro++ library is that it carries out cell-based calculations, computing the |
| 4208 | Voronoi cell for each particle individually. It is particularly well-suited |
| 4209 | for applications that rely on cell-based statistics, where features of Voronoi |
| 4210 | cells (eg. volume, centroid, number of faces) can be used to analyze a system |
| 4211 | of particles. |
| 4212 | |
| 4213 | Voro++ comprises of several C++ classes that can be built as a static library. |
| 4214 | A command-line utility is also provided that can use most features of the |
| 4215 | code. The direct cell-by-cell construction makes the library particularly |
| 4216 | well-suited to handling special boundary conditions and walls. It employs |
| 4217 | algorithms that are tolerant for numerical precision errors, it exhibits high |
| 4218 | performance, and it has been successfully employed on very large particle |
| 4219 | systems.") |
| 4220 | (license license:bsd-3))) |
| 4221 | |
| 4222 | (define-public maxflow |
| 4223 | (package |
| 4224 | (name "maxflow") |
| 4225 | ;; Versioning is ambiguous: the git tag matching this commit is ‘3.0.5’, |
| 4226 | ;; which matches CMakeLists.txt, but README.md and CHANGES say ‘3.04’. |
| 4227 | (version "3.0.5") |
| 4228 | (source (origin |
| 4229 | (method git-fetch) |
| 4230 | (uri (git-reference |
| 4231 | (url "https://github.com/gerddie/maxflow") |
| 4232 | (commit version))) |
| 4233 | (file-name (git-file-name name version)) |
| 4234 | (sha256 |
| 4235 | (base32 |
| 4236 | "0rll38whw55h0vcjrrwdnh9ascvxby0ph7n1l0d12z17cg215kkb")))) |
| 4237 | (build-system cmake-build-system) |
| 4238 | (home-page "https://pub.ist.ac.at/~vnk/software.html") |
| 4239 | (synopsis "Library implementing Maxflow algorithm") |
| 4240 | (description "An implementation of the maxflow algorithm described in |
| 4241 | @cite{An Experimental Comparison of Min-Cut/Max-Flow Algorithms for |
| 4242 | Energy Minimization in Computer Vision.\n |
| 4243 | Yuri Boykov and Vladimir Kolmogorov.\n |
| 4244 | In IEEE Transactions on Pattern Analysis and Machine Intelligence,\n |
| 4245 | September 2004}") |
| 4246 | (license license:gpl3+))) |
| 4247 | |
| 4248 | (define-public petsc |
| 4249 | (package |
| 4250 | (name "petsc") |
| 4251 | (version "3.24.0") |
| 4252 | (source |
| 4253 | (origin |
| 4254 | (method url-fetch) |
| 4255 | ;; The *-lite-* tarball does not contain the *large* documentation |
| 4256 | (uri (string-append "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/" |
| 4257 | "petsc-lite-" version ".tar.gz")) |
| 4258 | (sha256 |
| 4259 | (base32 "10q9bnf7j6nr3fn9x7b8l0c3hqa9mhmsk1j5sdyshg5f1kc6746c")))) |
| 4260 | (outputs '("out" ; libraries and headers |
| 4261 | "examples")) ; ~30MiB of examples |
| 4262 | (build-system gnu-build-system) |
| 4263 | (native-inputs |
| 4264 | (list python which)) |
| 4265 | (inputs |
| 4266 | (list gfortran openblas superlu |
| 4267 | ;; leaving out hdf5 and fftw, as petsc expects them to be built with mpi |
| 4268 | ;; leaving out opengl, as configuration seems to only be for mac |
| 4269 | )) |
| 4270 | (arguments |
| 4271 | (list |
| 4272 | #:test-target "test" |
| 4273 | #:parallel-build? #f ; build is parallel by default |
| 4274 | #:configure-flags |
| 4275 | #~(list "COPTFLAGS=-g -O3" |
| 4276 | "CXXOPTFLAGS=-g -O3" |
| 4277 | "FOPTFLAGS=-g -O3" |
| 4278 | "--with-mpi=0" |
| 4279 | "--with-openmp=1" |
| 4280 | "--with-openblas=1" |
| 4281 | (string-append "--with-openblas-dir=" |
| 4282 | #$(this-package-input "openblas")) |
| 4283 | "--with-superlu=1" |
| 4284 | "--with-debugging=0") |
| 4285 | #:make-flags |
| 4286 | ;; Honor (parallel-job-count) for build. Do not use --with-make-np, |
| 4287 | ;; whose value is dumped to $out/lib/petsc/conf/petscvariables. |
| 4288 | #~(list (format #f "MAKE_NP=~a" (parallel-job-count))) |
| 4289 | #:phases |
| 4290 | #~(modify-phases %standard-phases |
| 4291 | (replace 'configure |
| 4292 | ;; PETSc's configure script is actually a python script, so we can't |
| 4293 | ;; run it with bash. |
| 4294 | (lambda* (#:key outputs (configure-flags '()) |
| 4295 | #:allow-other-keys) |
| 4296 | (let* ((prefix (assoc-ref outputs "out")) |
| 4297 | (flags `(,(string-append "--prefix=" prefix) |
| 4298 | ,@configure-flags))) |
| 4299 | ;; Sort source files in configure (for reproducibility). |
| 4300 | (substitute* "config/gmakegen.py" |
| 4301 | (("join\\(srcs\\[lang\\]\\)") |
| 4302 | "join(sorted(srcs[lang]))")) |
| 4303 | |
| 4304 | (format #t "build directory: ~s~%" (getcwd)) |
| 4305 | (format #t "configure flags: ~s~%" flags) |
| 4306 | (apply invoke "./configure" flags) |
| 4307 | |
| 4308 | ;; Generate test scripts with the right shebang. |
| 4309 | (substitute* "config/example_template.py" |
| 4310 | (("#!/usr/bin/env bash") |
| 4311 | (string-append "#!" (which "bash"))))))) |
| 4312 | (add-after 'configure 'clean-local-references |
| 4313 | (lambda* (#:key outputs #:allow-other-keys) |
| 4314 | (let ((out (assoc-ref outputs "out"))) |
| 4315 | (substitute* (find-files "." "^petsc(conf|machineinfo).h$") |
| 4316 | ;; Prevent build directory from leaking into compiled code |
| 4317 | (((getcwd)) out) |
| 4318 | (("Machine characteristics: Linux-[0-9]+\\.[0-9]+\\.[0-9]+-arch[0-9]+-[0-9]+") |
| 4319 | "Machine characteristics: Linux-x.x.x-archx-x") |
| 4320 | (("([[:graph:]]+)/bin/make") "\"make")) |
| 4321 | (substitute* (find-files "." "petscvariables") |
| 4322 | ;; Do not expose build machine characteristics, set to defaults. |
| 4323 | (("MAKE_NP = [[:digit:]]+") "MAKE_NP = 2") |
| 4324 | (("MAKE_TEST_NP = [[:digit:]]+") "MAKE_TEST_NP = 2") |
| 4325 | (("MAKE_LOAD = .*") "MAKE_LOAD = 256.0\n") |
| 4326 | (("NPMAX = [[:digit:]]+") "NPMAX = 2"))))) |
| 4327 | (add-after 'install 'clean-install |
| 4328 | ;; Try to keep installed files from leaking build directory names. |
| 4329 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 4330 | (let ((out (assoc-ref outputs "out"))) |
| 4331 | (substitute* (map (lambda (file) |
| 4332 | (string-append out "/lib/petsc/conf/" file)) |
| 4333 | '("petscvariables")) |
| 4334 | (((getcwd)) out)) |
| 4335 | ;; Make compiler references point to the store |
| 4336 | (substitute* (string-append out "/lib/petsc/conf/petscvariables") |
| 4337 | (("= (gcc|g\\+\\+|gfortran)" _ compiler) |
| 4338 | (string-append "= " (which compiler)))) |
| 4339 | ;; PETSc installs some build logs, which aren't necessary. |
| 4340 | (for-each (lambda (file) |
| 4341 | (let ((f (string-append out "/lib/petsc/conf/" file))) |
| 4342 | (when (file-exists? f) |
| 4343 | (delete-file f)))) |
| 4344 | '("configure.log" "make.log" "gmake.log" |
| 4345 | "test.log" "error.log" "RDict.db" |
| 4346 | "PETScBuildInternal.cmake" |
| 4347 | "configure-hash" |
| 4348 | ;; Once installed, should uninstall with Guix |
| 4349 | "uninstall.py"))))) |
| 4350 | (add-after 'clean-install 'clear-reference-to-compiler |
| 4351 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 4352 | ;; Do not retain a reference to GCC and other build only inputs. |
| 4353 | (let ((out (assoc-ref outputs "out"))) |
| 4354 | (substitute* (string-append out "/lib/petsc/conf/petscvariables") |
| 4355 | (("([[:graph:]]+)/bin/gcc") "gcc") |
| 4356 | (("([[:graph:]]+)/bin/g\\+\\+") "g++") |
| 4357 | (("([[:graph:]]+)/bin/make") "make") |
| 4358 | (("([[:graph:]]+)/bin/diff") "diff") |
| 4359 | (("([[:graph:]]+)/bin/sed") "sed") |
| 4360 | (("([[:graph:]]+)/bin/gfortran") "gfortran") |
| 4361 | (("([[:graph:]]+)/bin/gcov") "gcov"))))) |
| 4362 | |
| 4363 | ;; Some of the tests get linked with '-L$prefix/lib -lpetsc' (even |
| 4364 | ;; though that's unnecessary because they also explicitly link |
| 4365 | ;; against 'libpetsc.so' from the build directory). To work around |
| 4366 | ;; it, run tests after installation. See |
| 4367 | ;; <https://gitlab.com/petsc/petsc/-/issues/1634>. |
| 4368 | (delete 'check) |
| 4369 | (add-after 'install 'check |
| 4370 | (assoc-ref %standard-phases 'check)) |
| 4371 | |
| 4372 | (add-after 'install 'move-examples |
| 4373 | (lambda* (#:key outputs #:allow-other-keys) |
| 4374 | (let* ((out (assoc-ref outputs "out")) |
| 4375 | (examples (assoc-ref outputs "examples")) |
| 4376 | (exdir (string-append out "/share/petsc/examples")) |
| 4377 | (exdir' (string-append examples "/share/petsc/examples"))) |
| 4378 | (copy-recursively exdir exdir') |
| 4379 | (delete-file-recursively exdir))))))) |
| 4380 | (home-page "https://petsc.org") |
| 4381 | (synopsis "Library to solve PDEs") |
| 4382 | (description "PETSc, pronounced PET-see (the S is silent), is a suite of |
| 4383 | data structures and routines for the scalable (parallel) solution of |
| 4384 | scientific applications modeled by partial differential equations.") |
| 4385 | (license (license:non-copyleft |
| 4386 | "https://www.mcs.anl.gov/petsc/documentation/copyright.html")) |
| 4387 | (properties '((tunable? . #t))))) |
| 4388 | |
| 4389 | (define-public petsc-complex |
| 4390 | (package |
| 4391 | (inherit petsc) |
| 4392 | (name "petsc-complex") |
| 4393 | (arguments |
| 4394 | (substitute-keyword-arguments arguments |
| 4395 | ((#:configure-flags cf) |
| 4396 | #~(cons "--with-scalar-type=complex" #$cf)))) |
| 4397 | (synopsis "Library to solve PDEs (with complex scalars)"))) |
| 4398 | |
| 4399 | (define-public petsc-openmpi |
| 4400 | (package |
| 4401 | (inherit petsc) |
| 4402 | (name "petsc-openmpi") |
| 4403 | (inputs |
| 4404 | (modify-inputs inputs |
| 4405 | (prepend hdf5-parallel-openmpi |
| 4406 | hypre-openmpi |
| 4407 | metis |
| 4408 | mumps-openmpi |
| 4409 | openmpi |
| 4410 | pt-scotch32 |
| 4411 | scalapack |
| 4412 | `(,pt-scotch32 "metis")))) |
| 4413 | (arguments |
| 4414 | (substitute-keyword-arguments arguments |
| 4415 | ((#:configure-flags cf) |
| 4416 | #~`("--with-hypre=1" |
| 4417 | "--with-mpiexec=mpirun" |
| 4418 | "--with-metis=1" |
| 4419 | "--with-mumps=1" |
| 4420 | "--with-scalapack=1" |
| 4421 | "--with-ptscotch=1" |
| 4422 | ,(string-append "--with-mpi-dir=" |
| 4423 | #$(this-package-input "openmpi")) |
| 4424 | ,(string-append "--with-hdf5-include=" |
| 4425 | #$(this-package-input "hdf5-parallel-openmpi") |
| 4426 | "/include") |
| 4427 | ,(string-append "--with-hdf5-lib=" |
| 4428 | #$(this-package-input "hdf5-parallel-openmpi") |
| 4429 | "/lib/libhdf5.a") |
| 4430 | ,@(delete "--with-mpi=0" #$cf))) |
| 4431 | ((#:phases phases) |
| 4432 | #~(modify-phases #$phases |
| 4433 | (add-before 'configure 'mpi-setup |
| 4434 | #$%openmpi-setup) |
| 4435 | (add-after 'install 'patch-header-inclusions |
| 4436 | ;; TODO: Replace with ‘patch-header-inclusions’ when (some form |
| 4437 | ;; of) https://issues.guix.gnu.org/54780#19 is merged. |
| 4438 | (lambda _ |
| 4439 | (substitute* (string-append #$output "/include/petsclayouthdf5.h") |
| 4440 | (("<(H5Ipublic.h)>" _ header) |
| 4441 | (format #f "<~a/include/~a>" |
| 4442 | #$(this-package-input "hdf5-parallel-openmpi") |
| 4443 | header))))))))) |
| 4444 | (synopsis "Library to solve PDEs (with MUMPS and MPI support)"))) |
| 4445 | |
| 4446 | (define-public petsc-complex-openmpi |
| 4447 | (package |
| 4448 | (inherit petsc-complex) |
| 4449 | (name "petsc-complex-openmpi") |
| 4450 | (inputs |
| 4451 | (modify-inputs inputs |
| 4452 | (prepend openmpi))) |
| 4453 | (arguments |
| 4454 | (substitute-keyword-arguments arguments |
| 4455 | ((#:configure-flags cf) |
| 4456 | #~`("--with-mpiexec=mpirun" |
| 4457 | ,(string-append "--with-mpi-dir=" |
| 4458 | #$(this-package-input "openmpi")) |
| 4459 | ,@(delete "--with-mpi=0" #$cf))) |
| 4460 | ((#:phases phases) |
| 4461 | #~(modify-phases #$phases |
| 4462 | (add-before 'configure 'mpi-setup |
| 4463 | #$%openmpi-setup))))) |
| 4464 | (synopsis "Library to solve PDEs (with complex scalars and MPI support)"))) |
| 4465 | |
| 4466 | (define-public pnetcdf |
| 4467 | (package |
| 4468 | (name "pnetcdf") |
| 4469 | (version "1.13.0") |
| 4470 | (source |
| 4471 | (origin |
| 4472 | (method url-fetch) |
| 4473 | (uri (string-append |
| 4474 | "https://parallel-netcdf.github.io/Release/pnetcdf-" |
| 4475 | version ".tar.gz")) |
| 4476 | (sha256 |
| 4477 | (base32 |
| 4478 | "14f4nbcnw80y59cl0kjpxqqfaxzzd62kixnhb6ihp6aigb3z385b")))) |
| 4479 | (build-system gnu-build-system) |
| 4480 | (arguments |
| 4481 | (list #:configure-flags |
| 4482 | #~(list "--enable-shared" |
| 4483 | (string-append "--with-mpi=" #$(this-package-input "openmpi"))) |
| 4484 | #:phases |
| 4485 | #~(modify-phases %standard-phases |
| 4486 | (add-after 'build 'mpi-setup |
| 4487 | #$%openmpi-setup)))) |
| 4488 | (inputs (list openmpi zlib)) |
| 4489 | (native-inputs (list m4)) |
| 4490 | (home-page "https://parallel-netcdf.github.io/") |
| 4491 | (synopsis "Parallel I/O Library for NetCDF File Access") |
| 4492 | (description "PnetCDF is a high-performance parallel I/O library for accessing |
| 4493 | Unidata's NetCDF, files in classic formats, specifically the formats of CDF-1, 2, and |
| 4494 | 5.") |
| 4495 | (license (license:x11-style "file://COPYRIGHT")))) |
| 4496 | |
| 4497 | (define-public popf |
| 4498 | (package |
| 4499 | (name "popf") |
| 4500 | (version "0.0.15") |
| 4501 | (source (origin |
| 4502 | (method git-fetch) |
| 4503 | (uri (git-reference |
| 4504 | (url "https://github.com/fmrico/popf") |
| 4505 | (commit version))) |
| 4506 | (file-name (git-file-name name version)) |
| 4507 | (sha256 |
| 4508 | (base32 |
| 4509 | "1i1am3h6japn8fgapi5s5mnyrm31a05jkjhzgk48cd2n42c5060v")))) |
| 4510 | (build-system cmake-build-system) |
| 4511 | (arguments |
| 4512 | (list |
| 4513 | #:tests? #f ; no tests |
| 4514 | #:phases |
| 4515 | #~(modify-phases %standard-phases |
| 4516 | (add-after 'unpack 'fix-cmake |
| 4517 | (lambda* (#:key inputs #:allow-other-keys) |
| 4518 | (substitute* (find-files "." "CMakeLists\\.txt") |
| 4519 | (("/usr/local/opt/flex/include") |
| 4520 | (dirname (search-input-file inputs "include/FlexLexer.h")))) |
| 4521 | (substitute* "CMakeLists.txt" |
| 4522 | (("find_package\\(ament_cmake REQUIRED\\)") "") |
| 4523 | (("ament_.*") "") |
| 4524 | (("(RUNTIME DESTINATION) .*" all dst) |
| 4525 | (string-append dst " libexec/${PROJECT_NAME}"))))) |
| 4526 | (add-after 'install 'symlink |
| 4527 | (lambda* (#:key outputs #:allow-other-keys) |
| 4528 | (let ((out (assoc-ref outputs "out"))) |
| 4529 | (mkdir-p (string-append out "/bin")) |
| 4530 | (for-each (lambda (link) |
| 4531 | (symlink |
| 4532 | (string-append out "/libexec/popf/" (cdr link)) |
| 4533 | (string-append out "/bin/" (car link)))) |
| 4534 | '(("popf" . "popf") ("VAL" . "validate"))))))))) |
| 4535 | (inputs (list cbc flex)) |
| 4536 | (native-inputs (list flex bison perl)) |
| 4537 | (home-page "https://github.com/fmrico/popf") |
| 4538 | (synopsis "Forward-chaining temporal planner") |
| 4539 | (description "This package contains an implementation of the @acronym{POPF, |
| 4540 | Partial Order Planning Forwards} planner described in @cite{Forward-Chaining |
| 4541 | Partial Order Planning}, that has been updated to compile with newer C++ |
| 4542 | compilers.") |
| 4543 | (license license:gpl2+))) |
| 4544 | |
| 4545 | (define-public ppl |
| 4546 | (package |
| 4547 | (name "ppl") |
| 4548 | (version "1.2") |
| 4549 | (source |
| 4550 | (origin |
| 4551 | (method url-fetch) |
| 4552 | (uri (string-append "https://www.bugseng.com/products/ppl/download/" |
| 4553 | "ftp/releases/" version |
| 4554 | "/ppl-" version ".tar.gz")) |
| 4555 | (sha256 |
| 4556 | (base32 |
| 4557 | "1j5aji1g2vmdvc0gqz45n2ll2l2f6czca04wiyfl5g3sm3a6vhvb")))) |
| 4558 | (build-system gnu-build-system) |
| 4559 | (native-inputs |
| 4560 | (list m4)) |
| 4561 | (inputs |
| 4562 | (list glpk gmp)) |
| 4563 | (home-page "https://www.bugseng.com/parma-polyhedra-library") |
| 4564 | (synopsis |
| 4565 | "Parma Polyhedra Library for computations with polyhedra") |
| 4566 | (description |
| 4567 | "The Parma Polyhedra Library (PPL) provides numerical abstractions |
| 4568 | especially targeted at applications in the field of analysis and |
| 4569 | verification of complex systems. These abstractions include convex |
| 4570 | polyhedra, defined as the intersection of a finite number of (open or |
| 4571 | closed) halfspaces, each described by a linear inequality (strict or |
| 4572 | non-strict) with rational coefficients; some special classes of polyhedra |
| 4573 | shapes that offer interesting complexity/precision tradeoffs; and grids |
| 4574 | which represent regularly spaced points that satisfy a set of linear |
| 4575 | congruence relations. The library also supports finite powersets and |
| 4576 | products of (any kind of) polyhedra and grids, a mixed integer linear |
| 4577 | programming problem solver using an exact-arithmetic version of the simplex |
| 4578 | algorithm, a parametric integer programming solver, and primitives for |
| 4579 | termination analysis via the automatic synthesis of linear ranking |
| 4580 | functions.") |
| 4581 | (license license:gpl3+))) |
| 4582 | |
| 4583 | (define-public primecount |
| 4584 | (package |
| 4585 | (name "primecount") |
| 4586 | (version "8.6") |
| 4587 | (source |
| 4588 | (origin |
| 4589 | (method git-fetch) |
| 4590 | (uri (git-reference |
| 4591 | (url "https://github.com/kimwalisch/primecount") |
| 4592 | (commit (string-append "v" version)))) |
| 4593 | (file-name (git-file-name name version)) |
| 4594 | (sha256 |
| 4595 | (base32 |
| 4596 | "0xm0dzdjnm877gndh7r0mj0pgqx42f0v5vnhjx6ig7gv5g0c2s92")))) |
| 4597 | (build-system cmake-build-system) |
| 4598 | (arguments |
| 4599 | (list |
| 4600 | #:configure-flags |
| 4601 | #~(list "-DBUILD_LIBPRIMESIEVE=OFF" |
| 4602 | "-DBUILD_MANPAGE=ON" |
| 4603 | "-DBUILD_SHARED_LIBS=ON" |
| 4604 | "-DBUILD_STATIC_LIBS=OFF" |
| 4605 | "-DBUILD_TESTS=ON"))) |
| 4606 | (native-inputs |
| 4607 | (list asciidoc)) |
| 4608 | (inputs |
| 4609 | (list primesieve)) |
| 4610 | (synopsis "Fast prime counting function implementations") |
| 4611 | (description |
| 4612 | "@code{primecount} is a command-line program and C/C++ library that |
| 4613 | counts the number of primes no greater than x (maximum 1031) using highly |
| 4614 | optimized implementations of the combinatorial prime counting algorithms.") |
| 4615 | (home-page "https://github.com/kimwalisch/primecount") |
| 4616 | (license license:bsd-2))) |
| 4617 | |
| 4618 | (define-public primesieve |
| 4619 | (package |
| 4620 | (name "primesieve") |
| 4621 | (version "12.10") |
| 4622 | (source |
| 4623 | (origin |
| 4624 | (method git-fetch) |
| 4625 | (uri (git-reference |
| 4626 | (url "https://github.com/kimwalisch/primesieve") |
| 4627 | (commit (string-append "v" version)))) |
| 4628 | (file-name (git-file-name name version)) |
| 4629 | (sha256 |
| 4630 | (base32 |
| 4631 | "0vlhhrylv63dmcf9kgsg15596pj06iflfnvjph3w8zlfaajwv9gd")))) |
| 4632 | (build-system cmake-build-system) |
| 4633 | (arguments |
| 4634 | (list |
| 4635 | #:configure-flags |
| 4636 | #~(list "-DBUILD_STATIC_LIBS=OFF" |
| 4637 | "-DBUILD_TESTS=ON"))) |
| 4638 | (synopsis "Prime number generator") |
| 4639 | (description |
| 4640 | "@code{primesieve} is a command-line program and C/C++ library for |
| 4641 | quickly generating prime numbers. It is very cache efficient, it detects your |
| 4642 | CPU's L1 & L2 cache sizes and allocates its main data structures accordingly. |
| 4643 | It is also multi-threaded by default, it uses all available CPU cores whenever |
| 4644 | possible i.e. if sequential ordering is not required. primesieve can generate |
| 4645 | primes and prime k-tuplets up to 264.") |
| 4646 | (home-page "https://github.com/kimwalisch/primesieve") |
| 4647 | (license license:bsd-2))) |
| 4648 | |
| 4649 | ;; It is unfortunate that we cannot just link with the existing blis package. |
| 4650 | (define-public python-blis |
| 4651 | (package |
| 4652 | (name "python-blis") |
| 4653 | (version "1.3.3") |
| 4654 | (source |
| 4655 | (origin |
| 4656 | (method git-fetch) |
| 4657 | (uri (git-reference |
| 4658 | (url "https://github.com/explosion/cython-blis") |
| 4659 | (commit (string-append "release-v" version)))) |
| 4660 | (file-name (git-file-name name version)) |
| 4661 | (sha256 |
| 4662 | (base32 "0ncr47054iy16wapb5yndr6rf3mh8wvi54ljgs791qp3i2yvjb08")))) |
| 4663 | (build-system pyproject-build-system) |
| 4664 | (arguments |
| 4665 | (list |
| 4666 | #:phases |
| 4667 | #~(modify-phases %standard-phases |
| 4668 | (add-before 'check 'remove-local-blis |
| 4669 | (lambda _ |
| 4670 | (copy-recursively "blis/tests" "tests") |
| 4671 | ;; This would otherwise interfere with finding the installed |
| 4672 | ;; blis when running tests. |
| 4673 | (delete-file-recursively "blis")))))) |
| 4674 | (native-inputs |
| 4675 | (list python-cython |
| 4676 | python-numpy |
| 4677 | python-pytest |
| 4678 | python-setuptools)) |
| 4679 | (home-page "https://github.com/explosion/cython-blis") |
| 4680 | (synopsis "Blis as a self-contained C-extension for Python") |
| 4681 | (description |
| 4682 | "This package provides the Blis BLAS-like linear algebra library, as a |
| 4683 | self-contained C-extension for Python.") |
| 4684 | (license license:bsd-3))) |
| 4685 | |
| 4686 | (define-public python-constraint2 |
| 4687 | (package |
| 4688 | (name "python-constraint2") |
| 4689 | (version "2.5.0") |
| 4690 | (source |
| 4691 | (origin |
| 4692 | (method git-fetch) |
| 4693 | (uri (git-reference |
| 4694 | (url "https://github.com/python-constraint/python-constraint") |
| 4695 | (commit version))) |
| 4696 | (file-name (git-file-name name version)) |
| 4697 | (sha256 |
| 4698 | (base32 "1y62jvgb5dm91abgfs3cy260y1lxiwpvirs378a3lj4mrlmrqdsm")))) |
| 4699 | (build-system pyproject-build-system) |
| 4700 | (arguments |
| 4701 | (list |
| 4702 | #:test-flags |
| 4703 | #~(list "--ignore=tests/test_toml_file.py" ;release information tests |
| 4704 | "--ignore=tests/test_util_benchmark.py") |
| 4705 | #:phases |
| 4706 | #~(modify-phases %standard-phases |
| 4707 | (add-after 'unpack 'fix-pytest-config |
| 4708 | (lambda _ |
| 4709 | ;; Drop test coverage requirements |
| 4710 | (substitute* "pyproject.toml" |
| 4711 | (("--cov(-[^ ]*)?([ =][^ \"]*)?") ""))))))) |
| 4712 | (native-inputs |
| 4713 | (list python-cython |
| 4714 | python-poetry-core ;actual build backend |
| 4715 | python-pytest |
| 4716 | python-setuptools)) ;required for cythonization |
| 4717 | (home-page "https://python-constraint.github.io/python-constraint") |
| 4718 | (synopsis "Constraint satisfaction problem resolver for Python") |
| 4719 | (description |
| 4720 | "The @code{python-constraint} module offers efficient solvers for |
| 4721 | @url{https://en.wikipedia.org/wiki/Constraint_satisfaction_problem, constraint |
| 4722 | satisfaction problems} over finite domains in an accessible Python package.") |
| 4723 | (license license:bsd-3))) |
| 4724 | |
| 4725 | (define-public python-cvxopt |
| 4726 | (package |
| 4727 | (name "python-cvxopt") |
| 4728 | (version "1.3.3") |
| 4729 | (source |
| 4730 | (origin |
| 4731 | (method git-fetch) |
| 4732 | (uri (git-reference |
| 4733 | (url "https://github.com/cvxopt/cvxopt") |
| 4734 | (commit version))) |
| 4735 | (file-name (git-file-name name version)) |
| 4736 | (sha256 |
| 4737 | (base32 "0g2lddikgmvi838b5vgfy7kbdvqsvzxrvw3i8pxq1q378dwsyp0d")))) |
| 4738 | (build-system pyproject-build-system) |
| 4739 | (arguments |
| 4740 | (list |
| 4741 | #:phases |
| 4742 | #~(modify-phases %standard-phases |
| 4743 | (add-after 'unpack 'find-libraries |
| 4744 | (lambda* (#:key inputs #:allow-other-keys) |
| 4745 | (setenv "CVXOPT_BLAS_LIB" "openblas") |
| 4746 | (setenv "CVXOPT_LAPACK_LIB" "openblas") |
| 4747 | (setenv "CVXOPT_BUILD_FFTW" "1") |
| 4748 | (setenv "CVXOPT_BUILD_GLPK" "1") |
| 4749 | (setenv "CVXOPT_BUILD_GSL" "1")))))) |
| 4750 | (native-inputs (list python-pytest python-setuptools)) |
| 4751 | (inputs (list fftw glpk gsl openblas suitesparse)) |
| 4752 | (home-page "https://www.cvxopt.org") |
| 4753 | (synopsis "Python library for convex optimization") |
| 4754 | (description |
| 4755 | "CVXOPT is a package for convex optimization based on the Python |
| 4756 | programming language. Its main purpose is to make the development of software |
| 4757 | for convex optimization applications straightforward by building on Python’s |
| 4758 | extensive standard library and on the strengths of Python as a high-level |
| 4759 | programming language.") |
| 4760 | (license license:gpl3+))) |
| 4761 | |
| 4762 | (define-public python-ducc0 |
| 4763 | (package |
| 4764 | (name "python-ducc0") |
| 4765 | (version "0.37.1") |
| 4766 | (source |
| 4767 | (origin |
| 4768 | (method git-fetch) |
| 4769 | (uri (git-reference |
| 4770 | (url "https://gitlab.mpcdf.mpg.de/mtr/ducc") |
| 4771 | (commit (string-append |
| 4772 | "ducc0_" (string-replace-substring version "." "_"))))) |
| 4773 | (file-name (git-file-name name version)) |
| 4774 | (sha256 |
| 4775 | (base32 "0pckbip2ffmiwm73wrpvif3gy0a09v9b9kbyallp520l6l69n4k8")))) |
| 4776 | (build-system pyproject-build-system) |
| 4777 | (arguments |
| 4778 | (list |
| 4779 | #:test-flags |
| 4780 | #~(list "--numprocesses" (number->string (parallel-job-count)) |
| 4781 | "python/test") |
| 4782 | #:phases |
| 4783 | #~(modify-phases %standard-phases |
| 4784 | (add-before 'build 'set-env |
| 4785 | (lambda _ |
| 4786 | (setenv "DUCC0_OPTIMIZATION" "portable-strip")))))) |
| 4787 | (native-inputs |
| 4788 | (list cmake-minimal |
| 4789 | pybind11-2 |
| 4790 | python-nanobind |
| 4791 | python-pytest |
| 4792 | python-pytest-xdist |
| 4793 | python-scikit-build-core |
| 4794 | python-setuptools)) |
| 4795 | (propagated-inputs |
| 4796 | (list python-numpy)) |
| 4797 | (home-page "https://gitlab.mpcdf.mpg.de/mtr/ducc") |
| 4798 | (synopsis "Distinctly Useful Code Collection") |
| 4799 | (description |
| 4800 | "This package provides a collection of basic programming tools for |
| 4801 | numerical computation, including Fast Fourier Transforms, Spherical Harmonic |
| 4802 | Transforms, non-equispaced Fourier transforms, as well as some concrete |
| 4803 | applications like 4pi convolution on the sphere and gridding/degridding of |
| 4804 | radio interferometry data.") |
| 4805 | (license license:gpl2+))) |
| 4806 | |
| 4807 | (define-public python-kiwisolver |
| 4808 | (package |
| 4809 | (name "python-kiwisolver") |
| 4810 | (version "1.5.0") |
| 4811 | (source |
| 4812 | (origin |
| 4813 | (method git-fetch) |
| 4814 | (uri (git-reference |
| 4815 | (url "https://github.com/nucleic/kiwi") |
| 4816 | (commit version))) |
| 4817 | (file-name (git-file-name name version)) |
| 4818 | (sha256 |
| 4819 | (base32 "18fxn3nvc6917mkm0as7088m794fqdp8rlk4qgypva9fir1br1r6")))) |
| 4820 | (build-system pyproject-build-system) |
| 4821 | (native-inputs |
| 4822 | (list python-cppy |
| 4823 | python-pytest |
| 4824 | python-setuptools |
| 4825 | python-setuptools-scm)) |
| 4826 | (home-page "https://github.com/nucleic/kiwi") |
| 4827 | (synopsis "Fast implementation of the Cassowary constraint solver") |
| 4828 | (description |
| 4829 | "Kiwi is an efficient C++ implementation of the Cassowary constraint |
| 4830 | solving algorithm. Kiwi has been designed from the ground up to be |
| 4831 | lightweight and fast. Kiwi ranges from 10x to 500x faster than the original |
| 4832 | Cassowary solver with typical use cases gaining a 40x improvement. Memory |
| 4833 | savings are consistently > 5x.") |
| 4834 | (license license:bsd-3))) |
| 4835 | |
| 4836 | (define-public python-libensemble |
| 4837 | (package |
| 4838 | (name "python-libensemble") |
| 4839 | (version "1.6.0") |
| 4840 | (source |
| 4841 | (origin |
| 4842 | (method git-fetch) |
| 4843 | (uri (git-reference |
| 4844 | (url "https://github.com/Libensemble/libensemble") |
| 4845 | (commit (string-append "v" version)))) |
| 4846 | (file-name (git-file-name name version)) |
| 4847 | (sha256 |
| 4848 | (base32 "1381xnhf8mrpbkhzaibqf0k8rmvb0bsjjfv0wjrf052yv1jzjimx")))) |
| 4849 | (build-system pyproject-build-system) |
| 4850 | (arguments |
| 4851 | (list |
| 4852 | ;; tests: 180 passed, 13 skipped |
| 4853 | #:phases |
| 4854 | #~(modify-phases %standard-phases |
| 4855 | (replace 'check |
| 4856 | (lambda* (#:key tests? #:allow-other-keys) |
| 4857 | (when tests? |
| 4858 | (substitute* '("libensemble/tests/unit_tests/test_executor.py" |
| 4859 | "libensemble/tests/unit_tests/test_resources.py") |
| 4860 | (((string-join |
| 4861 | ;; Tests expecting running MPI. |
| 4862 | (list "(test_finish_and_kill" |
| 4863 | "test_futures_interface" |
| 4864 | "test_futures_interface_cancel" |
| 4865 | "test_get_local_nodelist_.*_not_in_list" |
| 4866 | "test_get_local_resources_dedicated_mode" |
| 4867 | "test_kill_on_file" |
| 4868 | "test_kill_on_timeout" |
| 4869 | "test_kill_on_timeout_polling_loop_method" |
| 4870 | "test_launch_and_poll" |
| 4871 | "test_launch_and_poll_multitasks" |
| 4872 | "test_launch_and_wait" |
| 4873 | "test_launch_and_wait_no_platform" |
| 4874 | "test_launch_and_wait_timeout" |
| 4875 | "test_launch_as_gen" |
| 4876 | "test_launch_wait_on_start" |
| 4877 | "test_machinefile_from_resources" |
| 4878 | "test_procs_and_machinefile_logic" |
| 4879 | "test_wresources_set_gpus" |
| 4880 | "test_wresources_set_gpus_by_platform" |
| 4881 | "test_wresources_set_gpus_by_platform_gpu_tiles" |
| 4882 | "test_wresources_set_gpus_x2" |
| 4883 | "test_wresources_set_limit_gpus" |
| 4884 | "test_wresources_set_no_gpus)") |
| 4885 | "|") all) |
| 4886 | (string-append "__off_" all))) |
| 4887 | (invoke "python" "libensemble/tests/run_tests.py" "-u"))))))) |
| 4888 | (native-inputs |
| 4889 | (list openmpi |
| 4890 | python-mock |
| 4891 | python-mpi4py |
| 4892 | python-pytest |
| 4893 | python-pytest-cov ;custom test config |
| 4894 | python-pytest-timeout |
| 4895 | python-rich |
| 4896 | python-setuptools)) |
| 4897 | (propagated-inputs |
| 4898 | (list python-gest-api |
| 4899 | python-mpmath |
| 4900 | python-numpy |
| 4901 | python-psutil |
| 4902 | python-pydantic |
| 4903 | python-pyyaml |
| 4904 | python-tomli)) |
| 4905 | (home-page "https://github.com/Libensemble/libensemble") |
| 4906 | (synopsis "Toolkit for dynamic ensembles of calculations") |
| 4907 | (description "@code{libensemble} is a complete toolkit for dynamic |
| 4908 | ensembles of calculations. It connects @code{deciders} to experiments or |
| 4909 | simulations.") |
| 4910 | (license license:bsd-3))) |
| 4911 | |
| 4912 | (define-public python-ndim |
| 4913 | (package |
| 4914 | (name "python-ndim") |
| 4915 | (version "0.1.6") |
| 4916 | (source |
| 4917 | (origin |
| 4918 | (method git-fetch) |
| 4919 | (uri (git-reference |
| 4920 | (url "https://github.com/diego-hayashi/ndim") |
| 4921 | (commit (string-append "v" version)))) |
| 4922 | (file-name (git-file-name name version)) |
| 4923 | (sha256 |
| 4924 | (base32 "1hri82k7pcpw9dns8l1f2asa3dm7hjv71wnxi3752258ia2qa44v")))) |
| 4925 | (build-system pyproject-build-system) |
| 4926 | (propagated-inputs (list python-sympy)) |
| 4927 | (native-inputs (list python-flit-core python-pytest)) |
| 4928 | (home-page "https://github.com/diego-hayashi/ndim") |
| 4929 | (synopsis "Multidimensional volumes and monomial integrals") |
| 4930 | (description |
| 4931 | "@code{ndim} computes all kinds of volumes and integrals of |
| 4932 | monomials over such volumes in a fast, numerically stable way, using |
| 4933 | recurrence relations.") |
| 4934 | (license license:gpl3+))) |
| 4935 | |
| 4936 | (define-public python-petsc4py |
| 4937 | (package |
| 4938 | (name "python-petsc4py") |
| 4939 | (version "3.24.0") |
| 4940 | (source |
| 4941 | (origin |
| 4942 | (method url-fetch) |
| 4943 | (uri (pypi-uri "petsc4py" version)) |
| 4944 | (sha256 |
| 4945 | (base32 "06wi2r43drlfj3hml5392pckn2n99rjfb1p1hz75n3d84z5jrj9x")))) |
| 4946 | (build-system pyproject-build-system) |
| 4947 | (arguments |
| 4948 | (list |
| 4949 | #:phases |
| 4950 | #~(modify-phases %standard-phases |
| 4951 | (add-before 'build 'set-PETSC_DIR |
| 4952 | (lambda* (#:key inputs #:allow-other-keys) |
| 4953 | ;; Define path to PETSc installation. |
| 4954 | (setenv "PETSC_DIR" |
| 4955 | (assoc-ref inputs "petsc-openmpi")))) |
| 4956 | (add-before 'check 'mpi-setup #$%openmpi-setup) |
| 4957 | (replace 'check |
| 4958 | (lambda* (#:key tests? #:allow-other-keys) |
| 4959 | (when tests? |
| 4960 | (invoke "python" "test/runtests.py"))))))) |
| 4961 | (native-inputs (list python-cython python-setuptools)) |
| 4962 | (inputs (list petsc-openmpi python-numpy)) |
| 4963 | (home-page "https://bitbucket.org/petsc/petsc4py/") |
| 4964 | (synopsis "Python bindings for PETSc") |
| 4965 | (description "PETSc, the Portable, Extensible Toolkit for |
| 4966 | Scientific Computation, is a suite of data structures and routines for |
| 4967 | the scalable (parallel) solution of scientific applications modeled by |
| 4968 | partial differential equations. It employs the MPI standard for all |
| 4969 | message-passing communication. @code{petsc4py} provides Python |
| 4970 | bindings to almost all functions of PETSc.") |
| 4971 | (license license:bsd-3))) |
| 4972 | |
| 4973 | (define-public python-primecountpy |
| 4974 | (package |
| 4975 | (name "python-primecountpy") |
| 4976 | (version "0.2.1") |
| 4977 | (source |
| 4978 | (origin |
| 4979 | (method git-fetch) ; Fetch from GitHub to avoid precompiled files |
| 4980 | (uri (git-reference |
| 4981 | (url "https://github.com/dimpase/primecountpy") |
| 4982 | (commit (string-append "v" version)))) |
| 4983 | (file-name (git-file-name name version)) |
| 4984 | (sha256 |
| 4985 | (base32 "0ddv2r6mwn2p2xgi6pa50mjirxb0zj10ngimfpak36yaj8bp0as1")))) |
| 4986 | (build-system pyproject-build-system) |
| 4987 | (arguments |
| 4988 | (list #:tests? #f)) ; there are no tests |
| 4989 | (native-inputs |
| 4990 | (list pkg-config |
| 4991 | python-cysignals |
| 4992 | python-cython |
| 4993 | python-meson)) |
| 4994 | (inputs |
| 4995 | (list pari-gp |
| 4996 | primecount |
| 4997 | primesieve)) |
| 4998 | (home-page "https://github.com/dimpase/primecountpy") |
| 4999 | (synopsis "Cython interface for C++ primecount library") |
| 5000 | (description "This package provides a Cython interface to the C++ library |
| 5001 | @code{primecount}.") |
| 5002 | ;; pyproject.toml says gpl3 but file headers say gpl2+, see |
| 5003 | ;; <https://github.com/dimpase/primecountpy/issues/16>. |
| 5004 | (license license:gpl2+))) |
| 5005 | |
| 5006 | (define-public python-py-bobyqa |
| 5007 | (package |
| 5008 | (name "python-py-bobyqa") |
| 5009 | (version "1.5.0") |
| 5010 | (source |
| 5011 | (origin |
| 5012 | (method git-fetch) ;no tests in PyPI release |
| 5013 | (uri (git-reference |
| 5014 | (url "https://github.com/numericalalgorithmsgroup/pybobyqa") |
| 5015 | (commit (string-append "v" version)))) |
| 5016 | (file-name (git-file-name name version)) |
| 5017 | (sha256 |
| 5018 | (base32 "0k9iapdlbp1k2ck1550ckw0y75f71gxzqkv4clz89ym4fwqwszv2")))) |
| 5019 | (build-system pyproject-build-system) |
| 5020 | (native-inputs |
| 5021 | (list python-pytest |
| 5022 | python-setuptools |
| 5023 | python-wheel)) |
| 5024 | (propagated-inputs |
| 5025 | (list python-numpy |
| 5026 | python-pandas |
| 5027 | python-scipy |
| 5028 | python-setuptools)) |
| 5029 | (home-page "https://github.com/numericalalgorithmsgroup/pybobyqa") |
| 5030 | (synopsis "Derivative-free solver for general objective minimization") |
| 5031 | (description |
| 5032 | "Py-BOBYQA is a flexible package for solving bound-constrained general |
| 5033 | objective minimization, without requiring derivatives of the objective. At |
| 5034 | its core, it is a Python implementation of the BOBYQA algorithm by Powell,but |
| 5035 | Py-BOBYQA has extra features improving its performance on some problems. |
| 5036 | Py-BOBYQA is particularly useful when evaluations of the objective function |
| 5037 | are expensive and/or noisy.") |
| 5038 | (license license:gpl3))) |
| 5039 | |
| 5040 | (define-public python-pyglm |
| 5041 | (package |
| 5042 | (name "python-pyglm") |
| 5043 | (version "2.8.1") |
| 5044 | (source |
| 5045 | (origin |
| 5046 | ;; Test files are not included in the archive in pypi. |
| 5047 | (method git-fetch) |
| 5048 | (uri (git-reference |
| 5049 | (url "https://github.com/Zuzu-Typ/PyGLM") |
| 5050 | (commit version) |
| 5051 | ;; XXX: Attempt to use Guix's [email protected] failed, try to figure out |
| 5052 | ;; how to fix it. |
| 5053 | (recursive? #t))) |
| 5054 | (file-name (git-file-name name version)) |
| 5055 | (sha256 |
| 5056 | (base32 |
| 5057 | "1ra54m0pb5aca7q6ymappjsyxdzdy17yz8rrhlql04k0p9lnf1v8")))) |
| 5058 | (build-system pyproject-build-system) |
| 5059 | (native-inputs |
| 5060 | (list python-pytest |
| 5061 | python-setuptools |
| 5062 | python-wheel)) |
| 5063 | (home-page "https://github.com/Zuzu-Typ/PyGLM") |
| 5064 | (synopsis "OpenGL Mathematics library for Python") |
| 5065 | (description "PyGLM is a Python extension library which brings the OpenGL |
| 5066 | Mathematics (GLM) library to Python.") |
| 5067 | (license license:zlib))) |
| 5068 | |
| 5069 | (define-public python-simplesat |
| 5070 | (package |
| 5071 | (name "python-simplesat") |
| 5072 | (version "0.9.2") |
| 5073 | (source |
| 5074 | (origin |
| 5075 | (method git-fetch) |
| 5076 | (uri (git-reference |
| 5077 | (url "https://github.com/enthought/sat-solver") |
| 5078 | (commit (string-append "v" version)))) |
| 5079 | (file-name (git-file-name name version)) |
| 5080 | (sha256 |
| 5081 | (base32 "0z44pi8yb6pvc9bisl3qnn3glj7ir0ad2j4gd4jfg2kxvwvi0w0b")))) |
| 5082 | (build-system pyproject-build-system) |
| 5083 | (arguments |
| 5084 | (list |
| 5085 | #:test-flags #~(list "--ignore=old"))) |
| 5086 | (native-inputs |
| 5087 | (list python-mock |
| 5088 | python-pytest |
| 5089 | python-pyyaml |
| 5090 | python-setuptools)) |
| 5091 | (propagated-inputs |
| 5092 | (list python-attrs |
| 5093 | python-okonomiyaki |
| 5094 | python-six)) |
| 5095 | (home-page "https://github.com/enthought/sat-solver") |
| 5096 | (synopsis |
| 5097 | "@acronym{SAT, Boolean Satisfiability Problem} dependency handling") |
| 5098 | (description |
| 5099 | "This package provides a prototype Python implementation for SAT-based |
| 5100 | problems.") |
| 5101 | (license license:bsd-3))) |
| 5102 | |
| 5103 | (define-public slepc |
| 5104 | (package |
| 5105 | (name "slepc") |
| 5106 | (version "3.24.0") |
| 5107 | (source |
| 5108 | (origin |
| 5109 | (method url-fetch) |
| 5110 | (uri (string-append "http://slepc.upv.es/download/distrib/slepc-" |
| 5111 | version ".tar.gz")) |
| 5112 | (sha256 |
| 5113 | (base32 |
| 5114 | "1sdl9hv34pckwkxjq2spiyc6k5czd9y4m852k338l4x9ib4i8bbf")))) |
| 5115 | (build-system gnu-build-system) |
| 5116 | (native-inputs |
| 5117 | `(("python" ,python) |
| 5118 | ("which" ,which) |
| 5119 | ("petsc:examples" ,petsc "examples"))) ;for gmakegen.py script |
| 5120 | (inputs |
| 5121 | `(("arpack" ,arpack-ng) |
| 5122 | ("gfortran" ,gfortran))) |
| 5123 | (propagated-inputs |
| 5124 | (list petsc)) |
| 5125 | (arguments |
| 5126 | `(#:parallel-build? #f ;build is parallel by default |
| 5127 | #:configure-flags |
| 5128 | `(,(string-append "--with-arpack-dir=" |
| 5129 | (assoc-ref %build-inputs "arpack") "/lib")) |
| 5130 | #:make-flags ;honor (parallel-job-count) |
| 5131 | `(,(format #f "MAKE_NP=~a" (parallel-job-count)) |
| 5132 | ,(string-append "PETSCCONFIGDIR=" |
| 5133 | (assoc-ref %build-inputs "petsc:examples") |
| 5134 | "/share/petsc/examples/config")) |
| 5135 | #:phases |
| 5136 | (modify-phases %standard-phases |
| 5137 | (replace 'configure |
| 5138 | ;; configure is a python script, so we can't run it with bash. |
| 5139 | (lambda* (#:key inputs outputs (configure-flags '()) |
| 5140 | #:allow-other-keys) |
| 5141 | (let* ((prefix (assoc-ref outputs "out")) |
| 5142 | (flags `(,(string-append "--prefix=" prefix) |
| 5143 | ,@configure-flags))) |
| 5144 | (format #t "build directory: ~s~%" (getcwd)) |
| 5145 | (format #t "configure flags: ~s~%" flags) |
| 5146 | (setenv "SLEPC_DIR" (getcwd)) |
| 5147 | (setenv "PETSC_DIR" (assoc-ref inputs "petsc")) |
| 5148 | (apply invoke "./configure" flags)))) |
| 5149 | (add-after 'install 'delete-doc |
| 5150 | ;; TODO: SLEPc installs HTML documentation alongside headers in |
| 5151 | ;; $out/include. We'd like to move them to share/doc, but delete |
| 5152 | ;; them for now, as they are incomplete and installing the complete |
| 5153 | ;; documentation is difficult. |
| 5154 | (lambda* (#:key outputs #:allow-other-keys) |
| 5155 | (let* ((out (assoc-ref outputs "out"))) |
| 5156 | (for-each delete-file (find-files out "\\.html$")) |
| 5157 | #t))) |
| 5158 | (add-after 'install 'clean-install |
| 5159 | ;; Clean up unnecessary build logs from installation. |
| 5160 | (lambda* (#:key outputs #:allow-other-keys) |
| 5161 | (let ((out (assoc-ref outputs "out"))) |
| 5162 | (for-each (lambda (file) |
| 5163 | (let ((f (string-append out "/lib/slepc/conf/" file))) |
| 5164 | (when (file-exists? f) |
| 5165 | (delete-file f)))) |
| 5166 | '("configure.log" "make.log" "gmake.log" |
| 5167 | "test.log" "error.log" "RDict.db" |
| 5168 | "uninstall.py")) |
| 5169 | #t)))))) |
| 5170 | (home-page "https://slepc.upv.es") |
| 5171 | (synopsis "Scalable library for eigenproblems") |
| 5172 | (description "SLEPc is a software library for the solution of large sparse |
| 5173 | eigenproblems on parallel computers. It can be used for the solution of |
| 5174 | linear eigenvalue problems formulated in either standard or generalized form, |
| 5175 | as well as other related problems such as the singular value decomposition. |
| 5176 | The emphasis of the software is on methods and techniques appropriate for |
| 5177 | problems in which the associated matrices are sparse, for example, those |
| 5178 | arising after the discretization of partial differential equations.") |
| 5179 | (license license:bsd-2) |
| 5180 | (properties |
| 5181 | `((release-monitoring-url . "http://slepc.upv.es/download/"))))) |
| 5182 | |
| 5183 | (define-public slepc-complex |
| 5184 | (package (inherit slepc) |
| 5185 | (name "slepc-complex") |
| 5186 | (propagated-inputs |
| 5187 | `(("petsc" ,petsc-complex) |
| 5188 | ,@(alist-delete "petsc" (package-propagated-inputs slepc)))) |
| 5189 | (synopsis "Scalable library for eigenproblems (with complex scalars)"))) |
| 5190 | |
| 5191 | (define-public slepc-openmpi |
| 5192 | (package (inherit slepc) |
| 5193 | (name "slepc-openmpi") |
| 5194 | (arguments |
| 5195 | (substitute-keyword-arguments arguments |
| 5196 | ((#:phases phases '%standard-phases) |
| 5197 | `(modify-phases ,phases |
| 5198 | (add-before 'check 'mpi-setup |
| 5199 | ,%openmpi-setup))))) |
| 5200 | (inputs |
| 5201 | `(("mpi" ,openmpi) |
| 5202 | ,@(alist-delete "arpack" (package-inputs slepc)))) |
| 5203 | (propagated-inputs |
| 5204 | `(("petsc" ,petsc-openmpi) |
| 5205 | ("arpack" ,arpack-ng-openmpi) |
| 5206 | ,@(alist-delete "petsc" (package-propagated-inputs slepc)))) |
| 5207 | (synopsis "Scalable library for eigenproblems (with MPI support)"))) |
| 5208 | |
| 5209 | (define-public slepc-complex-openmpi |
| 5210 | (package (inherit slepc-openmpi) |
| 5211 | (name "slepc-complex-openmpi") |
| 5212 | (propagated-inputs |
| 5213 | `(("petsc" ,petsc-complex-openmpi) |
| 5214 | ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi)))) |
| 5215 | (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)"))) |
| 5216 | |
| 5217 | (define-public python-slepc4py |
| 5218 | (package |
| 5219 | (name "python-slepc4py") |
| 5220 | (version "3.24.0") |
| 5221 | (source |
| 5222 | (origin |
| 5223 | (method url-fetch) |
| 5224 | (uri (pypi-uri "slepc4py" version)) |
| 5225 | (sha256 |
| 5226 | (base32 "1wiqcwgr9mq81dd68glsnwn57gqmgahcvcchqqqq3ns7bykvdjah")))) |
| 5227 | (build-system pyproject-build-system) |
| 5228 | (arguments |
| 5229 | (list |
| 5230 | #:phases |
| 5231 | #~(modify-phases %standard-phases |
| 5232 | (add-before 'build 'pre-build |
| 5233 | (lambda* (#:key inputs #:allow-other-keys) |
| 5234 | ;; Define path to PETSc installation. |
| 5235 | (setenv "PETSC_DIR" |
| 5236 | (assoc-ref inputs "petsc-openmpi")) |
| 5237 | ;; Define path to SLEPc installation. |
| 5238 | (setenv "SLEPC_DIR" |
| 5239 | (assoc-ref inputs "slepc-openmpi")))) |
| 5240 | (add-before 'check 'mpi-setup |
| 5241 | #$%openmpi-setup) |
| 5242 | (replace 'check |
| 5243 | (lambda* (#:key tests? #:allow-other-keys) |
| 5244 | (when tests? |
| 5245 | (invoke "python" "test/runtests.py"))))))) |
| 5246 | (native-inputs (list python-cython python-setuptools)) |
| 5247 | (inputs (list python-numpy python-petsc4py petsc-openmpi slepc-openmpi)) |
| 5248 | (home-page "https://bitbucket.org/slepc/slepc4py/") |
| 5249 | (synopsis "Python bindings for SLEPc") |
| 5250 | (description |
| 5251 | "SLEPc, the Scalable Library for Eigenvalue Problem Computations, is |
| 5252 | based on PETSc, the Portable, Extensible Toolkit for Scientific Computation. |
| 5253 | It employs the MPI standard for all message-passing communication. |
| 5254 | @code{slepc4py} provides Python bindings to almost all functions of SLEPc.") |
| 5255 | (license license:bsd-3))) |
| 5256 | |
| 5257 | (define-public metamath |
| 5258 | (package |
| 5259 | (name "metamath") |
| 5260 | (version "0.193") |
| 5261 | (source |
| 5262 | (origin |
| 5263 | (method git-fetch) |
| 5264 | (uri (git-reference |
| 5265 | (url "https://github.com/metamath/metamath-exe") |
| 5266 | (commit (string-append "v" version)))) |
| 5267 | (file-name (git-file-name name version)) |
| 5268 | (sha256 |
| 5269 | (base32 "1s9hyknfvhj86g3giayyf3dxzg23iij0rs7bdvj075v9qbyhqn9b")))) |
| 5270 | (build-system gnu-build-system) |
| 5271 | (native-inputs |
| 5272 | (list autoconf automake)) |
| 5273 | (home-page "https://us.metamath.org/") |
| 5274 | (synopsis "Proof verifier based on a minimalistic formalism") |
| 5275 | (description |
| 5276 | "Metamath is a tiny formal language and that can express theorems in |
| 5277 | abstract mathematics, with an accompyaning @command{metamath} executable that |
| 5278 | verifies databases of these proofs. There is a public database, |
| 5279 | @url{https://github.com/metamath/set.mm, set.mm}, implementing first-order |
| 5280 | logic and Zermelo-Frenkel set theory with Choice, along with a large swath of |
| 5281 | associated, high-level theorems, e.g.@: the fundamental theorem of arithmetic, |
| 5282 | the Cauchy-Schwarz inequality, Stirling's formula, etc. See the Metamath |
| 5283 | book.") |
| 5284 | (license license:gpl2+))) |
| 5285 | |
| 5286 | (define-public minizinc |
| 5287 | (package |
| 5288 | (name "minizinc") |
| 5289 | (version "2.8.4") |
| 5290 | (source (origin |
| 5291 | (method git-fetch) |
| 5292 | (uri (git-reference |
| 5293 | (url "https://github.com/MiniZinc/libminizinc") |
| 5294 | (commit version))) |
| 5295 | (file-name (git-file-name name version)) |
| 5296 | (sha256 |
| 5297 | (base32 |
| 5298 | "03iliizyadd0wvx6a63rg22lb6p4m6krhlpfm2hfzwj66y3a76j6")) |
| 5299 | (modules '((guix build utils) |
| 5300 | (ice-9 ftw) |
| 5301 | (srfi srfi-1))) |
| 5302 | (snippet |
| 5303 | '(begin |
| 5304 | ;; Do not advertise proprietary solvers |
| 5305 | (with-directory-excursion "cmake/targets" |
| 5306 | (let ((targets '("libminizinc_fzn.cmake" |
| 5307 | "libminizinc_gecode.cmake" |
| 5308 | "libminizinc_mip.cmake" |
| 5309 | "libminizinc_nl.cmake" |
| 5310 | "libminizinc_osicbc.cmake" |
| 5311 | "libminizinc_parser.cmake" |
| 5312 | "libmzn.cmake" |
| 5313 | "minizinc.cmake" |
| 5314 | "mzn2doc.cmake"))) |
| 5315 | (for-each delete-file |
| 5316 | (remove |
| 5317 | (lambda (file) |
| 5318 | (member file (cons* "." ".." targets))) |
| 5319 | (scandir "."))) |
| 5320 | (substitute* "libmzn.cmake" |
| 5321 | (("include\\(cmake/targets/(.*)\\)" all target) |
| 5322 | (if (member target targets) all ""))))) |
| 5323 | (with-directory-excursion "include/minizinc/solvers/MIP" |
| 5324 | (for-each delete-file |
| 5325 | (remove |
| 5326 | (lambda (file) |
| 5327 | (member file '("." ".." |
| 5328 | "MIP_osicbc_solverfactory.hh" |
| 5329 | "MIP_osicbc_wrap.hh" |
| 5330 | "MIP_solverinstance.hh" |
| 5331 | "MIP_solverinstance.hpp" |
| 5332 | "MIP_wrap.hh"))) |
| 5333 | (scandir ".")))) |
| 5334 | (with-directory-excursion "solvers/MIP" |
| 5335 | (for-each delete-file |
| 5336 | (remove |
| 5337 | (lambda (file) |
| 5338 | (member file '("." ".." |
| 5339 | "MIP_osicbc_solverfactory.cpp" |
| 5340 | "MIP_osicbc_wrap.cpp" |
| 5341 | "MIP_solverinstance.cpp" |
| 5342 | "MIP_wrap.cpp"))) |
| 5343 | (scandir ".")))) |
| 5344 | (substitute* "CMakeLists.txt" |
| 5345 | (("find_package\\(([^ ]*).*\\)" all pkg) |
| 5346 | (if (member pkg '("Gecode" "OsiCBC" "Threads")) |
| 5347 | all |
| 5348 | ""))) |
| 5349 | ;; TODO: swap out miniz for zlib |
| 5350 | #t)))) |
| 5351 | (build-system cmake-build-system) |
| 5352 | (arguments |
| 5353 | (list |
| 5354 | #:tests? #f ; no ‘check’ target |
| 5355 | #:modules '((guix build cmake-build-system) |
| 5356 | (guix build utils) |
| 5357 | (srfi srfi-1)) |
| 5358 | #:phases |
| 5359 | #~(modify-phases %standard-phases |
| 5360 | (add-after 'install 'install-solver-configs |
| 5361 | (lambda _ |
| 5362 | (let ((chuffed #$(this-package-input "chuffed")) |
| 5363 | (gecode #$(this-package-input "gecode")) |
| 5364 | (or-tools #$(this-package-input "or-tools")) |
| 5365 | (pkgdatadir (string-append #$output |
| 5366 | "/share/minizinc"))) |
| 5367 | (call-with-output-file (string-append pkgdatadir |
| 5368 | "/Preferences.json") |
| 5369 | (lambda (port) |
| 5370 | (display "\ |
| 5371 | { |
| 5372 | \"tagDefaults\": [ |
| 5373 | [\"\", \"org.gecode.gecode\"], |
| 5374 | [\"gecode\", \"org.gecode.gecode\"] |
| 5375 | ], |
| 5376 | \"solverDefaults\": [] |
| 5377 | }" |
| 5378 | port) |
| 5379 | (newline port))) |
| 5380 | (for-each |
| 5381 | (lambda (solver) |
| 5382 | (copy-recursively |
| 5383 | (string-append solver "/share/minizinc/solvers") |
| 5384 | (string-append pkgdatadir "/solvers"))) |
| 5385 | (list chuffed gecode or-tools)))))))) |
| 5386 | (native-inputs |
| 5387 | (list bison flex)) |
| 5388 | (inputs |
| 5389 | (list cbc chuffed gecode or-tools zlib)) |
| 5390 | (home-page "https://www.minizinc.org") |
| 5391 | (synopsis "High-level constraint modeling language") |
| 5392 | (description "MiniZinc is a high-level modeling language for constraint |
| 5393 | satisfaction and optimization problems. Models are compiled to FlatZinc, a |
| 5394 | language understood by many solvers.") |
| 5395 | (license license:mpl2.0))) |
| 5396 | |
| 5397 | (define-public mumps |
| 5398 | (package |
| 5399 | (name "mumps") |
| 5400 | (version "5.9.1") |
| 5401 | (source |
| 5402 | (origin |
| 5403 | (method url-fetch) |
| 5404 | (uri (string-append "https://mumps-solver.org/MUMPS_" version |
| 5405 | ".tar.gz")) |
| 5406 | (sha256 |
| 5407 | (base32 |
| 5408 | "0ihv7q05hwdwrjm3savkdkj4886xz7xa3fhqqqx00nkbcibrp735")))) |
| 5409 | (build-system gnu-build-system) |
| 5410 | (inputs |
| 5411 | (list gfortran |
| 5412 | ;; These are required for linking against mumps, but we let the user |
| 5413 | ;; declare the dependency. |
| 5414 | openblas |
| 5415 | metis |
| 5416 | scotch)) |
| 5417 | (arguments |
| 5418 | `(#:modules ((ice-9 match) |
| 5419 | (ice-9 popen) |
| 5420 | (srfi srfi-1) |
| 5421 | ,@%default-gnu-modules) |
| 5422 | #:phases |
| 5423 | (modify-phases %standard-phases |
| 5424 | (replace 'configure |
| 5425 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 5426 | (call-with-output-file "Makefile.inc" |
| 5427 | (lambda (port) |
| 5428 | (format port " |
| 5429 | PLAT = |
| 5430 | LIBEXT = .a |
| 5431 | LIBEXT_SHARED = .so |
| 5432 | OUTC = -o |
| 5433 | OUTF = -o |
| 5434 | BLASDIR = ~a |
| 5435 | LIBBLAS = -Wl,-rpath=$(BLASDIR)/lib -Wl,-rpath='$$ORIGIN' |
| 5436 | LIBBLAS += -L$(BLASDIR)/lib |
| 5437 | LIBBLAS += -lopenblas~@[ |
| 5438 | SCALAPDIR = ~a |
| 5439 | SCALAP = -Wl,-rpath=$(SCALAPDIR)/lib -Wl,-rpath='$$ORIGIN' |
| 5440 | SCALAP += -L$(SCALAPDIR)/lib -lscalapack~] |
| 5441 | RM = rm -f~:[ |
| 5442 | CC = gcc |
| 5443 | FC = gfortran |
| 5444 | FL = gfortran |
| 5445 | INCSEQ = -I$(topdir)/libseq |
| 5446 | LIBSEQ = $(LAPACK) -L$(topdir)/libseq -lmpiseq |
| 5447 | LIBSEQNEEDED = libseqneeded |
| 5448 | INCS = $(INCSEQ) |
| 5449 | LIBS = $(LIBSEQ)~; |
| 5450 | CC = mpicc |
| 5451 | FC = mpifort |
| 5452 | FL = mpifort |
| 5453 | INCPAR = |
| 5454 | LIBPAR = $(SCALAP) $(LAPACK) |
| 5455 | LIBSEQNEEDED = |
| 5456 | INCS = $(INCPAR) |
| 5457 | LIBS = $(LIBPAR)~] |
| 5458 | AR = ar vr # rules require trailing space, ugh... |
| 5459 | RANLIB = ranlib |
| 5460 | LIBOTHERS = -pthread |
| 5461 | CDEFS = -DAdd_ |
| 5462 | PIC = -fPIC |
| 5463 | FPIC_OPT = $(PIC) |
| 5464 | RPATH_OPT = -Wl,-rpath,~a/lib |
| 5465 | OPTF = -O2 -fopenmp -DALLOW_NON_INIT -DBLR_MT |
| 5466 | OPTF += -fallow-argument-mismatch $(PIC) |
| 5467 | OPTL = -O2 -fopenmp $(PIC) |
| 5468 | OPTC = -O2 -fopenmp $(PIC) |
| 5469 | LPORDDIR = $(topdir)/PORD/lib |
| 5470 | IPORD = -I$(topdir)/PORD/include |
| 5471 | LPORD = -L$(LPORDDIR) -lpord |
| 5472 | SONAME = -soname |
| 5473 | SHARED_OPT = -shared |
| 5474 | ORDERINGSF = -Dpord~@[ |
| 5475 | METISDIR = ~a |
| 5476 | IMETIS = -I$(METISDIR)/include |
| 5477 | LMETIS = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis |
| 5478 | ORDERINGSF += -Dmetis~]~@[~:{ |
| 5479 | SCOTCHDIR = ~a |
| 5480 | ISCOTCH = -I$(SCOTCHDIR)/include |
| 5481 | LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a -lesmumps |
| 5482 | LSCOTCH += -lscotch -lscotcherr |
| 5483 | ORDERINGSF += ~a~}~] |
| 5484 | ORDERINGSC = $(ORDERINGSF) |
| 5485 | LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) |
| 5486 | IORDERINGSF = $(ISCOTCH) |
| 5487 | IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)" |
| 5488 | (assoc-ref inputs "openblas") |
| 5489 | (assoc-ref inputs "scalapack") |
| 5490 | (->bool (which "mpicc")) ;; MPI support enabled? |
| 5491 | (assoc-ref outputs "out") |
| 5492 | (assoc-ref inputs "metis") |
| 5493 | (match (list (assoc-ref inputs "pt-scotch") |
| 5494 | (assoc-ref inputs "scotch")) |
| 5495 | ((#f #f) |
| 5496 | #f) |
| 5497 | ((#f scotch) |
| 5498 | `((,scotch "" "-Dscotch"))) |
| 5499 | ((ptscotch _) |
| 5500 | `((,ptscotch |
| 5501 | "-lesmumps -lptscotch -lptscotcherr " |
| 5502 | "-Dptscotch"))))))))) |
| 5503 | (replace 'build |
| 5504 | ;; By default only the d-precision library is built. Make with "all" |
| 5505 | ;; target so that all precision libraries and examples are built. |
| 5506 | ;; Then, "make allshared" builts equivalent shared libraries as well. |
| 5507 | (lambda _ |
| 5508 | (invoke "make" "all" |
| 5509 | (format #f "-j~a" (parallel-job-count))) |
| 5510 | (invoke "make" "allshared" |
| 5511 | (format #f "-j~a" (parallel-job-count))))) |
| 5512 | (replace 'check |
| 5513 | ;; Run the simple test drivers, which read test input from stdin: |
| 5514 | ;; from the "real" input for the single- and double-precision |
| 5515 | ;; testers, and from the "cmplx" input for complex-precision |
| 5516 | ;; testers. The EXEC-PREFIX key is used by the mumps-openmpi |
| 5517 | ;; package to prefix execution with "mpirun". |
| 5518 | (lambda* (#:key (exec-prefix '()) #:allow-other-keys) |
| 5519 | (with-directory-excursion "examples" |
| 5520 | (every |
| 5521 | (lambda (prec type) |
| 5522 | (let ((tester (apply open-pipe* |
| 5523 | `(,OPEN_WRITE |
| 5524 | ,@exec-prefix |
| 5525 | ,(string-append "./" prec |
| 5526 | "simpletest")))) |
| 5527 | (input (open-input-file |
| 5528 | (string-append "input_simpletest_" type)))) |
| 5529 | (begin |
| 5530 | (dump-port input tester) |
| 5531 | (close-port input) |
| 5532 | (zero? (close-pipe tester))))) |
| 5533 | '("s" "d" "c" "z") |
| 5534 | '("real" "real" "cmplx" "cmplx"))))) |
| 5535 | (replace 'install |
| 5536 | (lambda* (#:key outputs #:allow-other-keys) |
| 5537 | (let* ((out (assoc-ref outputs "out")) |
| 5538 | (libdir (string-append out "/lib"))) |
| 5539 | (copy-recursively "lib" libdir) |
| 5540 | (copy-recursively "include" (string-append out "/include")) |
| 5541 | (when (file-exists? "libseq/libmpiseq.a") |
| 5542 | (install-file "libseq/libmpiseq.a" libdir)) |
| 5543 | (when (file-exists? "libseq/libmpiseq.so") |
| 5544 | (install-file "libseq/libmpiseq.so" libdir)) |
| 5545 | #t)))))) |
| 5546 | (home-page "https://mumps-solver.org") |
| 5547 | (synopsis "Multifrontal sparse direct solver") |
| 5548 | (description |
| 5549 | "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a |
| 5550 | sparse system of linear equations A x = b using Gaussian elimination.") |
| 5551 | (license license:cecill-c))) |
| 5552 | |
| 5553 | (define-public mumps-metis |
| 5554 | (package |
| 5555 | (inherit mumps) |
| 5556 | (name "mumps-metis") |
| 5557 | (inputs (modify-inputs inputs |
| 5558 | (delete "scotch"))))) |
| 5559 | |
| 5560 | (define-public mumps-openmpi |
| 5561 | (package |
| 5562 | (inherit mumps) |
| 5563 | (name "mumps-openmpi") |
| 5564 | (inputs |
| 5565 | (modify-inputs inputs |
| 5566 | (delete "scotch") |
| 5567 | (prepend openmpi scalapack pt-scotch))) |
| 5568 | (arguments |
| 5569 | (substitute-keyword-arguments arguments |
| 5570 | ((#:phases phases) |
| 5571 | `(modify-phases ,phases |
| 5572 | (add-before 'check 'mpi-setup |
| 5573 | ,%openmpi-setup) |
| 5574 | (replace 'check |
| 5575 | (lambda _ |
| 5576 | ((assoc-ref ,phases 'check) |
| 5577 | #:exec-prefix '("mpirun" "-n" "2")))))))) |
| 5578 | (synopsis "Multifrontal sparse direct solver (with MPI)"))) |
| 5579 | |
| 5580 | (define-public mumps-metis-openmpi |
| 5581 | (package |
| 5582 | (inherit mumps-openmpi) |
| 5583 | (name "mumps-metis-openmpi") |
| 5584 | (inputs (modify-inputs inputs |
| 5585 | (delete "pt-scotch"))))) |
| 5586 | |
| 5587 | (define-public ruby-asciimath |
| 5588 | (package |
| 5589 | (name "ruby-asciimath") |
| 5590 | (version "2.0.6") |
| 5591 | (source |
| 5592 | (origin |
| 5593 | (method url-fetch) |
| 5594 | (uri (rubygems-uri "asciimath" version)) |
| 5595 | (sha256 |
| 5596 | (base32 |
| 5597 | "0b5h65vas9fj4k85gw18cf6pgqbdxfjzj63632rdkngabar67zlq")))) |
| 5598 | (build-system ruby-build-system) |
| 5599 | (native-inputs |
| 5600 | (list ruby-nokogiri ruby-rspec)) |
| 5601 | (synopsis "AsciiMath parsing and conversion library") |
| 5602 | (description |
| 5603 | "A pure Ruby AsciiMath parsing and conversion library. AsciiMath is an |
| 5604 | easy-to-write markup language for mathematics.") |
| 5605 | (home-page "https://github.com/asciidoctor/asciimath") |
| 5606 | (license license:expat))) |
| 5607 | |
| 5608 | (define-public superlu |
| 5609 | (package |
| 5610 | (name "superlu") |
| 5611 | (version "5.3.0") |
| 5612 | (source |
| 5613 | (origin |
| 5614 | (method url-fetch) |
| 5615 | (uri (string-append "https://portal.nersc.gov/project/sparse/superlu/" |
| 5616 | "superlu-" version ".tar.gz")) |
| 5617 | (sha256 |
| 5618 | (base32 "0xvib7nk2rlbsiv1iwkwl9kxppkalkciv628bsyiiv0pv754n48q")) |
| 5619 | (modules '((guix build utils))) |
| 5620 | (snippet |
| 5621 | ;; Replace the non-free implementation of MC64 with a stub adapted |
| 5622 | ;; from Debian |
| 5623 | '(begin |
| 5624 | (use-modules (ice-9 regex) |
| 5625 | (ice-9 rdelim)) |
| 5626 | (call-with-output-file "SRC/mc64ad.c" |
| 5627 | (lambda (port) |
| 5628 | (display " |
| 5629 | #include <stdio.h> |
| 5630 | #include <stdlib.h> |
| 5631 | void mc64id_(int *a) { |
| 5632 | fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\"); |
| 5633 | abort (); |
| 5634 | } |
| 5635 | void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g, |
| 5636 | int *h, int *i, int *j, int *k, double *l, int *m, int *n) { |
| 5637 | fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\"); |
| 5638 | abort (); |
| 5639 | }\n" port))) |
| 5640 | ;; Remove the corresponding license verbiage. MC64 license follows |
| 5641 | ;; a "------" line separator. |
| 5642 | (with-atomic-file-replacement "License.txt" |
| 5643 | (let ((rx (make-regexp "-{8}"))) |
| 5644 | (lambda (in out) |
| 5645 | (let loop () |
| 5646 | (let ((line (read-line in 'concat))) |
| 5647 | (unless (regexp-exec rx line) |
| 5648 | (display line out) |
| 5649 | (loop)))) |
| 5650 | #t))))))) |
| 5651 | (build-system cmake-build-system) |
| 5652 | (native-inputs |
| 5653 | (list tcsh)) |
| 5654 | (inputs |
| 5655 | `(("blas" ,openblas) |
| 5656 | ("gfortran" ,gfortran))) |
| 5657 | (arguments |
| 5658 | `(#:configure-flags '("-Denable_blaslib:BOOL=NO" ;do not use internal cblas |
| 5659 | "-DTPL_BLAS_LIBRARIES=openblas" |
| 5660 | "-DBUILD_SHARED_LIBS:BOOL=YES"))) |
| 5661 | (home-page "https://portal.nersc.gov/project/sparse/superlu/") |
| 5662 | (synopsis "Supernodal direct solver for sparse linear systems") |
| 5663 | (description |
| 5664 | "SuperLU is a general purpose library for the direct solution of large, |
| 5665 | sparse, nonsymmetric systems of linear equations on high performance machines. |
| 5666 | The library is written in C and is callable from either C or Fortran. The |
| 5667 | library routines perform an LU decomposition with partial pivoting and |
| 5668 | triangular system solves through forward and back substitution. The library |
| 5669 | also provides threshold-based ILU factorization preconditioners.") |
| 5670 | (license (list license:bsd-3 |
| 5671 | license:gpl2+ ;EXAMPLE/*fgmr.c |
| 5672 | (license:fsf-free "file://SRC/colamd.h"))))) |
| 5673 | |
| 5674 | (define-public superlu-dist |
| 5675 | (package |
| 5676 | (name "superlu-dist") |
| 5677 | (version "6.4.0") |
| 5678 | (source |
| 5679 | (origin |
| 5680 | (method git-fetch) |
| 5681 | (uri (git-reference |
| 5682 | (url "https://github.com/xiaoyeli/superlu_dist") |
| 5683 | (commit (string-append "v" version)))) |
| 5684 | (file-name (git-file-name name version)) |
| 5685 | (sha256 |
| 5686 | (base32 "0fa29yr72p4yq5ln4rgfsawmi5935n4qcr5niz6864bjladz4lql")) |
| 5687 | (modules '((guix build utils))) |
| 5688 | (snippet |
| 5689 | ;; Replace the non-free implementation of MC64 with a stub |
| 5690 | '(begin |
| 5691 | (make-file-writable "SRC/mc64ad_dist.c") |
| 5692 | (call-with-output-file "SRC/mc64ad_dist.c" |
| 5693 | (lambda (port) |
| 5694 | (display " |
| 5695 | #include <stdio.h> |
| 5696 | #include <stdlib.h> |
| 5697 | void mc64id_dist(int *a) { |
| 5698 | fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\"); |
| 5699 | abort (); |
| 5700 | } |
| 5701 | void mc64ad_dist (int *a, int *b, int *c, int *d, int *e, double *f, int *g, |
| 5702 | int *h, int *i, int *j, int *k, double *l, int *m, int *n) { |
| 5703 | fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\"); |
| 5704 | abort (); |
| 5705 | }\n" port))) |
| 5706 | (substitute* "SRC/util.c" ;adjust default algorithm |
| 5707 | (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag_MC64;") |
| 5708 | ;; TODO: set to "LargeDiag_AWPM" once combinatorial-blas has |
| 5709 | ;; general (i.e. non-square) processor-grid support. |
| 5710 | "RowPerm = NOROWPERM;")) |
| 5711 | #t)) |
| 5712 | (patches (search-patches "superlu-dist-scotchmetis.patch" |
| 5713 | "superlu-dist-awpm-grid.patch")))) |
| 5714 | (build-system cmake-build-system) |
| 5715 | (native-inputs |
| 5716 | (list tcsh)) |
| 5717 | (inputs |
| 5718 | `(("gfortran" ,gfortran) |
| 5719 | ("blas" ,openblas) |
| 5720 | ("combblas" ,combinatorial-blas))) |
| 5721 | (propagated-inputs |
| 5722 | `(("mpi" ,openmpi) ;headers include MPI heades |
| 5723 | ("parmetis" ,pt-scotch32 "metis") |
| 5724 | ("pt-scotch" ,pt-scotch32))) |
| 5725 | (arguments |
| 5726 | `(#:parallel-tests? #f ;tests use MPI and OpenMP |
| 5727 | #:configure-flags (list "-DBUILD_SHARED_LIBS:BOOL=YES" |
| 5728 | "-DTPL_ENABLE_COMBBLASLIB=YES" |
| 5729 | "-DTPL_BLAS_LIBRARIES=-lopenblas" |
| 5730 | "-DTPL_LAPACK_LIBRARIES=-lopenblas" |
| 5731 | (string-append "-DTPL_PARMETIS_LIBRARIES=" |
| 5732 | (string-join |
| 5733 | '("ptscotchparmetisv3" "ptscotcherr" |
| 5734 | "scotchmetisv3" "scotcherr") |
| 5735 | ";")) |
| 5736 | (string-append "-DTPL_PARMETIS_INCLUDE_DIRS=" |
| 5737 | (assoc-ref %build-inputs "parmetis") |
| 5738 | "/include") |
| 5739 | "-DTPL_ENABLE_COMBBLASLIB=ON" |
| 5740 | (string-append "-DTPL_COMBBLAS_INCLUDE_DIRS=" |
| 5741 | (assoc-ref %build-inputs "combblas") |
| 5742 | "/include/CombBLAS;" |
| 5743 | (assoc-ref %build-inputs "combblas") |
| 5744 | "/include/BipartiteMatchings") |
| 5745 | "-DTPL_COMBBLAS_LIBRARIES=CombBLAS") |
| 5746 | #:phases |
| 5747 | (modify-phases %standard-phases |
| 5748 | (add-before 'configure 'set-c++-standard |
| 5749 | (lambda _ |
| 5750 | (substitute* "CMakeLists.txt" |
| 5751 | ;; AWPM headers require C++14 |
| 5752 | (("CMAKE_CXX_STANDARD 11") "CMAKE_CXX_STANDARD 14")))) |
| 5753 | (add-before 'check 'mpi-setup |
| 5754 | ,%openmpi-setup) |
| 5755 | (add-before 'check 'omp-setup |
| 5756 | (lambda _ (setenv "OMP_NUM_THREADS" "1") #t))))) |
| 5757 | (home-page (package-home-page superlu)) |
| 5758 | (synopsis "Parallel supernodal direct solver") |
| 5759 | (description |
| 5760 | "SuperLU_DIST is a parallel extension to the serial SuperLU library. |
| 5761 | It is targeted for distributed memory parallel machines. SuperLU_DIST is |
| 5762 | implemented in ANSI C, and MPI for communications.") |
| 5763 | (license license:bsd-3))) |
| 5764 | |
| 5765 | (define-public scotch |
| 5766 | (package |
| 5767 | (name "scotch") |
| 5768 | (version "7.0.15") |
| 5769 | (source |
| 5770 | (origin |
| 5771 | (method git-fetch) |
| 5772 | (uri (git-reference |
| 5773 | (url "https://gitlab.inria.fr/scotch/scotch") |
| 5774 | (commit (string-append "v" version)))) |
| 5775 | (file-name (git-file-name name version)) |
| 5776 | (sha256 |
| 5777 | (base32 "1d2v481zgi0b42qny3d97ysm1f5y89qkjhlzpnh8xx2abljssnqi")) |
| 5778 | (patches (search-patches "scotch-cmake-remove-metis.patch")))) |
| 5779 | (build-system cmake-build-system) |
| 5780 | (inputs |
| 5781 | (list zlib)) |
| 5782 | (native-inputs |
| 5783 | (list flex bison gfortran)) |
| 5784 | (outputs '("out" "metis")) |
| 5785 | (arguments |
| 5786 | (list #:parallel-tests? #f |
| 5787 | #:configure-flags #~'("-DBUILD_SHARED_LIBS=YES" "-DINTSIZE=64" |
| 5788 | "-DBUILD_PTSCOTCH=OFF") |
| 5789 | #:phases |
| 5790 | #~(modify-phases %standard-phases |
| 5791 | (add-after 'unpack 'add-metis-executable-runpath |
| 5792 | (lambda _ |
| 5793 | ;; 'adm2dgr' is linked to libptscotchparmetisv3 and |
| 5794 | ;; installed in the "metis" output so add |
| 5795 | ;; '${ORIGIN}/../lib' to its RUNPATH. |
| 5796 | (substitute* "src/libscotchmetis/CMakeLists.txt" |
| 5797 | (("target_link_libraries\\(adm2dgr (.*)\\)" _ libraries) |
| 5798 | (string-append |
| 5799 | "target_link_libraries(adm2dgr " |
| 5800 | libraries |
| 5801 | " -Wl,-rpath='\\${ORIGIN}/../lib')\n"))))) |
| 5802 | (add-after 'install 'install-metis |
| 5803 | (lambda* (#:key outputs #:allow-other-keys) |
| 5804 | ;; Move the METIS compatibility library to a separate output to |
| 5805 | ;; avoid a name clash on <metis.h>. |
| 5806 | (let* ((out (assoc-ref outputs "out")) |
| 5807 | (metis (assoc-ref outputs "metis")) |
| 5808 | (prefix (string-length out))) |
| 5809 | (for-each (lambda (file) |
| 5810 | (let ((target |
| 5811 | (string-append metis |
| 5812 | (string-drop file |
| 5813 | prefix)))) |
| 5814 | (mkdir-p (dirname target)) |
| 5815 | (rename-file file target))) |
| 5816 | (find-files out "(adm2dgr|metis)")))))))) |
| 5817 | (home-page "https://www.labri.fr/perso/pelegrin/scotch/") |
| 5818 | (properties |
| 5819 | `((release-monitoring-url |
| 5820 | . "https://gitlab.inria.fr/scotch/scotch/-/releases"))) |
| 5821 | (synopsis "Programs and libraries for graph algorithms") |
| 5822 | (description "SCOTCH is a set of programs and libraries which implement |
| 5823 | the static mapping and sparse matrix reordering algorithms developed within |
| 5824 | the SCOTCH project. Its purpose is to apply graph theory, with a divide and |
| 5825 | conquer approach, to scientific computing problems such as graph and mesh |
| 5826 | partitioning, static mapping, and sparse matrix ordering, in application |
| 5827 | domains ranging from structural mechanics to operating systems or |
| 5828 | bio-chemistry.") |
| 5829 | ;; See LICENSE_en.txt |
| 5830 | (license license:cecill-c))) |
| 5831 | |
| 5832 | (define-public scotch32 |
| 5833 | ;; This is the 'INTSIZE32' variant, which uses 32-bit integers, as needed by |
| 5834 | ;; some applications. |
| 5835 | (package |
| 5836 | (inherit scotch) |
| 5837 | (name "scotch32") |
| 5838 | (arguments |
| 5839 | (substitute-keyword-arguments arguments |
| 5840 | ((#:configure-flags flags #~'()) |
| 5841 | #~'("-DBUILD_SHARED_LIBS=YES" "-DBUILD_PTSCOTCH=OFF" "-DINTSIZE=32")))) |
| 5842 | (synopsis |
| 5843 | "Programs and libraries for graph algorithms (32-bit integers)"))) |
| 5844 | |
| 5845 | (define-public pt-scotch |
| 5846 | (package |
| 5847 | (inherit scotch) |
| 5848 | (name "pt-scotch") |
| 5849 | (propagated-inputs |
| 5850 | (list openmpi)) ;headers include MPI headers |
| 5851 | (arguments |
| 5852 | (substitute-keyword-arguments arguments |
| 5853 | ((#:configure-flags flags #~'()) |
| 5854 | #~'("-DBUILD_SHARED_LIBS=YES" "-DBUILD_PTSCOTCH=ON" "-DINTSIZE=64")) |
| 5855 | ((#:phases phases #~%standard-phases) |
| 5856 | #~(modify-phases #$phases |
| 5857 | (add-before 'check 'mpi-setup |
| 5858 | #$%openmpi-setup))))) |
| 5859 | (synopsis "Programs and libraries for graph algorithms (with MPI)"))) |
| 5860 | |
| 5861 | (define-public pt-scotch32 |
| 5862 | (package |
| 5863 | (inherit pt-scotch) |
| 5864 | (name "pt-scotch32") |
| 5865 | (propagated-inputs |
| 5866 | (list openmpi)) ;headers include MPI headers |
| 5867 | (arguments |
| 5868 | (substitute-keyword-arguments arguments |
| 5869 | ((#:configure-flags flags #~'()) |
| 5870 | #~'("-DBUILD_SHARED_LIBS=YES" "-DBUILD_PTSCOTCH=ON" "-DINTSIZE=32")))) |
| 5871 | (synopsis |
| 5872 | "Programs and libraries for graph algorithms (with MPI and 32-bit integers)"))) |
| 5873 | |
| 5874 | (define-public gklib |
| 5875 | (let ((commit "8bd6bad750b2b0d90800c632cf18e8ee93ad72d7") |
| 5876 | (revision "1")) |
| 5877 | (package |
| 5878 | (name "gklib") |
| 5879 | (version (git-version "5.1.1" revision commit)) |
| 5880 | (source |
| 5881 | (origin |
| 5882 | (method git-fetch) |
| 5883 | (uri (git-reference |
| 5884 | (url "https://github.com/KarypisLab/GKlib") |
| 5885 | (commit commit))) |
| 5886 | (file-name (git-file-name name version)) |
| 5887 | (sha256 |
| 5888 | (base32 |
| 5889 | "08k4zzyd7zsisdhfmnwz7zb9w3pzpgagyjq52mwk8i6sqajdxsdn")))) |
| 5890 | (build-system cmake-build-system) |
| 5891 | (arguments |
| 5892 | (list |
| 5893 | #:tests? #f |
| 5894 | #:configure-flags |
| 5895 | #~(list "-DBUILD_SHARED_LIBS=ON" |
| 5896 | #$@(if (target-x86?) |
| 5897 | '() |
| 5898 | '("-DNO_X86=1"))) |
| 5899 | #:phases |
| 5900 | #~(modify-phases %standard-phases |
| 5901 | (add-after 'unpack 'remove-march=native |
| 5902 | (lambda _ |
| 5903 | (substitute* "GKlibSystem.cmake" |
| 5904 | (("-march=native") ""))))))) |
| 5905 | (home-page "https://github.com/KarypisLab/GKlib") |
| 5906 | (synopsis "Helper library for METIS") |
| 5907 | (description |
| 5908 | "GKlib is a library of various helper routines and frameworks used by |
| 5909 | software from KarypisLab, such as METIS.") |
| 5910 | (license license:asl2.0)))) |
| 5911 | |
| 5912 | ;; XXX: Remove once the full SuiteSparse package is replaced. |
| 5913 | (define-public metis |
| 5914 | (package |
| 5915 | (name "metis") |
| 5916 | (version "5.1.0") |
| 5917 | (source |
| 5918 | (origin |
| 5919 | (method url-fetch) |
| 5920 | (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/" |
| 5921 | "metis-" version ".tar.gz")) |
| 5922 | (sha256 |
| 5923 | (base32 |
| 5924 | "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn")))) |
| 5925 | (properties |
| 5926 | `((release-monitoring-url |
| 5927 | . "http://glaros.dtc.umn.edu/gkhome/metis/metis/download"))) |
| 5928 | (build-system cmake-build-system) |
| 5929 | (arguments |
| 5930 | (list |
| 5931 | #:tests? #f ;no tests |
| 5932 | #:configure-flags |
| 5933 | #~(list "-DSHARED=ON" |
| 5934 | (string-append "-DGKLIB_PATH=" |
| 5935 | (getcwd) "/metis-" #$version "/GKlib")))) |
| 5936 | (inputs (list openblas)) |
| 5937 | (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview") |
| 5938 | (synopsis "Graph partitioning and fill-reducing matrix ordering library") |
| 5939 | (description |
| 5940 | "METIS is a set of serial programs for partitioning graphs, partitioning |
| 5941 | finite element meshes, and producing fill-reducing orderings for sparse |
| 5942 | matrices. The algorithms implemented in METIS are based on the multilevel |
| 5943 | recursive-bisection, multilevel k-way, and multi-constraint partitioning |
| 5944 | schemes.") |
| 5945 | (license license:asl2.0))) ;As of version 5.0.3 |
| 5946 | |
| 5947 | (define-public metis-5.2 |
| 5948 | (package |
| 5949 | (name "metis") |
| 5950 | (version "5.2.1") |
| 5951 | (source |
| 5952 | (origin |
| 5953 | (method git-fetch) |
| 5954 | (uri (git-reference |
| 5955 | (url "https://github.com/KarypisLab/METIS") |
| 5956 | (commit (string-append "v" version)))) |
| 5957 | (file-name (git-file-name name version)) |
| 5958 | (sha256 |
| 5959 | (base32 |
| 5960 | "19vi1wsi2gp2m5vb715yfnzd2g7brm4r40qxg65ysrzgl13lpmvr")) |
| 5961 | (snippet |
| 5962 | #~(delete-file "manual/manual.pdf")))) |
| 5963 | (build-system cmake-build-system) |
| 5964 | (inputs (list gklib openblas)) |
| 5965 | (arguments |
| 5966 | (list |
| 5967 | #:tests? #f ; Tests are not automatic |
| 5968 | #:configure-flags |
| 5969 | #~(list "-DSHARED=ON" |
| 5970 | (string-append "-DGKLIB_PATH=" #$gklib)) |
| 5971 | #:phases |
| 5972 | #~(modify-phases %standard-phases |
| 5973 | ;; The original Makefile copies some files and invokes CMake. |
| 5974 | (add-before 'configure 'prepare-cmake |
| 5975 | (lambda _ |
| 5976 | (substitute* "Makefile" |
| 5977 | (("config: distclean") "config:") |
| 5978 | (("BUILDDIR =.*") |
| 5979 | "BUILDDIR = .\n") |
| 5980 | ((".*cmake.*") "")) |
| 5981 | (substitute* "CMakeLists.txt" |
| 5982 | (("build/") "../source/")) |
| 5983 | (invoke "make" "config")))))) |
| 5984 | (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview") |
| 5985 | (synopsis "Graph partitioning and fill-reducing matrix ordering library") |
| 5986 | (description |
| 5987 | "METIS is a set of serial programs for partitioning graphs, partitioning |
| 5988 | finite element meshes, and producing fill-reducing orderings for sparse |
| 5989 | matrices. The algorithms implemented in METIS are based on the multilevel |
| 5990 | recursive-bisection, multilevel k-way, and multi-constraint partitioning |
| 5991 | schemes.") |
| 5992 | (license license:asl2.0))) |
| 5993 | |
| 5994 | (define-public gsegrafix |
| 5995 | ;; This is an old and equally dead "experimental fork" of the longer-dead |
| 5996 | ;; original. At least it no longer requires the even-deader libgnomeprint{,ui} |
| 5997 | ;; libraries, instead rendering plots with Pango. |
| 5998 | (package |
| 5999 | (name "gsegrafix") |
| 6000 | (version "1.0.7.2") |
| 6001 | (source |
| 6002 | (origin |
| 6003 | (method url-fetch) |
| 6004 | (uri (string-append "mirror://savannah/gsegrafix-experimental/" |
| 6005 | "gsegrafix-experimental-" version ".tar.gz")) |
| 6006 | (sha256 |
| 6007 | (base32 "0fwh6719xy2zasmqlp0vdx6kzm45hn37ga88xmw5cz0yx7xw4j6f")))) |
| 6008 | (build-system gnu-build-system) |
| 6009 | (arguments |
| 6010 | `(#:configure-flags |
| 6011 | (list "--disable-static"))) |
| 6012 | (inputs |
| 6013 | (list glib gtk+)) |
| 6014 | (native-inputs |
| 6015 | (list pkg-config)) |
| 6016 | (home-page "https://www.gnu.org/software/gsegrafix/") |
| 6017 | (synopsis "GNOME application to create scientific and engineering plots") |
| 6018 | (description |
| 6019 | "GSEGrafix is an application which produces high-quality graphical |
| 6020 | plots for science and engineering. Plots are specified via simple ASCII |
| 6021 | parameter files and data files and are presented in an anti-aliased GNOME |
| 6022 | canvas. The program supports rectangular two-dimensional plots, histograms, |
| 6023 | polar-axis plots and three-dimensional plots. Plots can be printed or saved |
| 6024 | to BMP, JPEG or PNG image formats.") |
| 6025 | (license license:gpl3+))) |
| 6026 | |
| 6027 | (define-public maxima |
| 6028 | (package |
| 6029 | (name "maxima") |
| 6030 | (version "5.47.0") |
| 6031 | (source |
| 6032 | (origin |
| 6033 | (method url-fetch) |
| 6034 | (uri (string-append "mirror://sourceforge/maxima/Maxima-source/" |
| 6035 | version "-source/" name "-" version ".tar.gz")) |
| 6036 | (sha256 |
| 6037 | (base32 "0yhgsi7s22bpblrmrj60x0jsjdz98b5hjdcq7b0fhlzx4hdh414i")) |
| 6038 | (patches (search-patches "maxima-defsystem-mkdir.patch")))) |
| 6039 | (build-system gnu-build-system) |
| 6040 | (inputs |
| 6041 | (list bash-minimal |
| 6042 | gnuplot ;for plots |
| 6043 | sbcl |
| 6044 | sed |
| 6045 | tk)) ;Tcl/Tk is used by 'xmaxima' |
| 6046 | (native-inputs |
| 6047 | (list texinfo perl python)) |
| 6048 | (arguments |
| 6049 | (list |
| 6050 | #:configure-flags |
| 6051 | #~(list "--enable-sbcl" |
| 6052 | (string-append "--with-sbcl=" #$sbcl "/bin/sbcl") |
| 6053 | (string-append "--with-posix-shell=" #$bash-minimal "/bin/sh") |
| 6054 | (string-append "--with-wish=" #$tk "/bin/wish" |
| 6055 | #$(version-major+minor (package-version tk)))) |
| 6056 | ;; By default Maxima attempts to write temporary files to |
| 6057 | ;; '/tmp/nix-build-maxima-*', which won't exist at run time. |
| 6058 | ;; Work around that. |
| 6059 | #:make-flags #~(list "TMPDIR=/tmp") |
| 6060 | #:phases |
| 6061 | #~(modify-phases %standard-phases |
| 6062 | (add-after 'unpack 'patch-paths |
| 6063 | (lambda* (#:key inputs #:allow-other-keys) |
| 6064 | (let* ((sed (search-input-file inputs "/bin/sed")) |
| 6065 | (coreutils (assoc-ref inputs "coreutils")) |
| 6066 | (dirname (string-append coreutils "/bin/dirname")) |
| 6067 | (head (string-append coreutils "/bin/head")) |
| 6068 | (perl (search-input-file inputs "/bin/perl")) |
| 6069 | (python (search-input-file inputs "/bin/python3"))) |
| 6070 | (substitute* "src/maxima.in" |
| 6071 | (("sed ") (string-append sed " ")) |
| 6072 | (("dirname") dirname) |
| 6073 | (("head") head)) |
| 6074 | (substitute* "doc/info/Makefile.in" |
| 6075 | (("/usr/bin/env perl") perl)) |
| 6076 | (substitute* "doc/info/build_html.sh.in" |
| 6077 | (("python") python))))) |
| 6078 | (add-before 'check 'pre-check |
| 6079 | (lambda _ |
| 6080 | (chmod "src/maxima" #o555))) |
| 6081 | (replace 'check |
| 6082 | (lambda _ |
| 6083 | ;; This is derived from the testing code in the "debian/rules" file |
| 6084 | ;; of Debian's Maxima package. |
| 6085 | ;; If Maxima can successfully run this, the binary to be installed |
| 6086 | ;; should be fine. |
| 6087 | (invoke "sh" "-c" |
| 6088 | (string-append |
| 6089 | "./maxima-local " |
| 6090 | "--lisp=sbcl " |
| 6091 | "--batch-string=\"run_testsuite();\" " |
| 6092 | "| grep -q \"No unexpected errors found\"")))) |
| 6093 | ;; Make sure the doc and emacs files are found in the |
| 6094 | ;; standard location. Also configure maxima to find gnuplot |
| 6095 | ;; without having it on the PATH. |
| 6096 | (add-after 'install 'post-install |
| 6097 | (lambda* (#:key outputs inputs #:allow-other-keys) |
| 6098 | (let* ((gnuplot (assoc-ref inputs "gnuplot")) |
| 6099 | (out (assoc-ref outputs "out")) |
| 6100 | (datadir (string-append out "/share/maxima/" #$version)) |
| 6101 | (binutils (dirname (search-input-file inputs "/bin/as")))) |
| 6102 | (with-directory-excursion out |
| 6103 | (mkdir-p "share/emacs") |
| 6104 | (mkdir-p "share/doc") |
| 6105 | (symlink |
| 6106 | (string-append datadir "/doc/") |
| 6107 | (string-append out "/share/doc/maxima")) |
| 6108 | (with-atomic-file-replacement |
| 6109 | (string-append datadir "/share/maxima-init.lisp") |
| 6110 | (lambda (in out) |
| 6111 | (format out "~a ~s~a~%" |
| 6112 | "(setf $gnuplot_command " |
| 6113 | (string-append gnuplot "/bin/gnuplot") ")") |
| 6114 | (dump-port in out)))) |
| 6115 | ;; Ensure that Maxima will have access to the GNU binutils |
| 6116 | ;; components at runtime. |
| 6117 | (wrap-program (string-append out "/bin/maxima") |
| 6118 | `("PATH" prefix (#$binutils)))))) |
| 6119 | ;; The Maxima command ‘describe’ allows picking the relevant portions |
| 6120 | ;; from Maxima’s Texinfo docs. However it does not support reading |
| 6121 | ;; gzipped info files. |
| 6122 | (delete 'compress-documentation)))) |
| 6123 | (home-page "https://maxima.sourceforge.io") |
| 6124 | (synopsis "Numeric and symbolic expression manipulation") |
| 6125 | (description "Maxima is a system for the manipulation of symbolic and |
| 6126 | numerical expressions. It yields high precision numeric results by using |
| 6127 | exact fractions, arbitrary precision integers, and variable precision floating |
| 6128 | point numbers.") |
| 6129 | ;; Some files are lgpl2.1+. Some are gpl2+. Some explicitly state gpl1+. |
| 6130 | ;; Others simply say "GNU General Public License" without stating a |
| 6131 | ;; version (which implicitly means gpl1+). |
| 6132 | ;; At least one file (src/maxima.asd) says "version 2." |
| 6133 | ;; GPLv2 only is therefore the smallest subset. |
| 6134 | (license license:gpl2))) |
| 6135 | |
| 6136 | (define-public maxima-ecl |
| 6137 | (package/inherit maxima |
| 6138 | (name "maxima-ecl") |
| 6139 | (properties '((hidden? . #t))) |
| 6140 | (inputs |
| 6141 | (modify-inputs inputs |
| 6142 | (delete "sbcl") |
| 6143 | (prepend ecl))) |
| 6144 | (arguments |
| 6145 | (substitute-keyword-arguments arguments |
| 6146 | ((#:configure-flags flags) |
| 6147 | #~(list "--enable-ecl")) |
| 6148 | ((#:phases phases) |
| 6149 | #~(modify-phases #$phases |
| 6150 | (add-after 'install 'install-lib |
| 6151 | (lambda _ |
| 6152 | (let ((lib (string-append |
| 6153 | #$output "/lib/maxima/" |
| 6154 | #$(package-version this-package) |
| 6155 | "/binary-ecl"))) |
| 6156 | (install-file "src/binary-ecl/maxima.fas" lib)))) |
| 6157 | (replace 'check |
| 6158 | (lambda _ |
| 6159 | (invoke "sh" "-c" |
| 6160 | (string-append |
| 6161 | "./maxima-local " |
| 6162 | "--lisp=ecl " |
| 6163 | "--batch-string=\"run_testsuite();\" " |
| 6164 | "| grep -q \"No unexpected errors found\"")))))))) |
| 6165 | (description |
| 6166 | (string-append |
| 6167 | (package-description maxima) |
| 6168 | " This package variant uses ECL as the underlying Lisp |
| 6169 | implementation.")))) |
| 6170 | |
| 6171 | (define-public wxmaxima |
| 6172 | (package |
| 6173 | (name "wxmaxima") |
| 6174 | (version "25.04.0") |
| 6175 | (source (origin |
| 6176 | (method git-fetch) |
| 6177 | (uri (git-reference |
| 6178 | (url "https://github.com/wxMaxima-developers/wxmaxima") |
| 6179 | (commit (string-append "Version-" version)))) |
| 6180 | (file-name (git-file-name name version)) |
| 6181 | (sha256 |
| 6182 | (base32 |
| 6183 | "0m8sk02cmiqxqlcw8rcljyinwajn5hvj5ldf3xr5v1asq1mvck00")))) |
| 6184 | (build-system cmake-build-system) |
| 6185 | (native-inputs (list gettext-minimal)) |
| 6186 | (inputs (list bash-minimal |
| 6187 | wxwidgets |
| 6188 | maxima |
| 6189 | ;; Runtime support. |
| 6190 | adwaita-icon-theme |
| 6191 | gtk+ |
| 6192 | shared-mime-info)) |
| 6193 | (arguments |
| 6194 | `(#:tests? #f ; tests fail non-deterministically |
| 6195 | #:phases |
| 6196 | (modify-phases %standard-phases |
| 6197 | (add-after 'unpack 'patch-doc-path |
| 6198 | (lambda _ |
| 6199 | ;; Don't look in share/doc/wxmaxima-xx.xx.x for the |
| 6200 | ;; documentation. Only licensing information is placed there by |
| 6201 | ;; Guix. |
| 6202 | (substitute* "src/Dirstructure.cpp" |
| 6203 | (("/doc/wxmaxima-\\%s") |
| 6204 | "/doc/wxmaxima")))) |
| 6205 | (add-after 'install 'wrap-program |
| 6206 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 6207 | (wrap-program (string-append (assoc-ref outputs "out") |
| 6208 | "/bin/wxmaxima") |
| 6209 | `("PATH" ":" prefix |
| 6210 | (,(string-append (assoc-ref inputs "maxima") |
| 6211 | "/bin"))) |
| 6212 | ;; For GtkFileChooserDialog. |
| 6213 | `("GSETTINGS_SCHEMA_DIR" = |
| 6214 | (,(string-append (assoc-ref inputs "gtk+") |
| 6215 | "/share/glib-2.0/schemas"))) |
| 6216 | `("XDG_DATA_DIRS" ":" prefix |
| 6217 | ( ;; Needed by gdk-pixbuf to know supported icon formats. |
| 6218 | ,(string-append (assoc-ref inputs "shared-mime-info") |
| 6219 | "/share") |
| 6220 | ;; The default icon theme of GTK+. |
| 6221 | ,(string-append (assoc-ref inputs "adwaita-icon-theme") |
| 6222 | "/share"))))))))) |
| 6223 | (home-page "https://wxmaxima-developers.github.io/wxmaxima/") |
| 6224 | (synopsis |
| 6225 | "Graphical user interface for the Maxima computer algebra system") |
| 6226 | (description |
| 6227 | "wxMaxima is a graphical user interface for the Maxima computer algebra |
| 6228 | system. It eases the use of Maxima by making most of its commands available |
| 6229 | through a menu system and by providing input dialogs for commands that require |
| 6230 | more than one argument. It also implements its own display engine that |
| 6231 | outputs mathematical symbols directly instead of depicting them with ASCII |
| 6232 | characters. |
| 6233 | |
| 6234 | wxMaxima also features 2D and 3D inline plots, simple animations, mixing of |
| 6235 | text and mathematical calculations to create documents, exporting of input and |
| 6236 | output to TeX, and a browser for Maxima's manual including command index and |
| 6237 | full text searching.") |
| 6238 | (license license:gpl2+))) |
| 6239 | |
| 6240 | (define-public armadillo |
| 6241 | (package |
| 6242 | (name "armadillo") |
| 6243 | (version "12.4.2") |
| 6244 | (source (origin |
| 6245 | (method url-fetch) |
| 6246 | (uri (string-append "mirror://sourceforge/arma/armadillo-" |
| 6247 | version ".tar.xz")) |
| 6248 | (sha256 |
| 6249 | (base32 |
| 6250 | "150fcl2cca3ks91ahgr32jw0ww8lc8ng84mczfab7clvigqpdnpv")))) |
| 6251 | (build-system cmake-build-system) |
| 6252 | (arguments |
| 6253 | `(#:tests? #f ; no test target |
| 6254 | #:configure-flags '("-DOPENBLAS_PROVIDES_LAPACK=ON"))) |
| 6255 | (inputs |
| 6256 | (list openblas arpack-ng)) |
| 6257 | (home-page "https://arma.sourceforge.net/") |
| 6258 | (synopsis "C++ linear algebra library") |
| 6259 | (description |
| 6260 | "Armadillo is a C++ linear algebra library, aiming towards a good balance |
| 6261 | between speed and ease of use. It is useful for algorithm development |
| 6262 | directly in C++, or quick conversion of research code into production |
| 6263 | environments. It can be used for machine learning, pattern recognition, |
| 6264 | signal processing, bioinformatics, statistics, econometrics, etc. The library |
| 6265 | provides efficient classes for vectors, matrices and cubes, as well as 150+ |
| 6266 | associated functions (e.g., contiguous and non-contiguous submatrix views).") |
| 6267 | (license license:asl2.0))) |
| 6268 | |
| 6269 | (define-public muparser |
| 6270 | (package |
| 6271 | (name "muparser") |
| 6272 | (version "2.3.5") |
| 6273 | (source |
| 6274 | (origin |
| 6275 | (method git-fetch) |
| 6276 | (uri (git-reference |
| 6277 | (url "https://github.com/beltoforion/muparser") |
| 6278 | (commit (string-append "v" version)))) |
| 6279 | (file-name (git-file-name name version)) |
| 6280 | (sha256 |
| 6281 | (base32 "0zazg6awbfimjlf7352frps47ykpn7z0kz5q686xni7nka0g2k88")))) |
| 6282 | (build-system cmake-build-system) |
| 6283 | (home-page "https://beltoforion.de/en/muparser") |
| 6284 | (synopsis "Fast parser library for mathematical expressions") |
| 6285 | (description |
| 6286 | "muParser is an extensible high performance math parser library. It is |
| 6287 | based on transforming an expression into a bytecode and precalculating constant |
| 6288 | parts of it.") |
| 6289 | (license license:expat))) |
| 6290 | |
| 6291 | (define-public openblas |
| 6292 | (package |
| 6293 | (name "openblas") |
| 6294 | (version "0.3.31") |
| 6295 | (source |
| 6296 | (origin |
| 6297 | (method git-fetch) |
| 6298 | (uri (git-reference |
| 6299 | (url "https://github.com/OpenMathLib/OpenBLAS") |
| 6300 | (commit (string-append "v" version)))) |
| 6301 | (file-name (git-file-name name version)) |
| 6302 | (sha256 |
| 6303 | (base32 |
| 6304 | "1ifbbk4mg4ykm92i9b09wwbcwpyzlfzn8lhds8f3p7cbcga7q530")))) |
| 6305 | ;; To build the package, we can either rely on a preset Makefile, or |
| 6306 | ;; generate a new one through a CMake configuration. |
| 6307 | ;; We choose the first option, so we delete the configure phase and we set |
| 6308 | ;; the build system to gnu-build-system to build the package through the |
| 6309 | ;; 'make' command. |
| 6310 | (build-system gnu-build-system) |
| 6311 | (arguments |
| 6312 | (list |
| 6313 | ;; Set the test target (but tests are indeed already run in the build |
| 6314 | ;; phase, which calls 'make -C test all'). |
| 6315 | #:test-target "test" |
| 6316 | ;; No default baseline is supplied for powerpc-linux. |
| 6317 | #:substitutable? (not (target-ppc32?)) |
| 6318 | #:make-flags |
| 6319 | #~(list (string-append "PREFIX=" #$output) |
| 6320 | "CFLAGS=-O3" ; optimization flags |
| 6321 | "FFLAGS=-O3" ; optimization flags |
| 6322 | "SHELL=bash" |
| 6323 | "DEBUG=1" ; enable debug symbols -g |
| 6324 | "MAKE_NB_JOBS=0" ; use jobserver for submakes |
| 6325 | "NO_STATIC=1" ; avoid a 67 MiB static archive |
| 6326 | |
| 6327 | ;; This is the maximum number of threads OpenBLAS will ever use |
| 6328 | ;; (that is, if $OPENBLAS_NUM_THREADS is greater than that, then |
| 6329 | ;; NUM_THREADS is used.) If we don't set it, the makefile sets |
| 6330 | ;; it to the number of cores of the build machine, which is |
| 6331 | ;; obviously wrong. |
| 6332 | "NUM_THREADS=128" |
| 6333 | |
| 6334 | ;; OpenMP support prevents deadlocks when multithreaded Openblas |
| 6335 | ;; is called from an OpenMP parallel region and takes care of |
| 6336 | ;; deactivating threads when necessary. See |
| 6337 | ;; http://www.openmathlib.org/OpenBLAS/docs/faq/#using-openblas-with-openmp |
| 6338 | ;; for more details. |
| 6339 | "USE_OPENMP=1" |
| 6340 | |
| 6341 | ;; DYNAMIC_ARCH is only supported on some architectures. |
| 6342 | ;; DYNAMIC_ARCH combined with TARGET=GENERIC provides a library |
| 6343 | ;; which uses the optimizations for the detected CPU. This can |
| 6344 | ;; be overridden at runtime with the environment variable |
| 6345 | ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU |
| 6346 | ;; type. On other architectures we target only the baseline CPU |
| 6347 | ;; supported by Guix. |
| 6348 | #$@(cond |
| 6349 | ((or (target-x86-64?) |
| 6350 | (target-x86-32?) |
| 6351 | (target-ppc64le?) |
| 6352 | (target-aarch64?)) |
| 6353 | ;; Dynamic older enables a few extra CPU architectures |
| 6354 | ;; on x86_64 that were released before 2010. |
| 6355 | '("DYNAMIC_ARCH=1" "DYNAMIC_OLDER=1" "TARGET=GENERIC")) |
| 6356 | ;; On some of these architectures the CPU type can't be detected. |
| 6357 | ;; We list the oldest CPU core we want to have support for. |
| 6358 | ;; On MIPS we force the "SICORTEX" TARGET, as for the other |
| 6359 | ;; two available MIPS targets special extended instructions |
| 6360 | ;; for Loongson cores are used. |
| 6361 | ((target-mips64el?) |
| 6362 | '("TARGET=SICORTEX")) |
| 6363 | ((target-arm32?) |
| 6364 | '("TARGET=ARMV7")) |
| 6365 | ((target-riscv64?) |
| 6366 | '("TARGET=RISCV64_GENERIC")) |
| 6367 | (else '()))) |
| 6368 | #:phases |
| 6369 | #~(modify-phases %standard-phases |
| 6370 | ;; Skip configure phase since we rely on a preset Makefile. |
| 6371 | (delete 'configure) |
| 6372 | ;; Get libgfortran found when building in utest. |
| 6373 | (add-before 'build 'set-extralib |
| 6374 | (lambda* (#:key inputs #:allow-other-keys) |
| 6375 | (setenv "FEXTRALIB" |
| 6376 | (string-append |
| 6377 | "-L" |
| 6378 | (dirname |
| 6379 | (search-input-file inputs |
| 6380 | "/lib/libgfortran.so")))))) |
| 6381 | #$@(if (target-hurd?) |
| 6382 | #~((add-after 'unpack 'do-not-use-syscall-on-hurd |
| 6383 | (lambda _ |
| 6384 | (let ((patch |
| 6385 | #$(local-file |
| 6386 | (search-patch |
| 6387 | "openblas-do-not-use-syscall-on-hurd.patch")))) |
| 6388 | (invoke "patch" "--force" "-p1" "-i" patch))))) |
| 6389 | '())))) |
| 6390 | (inputs |
| 6391 | (list `(,gfortran "lib"))) |
| 6392 | (native-inputs |
| 6393 | (list cunit gfortran perl)) |
| 6394 | (outputs '("out" "debug")) |
| 6395 | (home-page "https://www.openblas.net/") |
| 6396 | (synopsis "Optimized BLAS library based on GotoBLAS") |
| 6397 | (description |
| 6398 | "OpenBLAS is a Basic Linear Algebra Subprograms (BLAS) library forked |
| 6399 | from the GotoBLAS2-1.13 BSD version.") |
| 6400 | (license license:bsd-3))) |
| 6401 | |
| 6402 | (define-public openblas-ilp64 |
| 6403 | (package/inherit openblas |
| 6404 | (name "openblas-ilp64") |
| 6405 | (supported-systems %64bit-supported-systems) |
| 6406 | (arguments |
| 6407 | (substitute-keyword-arguments arguments |
| 6408 | ((#:make-flags flags #~'()) |
| 6409 | ;; These should be '64' but julia hardcodes '64_'. |
| 6410 | #~(append (list "INTERFACE64=1" |
| 6411 | "SYMBOLSUFFIX=64_" |
| 6412 | "LIBPREFIX=libopenblas64_") |
| 6413 | #$flags)))) |
| 6414 | (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)") |
| 6415 | (license license:bsd-3))) |
| 6416 | |
| 6417 | (define-public libblastrampoline |
| 6418 | (package |
| 6419 | (name "libblastrampoline") |
| 6420 | (version "5.1.1") |
| 6421 | (source |
| 6422 | (origin |
| 6423 | (method git-fetch) |
| 6424 | (uri (git-reference |
| 6425 | (url "https://github.com/JuliaLinearAlgebra/libblastrampoline") |
| 6426 | (commit (string-append "v" version)))) |
| 6427 | (file-name (git-file-name name version)) |
| 6428 | (sha256 |
| 6429 | (base32 |
| 6430 | "0mf79zw11kxyil72y2ly5x8bbz3ng3nsqmp0zcps16b69wvfs19c")))) |
| 6431 | (build-system gnu-build-system) |
| 6432 | (arguments |
| 6433 | `(#:make-flags (list "-C" "src" |
| 6434 | (string-append "prefix=" (assoc-ref %outputs "out")) |
| 6435 | (string-append "CC=" ,(cc-for-target))) |
| 6436 | #:tests? #f ; No check target. |
| 6437 | #:phases |
| 6438 | (modify-phases %standard-phases |
| 6439 | (delete 'configure)))) |
| 6440 | (home-page "https://github.com/JuliaLinearAlgebra/libblastrampoline") |
| 6441 | (synopsis "PLT trampolines to provide a BLAS and LAPACK demuxing library") |
| 6442 | (description |
| 6443 | "This package uses PLT trampolines to provide a BLAS and LAPACK demuxing |
| 6444 | library.") |
| 6445 | (license license:expat))) |
| 6446 | |
| 6447 | (define-public palp |
| 6448 | (package |
| 6449 | (name "palp") |
| 6450 | (version "2.21") |
| 6451 | (source (origin |
| 6452 | (method url-fetch) |
| 6453 | (uri (string-append |
| 6454 | "http://hep.itp.tuwien.ac.at/~kreuzer/CY/palp/palp-" |
| 6455 | version ".tar.gz")) |
| 6456 | (sha256 |
| 6457 | (base32 |
| 6458 | "1myxjv0jxgr9acchwnjh9g5l61wxwiva3q6c1d6892lr37r7njky")))) |
| 6459 | (build-system gnu-build-system) |
| 6460 | (arguments |
| 6461 | (list #:make-flags #~(list (string-append "CC=" #$(cc-for-target))) |
| 6462 | #:tests? #f ; no tests |
| 6463 | #:phases #~(modify-phases %standard-phases |
| 6464 | (delete 'configure) |
| 6465 | (replace 'install |
| 6466 | (lambda _ |
| 6467 | (for-each |
| 6468 | (lambda (name) |
| 6469 | (install-file name (string-append #$output "/bin"))) |
| 6470 | '("class.x" "cws.x" "mori.x" "nef.x" "poly.x"))))))) |
| 6471 | (home-page "http://hep.itp.tuwien.ac.at/~kreuzer/CY/CYpalp.html") |
| 6472 | (synopsis "Package for Analyzing Lattice Polytopes") |
| 6473 | (description |
| 6474 | "PALP is a set of programs for calculations with lattice polytopes and |
| 6475 | applications to toric geometry.") |
| 6476 | (license license:gpl3))) |
| 6477 | |
| 6478 | (define-public blis |
| 6479 | (package |
| 6480 | (name "blis") |
| 6481 | (version "0.9.0") |
| 6482 | (home-page "https://github.com/flame/blis") |
| 6483 | (source (origin |
| 6484 | (method git-fetch) |
| 6485 | (uri (git-reference (url home-page) (commit version))) |
| 6486 | (sha256 |
| 6487 | (base32 |
| 6488 | "14v2awhxma6nzas42hq97702672f2njrskqhsv9kl23hvrvci8fm")) |
| 6489 | (file-name (git-file-name "blis" version)))) |
| 6490 | (native-inputs |
| 6491 | (list python perl)) |
| 6492 | (build-system gnu-build-system) |
| 6493 | (arguments |
| 6494 | (list |
| 6495 | #:configure-flags #~'("--enable-cblas") |
| 6496 | #:modules |
| 6497 | '((guix build gnu-build-system) |
| 6498 | (guix build utils) |
| 6499 | (srfi srfi-1)) |
| 6500 | #:test-target "test" |
| 6501 | #:phases |
| 6502 | #~(modify-phases %standard-phases |
| 6503 | (replace 'configure |
| 6504 | (lambda* (#:key outputs target system (configure-flags '()) |
| 6505 | #:allow-other-keys) |
| 6506 | ;; This is a home-made 'configure' script. |
| 6507 | (let* (;; Guix-specific support for choosing the configuration |
| 6508 | ;; via #:configure-flags: see below for details. |
| 6509 | (config-flag-prefix "--blis-config=") |
| 6510 | (maybe-config-flag (find |
| 6511 | (lambda (s) |
| 6512 | (string-prefix? config-flag-prefix s)) |
| 6513 | configure-flags)) |
| 6514 | (configure-flags (if maybe-config-flag |
| 6515 | (delete maybe-config-flag |
| 6516 | configure-flags) |
| 6517 | configure-flags)) |
| 6518 | ;; Select the "configuration" to build. |
| 6519 | ;; The "generic" configuration is non-optimized but |
| 6520 | ;; portable (no assembly). |
| 6521 | ;; The "x86_64" configuration family includes |
| 6522 | ;; sub-configurations for all supported |
| 6523 | ;; x86_64 microarchitectures. |
| 6524 | ;; BLIS currently lacks runtime hardware detection |
| 6525 | ;; for other architectures: see |
| 6526 | ;; <https://github.com/flame/blis/commit/c534da6>. |
| 6527 | ;; Conservatively, we stick to "generic" on armhf, |
| 6528 | ;; aarch64, and ppc64le for now. (But perhaps |
| 6529 | ;; "power9", "cortexa9", and "cortexa57" might be |
| 6530 | ;; general enough to use?) |
| 6531 | ;; Another approach would be to use the "auto" |
| 6532 | ;; configuration and make this package |
| 6533 | ;; non-substitutable. |
| 6534 | ;; The build is fairly intensive, though. |
| 6535 | (blis-config |
| 6536 | (cond |
| 6537 | (maybe-config-flag |
| 6538 | (substring maybe-config-flag |
| 6539 | (string-length config-flag-prefix))) |
| 6540 | ((string-prefix? "x86_64" (or target system)) |
| 6541 | "x86_64") |
| 6542 | (else |
| 6543 | "generic"))) |
| 6544 | (configure-args |
| 6545 | `("-p" ,#$output |
| 6546 | "-d" "opt" |
| 6547 | "--disable-static" |
| 6548 | "--enable-shared" |
| 6549 | "--enable-threading=openmp" |
| 6550 | "--enable-verbose-make" |
| 6551 | ,@configure-flags |
| 6552 | ,blis-config))) |
| 6553 | (format #t "configure args: ~s~%" configure-args) |
| 6554 | (apply invoke |
| 6555 | "./configure" |
| 6556 | configure-args)))) |
| 6557 | (add-before 'check 'show-test-output |
| 6558 | (lambda _ |
| 6559 | ;; By default "make check" is silent. Make it verbose. |
| 6560 | (system "tail -F output.testsuite &")))))) |
| 6561 | (synopsis "High-performance basic linear algebra (BLAS) routines") |
| 6562 | (description |
| 6563 | "BLIS is a portable software framework for instantiating high-performance |
| 6564 | BLAS-like dense linear algebra libraries. The framework was designed to |
| 6565 | isolate essential kernels of computation that, when optimized, immediately |
| 6566 | enable optimized implementations of most of its commonly used and |
| 6567 | computationally intensive operations. While BLIS exports a new BLAS-like API, |
| 6568 | it also includes a BLAS compatibility layer which gives application developers |
| 6569 | access to BLIS implementations via traditional BLAS routine calls.") |
| 6570 | (license license:bsd-3))) |
| 6571 | |
| 6572 | (define ignorance blis) |
| 6573 | |
| 6574 | (define-public openlibm |
| 6575 | (package |
| 6576 | (name "openlibm") |
| 6577 | (version "0.8.7") |
| 6578 | (source |
| 6579 | (origin |
| 6580 | (method git-fetch) |
| 6581 | (uri (git-reference |
| 6582 | (url "https://github.com/JuliaLang/openlibm") |
| 6583 | (commit (string-append "v" version)))) |
| 6584 | (file-name (git-file-name name version)) |
| 6585 | (sha256 |
| 6586 | (base32 "0lgylmspyhsndfxzya9bymyz7vnah3197jylr497jgbm4b62q8bx")))) |
| 6587 | (build-system gnu-build-system) |
| 6588 | (arguments |
| 6589 | `(#:make-flags |
| 6590 | (list (string-append "prefix=" (assoc-ref %outputs "out")) |
| 6591 | ,(string-append "CC=" (cc-for-target))) |
| 6592 | #:phases |
| 6593 | ;; no configure script |
| 6594 | (modify-phases %standard-phases (delete 'configure)) |
| 6595 | #:tests? #f)) ;the tests are part of the default target |
| 6596 | (home-page "https://openlibm.org/") |
| 6597 | (synopsis "Portable C mathematical library (libm)") |
| 6598 | (description |
| 6599 | "OpenLibm is an effort to have a high quality, portable, standalone C |
| 6600 | mathematical library (libm). It can be used standalone in applications and |
| 6601 | programming language implementations. The project was born out of a need to |
| 6602 | have a good libm for the Julia programming language that worked consistently |
| 6603 | across compilers and operating systems, and in 32-bit and 64-bit |
| 6604 | environments.") |
| 6605 | ;; Each architecture has its own make target, and there is none for mips. |
| 6606 | (supported-systems (delete "mips64el-linux" %supported-systems)) |
| 6607 | ;; See LICENSE.md for details. |
| 6608 | (license (list license:expat |
| 6609 | license:isc |
| 6610 | license:bsd-2 |
| 6611 | license:public-domain |
| 6612 | license:lgpl2.1+)))) |
| 6613 | |
| 6614 | (define-public openspecfun |
| 6615 | (package |
| 6616 | (name "openspecfun") |
| 6617 | (version "0.5.3") |
| 6618 | (source |
| 6619 | (origin |
| 6620 | (method git-fetch) |
| 6621 | (uri (git-reference |
| 6622 | (url "https://github.com/JuliaLang/openspecfun") |
| 6623 | (commit (string-append "v" version)))) |
| 6624 | (file-name (git-file-name name version)) |
| 6625 | (sha256 |
| 6626 | (base32 "0pfw6l3ch7isz403llx7inxlvavqh01jh1hb9dpidi86sjjx9kfh")))) |
| 6627 | (build-system gnu-build-system) |
| 6628 | (arguments |
| 6629 | '(#:tests? #f ; no "check" target |
| 6630 | #:make-flags |
| 6631 | (list (string-append "prefix=" (assoc-ref %outputs "out"))) |
| 6632 | #:phases |
| 6633 | (modify-phases %standard-phases |
| 6634 | (delete 'configure)))) ; no configure script |
| 6635 | (inputs |
| 6636 | `(("fortran" ,gfortran))) |
| 6637 | (home-page "https://github.com/JuliaLang/openspecfun") |
| 6638 | (synopsis "Collection of special mathematical functions") |
| 6639 | (description |
| 6640 | "Openspecfun provides AMOS and Faddeeva. AMOS (from Netlib) is a |
| 6641 | portable package for Bessel Functions of a Complex Argument and Nonnegative |
| 6642 | Order; it contains subroutines for computing Bessel functions and Airy |
| 6643 | functions. Faddeeva allows computing the various error functions of arbitrary |
| 6644 | complex arguments (Faddeeva function, error function, complementary error |
| 6645 | function, scaled complementary error function, imaginary error function, and |
| 6646 | Dawson function); given these, one can also easily compute Voigt functions, |
| 6647 | Fresnel integrals, and similar related functions as well.") |
| 6648 | ;; Faddeeva is released under the Expat license; AMOS is included as |
| 6649 | ;; public domain software. |
| 6650 | (license (list license:expat license:public-domain)))) |
| 6651 | |
| 6652 | (define-public osqp |
| 6653 | (package |
| 6654 | (name "osqp") |
| 6655 | (version "1.0.0") |
| 6656 | (source |
| 6657 | (origin |
| 6658 | (method git-fetch) |
| 6659 | (uri (git-reference |
| 6660 | (url "https://github.com/osqp/osqp") |
| 6661 | (commit (string-append "v" version)))) |
| 6662 | (file-name (git-file-name name version)) |
| 6663 | (sha256 |
| 6664 | (base32 "15n86mc232m04w8n38fx3pqam4y0swx7hcy4klhch7bk6avk5q04")))) |
| 6665 | (build-system cmake-build-system) |
| 6666 | (arguments |
| 6667 | (list |
| 6668 | #:configure-flags |
| 6669 | #~(list "-DOSQP_BUILD_UNITTESTS=ON" |
| 6670 | "-DOSQP_BUILD_SHARED_LIB=ON") |
| 6671 | #:phases |
| 6672 | #~(modify-phases %standard-phases |
| 6673 | (add-after 'unpack 'fix-qdldl-source-location |
| 6674 | (lambda _ |
| 6675 | (substitute* "algebra/_common/lin_sys/qdldl/qdldl.cmake" |
| 6676 | (("Fetching/configuring QDLDL solver") |
| 6677 | (format #f "Adding/configuring QDLDL solver from: ~a" |
| 6678 | #$(package-source |
| 6679 | (this-package-native-input "qdldl")))) |
| 6680 | (("GIT_REPOSITORY https://github.com/osqp/qdldl\\.git") |
| 6681 | (format #f "SOURCE_DIR ~a" |
| 6682 | #$(package-source |
| 6683 | (this-package-native-input "qdldl")))) |
| 6684 | (("GIT_TAG v0.1.8") |
| 6685 | "")))) |
| 6686 | (add-after 'unpack 'fix-catch2-source-location |
| 6687 | (lambda _ |
| 6688 | (substitute* "tests/CMakeLists.txt" |
| 6689 | (("GIT_REPOSITORY https://github.com/catchorg/Catch2\\.git") |
| 6690 | (format #f "SOURCE_DIR ~a" |
| 6691 | #$(package-source |
| 6692 | (this-package-native-input "catch2")))) |
| 6693 | (("GIT_TAG v2.13.6") |
| 6694 | ""))))))) |
| 6695 | (native-inputs |
| 6696 | (list catch2-2 |
| 6697 | python-wrapper ;You need python installed to generate unittests. |
| 6698 | python-numpy ;You need numpy ... |
| 6699 | python-scipy ;You need scipy ... |
| 6700 | qdldl)) |
| 6701 | (home-page "https://osqp.org/") |
| 6702 | (synopsis "Operator Splitting QP Solver") |
| 6703 | (description |
| 6704 | "The OSQP (Operator Splitting Quadratic Program) solver is a numerical |
| 6705 | optimization package for solving convex quadratic programs. |
| 6706 | |
| 6707 | It uses a custom ADMM-based first-order method requiring only a single matrix |
| 6708 | factorization in the setup phase. All the other operations are extremely |
| 6709 | cheap. It also implements custom sparse linear algebra routines exploiting |
| 6710 | structures in the problem data.") |
| 6711 | (license license:asl2.0))) |
| 6712 | |
| 6713 | (define %suitesparse-package-versions |
| 6714 | '(("AMD" . "3.3.3") |
| 6715 | ("BTF" . "2.3.2") |
| 6716 | ("CAMD" . "3.3.3") |
| 6717 | ("CCOLAMD" . "3.3.4") |
| 6718 | ("CHOLMOD" . "5.3.2") |
| 6719 | ("COLAMD" . "3.3.4") |
| 6720 | ("CXSparse" . "4.4.1") |
| 6721 | ("KLU" . "2.3.5") |
| 6722 | ("LDL" . "3.3.2") |
| 6723 | ("SuiteSparse_Mongoose" . "3.3.4") |
| 6724 | ("RBio" . "4.3.4") |
| 6725 | ("SPEX" . "3.2.3") |
| 6726 | ("SPQR" . "4.3.4") |
| 6727 | ("UMFPACK" . "6.3.5"))) |
| 6728 | |
| 6729 | ;; Source for the modular SuiteSparse packages. When updating, also update the |
| 6730 | ;; (different) versions of the subpackages. |
| 6731 | (define suitesparse-version "7.10.2") |
| 6732 | (define suitesparse-source |
| 6733 | (origin |
| 6734 | (method git-fetch) |
| 6735 | (uri (git-reference |
| 6736 | (url "https://github.com/DrTimothyAldenDavis/SuiteSparse") |
| 6737 | (commit (string-append "v" suitesparse-version)))) |
| 6738 | (file-name (git-file-name "suitesparse" suitesparse-version)) |
| 6739 | (sha256 |
| 6740 | (base32 |
| 6741 | "1ndwx2cp5zxrikq4xdrzjrxk1b5ps7lyi6qw34m8jpfpa0ba01ln")) |
| 6742 | (modules '((guix build utils))) |
| 6743 | (snippet |
| 6744 | #~(begin |
| 6745 | ;; Empty except for a .gitignore. |
| 6746 | (delete-file-recursively "build") |
| 6747 | ;; Delete autogenerated and bundled files |
| 6748 | (for-each delete-file (find-files "." "\\.pdf$")) |
| 6749 | ;; ssget |
| 6750 | (delete-file-recursively "ssget") |
| 6751 | ;; SuiteSparse_config |
| 6752 | (delete-file "SuiteSparse_config/SuiteSparse_config.h") |
| 6753 | ;; CHOLMOD |
| 6754 | (delete-file-recursively "CHOLMOD/SuiteSparse_metis") |
| 6755 | ; GraphBLAS |
| 6756 | (delete-file "GraphBLAS/README.md") |
| 6757 | (delete-file "GraphBLAS/Config/GB_prejit.c") |
| 6758 | (delete-file-recursively "GraphBLAS/cpu_features") |
| 6759 | (delete-file-recursively "GraphBLAS/lz4/lz4.c") |
| 6760 | (delete-file-recursively "GraphBLAS/lz4/lz4.h") |
| 6761 | (delete-file-recursively "GraphBLAS/lz4/lz4hc.c") |
| 6762 | (delete-file-recursively "GraphBLAS/lz4/lz4hc.h") |
| 6763 | (delete-file "GraphBLAS/Tcov/PreJIT/GB_prejit.c") |
| 6764 | (delete-file "GraphBLAS/xxHash/xxhash.h") |
| 6765 | (delete-file-recursively "GraphBLAS/zstd/zstd_subset") |
| 6766 | ;; KLU |
| 6767 | (delete-file "KLU/Include/klu.h") |
| 6768 | (delete-file "KLU/Doc/klu_version.tex") |
| 6769 | ;; LDL |
| 6770 | (delete-file "LDL/Include/ldl.h") |
| 6771 | (delete-file "LDL/Doc/ldl_version.tex") |
| 6772 | ;; RBio |
| 6773 | (delete-file "RBio/Include/RBio.h") |
| 6774 | ;; SPEX |
| 6775 | (delete-file "SPEX/Include/SPEX.h") |
| 6776 | (delete-file "SPEX/Doc/SPEX_version.tex") |
| 6777 | ;; SPQR |
| 6778 | (delete-file "SPQR/Include/SuiteSparseQR_definitions.h") |
| 6779 | (delete-file "SPQR/Doc/spqr_version.tex") |
| 6780 | ;; UMFPACK |
| 6781 | (delete-file "UMFPACK/Include/umfpack.h") |
| 6782 | (delete-file "UMFPACK/Doc/umfpack_version.tex"))))) |
| 6783 | |
| 6784 | (define-public suitesparse-config |
| 6785 | (package |
| 6786 | (name "suitesparse-config") |
| 6787 | (version suitesparse-version) |
| 6788 | (source suitesparse-source) |
| 6789 | (build-system cmake-build-system) |
| 6790 | (arguments |
| 6791 | (list |
| 6792 | #:tests? #f |
| 6793 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6794 | #:phases |
| 6795 | #~(modify-phases %standard-phases |
| 6796 | (add-after 'unpack 'chdir |
| 6797 | (lambda _ |
| 6798 | (chdir "SuiteSparse_config")))))) |
| 6799 | (inputs (list openblas)) |
| 6800 | (native-inputs (list pkg-config)) |
| 6801 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6802 | (synopsis "Configuration for all SuiteSparse packages") |
| 6803 | (description "SuiteSparse is a suite of sparse matrix algorithms. This |
| 6804 | package contains a library with common configuration options.") |
| 6805 | (license license:bsd-3))) |
| 6806 | |
| 6807 | (define-public suitesparse-amd |
| 6808 | (package |
| 6809 | (name "suitesparse-amd") |
| 6810 | (version (assoc-ref %suitesparse-package-versions "AMD")) |
| 6811 | (source suitesparse-source) |
| 6812 | (build-system cmake-build-system) |
| 6813 | (arguments |
| 6814 | (list |
| 6815 | #:tests? #f |
| 6816 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6817 | #:phases |
| 6818 | #~(modify-phases %standard-phases |
| 6819 | (add-after 'unpack 'chdir |
| 6820 | (lambda _ |
| 6821 | (chdir "AMD"))) |
| 6822 | (add-after 'chdir 'set-cmake-module-path |
| 6823 | (lambda _ |
| 6824 | (substitute* "CMakeLists.txt" |
| 6825 | (("set.*CMAKE_MODULE_PATH.*") |
| 6826 | (string-append "set(CMAKE_MODULE_PATH " |
| 6827 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 6828 | "set(DUMMY\n"))))) |
| 6829 | (add-after 'build 'build-doc |
| 6830 | (lambda _ |
| 6831 | ;; Generating font shapes require a writable TEXMFVAR directory. |
| 6832 | (setenv "TEXMFVAR" "/tmp") |
| 6833 | (with-directory-excursion "../AMD/Doc" |
| 6834 | (invoke "make")))) |
| 6835 | ;; Required for suitesparse-umfpack |
| 6836 | (add-after 'install 'install-internal-header |
| 6837 | (lambda _ |
| 6838 | (install-file "../AMD/Include/amd_internal.h" |
| 6839 | (string-append #$output "/include")))) |
| 6840 | (add-after 'install-internal-header 'install-doc |
| 6841 | (lambda _ |
| 6842 | (install-file "../AMD/Doc/AMD_UserGuide.pdf" |
| 6843 | (string-append #$output "/share/doc/" |
| 6844 | #$name "-" #$version)))) |
| 6845 | (replace 'install-license-files |
| 6846 | (lambda _ |
| 6847 | (install-file "../AMD/Doc/License.txt" |
| 6848 | (string-append #$output "/share/doc/" |
| 6849 | #$name "-" #$version))))))) |
| 6850 | (propagated-inputs (list suitesparse-config)) |
| 6851 | (native-inputs (list gfortran (texlive-local-tree '()))) |
| 6852 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6853 | (synopsis "Sparse matrix ordering for Cholesky factorization") |
| 6854 | (description "AMD is a set of routines for ordering a sparse matrix prior |
| 6855 | to Cholesky factorization (or for LU factorization with diagonal pivoting).") |
| 6856 | (license license:bsd-3))) |
| 6857 | |
| 6858 | (define-public suitesparse-btf |
| 6859 | (package |
| 6860 | (name "suitesparse-btf") |
| 6861 | (version (assoc-ref %suitesparse-package-versions "BTF")) |
| 6862 | (source suitesparse-source) |
| 6863 | (build-system cmake-build-system) |
| 6864 | (arguments |
| 6865 | (list |
| 6866 | #:tests? #f |
| 6867 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6868 | #:phases |
| 6869 | #~(modify-phases %standard-phases |
| 6870 | (add-after 'unpack 'chdir |
| 6871 | (lambda _ |
| 6872 | (chdir "BTF"))) |
| 6873 | (add-after 'chdir 'set-cmake-module-path |
| 6874 | (lambda _ |
| 6875 | (substitute* "CMakeLists.txt" |
| 6876 | (("set.*CMAKE_MODULE_PATH.*") |
| 6877 | (string-append "set(CMAKE_MODULE_PATH " |
| 6878 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 6879 | "set(DUMMY\n"))))) |
| 6880 | (replace 'install-license-files |
| 6881 | (lambda _ |
| 6882 | (install-file "../BTF/Doc/License.txt" |
| 6883 | (string-append #$output "/share/doc/" |
| 6884 | #$name "-" #$version))))))) |
| 6885 | (propagated-inputs (list suitesparse-config)) |
| 6886 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6887 | (synopsis "Library for permuting matrices into block upper triangular form") |
| 6888 | (description "BTF (Block Triangular Form) is a C library for permuting a |
| 6889 | matrix into block upper triangular form.") |
| 6890 | (license license:lgpl2.1+))) |
| 6891 | |
| 6892 | (define-public suitesparse-camd |
| 6893 | (package |
| 6894 | (name "suitesparse-camd") |
| 6895 | (version (assoc-ref %suitesparse-package-versions "CAMD")) |
| 6896 | (source suitesparse-source) |
| 6897 | (build-system cmake-build-system) |
| 6898 | (arguments |
| 6899 | (list |
| 6900 | #:tests? #f |
| 6901 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6902 | #:phases |
| 6903 | #~(modify-phases %standard-phases |
| 6904 | (add-after 'unpack 'chdir |
| 6905 | (lambda _ |
| 6906 | (chdir "CAMD"))) |
| 6907 | (add-after 'chdir 'set-cmake-module-path |
| 6908 | (lambda _ |
| 6909 | (substitute* "CMakeLists.txt" |
| 6910 | (("set.*CMAKE_MODULE_PATH.*") |
| 6911 | (string-append "set(CMAKE_MODULE_PATH " |
| 6912 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 6913 | "set(DUMMY\n"))))) |
| 6914 | (add-after 'build 'build-doc |
| 6915 | (lambda _ |
| 6916 | ;; Generating font shapes require a writable TEXMFVAR directory. |
| 6917 | (setenv "TEXMFVAR" "/tmp") |
| 6918 | (with-directory-excursion "../CAMD/Doc" |
| 6919 | (invoke "make")))) |
| 6920 | (add-after 'install 'install-doc |
| 6921 | (lambda _ |
| 6922 | (install-file "../CAMD/Doc/CAMD_UserGuide.pdf" |
| 6923 | (string-append #$output "/share/doc/" |
| 6924 | #$name "-" #$version)))) |
| 6925 | (replace 'install-license-files |
| 6926 | (lambda _ |
| 6927 | (install-file "../CAMD/Doc/License.txt" |
| 6928 | (string-append #$output "/share/doc/" |
| 6929 | #$name "-" #$version))))))) |
| 6930 | (propagated-inputs (list suitesparse-config)) |
| 6931 | (native-inputs (list (texlive-local-tree '()))) |
| 6932 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6933 | (synopsis "Sparse matrix ordering for Cholesky factorization with constraints") |
| 6934 | (description "CAMD is a set of routines for ordering a sparse matrix prior |
| 6935 | to Cholesky factorization (or for LU factorization with diagonal pivoting). |
| 6936 | It is a variant of AMD which has the the option to apply constraints to the |
| 6937 | ordering.") |
| 6938 | (license license:bsd-3))) |
| 6939 | |
| 6940 | (define-public suitesparse-colamd |
| 6941 | (package |
| 6942 | (name "suitesparse-colamd") |
| 6943 | (version (assoc-ref %suitesparse-package-versions "COLAMD")) |
| 6944 | (source suitesparse-source) |
| 6945 | (build-system cmake-build-system) |
| 6946 | (arguments |
| 6947 | (list |
| 6948 | #:tests? #f |
| 6949 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6950 | #:phases |
| 6951 | #~(modify-phases %standard-phases |
| 6952 | (add-after 'unpack 'chdir |
| 6953 | (lambda _ |
| 6954 | (chdir "COLAMD"))) |
| 6955 | (add-after 'chdir 'set-cmake-module-path |
| 6956 | (lambda _ |
| 6957 | (substitute* "CMakeLists.txt" |
| 6958 | (("set.*CMAKE_MODULE_PATH.*") |
| 6959 | (string-append "set(CMAKE_MODULE_PATH " |
| 6960 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 6961 | "set(DUMMY\n"))))) |
| 6962 | (replace 'install-license-files |
| 6963 | (lambda _ |
| 6964 | (install-file "../COLAMD/Doc/License.txt" |
| 6965 | (string-append #$output "/share/doc/" |
| 6966 | #$name "-" #$version))))))) |
| 6967 | (propagated-inputs (list suitesparse-config)) |
| 6968 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 6969 | (synopsis "Column Approximate Minimum Degree Ordering") |
| 6970 | (description "COLAMD is library for computing a permutation vector for a |
| 6971 | matrix with which the LU factorization becomes sparser.") |
| 6972 | (license license:bsd-3))) |
| 6973 | |
| 6974 | (define-public suitesparse-ccolamd |
| 6975 | (package |
| 6976 | (name "suitesparse-ccolamd") |
| 6977 | (version (assoc-ref %suitesparse-package-versions "CCOLAMD")) |
| 6978 | (source suitesparse-source) |
| 6979 | (build-system cmake-build-system) |
| 6980 | (arguments |
| 6981 | (list |
| 6982 | #:tests? #f |
| 6983 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 6984 | #:phases |
| 6985 | #~(modify-phases %standard-phases |
| 6986 | (add-after 'unpack 'chdir |
| 6987 | (lambda _ |
| 6988 | (chdir "CCOLAMD"))) |
| 6989 | (add-after 'chdir 'set-cmake-module-path |
| 6990 | (lambda _ |
| 6991 | (substitute* "CMakeLists.txt" |
| 6992 | (("set.*CMAKE_MODULE_PATH.*") |
| 6993 | (string-append "set(CMAKE_MODULE_PATH " |
| 6994 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 6995 | "set(DUMMY\n"))))) |
| 6996 | (replace 'install-license-files |
| 6997 | (lambda _ |
| 6998 | (install-file "../CCOLAMD/Doc/License.txt" |
| 6999 | (string-append #$output "/share/doc/" |
| 7000 | #$name "-" #$version))))))) |
| 7001 | (propagated-inputs (list suitesparse-config)) |
| 7002 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7003 | (synopsis "Column Approximate Minimum Degree Ordering with constraints") |
| 7004 | (description "CCOLAMD is library for computing a permutation vector for a |
| 7005 | matrix with which the LU factorization becomes sparser. It is a variant of |
| 7006 | COLAMD which has the the option to apply constraints to the ordering.") |
| 7007 | (license license:bsd-3))) |
| 7008 | |
| 7009 | (define-public gklib-suitesparse |
| 7010 | (package/inherit gklib |
| 7011 | (name "gklib-suitesparse") |
| 7012 | (source (origin |
| 7013 | (inherit (package-source gklib)) |
| 7014 | (patches (cons |
| 7015 | (search-patch |
| 7016 | "gklib-suitesparse.patch") |
| 7017 | (origin-patches (package-source gklib)))))) |
| 7018 | (arguments |
| 7019 | (substitute-keyword-arguments arguments |
| 7020 | ((#:phases phases #~%standard-phases) |
| 7021 | #~(modify-phases #$phases |
| 7022 | (add-after 'unpack 'patch-cmake |
| 7023 | (lambda _ |
| 7024 | (substitute* "CMakeLists.txt" |
| 7025 | (("add_library\\(GKlib.*" all) |
| 7026 | (string-append |
| 7027 | all |
| 7028 | "target_link_libraries(GKlib PUBLIC" |
| 7029 | " ${SUITESPARSE_CONFIG_LIBRARIES} m)\n"))))))))) |
| 7030 | (propagated-inputs (list suitesparse-config)))) |
| 7031 | |
| 7032 | (define-public metis-suitesparse |
| 7033 | (package/inherit metis-5.2 |
| 7034 | (name "metis-suitesparse") |
| 7035 | (arguments |
| 7036 | (substitute-keyword-arguments (package-arguments metis-5.2) |
| 7037 | ((#:phases phases) |
| 7038 | #~(modify-phases #$phases |
| 7039 | (add-before 'prepare-cmake 'set-idxwidth |
| 7040 | (lambda _ |
| 7041 | (substitute* "Makefile" |
| 7042 | (("IDXWIDTH.*=.*") |
| 7043 | "IDXWIDTH = \"\\#define IDXTYPEWIDTH 64\"\n")))) |
| 7044 | (add-before 'prepare-cmake 'link-suitesparse-config |
| 7045 | (lambda _ |
| 7046 | (substitute* "programs/CMakeLists.txt" |
| 7047 | (("include_directories.*" all) |
| 7048 | (string-append |
| 7049 | all "find_package(SuiteSparse_config REQUIRED)\n")) |
| 7050 | (("(target_link_libraries.*)GKlib(.*)" _ start end) |
| 7051 | (string-append |
| 7052 | start "GKlib ${SUITESPARSE_CONFIG_LIBRARIES}" end))))))) |
| 7053 | ((#:configure-flags _) |
| 7054 | #~(list "-DSHARED=ON" |
| 7055 | (string-append "-DGKLIB_PATH=" #$gklib-suitesparse))))) |
| 7056 | (inputs (list suitesparse-config gklib-suitesparse)))) |
| 7057 | |
| 7058 | (define-public suitesparse-cholmod |
| 7059 | (package |
| 7060 | (name "suitesparse-cholmod") |
| 7061 | (version (assoc-ref %suitesparse-package-versions "CHOLMOD")) |
| 7062 | (source suitesparse-source) |
| 7063 | (build-system cmake-build-system) |
| 7064 | (arguments |
| 7065 | (list |
| 7066 | #:tests? #f |
| 7067 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7068 | #:phases |
| 7069 | #~(modify-phases %standard-phases |
| 7070 | (add-after 'unpack 'chdir |
| 7071 | (lambda _ |
| 7072 | (chdir "CHOLMOD"))) |
| 7073 | (add-after 'chdir 'set-cmake-module-path |
| 7074 | (lambda _ |
| 7075 | (substitute* "CMakeLists.txt" |
| 7076 | (("set.*CMAKE_MODULE_PATH.*") |
| 7077 | (string-append |
| 7078 | "set(CMAKE_MODULE_PATH " |
| 7079 | (string-join |
| 7080 | (map (lambda (path) |
| 7081 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7082 | (list #$suitesparse-amd |
| 7083 | #$suitesparse-camd |
| 7084 | #$suitesparse-ccolamd |
| 7085 | #$suitesparse-colamd |
| 7086 | #$suitesparse-config))) |
| 7087 | ")\nset(DUMMY\n")) |
| 7088 | (("add_subdirectory.*GPU.*") "\n") |
| 7089 | ((".*cmake_modules/FindCHOLMOD_CUDA.cmake.*") "\n")))) |
| 7090 | (add-after 'chdir 'use-external-metis |
| 7091 | (lambda _ |
| 7092 | (let ((port (open-file "CMakeLists.txt" "a"))) |
| 7093 | (display |
| 7094 | (string-append |
| 7095 | "find_library(METIS_LIBRARY NAME metis PATHS ENV LIBRARY_PATH) |
| 7096 | get_filename_component(METIS_LIBRARY ${METIS_LIBRARY} REALPATH) |
| 7097 | find_library(GKLIB_LIBRARY NAME GKlib PATHS ENV LIBRARY_PATH) |
| 7098 | get_filename_component(GKLIB_LIBRARY ${GKLIB_LIBRARY} REALPATH) |
| 7099 | target_link_libraries(CHOLMOD PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY}) |
| 7100 | target_link_libraries(CHOLMOD_static PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY})") |
| 7101 | port) |
| 7102 | (close-port port)) |
| 7103 | (delete-file "Partition/cholmod_metis_wrapper.c") |
| 7104 | (delete-file "Partition/cholmod_metis_wrapper.h") |
| 7105 | (substitute* "Partition/cholmod_metis.c" |
| 7106 | (("#include \"cholmod_metis_wrapper\\.h\"") "") |
| 7107 | (("#include \"SuiteSparse_metis/include/metis.h\"") |
| 7108 | "#include <metis.h>") |
| 7109 | (("SuiteSparse_metis_METIS") "METIS")))) |
| 7110 | (add-after 'build 'build-doc |
| 7111 | (lambda _ |
| 7112 | (setenv "TEXMFVAR" "/tmp") ;for font shapes generation |
| 7113 | (with-directory-excursion "../CHOLMOD/Doc" |
| 7114 | (invoke "make")))) |
| 7115 | (add-after 'install 'install-doc |
| 7116 | (lambda _ |
| 7117 | (install-file "../CHOLMOD/Doc/CHOLMOD_UserGuide.pdf" |
| 7118 | (string-append #$output "/share/doc/" |
| 7119 | #$name "-" #$version)))) |
| 7120 | (replace 'install-license-files |
| 7121 | (lambda _ |
| 7122 | (let ((out (string-append #$output |
| 7123 | "/share/doc/" #$name "-" #$version))) |
| 7124 | (install-file "../CHOLMOD/Doc/License.txt" out) |
| 7125 | (install-file "../CHOLMOD/Check/lesser.txt" out) |
| 7126 | (install-file "../CHOLMOD/MatrixOps/gpl.txt" out))))))) |
| 7127 | (inputs |
| 7128 | (list gklib-suitesparse |
| 7129 | metis-suitesparse |
| 7130 | openblas |
| 7131 | suitesparse-amd |
| 7132 | suitesparse-camd |
| 7133 | suitesparse-ccolamd |
| 7134 | suitesparse-colamd)) |
| 7135 | (propagated-inputs (list suitesparse-config)) |
| 7136 | (native-inputs (list (texlive-local-tree '()))) |
| 7137 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7138 | (synopsis "Library for solving sparse symmetric positive definite linear |
| 7139 | equations") |
| 7140 | (description "CHOLMOD is a set of routines for factorizing sparse symmetrix |
| 7141 | positive definite matrices, updating/downdating sparse Cholesky factorizations |
| 7142 | and other related operations.") |
| 7143 | (license (list license:gpl2+ license:lgpl2.1+)))) |
| 7144 | |
| 7145 | (define-public suitesparse-cxsparse |
| 7146 | (package |
| 7147 | (name "suitesparse-cxsparse") |
| 7148 | (version (assoc-ref %suitesparse-package-versions "CXSparse")) |
| 7149 | (source suitesparse-source) |
| 7150 | (build-system cmake-build-system) |
| 7151 | (arguments |
| 7152 | (list |
| 7153 | #:tests? #f |
| 7154 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7155 | #:phases |
| 7156 | #~(modify-phases %standard-phases |
| 7157 | (add-after 'unpack 'chdir |
| 7158 | (lambda _ |
| 7159 | (chdir "CXSparse"))) |
| 7160 | (add-after 'chdir 'set-cmake-module-path |
| 7161 | (lambda _ |
| 7162 | (substitute* "CMakeLists.txt" |
| 7163 | (("set.*CMAKE_MODULE_PATH.*") |
| 7164 | (string-append "set(CMAKE_MODULE_PATH " |
| 7165 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 7166 | "set(DUMMY\n"))))) |
| 7167 | (replace 'install-license-files |
| 7168 | (lambda _ |
| 7169 | (let ((out (string-append #$output |
| 7170 | "/share/doc/" #$name "-" #$version))) |
| 7171 | (install-file "../CXSparse/Doc/License.txt" out) |
| 7172 | (install-file "../CXSparse/Doc/lesser.txt" out))))))) |
| 7173 | (propagated-inputs (list suitesparse-config)) |
| 7174 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7175 | (synopsis "Concise eXtended Sparse Matrix Package") |
| 7176 | (description "CXSparse is a collection of sparse matrix algorithms for |
| 7177 | direct methods on both real and complex matrices.") |
| 7178 | (license license:lgpl2.1+))) |
| 7179 | |
| 7180 | (define-public suitesparse-klu |
| 7181 | (package |
| 7182 | (name "suitesparse-klu") |
| 7183 | (version (assoc-ref %suitesparse-package-versions "KLU")) |
| 7184 | (source suitesparse-source) |
| 7185 | (build-system cmake-build-system) |
| 7186 | (arguments |
| 7187 | (list |
| 7188 | #:tests? #f |
| 7189 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7190 | #:phases |
| 7191 | #~(modify-phases %standard-phases |
| 7192 | (add-after 'unpack 'chdir |
| 7193 | (lambda _ |
| 7194 | (chdir "KLU"))) |
| 7195 | (add-after 'chdir 'set-cmake-module-path |
| 7196 | (lambda _ |
| 7197 | (substitute* "CMakeLists.txt" |
| 7198 | (("set.*CMAKE_MODULE_PATH.*") |
| 7199 | (string-append |
| 7200 | "set(CMAKE_MODULE_PATH " |
| 7201 | (string-join |
| 7202 | (map (lambda (path) |
| 7203 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7204 | (list #$suitesparse-amd |
| 7205 | #$suitesparse-btf |
| 7206 | #$suitesparse-camd |
| 7207 | #$suitesparse-ccolamd |
| 7208 | #$suitesparse-cholmod |
| 7209 | #$suitesparse-colamd |
| 7210 | #$suitesparse-config))) |
| 7211 | ")\nset(DUMMY\n"))))) |
| 7212 | (add-after 'build 'build-doc |
| 7213 | (lambda _ |
| 7214 | (substitute* "../KLU/Doc/Makefile" |
| 7215 | (("\\.\\./\\.\\./BTF/Include/btf.h") |
| 7216 | (string-append #$suitesparse-btf "/include/btf.h"))) |
| 7217 | (setenv "TEXMFVAR" "/tmp") ;for generating font shapes |
| 7218 | (with-directory-excursion "../KLU/Doc" |
| 7219 | (invoke "make")))) |
| 7220 | (add-after 'install 'install-doc |
| 7221 | (lambda _ |
| 7222 | (install-file "../KLU/Doc/KLU_UserGuide.pdf" |
| 7223 | (string-append #$output "/share/doc/" |
| 7224 | #$name "-" #$version)))) |
| 7225 | (replace 'install-license-files |
| 7226 | (lambda _ |
| 7227 | (install-file "../KLU/Doc/License.txt" |
| 7228 | (string-append #$output "/share/doc/" |
| 7229 | #$name "-" #$version))))))) |
| 7230 | (inputs |
| 7231 | (list suitesparse-camd |
| 7232 | suitesparse-ccolamd |
| 7233 | suitesparse-colamd |
| 7234 | suitesparse-config)) |
| 7235 | (propagated-inputs |
| 7236 | (list suitesparse-amd |
| 7237 | suitesparse-btf |
| 7238 | suitesparse-cholmod)) |
| 7239 | (native-inputs (list (texlive-local-tree '()))) |
| 7240 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7241 | (synopsis "Routines for solving sparse linear problems with a LU factorization") |
| 7242 | (description "KLU is a method for computing the LU factorization of sparse |
| 7243 | for real and complex matrices.") |
| 7244 | (license license:lgpl2.1+))) |
| 7245 | |
| 7246 | (define-public suitesparse-ldl |
| 7247 | (package |
| 7248 | (name "suitesparse-ldl") |
| 7249 | (version (assoc-ref %suitesparse-package-versions "LDL")) |
| 7250 | (source suitesparse-source) |
| 7251 | (build-system cmake-build-system) |
| 7252 | (arguments |
| 7253 | (list |
| 7254 | #:tests? #f |
| 7255 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7256 | #:phases |
| 7257 | #~(modify-phases %standard-phases |
| 7258 | (add-after 'unpack 'chdir |
| 7259 | (lambda _ |
| 7260 | (chdir "LDL"))) |
| 7261 | (add-after 'chdir 'set-cmake-module-path |
| 7262 | (lambda _ |
| 7263 | (substitute* "CMakeLists.txt" |
| 7264 | (("set.*CMAKE_MODULE_PATH.*") |
| 7265 | (string-append |
| 7266 | "set(CMAKE_MODULE_PATH " |
| 7267 | (string-join |
| 7268 | (map (lambda (path) |
| 7269 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7270 | (list #$suitesparse-amd |
| 7271 | #$suitesparse-config))) |
| 7272 | ")\nset(DUMMY\n"))))) |
| 7273 | (add-after 'build 'build-doc |
| 7274 | (lambda _ |
| 7275 | (substitute* "../LDL/Doc/Makefile" |
| 7276 | (("\\.\\./\\.\\./BTF/Include/btf.h") |
| 7277 | (string-append #$suitesparse-btf "/include/btf.h"))) |
| 7278 | (setenv "TEXMFVAR" "/tmp") ;for font shape generation |
| 7279 | (with-directory-excursion "../LDL/Doc" |
| 7280 | (invoke "make")))) |
| 7281 | (add-after 'install 'install-doc |
| 7282 | (lambda _ |
| 7283 | (install-file "../LDL/Doc/ldl_userguide.pdf" |
| 7284 | (string-append #$output "/share/doc/" |
| 7285 | #$name "-" #$version)))) |
| 7286 | (replace 'install-license-files |
| 7287 | (lambda _ |
| 7288 | (install-file "../LDL/Doc/License.txt" |
| 7289 | (string-append #$output "/share/doc/" |
| 7290 | #$name "-" #$version))))))) |
| 7291 | (inputs (list suitesparse-amd)) |
| 7292 | (propagated-inputs (list suitesparse-config)) |
| 7293 | (native-inputs (list (texlive-local-tree '()))) |
| 7294 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7295 | (synopsis "LDL' factorization method for sparse, symmetric matrices") |
| 7296 | (description "This package contains a set of routines for computing the |
| 7297 | LDL' factorization of sparse, symmetric matrices. Its focus lies on concise |
| 7298 | code.") |
| 7299 | (license license:lgpl2.1+))) |
| 7300 | |
| 7301 | (define-public suitesparse-rbio |
| 7302 | (package |
| 7303 | (name "suitesparse-rbio") |
| 7304 | (version (assoc-ref %suitesparse-package-versions "RBio")) |
| 7305 | (source suitesparse-source) |
| 7306 | (build-system cmake-build-system) |
| 7307 | (arguments |
| 7308 | (list |
| 7309 | #:tests? #f |
| 7310 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7311 | #:phases |
| 7312 | #~(modify-phases %standard-phases |
| 7313 | (add-after 'unpack 'chdir |
| 7314 | (lambda _ |
| 7315 | (chdir "RBio"))) |
| 7316 | (add-after 'chdir 'set-cmake-module-path |
| 7317 | (lambda _ |
| 7318 | (substitute* "CMakeLists.txt" |
| 7319 | (("set.*CMAKE_MODULE_PATH.*") |
| 7320 | (string-append |
| 7321 | "set(CMAKE_MODULE_PATH " |
| 7322 | (string-join |
| 7323 | (map (lambda (path) |
| 7324 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7325 | (list #$suitesparse-config))) |
| 7326 | ")\nset(DUMMY\n"))))) |
| 7327 | (replace 'install-license-files |
| 7328 | (lambda _ |
| 7329 | (let ((out (string-append #$output |
| 7330 | "/share/doc/" #$name "-" #$version))) |
| 7331 | (install-file "../RBio/Doc/License.txt" out) |
| 7332 | (install-file "../RBio/Doc/gpl.txt" out))))))) |
| 7333 | (propagated-inputs (list suitesparse-config)) |
| 7334 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7335 | (synopsis "Library for the Rutherford/Boeing sparse matrix format") |
| 7336 | (description "This package provides the C library of RBio. It can be used |
| 7337 | for reading and writing sparse matrices in the Rutherford/Boeing format.") |
| 7338 | (license license:gpl2+))) |
| 7339 | |
| 7340 | (define-public suitesparse-mongoose |
| 7341 | (package |
| 7342 | (name "suitesparse-mongoose") |
| 7343 | (version (assoc-ref %suitesparse-package-versions "SuiteSparse_Mongoose")) |
| 7344 | (source suitesparse-source) |
| 7345 | (build-system cmake-build-system) |
| 7346 | (arguments |
| 7347 | (list |
| 7348 | #:tests? #f |
| 7349 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7350 | #:phases |
| 7351 | #~(modify-phases %standard-phases |
| 7352 | (add-after 'unpack 'chdir |
| 7353 | (lambda _ |
| 7354 | (chdir "Mongoose"))) |
| 7355 | (add-after 'chdir 'set-cmake-module-path |
| 7356 | (lambda _ |
| 7357 | (substitute* "CMakeLists.txt" |
| 7358 | (("set.*CMAKE_MODULE_PATH.*") |
| 7359 | (string-append "set(CMAKE_MODULE_PATH " |
| 7360 | #$suitesparse-config "/lib/cmake/SuiteSparse)\n" |
| 7361 | "set(DUMMY\n"))))) |
| 7362 | (add-after 'build 'build-doc |
| 7363 | (lambda _ |
| 7364 | ;; A writable TEXMFVAR is required for building font shapes. |
| 7365 | (setenv "TEXMFVAR" "/tmp") |
| 7366 | ;; XeLaTeX fails with .eps graphics |
| 7367 | (with-directory-excursion "../Mongoose/Doc" |
| 7368 | (for-each |
| 7369 | (lambda (name) |
| 7370 | (invoke "epstopdf" name)) |
| 7371 | (find-files "Figures" "\\.eps$")) |
| 7372 | (substitute* "Mongoose_UserGuide.tex" |
| 7373 | (("\\.eps") ".pdf")) |
| 7374 | (invoke "make")))) |
| 7375 | (add-after 'install 'install-doc |
| 7376 | (lambda _ |
| 7377 | (install-file "../Mongoose/Doc/Mongoose_UserGuide.pdf" |
| 7378 | (string-append #$output "/share/doc/" |
| 7379 | #$name "-" #$version)))) |
| 7380 | (replace 'install-license-files |
| 7381 | (lambda _ |
| 7382 | (install-file "../Mongoose/Doc/License.txt" |
| 7383 | (string-append #$output "/share/doc/" |
| 7384 | #$name "-" #$version))))))) |
| 7385 | (propagated-inputs (list suitesparse-config)) |
| 7386 | (native-inputs |
| 7387 | (list texlive-epstopdf |
| 7388 | (texlive-local-tree |
| 7389 | (list texlive-algorithmicx |
| 7390 | texlive-booktabs |
| 7391 | texlive-lastpage |
| 7392 | texlive-multirow |
| 7393 | texlive-pgf |
| 7394 | texlive-caption |
| 7395 | texlive-etoolbox |
| 7396 | texlive-csquotes |
| 7397 | texlive-fancybox |
| 7398 | texlive-enumitem |
| 7399 | texlive-microtype |
| 7400 | texlive-cancel |
| 7401 | texlive-sourcecodepro |
| 7402 | texlive-xkeyval |
| 7403 | texlive-fontspec |
| 7404 | texlive-wasy |
| 7405 | texlive-wasysym |
| 7406 | texlive-float |
| 7407 | texlive-tcolorbox |
| 7408 | texlive-environ |
| 7409 | texlive-xcolor |
| 7410 | texlive-xetex |
| 7411 | texlive-listings)))) |
| 7412 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7413 | (synopsis "Graph partitioning library") |
| 7414 | (description "Mongoose is a library for graph partitioning by computing |
| 7415 | edge cuts using a coarsening and refinement framework.") |
| 7416 | (license license:gpl3))) |
| 7417 | |
| 7418 | (define-public suitesparse-spex |
| 7419 | (package |
| 7420 | (name "suitesparse-spex") |
| 7421 | (version (assoc-ref %suitesparse-package-versions "SPEX")) |
| 7422 | (source suitesparse-source) |
| 7423 | (build-system cmake-build-system) |
| 7424 | (arguments |
| 7425 | (list |
| 7426 | #:tests? #f |
| 7427 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7428 | #:phases |
| 7429 | #~(modify-phases %standard-phases |
| 7430 | (add-after 'unpack 'chdir |
| 7431 | (lambda _ |
| 7432 | (chdir "SPEX"))) |
| 7433 | (add-after 'chdir 'set-cmake-module-path |
| 7434 | (lambda _ |
| 7435 | (substitute* "CMakeLists.txt" |
| 7436 | (("set.*CMAKE_MODULE_PATH.*") |
| 7437 | (string-append |
| 7438 | "set(CMAKE_MODULE_PATH " |
| 7439 | (string-join |
| 7440 | (map (lambda (path) |
| 7441 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7442 | (list #$suitesparse-amd |
| 7443 | #$suitesparse-colamd |
| 7444 | #$suitesparse-config))) |
| 7445 | ")\nset(DUMMY\n"))))) |
| 7446 | (add-after 'build 'build-doc |
| 7447 | (lambda _ |
| 7448 | (setenv "TEXMFVAR" "/tmp") ;for font shapes generation |
| 7449 | (with-directory-excursion "../SPEX/Doc" |
| 7450 | (invoke "make")))) |
| 7451 | (add-after 'install 'install-doc |
| 7452 | (lambda _ |
| 7453 | (install-file "../SPEX/Doc/SPEX_UserGuide.pdf" |
| 7454 | (string-append #$output "/share/doc/" |
| 7455 | #$name "-" #$version))))))) |
| 7456 | (inputs (list suitesparse-amd suitesparse-colamd)) |
| 7457 | (propagated-inputs (list gmp mpfr suitesparse-config)) |
| 7458 | (native-inputs |
| 7459 | (list (texlive-local-tree |
| 7460 | (list texlive-paralist |
| 7461 | texlive-comment |
| 7462 | texlive-psfrag |
| 7463 | texlive-soul |
| 7464 | texlive-multirow |
| 7465 | texlive-algorithms |
| 7466 | texlive-fncychap |
| 7467 | texlive-float |
| 7468 | texlive-algorithmicx |
| 7469 | texlive-cprotect |
| 7470 | texlive-bigfoot |
| 7471 | texlive-caption |
| 7472 | texlive-listings |
| 7473 | texlive-xcolor |
| 7474 | texlive-framed |
| 7475 | texlive-mdframed |
| 7476 | texlive-etoolbox |
| 7477 | texlive-zref |
| 7478 | texlive-needspace)))) |
| 7479 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7480 | (synopsis "Package for SParse EXact algebra") |
| 7481 | (description "SPEX is a set of routines for sparse exact linear algebra. |
| 7482 | It contains the SPEX Left LU library for computing a sparse exact left-looking |
| 7483 | LU factorization for solving unsymmetric sparse linear systems.") |
| 7484 | ;; Dual licensed. |
| 7485 | (license (list license:lgpl3+ license:gpl2+)))) |
| 7486 | |
| 7487 | (define-public suitesparse-spqr |
| 7488 | (package |
| 7489 | (name "suitesparse-spqr") |
| 7490 | (version (assoc-ref %suitesparse-package-versions "SPQR")) |
| 7491 | (source suitesparse-source) |
| 7492 | (build-system cmake-build-system) |
| 7493 | (arguments |
| 7494 | (list |
| 7495 | #:tests? #f |
| 7496 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7497 | #:phases |
| 7498 | #~(modify-phases %standard-phases |
| 7499 | (add-after 'unpack 'chdir |
| 7500 | (lambda _ |
| 7501 | (chdir "SPQR"))) |
| 7502 | (add-after 'chdir 'set-cmake-module-path |
| 7503 | (lambda _ |
| 7504 | (substitute* "CMakeLists.txt" |
| 7505 | (("set.*CMAKE_MODULE_PATH.*") |
| 7506 | (string-append |
| 7507 | "set(CMAKE_MODULE_PATH " |
| 7508 | (string-join |
| 7509 | (map (lambda (path) |
| 7510 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7511 | (list #$suitesparse-amd |
| 7512 | #$suitesparse-camd |
| 7513 | #$suitesparse-ccolamd |
| 7514 | #$suitesparse-cholmod |
| 7515 | #$suitesparse-colamd |
| 7516 | #$suitesparse-config))) |
| 7517 | ")\nset(DUMMY\n"))))) |
| 7518 | (add-after 'build 'build-doc |
| 7519 | (lambda _ |
| 7520 | (setenv "TEXMFVAR" "/tmp") ;for generating font shapes |
| 7521 | (with-directory-excursion "../SPQR/Doc" |
| 7522 | (invoke "make")))) |
| 7523 | (add-after 'install 'install-doc |
| 7524 | (lambda _ |
| 7525 | (install-file "../SPQR/Doc/spqr_user_guide.pdf" |
| 7526 | (string-append #$output "/share/doc/" |
| 7527 | #$name "-" #$version)))) |
| 7528 | (replace 'install-license-files |
| 7529 | (lambda _ |
| 7530 | (install-file "../SPQR/Doc/License.txt" |
| 7531 | (string-append #$output "/share/doc/" |
| 7532 | #$name "-" #$version))))))) |
| 7533 | (inputs (list openblas |
| 7534 | suitesparse-amd |
| 7535 | suitesparse-camd |
| 7536 | suitesparse-ccolamd |
| 7537 | suitesparse-colamd |
| 7538 | suitesparse-config)) |
| 7539 | (propagated-inputs (list suitesparse-cholmod)) |
| 7540 | (native-inputs |
| 7541 | (list (texlive-local-tree |
| 7542 | (list texlive-epsf |
| 7543 | texlive-etoolbox)))) |
| 7544 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7545 | (synopsis "Sparse QR factorization method") |
| 7546 | (description "The SPQR (SuiteSparseQR) package provides sparse QR |
| 7547 | factorization based on the multifrontal method, using BLAS for the frontal |
| 7548 | matrices.") |
| 7549 | (license license:gpl2+))) |
| 7550 | |
| 7551 | (define-public suitesparse-umfpack |
| 7552 | (package |
| 7553 | (name "suitesparse-umfpack") |
| 7554 | (version (assoc-ref %suitesparse-package-versions "UMFPACK")) |
| 7555 | (source suitesparse-source) |
| 7556 | (build-system cmake-build-system) |
| 7557 | (arguments |
| 7558 | (list |
| 7559 | #:tests? #f |
| 7560 | #:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=") |
| 7561 | #:phases |
| 7562 | #~(modify-phases %standard-phases |
| 7563 | (add-after 'unpack 'chdir |
| 7564 | (lambda _ |
| 7565 | (chdir "UMFPACK"))) |
| 7566 | (add-after 'chdir 'set-cmake-module-path |
| 7567 | (lambda _ |
| 7568 | (substitute* "CMakeLists.txt" |
| 7569 | (("set.*CMAKE_MODULE_PATH.*") |
| 7570 | (string-append |
| 7571 | "set(CMAKE_MODULE_PATH " |
| 7572 | (string-join |
| 7573 | (map (lambda (path) |
| 7574 | (string-append path "/lib/cmake/SuiteSparse")) |
| 7575 | (list #$suitesparse-amd |
| 7576 | #$suitesparse-camd |
| 7577 | #$suitesparse-ccolamd |
| 7578 | #$suitesparse-cholmod |
| 7579 | #$suitesparse-colamd |
| 7580 | #$suitesparse-config))) |
| 7581 | ")\nset(DUMMY\n"))))) |
| 7582 | (add-after 'build 'build-doc |
| 7583 | (lambda _ |
| 7584 | (setenv "TEXMFVAR" "/tmp") ;for generating font shapes |
| 7585 | (with-directory-excursion "../UMFPACK/Doc" |
| 7586 | (invoke "make")))) |
| 7587 | (add-after 'install 'install-doc |
| 7588 | (lambda _ |
| 7589 | (let ((outdir |
| 7590 | (string-append #$output "/share/doc/" |
| 7591 | #$name "-" #$version))) |
| 7592 | (install-file "../UMFPACK/Doc/UMFPACK_UserGuide.pdf" outdir) |
| 7593 | (install-file "../UMFPACK/Doc/UMFPACK_QuickStart.pdf" outdir)))) |
| 7594 | (replace 'install-license-files |
| 7595 | (lambda _ |
| 7596 | (let ((outdir |
| 7597 | (string-append #$output "/share/doc/" |
| 7598 | #$name "-" #$version))) |
| 7599 | (install-file "../UMFPACK/Doc/License.txt" outdir) |
| 7600 | (install-file "../UMFPACK/Doc/gpl.txt" outdir))))))) |
| 7601 | (inputs (list openblas |
| 7602 | suitesparse-camd |
| 7603 | suitesparse-ccolamd |
| 7604 | suitesparse-cholmod |
| 7605 | suitesparse-colamd)) |
| 7606 | (propagated-inputs |
| 7607 | (list suitesparse-amd |
| 7608 | suitesparse-config)) |
| 7609 | (native-inputs |
| 7610 | (list (texlive-local-tree |
| 7611 | (list texlive-etoolbox |
| 7612 | texlive-framed |
| 7613 | texlive-mdframed |
| 7614 | texlive-needspace |
| 7615 | texlive-xcolor |
| 7616 | texlive-zref)))) |
| 7617 | (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") |
| 7618 | (synopsis "Routines for solving sparse linear problems via LU factorization") |
| 7619 | (description "UMFPACK is a set of routines for solving unsymmetric sparse |
| 7620 | linear systems using the Unsymmetric MultiFrontal method and direct sparse LU |
| 7621 | factorization.") |
| 7622 | (license license:gpl2+))) |
| 7623 | |
| 7624 | (define-public suitesparse |
| 7625 | (package |
| 7626 | (name "suitesparse") |
| 7627 | (version "5.13.0") |
| 7628 | (source |
| 7629 | (origin |
| 7630 | (method git-fetch) |
| 7631 | (uri (git-reference |
| 7632 | (url "https://github.com/DrTimothyAldenDavis/SuiteSparse") |
| 7633 | (commit (string-append "v" version)))) |
| 7634 | (file-name (git-file-name name version)) |
| 7635 | (sha256 |
| 7636 | (base32 |
| 7637 | "1zwri246yr39p9ymjp18dzv36ch0dn107sf0jghj7capigasfxq2")) |
| 7638 | (patches (search-patches "suitesparse-mongoose-cmake.patch")) |
| 7639 | (modules '((guix build utils))) |
| 7640 | (snippet |
| 7641 | ;; Remove bundled metis source |
| 7642 | '(begin |
| 7643 | (delete-file-recursively "metis-5.1.0") |
| 7644 | #t)))) |
| 7645 | (build-system gnu-build-system) |
| 7646 | (arguments |
| 7647 | (list |
| 7648 | #:tests? #f ;no "check" target |
| 7649 | #:make-flags |
| 7650 | #~(list (string-append "CC=" #$(cc-for-target)) |
| 7651 | "TBB=-ltbb" |
| 7652 | "MY_METIS_LIB=-lmetis" |
| 7653 | |
| 7654 | ;; The default is to link against netlib lapack. Use OpenBLAS |
| 7655 | ;; instead. |
| 7656 | "BLAS=-lopenblas" |
| 7657 | "LAPACK=-lopenblas" |
| 7658 | |
| 7659 | ;; Flags for cmake (required to build GraphBLAS and Mongoose) |
| 7660 | (string-append |
| 7661 | "CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX=" #$output |
| 7662 | " -DCMAKE_VERBOSE_MAKEFILE=ON" |
| 7663 | " -DCMAKE_C_FLAGS_RELEASE=\"$(CFLAGS) $(CPPFLAGS)\"" |
| 7664 | " -DCMAKE_CXX_FLAGS_RELEASE=\"$(CXXFLAGS) $(CPPFLAGS)\"" |
| 7665 | " -DCMAKE_SKIP_RPATH=TRUE" |
| 7666 | " -DCMAKE_BUILD_TYPE=Release" |
| 7667 | " -DCMAKE_INSTALL_LIBDIR=lib") |
| 7668 | (string-append "INSTALL_LIB=" #$output "/lib") |
| 7669 | (string-append "INSTALL_INCLUDE=" #$output "/include") |
| 7670 | "library") |
| 7671 | #:phases |
| 7672 | #~(modify-phases %standard-phases |
| 7673 | #$@(if (target-riscv64?) |
| 7674 | ;; GraphBLAS FTBFS on riscv64-linux |
| 7675 | #~((add-after 'unpack 'skip-graphblas |
| 7676 | (lambda _ |
| 7677 | (substitute* "Makefile" |
| 7678 | ((".*cd GraphBLAS.*") |
| 7679 | "") |
| 7680 | (("metisinstall gbinstall moninstall") |
| 7681 | "metisinstall moninstall"))))) |
| 7682 | #~()) |
| 7683 | (delete 'configure)))) ;no configure script |
| 7684 | (inputs |
| 7685 | (list tbb openblas gmp mpfr metis)) |
| 7686 | (native-inputs |
| 7687 | (list cmake-minimal m4)) |
| 7688 | (home-page "https://faculty.cse.tamu.edu/davis/suitesparse.html") |
| 7689 | (synopsis "Suite of sparse matrix software") |
| 7690 | (description |
| 7691 | "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK, |
| 7692 | multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR, |
| 7693 | multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit |
| 7694 | simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and |
| 7695 | CXSparse, a concise sparse Cholesky factorization package; and many other |
| 7696 | packages. |
| 7697 | |
| 7698 | This package contains all of the above-mentioned parts. |
| 7699 | ") |
| 7700 | ;; LGPLv2.1+: |
| 7701 | ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL |
| 7702 | ;; GPLv2+: |
| 7703 | ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK |
| 7704 | (license (list license:gpl2+ license:lgpl2.1+)))) |
| 7705 | |
| 7706 | (define-public cglm |
| 7707 | (package |
| 7708 | (name "cglm") |
| 7709 | (version "0.9.6") |
| 7710 | (source |
| 7711 | (origin |
| 7712 | (method git-fetch) |
| 7713 | (uri (git-reference |
| 7714 | (url "https://github.com/recp/cglm") |
| 7715 | (commit (string-append "v" version)))) |
| 7716 | (file-name (git-file-name name version)) |
| 7717 | (sha256 |
| 7718 | (base32 "1b04zdypa8clhpzg95h8m8xjylk8y5pw9kfn4jv19qlz5bsz183i")))) |
| 7719 | (build-system meson-build-system) |
| 7720 | (arguments |
| 7721 | `(#:configure-flags '("-Dbuild_tests=true"))) |
| 7722 | (home-page "https://github.com/recp/cglm") |
| 7723 | (synopsis "Mathematics C library for graphics programming") |
| 7724 | (description |
| 7725 | "@acronym{CGLM, C OpenGL Mathematics} is an optimised 3D maths library |
| 7726 | for graphics software based on the @acronym{GLSL, OpenGL Shading Language} |
| 7727 | specifications. |
| 7728 | |
| 7729 | It's similar to the original C++ GLM library but written in C99 and compatible |
| 7730 | with C89.") |
| 7731 | (license license:expat))) |
| 7732 | |
| 7733 | (define-public glm |
| 7734 | (package |
| 7735 | (name "glm") |
| 7736 | (version "1.0.1") |
| 7737 | (source |
| 7738 | (origin |
| 7739 | (method git-fetch) |
| 7740 | (uri (git-reference |
| 7741 | (url "https://github.com/g-truc/glm") |
| 7742 | (commit version))) |
| 7743 | (file-name (git-file-name name version)) |
| 7744 | (sha256 |
| 7745 | (base32 "0890rvv3czi3nqj11dc2m3wcdfv0dm0nr63wfcpfikk9sk6b4w8s")))) |
| 7746 | (build-system cmake-build-system) |
| 7747 | (arguments |
| 7748 | (list |
| 7749 | #:phases |
| 7750 | #~(modify-phases %standard-phases |
| 7751 | (add-after 'install 'post-install |
| 7752 | (lambda _ |
| 7753 | (let* ((doc (string-append #$output "/share/doc/glm")) |
| 7754 | (pkgconfig (string-append #$output "/lib/pkgconfig"))) |
| 7755 | (mkdir-p doc) |
| 7756 | (mkdir-p pkgconfig) |
| 7757 | (copy-recursively "../source/doc/api" (string-append doc "/html")) |
| 7758 | (install-file "../source/doc/manual.pdf" doc) |
| 7759 | (call-with-output-file (string-append pkgconfig "/glm.pc") |
| 7760 | (lambda (port) |
| 7761 | (format port |
| 7762 | "prefix=~a |
| 7763 | includedir=${prefix}/include |
| 7764 | |
| 7765 | Name: GLM |
| 7766 | Description: OpenGL Mathematics |
| 7767 | Version: ~a |
| 7768 | Cflags: -I${includedir}~%" #$output #$version))))))))) |
| 7769 | (native-inputs |
| 7770 | (list unzip)) |
| 7771 | (home-page "https://glm.g-truc.net/") |
| 7772 | (synopsis "OpenGL Mathematics library") |
| 7773 | (description "OpenGL Mathematics (GLM) is a header-only C++ mathematics |
| 7774 | library for graphics software based on the OpenGL Shading Language (GLSL) |
| 7775 | specifications.") |
| 7776 | (license license:expat))) |
| 7777 | |
| 7778 | (define-public lpsolve |
| 7779 | (package |
| 7780 | (name "lpsolve") |
| 7781 | (version "5.5.2.5") |
| 7782 | (source |
| 7783 | (origin |
| 7784 | (method url-fetch) |
| 7785 | (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version |
| 7786 | "/lp_solve_" version "_source.tar.gz")) |
| 7787 | (sha256 |
| 7788 | (base32 |
| 7789 | "12pj1idjz31r7c2mb5w03vy1cmvycvbkx9z29s40qdmkp1i7q6i0")) |
| 7790 | (modules '((guix build utils))) |
| 7791 | (snippet |
| 7792 | '(begin |
| 7793 | (substitute* (list "lp_solve/ccc" "lpsolve55/ccc") |
| 7794 | (("^c=cc") "c=gcc") |
| 7795 | ;; Pretend to be on a 64 bit platform to obtain a common directory |
| 7796 | ;; name for the build results on all architectures; nothing else |
| 7797 | ;; seems to depend on it. |
| 7798 | (("^PLATFORM=.*$") "PLATFORM=ux64\n") |
| 7799 | |
| 7800 | ;; The check for 'isnan' as it is written fails with |
| 7801 | ;; "non-floating-point argument in call to function |
| 7802 | ;; ‘__builtin_isnan’", which leads to the 'NOISNAN' cpp macro |
| 7803 | ;; definition, which in turn leads to bad things. Fix the feature |
| 7804 | ;; test. |
| 7805 | (("isnan\\(0\\)") "isnan(0.)")) |
| 7806 | #t)))) |
| 7807 | (build-system gnu-build-system) |
| 7808 | (arguments |
| 7809 | `(#:tests? #f ; no check target |
| 7810 | #:phases |
| 7811 | (modify-phases %standard-phases |
| 7812 | (delete 'configure) ; no configure script |
| 7813 | (add-after 'unpack 'apply-gcc-14-patch |
| 7814 | (lambda _ |
| 7815 | (substitute* '("lpsolve55/ccc" |
| 7816 | "lp_solve/ccc") |
| 7817 | (("^c=gcc") "c=\"gcc -Wno-error=implicit-int\"")))) |
| 7818 | (replace 'build |
| 7819 | (lambda _ |
| 7820 | (with-directory-excursion "lpsolve55" |
| 7821 | (invoke "bash" "ccc")) |
| 7822 | (with-directory-excursion "lp_solve" |
| 7823 | (invoke "bash" "ccc")) |
| 7824 | #t)) |
| 7825 | (replace 'install |
| 7826 | (lambda* (#:key outputs #:allow-other-keys) |
| 7827 | (let* ((out (assoc-ref outputs "out")) |
| 7828 | (bin (string-append out "/bin")) |
| 7829 | (lib (string-append out "/lib")) |
| 7830 | ;; This is where LibreOffice expects to find the header |
| 7831 | ;; files, and where they are installed by Debian. |
| 7832 | (include (string-append out "/include/lpsolve"))) |
| 7833 | (install-file "lpsolve55/bin/ux64/liblpsolve55.a" lib) |
| 7834 | (install-file "lpsolve55/bin/ux64/liblpsolve55.so" lib) |
| 7835 | (install-file "lp_solve/bin/ux64/lp_solve" bin) |
| 7836 | |
| 7837 | ;; Install a subset of the header files as on Debian |
| 7838 | ;; (plus lp_bit.h, which matches the regular expression). |
| 7839 | (for-each (lambda (name) |
| 7840 | (install-file name include)) |
| 7841 | (find-files "." "lp_[HMSa-z].*\\.h$")) |
| 7842 | (with-directory-excursion "shared" |
| 7843 | (for-each (lambda (name) |
| 7844 | (install-file name include)) |
| 7845 | (find-files "." "\\.h$"))) |
| 7846 | #t)))))) |
| 7847 | (home-page "https://lpsolve.sourceforge.net/") |
| 7848 | (synopsis "Mixed integer linear programming (MILP) solver") |
| 7849 | (description |
| 7850 | "lp_solve is a mixed integer linear programming solver based on the |
| 7851 | revised simplex and the branch-and-bound methods.") |
| 7852 | (license license:lgpl2.1+))) |
| 7853 | |
| 7854 | (define-public dealii |
| 7855 | (package |
| 7856 | (name "dealii") |
| 7857 | (version "9.7.1") |
| 7858 | (source |
| 7859 | (origin |
| 7860 | (method url-fetch) |
| 7861 | (uri (string-append "https://github.com/dealii/dealii/releases/" |
| 7862 | "download/v" version "/dealii-" version ".tar.gz")) |
| 7863 | (sha256 |
| 7864 | (base32 "0hyyly71ljnb7fsl2yan7wf3zxhkly7i8gczpv7gsm6vhgprc80g")) |
| 7865 | (modules '((guix build utils))) |
| 7866 | (snippet |
| 7867 | ;; Remove bundled boost, Kokkos, muparser, TBB and UMFPACK. |
| 7868 | #~(delete-file-recursively "bundled")))) |
| 7869 | (build-system cmake-build-system) |
| 7870 | (outputs '("out" "doc")) |
| 7871 | (native-inputs |
| 7872 | ;; Required to build the documentation. |
| 7873 | (list graphviz doxygen perl)) |
| 7874 | (inputs |
| 7875 | (list arpack-ng |
| 7876 | openblas |
| 7877 | gfortran |
| 7878 | muparser |
| 7879 | taskflow |
| 7880 | zlib)) |
| 7881 | (propagated-inputs |
| 7882 | ;; Some scripts are installed into share/deal.II/scripts that require |
| 7883 | ;; perl and python, but they are not executable (and some are missing the |
| 7884 | ;; shebang line) and therefore must be explicitly passed to the |
| 7885 | ;; interpreter. |
| 7886 | ;; Anyway, they are meant to be used at build time, so rather than adding |
| 7887 | ;; the interpreters here, any package depending on them should just add |
| 7888 | ;; the requisite interpreter to its native inputs. |
| 7889 | (list boost |
| 7890 | hdf5 |
| 7891 | kokkos |
| 7892 | onetbb |
| 7893 | suitesparse ; For UMFPACK. |
| 7894 | sundials)) |
| 7895 | (arguments |
| 7896 | (list #:build-type "DebugRelease" ; Only Debug, Release or DebugRelease. |
| 7897 | ;; The tests take too long and must be explicitly enabled with |
| 7898 | ;; "make setup_tests". |
| 7899 | ;; See https://www.dealii.org/developer/developers/testsuite.html. |
| 7900 | ;; (They can also be run for an already installed deal.II.) |
| 7901 | #:tests? #f |
| 7902 | #:configure-flags |
| 7903 | #~(let ((doc (string-append #$output:doc "/share/doc/" |
| 7904 | #$name "-" #$version))) |
| 7905 | (list "-DDEAL_II_COMPONENT_DOCUMENTATION=ON" |
| 7906 | (string-append "-DDEAL_II_DOCREADME_RELDIR=" doc) |
| 7907 | (string-append "-DDEAL_II_DOCHTML_RELDIR=" doc "/html") |
| 7908 | ;; Don't compile the examples because the source and |
| 7909 | ;; CMakeLists.txt are installed anyway, allowing users to |
| 7910 | ;; do so for themselves. |
| 7911 | "-DDEAL_II_COMPILE_EXAMPLES=OFF" |
| 7912 | (string-append "-DDEAL_II_EXAMPLES_RELDIR=" doc |
| 7913 | "/examples"))) |
| 7914 | #:phases |
| 7915 | #~(modify-phases %standard-phases |
| 7916 | ;; Without unsetting CPATH, the build fails with the following |
| 7917 | ;; error (similar to <https://bugs.gnu.org/30756>): |
| 7918 | ;; |
| 7919 | ;; /gnu/store/…-gcc-11.3.0/include/c++/math.h:30:16: fatal error: math.h: No such file or directory |
| 7920 | ;; 30 | # include_next <math.h> |
| 7921 | ;; | ^~~~~~~~ |
| 7922 | ;; |
| 7923 | ;; Why does unsetting CPATH magically fix the error? |
| 7924 | ;; TODO: Properly fix this issue. |
| 7925 | (add-after 'set-paths 'unset-cpath |
| 7926 | (lambda _ |
| 7927 | (unsetenv "CPATH"))) |
| 7928 | (add-after 'install 'remove-build-logs |
| 7929 | ;; These build logs leak the name of the build directory by |
| 7930 | ;; storing the values of CMAKE_SOURCE_DIR and |
| 7931 | ;; CMAKE_BINARY_DIR. |
| 7932 | (lambda _ |
| 7933 | (let ((doc (string-append #$output:doc "/share/doc/" |
| 7934 | #$name "-" #$version))) |
| 7935 | (for-each delete-file |
| 7936 | (map (lambda (f) (string-append doc "/" f)) |
| 7937 | '("detailed.log" "summary.log"))))))))) |
| 7938 | (home-page "https://www.dealii.org/") |
| 7939 | (synopsis "Finite element library") |
| 7940 | (description |
| 7941 | "Deal.II is a C++ program library targeted at the computational solution |
| 7942 | of partial differential equations using adaptive finite elements. The main |
| 7943 | aim of deal.II is to enable rapid development of modern finite element codes, |
| 7944 | using among other aspects adaptive meshes and a wide array of tools often used |
| 7945 | in finite element programs.") |
| 7946 | (license license:lgpl2.1+))) |
| 7947 | |
| 7948 | (define-public flann |
| 7949 | (package |
| 7950 | (name "flann") |
| 7951 | (version "1.9.2") |
| 7952 | (home-page "https://github.com/mariusmuja/flann/") |
| 7953 | (source |
| 7954 | (origin |
| 7955 | (method git-fetch) |
| 7956 | (uri (git-reference (url home-page) (commit version))) |
| 7957 | (file-name (git-file-name name version)) |
| 7958 | (sha256 |
| 7959 | (base32 |
| 7960 | "1954azd78qx1dkcs47cyyhb34845zdg0qrhs9z649sfc5mf2gbhp")) |
| 7961 | (patches (search-patches "flann-pc-file.patch")))) |
| 7962 | (build-system cmake-build-system) |
| 7963 | (outputs '("out")) |
| 7964 | (native-inputs |
| 7965 | (list pkg-config unzip)) |
| 7966 | (propagated-inputs (list lz4)) |
| 7967 | ;; utils/serialization.h includes lz.4 |
| 7968 | (inputs |
| 7969 | (list |
| 7970 | hdf5 |
| 7971 | ;; FIXME: 'mkoctfile' fails with a linker error: |
| 7972 | ;; ld: cannot find -loctinterp |
| 7973 | ;; ld: cannot find -loctave |
| 7974 | ;; Disable it for now. |
| 7975 | ;; octave-cli |
| 7976 | python)) |
| 7977 | (arguments |
| 7978 | (list |
| 7979 | #:tests? #f ; The test data are downloaded from the Internet. |
| 7980 | ;; The 'share/flann/octave' contains a .mex file, which is an ELF file |
| 7981 | ;; taken 46 MiB unstripped, and 6 MiB stripped. |
| 7982 | #:strip-directories #~(list "lib" "lib64" "libexec" |
| 7983 | "bin" "sbin" "share/flann/octave") |
| 7984 | ;; Save 10 MiB by not installing .a files. Passing |
| 7985 | ;; '-DBUILD_STATIC_LIBS=OFF' has no effect. |
| 7986 | #:phases |
| 7987 | #~(modify-phases %standard-phases |
| 7988 | (add-after 'install 'remove-static-libraries |
| 7989 | (lambda _ |
| 7990 | (let ((lib (string-append #$output "/lib"))) |
| 7991 | (for-each delete-file |
| 7992 | (find-files lib "\\.a$")))))))) |
| 7993 | (synopsis "Library for approximate nearest neighbors computation") |
| 7994 | (description "FLANN is a library for performing fast approximate |
| 7995 | nearest neighbor searches in high dimensional spaces. It implements a |
| 7996 | collection of algorithms and a system for automatically choosing the best |
| 7997 | algorithm and optimum parameters depending on the dataset. |
| 7998 | |
| 7999 | FLANN is written in C++ and contains bindings for C, Octave and Python.") |
| 8000 | (license (license:non-copyleft "file://COPYING" |
| 8001 | "See COPYING in the distribution.")))) |
| 8002 | |
| 8003 | (define-public nanoflann |
| 8004 | (package |
| 8005 | (name "nanoflann") |
| 8006 | (version "1.9.0") |
| 8007 | (source |
| 8008 | (origin |
| 8009 | (method git-fetch) |
| 8010 | (uri (git-reference |
| 8011 | (url "https://github.com/jlblancoc/nanoflann") |
| 8012 | (commit (string-append "v" version)))) |
| 8013 | (file-name (git-file-name name version)) |
| 8014 | (sha256 |
| 8015 | (base32 "1cizyl30ad5ljxy0dvj4hw85222rzhsw7lsdgjp5rl6kpqqrxmqw")))) |
| 8016 | (build-system cmake-build-system) |
| 8017 | (arguments |
| 8018 | (list |
| 8019 | #:configure-flags |
| 8020 | #~(list "-DNANOFLANN_BUILD_EXAMPLES=OFF" "-DNANOFLANN_BUILD_TESTS=ON"))) |
| 8021 | (native-inputs (list googletest)) |
| 8022 | (home-page "https://github.com/jlblancoc/nanoflann") |
| 8023 | (synopsis |
| 8024 | "C++11 header-only library for nearest neighbor search with KD-trees") |
| 8025 | (description |
| 8026 | "nanoflann is a C++11 header-only library for building KD-trees of datasets |
| 8027 | with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D |
| 8028 | rotation groups). It is a fork of the FLANN library that replaces virtual |
| 8029 | methods inlined templates for improved runtime and memory efficiency.") |
| 8030 | (license license:bsd-2))) |
| 8031 | |
| 8032 | (define-public wcalc |
| 8033 | (package |
| 8034 | (name "wcalc") |
| 8035 | (version "2.5") |
| 8036 | (source |
| 8037 | (origin |
| 8038 | (method url-fetch) |
| 8039 | (uri (string-append "mirror://sourceforge/w-calc/Wcalc/" version "/" |
| 8040 | "wcalc-" version ".tar.bz2")) |
| 8041 | (sha256 |
| 8042 | (base32 |
| 8043 | "1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f")) |
| 8044 | (snippet |
| 8045 | #~(begin |
| 8046 | (for-each delete-file |
| 8047 | (list "src/common/scanner.c" |
| 8048 | "src/common/parser.c" |
| 8049 | "src/common/parser.h")))))) |
| 8050 | (build-system gnu-build-system) |
| 8051 | (inputs |
| 8052 | (list mpfr readline)) |
| 8053 | (native-inputs |
| 8054 | (list bison flex)) |
| 8055 | (home-page "https://w-calc.sourceforge.net/index.php") |
| 8056 | (synopsis "Flexible command-line scientific calculator") |
| 8057 | (description "Wcalc is a very capable calculator. It has standard functions |
| 8058 | (sin, asin, and sinh for example, in either radians or degrees), many |
| 8059 | pre-defined constants (pi, e, c, etc.), support for using variables, \"active\" |
| 8060 | variables, a command history, hex/octal/binary input and output, unit |
| 8061 | conversions, embedded comments, and an expandable expression entry field. It |
| 8062 | evaluates expressions using the standard order of operations.") |
| 8063 | (license license:gpl2+))) |
| 8064 | |
| 8065 | (define-public xaos |
| 8066 | (package |
| 8067 | (name "xaos") |
| 8068 | (version "4.3.3") |
| 8069 | (source (origin |
| 8070 | (method git-fetch) |
| 8071 | (uri (git-reference |
| 8072 | (url "https://github.com/xaos-project/XaoS") |
| 8073 | (commit (string-append "release-" version)))) |
| 8074 | (file-name (git-file-name name version)) |
| 8075 | (sha256 |
| 8076 | (base32 |
| 8077 | "0imq6rvvjwjgmrfr25yr5lmhmqr4s6a5174jhah90mhf7pb62j0i")))) |
| 8078 | (build-system gnu-build-system) |
| 8079 | (native-inputs `(("gettext" ,gettext-minimal) |
| 8080 | ("qtbase" ,qtbase) |
| 8081 | ("qttools" ,qttools))) |
| 8082 | (inputs (list libx11 zlib libpng gsl)) |
| 8083 | ;; The upstream project file ("XaoS.pro") and the Makefile it generates are |
| 8084 | ;; not enough for this package to install properly. These phases fix that. |
| 8085 | (arguments |
| 8086 | (list #:tests? #f ;no "check" target |
| 8087 | #:phases |
| 8088 | #~(modify-phases %standard-phases |
| 8089 | (add-before 'configure 'make-qt-deterministic |
| 8090 | (lambda _ |
| 8091 | ;; Make Qt deterministic. |
| 8092 | (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1"))) |
| 8093 | (replace 'configure |
| 8094 | (lambda* (#:key outputs #:allow-other-keys) |
| 8095 | (let ((out (assoc-ref outputs "out"))) |
| 8096 | (substitute* "XaoS.pro" |
| 8097 | ;; The DESTDIR is originally set to install the xaos binary to |
| 8098 | ;; the "bin" folder inside the build directory. Setting make |
| 8099 | ;; flags doesn't seem to change this. |
| 8100 | (("DESTDIR.*$") |
| 8101 | (string-append "DESTDIR=" out "/bin")) |
| 8102 | (("/usr/local") |
| 8103 | out) |
| 8104 | ;; Set the correct path to the lrelease binary. |
| 8105 | (("lrelease-qt6") "lrelease")) |
| 8106 | (substitute* "src/include/config.h" |
| 8107 | (("/usr/share/XaoS") |
| 8108 | (string-append out "/share/XaoS"))) |
| 8109 | (invoke "qmake")))) |
| 8110 | (add-after 'install 'install-data |
| 8111 | (lambda* (#:key outputs #:allow-other-keys) |
| 8112 | (let* ((out (assoc-ref outputs "out")) |
| 8113 | (share (string-append out "/share"))) |
| 8114 | (mkdir-p share) |
| 8115 | (for-each |
| 8116 | (lambda (folder) |
| 8117 | (copy-recursively folder |
| 8118 | (string-append share "/XaoS/" folder))) |
| 8119 | '("catalogs" "examples" "tutorial")) |
| 8120 | (install-file "xdg/xaos.png" |
| 8121 | (string-append share "/pixmaps")) |
| 8122 | (install-file "xdg/io.github.xaos_project.XaoS.desktop" |
| 8123 | (string-append share "/applications")))))))) |
| 8124 | (synopsis "Real-time fractal zoomer") |
| 8125 | (description "GNU XaoS is a graphical program that generates fractal |
| 8126 | patterns and allows you to zoom in and out of them infinitely in a fluid, |
| 8127 | continuous manner. It also includes tutorials that help to explain how fractals |
| 8128 | are built. It can generate many different fractal types such as the Mandelbrot |
| 8129 | set.") |
| 8130 | (home-page "https://xaos-project.github.io/") |
| 8131 | (license license:gpl2+))) |
| 8132 | |
| 8133 | (define-public hypre |
| 8134 | (package |
| 8135 | (name "hypre") |
| 8136 | (version "2.32.0") |
| 8137 | (source |
| 8138 | (origin |
| 8139 | (method git-fetch) |
| 8140 | (uri (git-reference |
| 8141 | (url "https://github.com/hypre-space/hypre") |
| 8142 | (commit (string-append "v" version)))) |
| 8143 | (file-name (git-file-name name version)) |
| 8144 | (sha256 |
| 8145 | (base32 "1hlydh15wz0yv5bgry7yyx4pvrl656mifhqjgifzf6dyksfvwpl7")))) |
| 8146 | (build-system gnu-build-system) |
| 8147 | (outputs '("out" ;5.3 MiB of headers and libraries |
| 8148 | "doc")) ;12 MiB of documentation |
| 8149 | (native-inputs |
| 8150 | (list doc++ |
| 8151 | doxygen-1.16 |
| 8152 | ghostscript |
| 8153 | python |
| 8154 | python-breathe |
| 8155 | python-sphinx |
| 8156 | python-sphinx-rtd-theme |
| 8157 | (texlive-local-tree |
| 8158 | (list texlive-adjustbox |
| 8159 | texlive-alphalph |
| 8160 | texlive-booktabs |
| 8161 | texlive-capt-of |
| 8162 | texlive-caption |
| 8163 | texlive-changepage |
| 8164 | texlive-cmap |
| 8165 | texlive-courier |
| 8166 | texlive-enumitem |
| 8167 | texlive-etoc |
| 8168 | texlive-fancyvrb |
| 8169 | texlive-float |
| 8170 | texlive-fncychap |
| 8171 | texlive-framed |
| 8172 | texlive-hanging |
| 8173 | texlive-helvetic |
| 8174 | texlive-jknapltx |
| 8175 | texlive-latexmk |
| 8176 | texlive-listofitems |
| 8177 | texlive-ltablex |
| 8178 | texlive-multirow |
| 8179 | texlive-natbib |
| 8180 | texlive-needspace |
| 8181 | texlive-newunicodechar |
| 8182 | texlive-ninecolors |
| 8183 | texlive-parskip |
| 8184 | texlive-sectsty |
| 8185 | texlive-stackengine |
| 8186 | texlive-tabularray |
| 8187 | texlive-tabulary |
| 8188 | texlive-tex-gyre |
| 8189 | texlive-titlesec |
| 8190 | texlive-tocloft |
| 8191 | texlive-ulem |
| 8192 | texlive-upquote |
| 8193 | texlive-varwidth |
| 8194 | texlive-wasy |
| 8195 | texlive-wasysym |
| 8196 | texlive-wrapfig |
| 8197 | texlive-xcolor |
| 8198 | texlive-xltabular |
| 8199 | texlive-xypic)))) |
| 8200 | (inputs |
| 8201 | (list openblas)) |
| 8202 | (arguments |
| 8203 | (list #:modules `((srfi srfi-1) |
| 8204 | ,@%default-gnu-modules) |
| 8205 | #:configure-flags #~'("--enable-shared" |
| 8206 | "--disable-fortran" |
| 8207 | "--without-MPI" |
| 8208 | "--with-openmp" |
| 8209 | "--with-fei" |
| 8210 | "--with-lapack" |
| 8211 | "--with-blas") |
| 8212 | #:phases |
| 8213 | #~(modify-phases %standard-phases |
| 8214 | (add-before 'configure 'chdir-src |
| 8215 | (lambda _ |
| 8216 | (chdir "src"))) |
| 8217 | (replace 'configure |
| 8218 | (lambda* (#:key build target configure-flags |
| 8219 | #:allow-other-keys #:rest args) |
| 8220 | (let* ((configure (assoc-ref %standard-phases 'configure))) |
| 8221 | (apply configure |
| 8222 | (append args |
| 8223 | (list #:configure-flags |
| 8224 | (cons (string-append "--host=" |
| 8225 | (or target build)) |
| 8226 | configure-flags))))))) |
| 8227 | (add-after 'build 'build-docs |
| 8228 | (lambda _ |
| 8229 | (setenv "TEXMFVAR" "/tmp") |
| 8230 | (invoke "make" "-C" "docs"))) |
| 8231 | (replace 'check |
| 8232 | (lambda* (#:key tests? #:allow-other-keys) |
| 8233 | (when tests? |
| 8234 | (setenv "LD_LIBRARY_PATH" |
| 8235 | (string-append (getcwd) "/hypre/lib")) |
| 8236 | (setenv "PATH" |
| 8237 | (string-append "." ":" (getenv "PATH"))) |
| 8238 | (invoke "make" "check" "CHECKRUN=") |
| 8239 | (for-each (lambda (filename) |
| 8240 | (let ((size (stat:size (stat filename)))) |
| 8241 | (when (positive? size) |
| 8242 | (error (format #f |
| 8243 | "~a size ~d; error indication~%" |
| 8244 | filename size))))) |
| 8245 | (find-files "test" ".*\\.err$"))))) |
| 8246 | (add-after 'install 'install-docs |
| 8247 | (lambda* (#:key outputs #:allow-other-keys) |
| 8248 | ;; Custom install because docs/Makefile doesn't honor ${docdir}. |
| 8249 | (let* ((doc (assoc-ref outputs "doc")) |
| 8250 | (docdir (string-append doc "/share/doc/hypre-" |
| 8251 | #$version))) |
| 8252 | (with-directory-excursion "docs" |
| 8253 | (for-each (lambda (base) |
| 8254 | (install-file (string-append base |
| 8255 | ".pdf") docdir) |
| 8256 | (copy-recursively (string-append base |
| 8257 | "-html") |
| 8258 | (string-append docdir |
| 8259 | "/" base))) |
| 8260 | '("usr-manual" "ref-manual"))))))))) |
| 8261 | (home-page "https://computing.llnl.gov/projects\ |
| 8262 | /hypre-scalable-linear-solvers-multigrid-methods") |
| 8263 | (synopsis "Library of solvers and preconditioners for linear equations") |
| 8264 | (description |
| 8265 | "HYPRE is a software library of high performance preconditioners and |
| 8266 | solvers for the solution of large, sparse linear systems of equations. It |
| 8267 | features multigrid solvers for both structured and unstructured grid |
| 8268 | problems.") |
| 8269 | (properties '((tunable? . #t))) |
| 8270 | (license license:lgpl2.1))) |
| 8271 | |
| 8272 | (define-public hypre-openmpi |
| 8273 | (package |
| 8274 | (inherit hypre) |
| 8275 | (name "hypre-openmpi") |
| 8276 | (inputs (modify-inputs inputs |
| 8277 | (prepend openmpi))) |
| 8278 | (arguments |
| 8279 | (substitute-keyword-arguments arguments |
| 8280 | ((#:configure-flags flags) |
| 8281 | #~`("--with-MPI" ,@(delete "--without-MPI" |
| 8282 | #$flags))) |
| 8283 | ((#:phases phases) |
| 8284 | #~(modify-phases #$phases |
| 8285 | (add-before 'check 'mpi-setup |
| 8286 | #$%openmpi-setup))))) |
| 8287 | (synopsis "Parallel solvers and preconditioners for linear equations") |
| 8288 | (description |
| 8289 | "HYPRE is a software library of high performance preconditioners and |
| 8290 | solvers for the solution of large, sparse linear systems of equations on |
| 8291 | parallel computers. It features parallel multigrid solvers for both |
| 8292 | structured and unstructured grid problems."))) |
| 8293 | |
| 8294 | (define-public matio |
| 8295 | (package |
| 8296 | (name "matio") |
| 8297 | (version "1.5.23") |
| 8298 | (source |
| 8299 | (origin |
| 8300 | (method url-fetch) |
| 8301 | (uri (string-append "mirror://sourceforge/matio/matio/" version "/" |
| 8302 | "matio-" version ".tar.gz")) |
| 8303 | (sha256 |
| 8304 | (base32 |
| 8305 | "0vjdkxn402gwrgbi5ii3n2ai01bjzzfb588iqd9ylinzc7kfm4cz")))) |
| 8306 | (build-system gnu-build-system) |
| 8307 | (arguments |
| 8308 | (list |
| 8309 | #:phases |
| 8310 | #~(modify-phases %standard-phases |
| 8311 | (add-before 'install 'install-matioConfig.h |
| 8312 | (lambda _ |
| 8313 | (install-file "src/matioConfig.h" |
| 8314 | (string-append #$output "/include"))))))) |
| 8315 | (inputs |
| 8316 | (list zlib hdf5)) |
| 8317 | (home-page "http://matio.sourceforge.net/") |
| 8318 | (synopsis "Library for reading and writing MAT files") |
| 8319 | (description "Matio is a library for reading and writing MAT files. It |
| 8320 | supports compressed MAT files, as well as newer (version 7.3) MAT files.") |
| 8321 | (license license:bsd-2))) |
| 8322 | |
| 8323 | (define-public vc |
| 8324 | (package |
| 8325 | (name "vc") |
| 8326 | (version "1.4.3") |
| 8327 | (source |
| 8328 | (origin |
| 8329 | (method url-fetch) |
| 8330 | (uri (string-append "https://github.com/VcDevel/Vc/releases/" |
| 8331 | "download/" version "/Vc-" version ".tar.gz")) |
| 8332 | (sha256 |
| 8333 | (base32 "0zq37r8yisd4dwlb024l10wk2yq9kisa4xm79ia1ggrz7w2s13lq")))) |
| 8334 | (build-system cmake-build-system) |
| 8335 | (arguments |
| 8336 | (list |
| 8337 | #:configure-flags |
| 8338 | #~(list ;; By default, Vc will optimize for the CPU of the build machine. |
| 8339 | ;; Setting this to "none" makes it create portable binaries. See |
| 8340 | ;; "cmake/OptimizeForArchitecture.cmake". |
| 8341 | "-DTARGET_ARCHITECTURE=none") |
| 8342 | #:phases |
| 8343 | #~(modify-phases %standard-phases |
| 8344 | (add-after 'unpack 'copy-testdata |
| 8345 | (lambda _ |
| 8346 | (copy-recursively #$(this-package-native-input "testdata") |
| 8347 | "tests/testdata")))))) |
| 8348 | (native-inputs |
| 8349 | `(("virtest" ,virtest) |
| 8350 | |
| 8351 | ;; This is a submodule in the git project, but not part of the |
| 8352 | ;; released sources. See the git branch for the commit to take. |
| 8353 | ("testdata" |
| 8354 | ,(let ((commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3")) |
| 8355 | (origin |
| 8356 | (method git-fetch) |
| 8357 | (uri (git-reference |
| 8358 | (url "https://github.com/VcDevel/vc-testdata") |
| 8359 | (commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3"))) |
| 8360 | (file-name (git-file-name "vc-testdata" (string-take commit 7))) |
| 8361 | (sha256 |
| 8362 | (base32 |
| 8363 | "1hkhqib03qlcq412ym2dciynfxcdr2ygqhnplz4l1vissr1wnqn2"))))))) |
| 8364 | (synopsis "SIMD vector classes for C++") |
| 8365 | (description "Vc provides portable, zero-overhead C++ types for explicitly |
| 8366 | data-parallel programming. It is a library designed to ease explicit |
| 8367 | vectorization of C++ code. Its types enable explicitly stating data-parallel |
| 8368 | operations on multiple values. The parallelism is therefore added via the type |
| 8369 | system. Vc has an intuitive API and provides portability between different |
| 8370 | compilers and compiler versions as well as portability between different vector |
| 8371 | instruction sets. Thus, an application written with Vc can be compiled for: |
| 8372 | @enumerate |
| 8373 | @item AVX and AVX2 |
| 8374 | @item SSE2 up to SSE4.2 or SSE4a |
| 8375 | @item Scalar |
| 8376 | @item MIC |
| 8377 | @item NEON (in development) |
| 8378 | @item NVIDIA GPUs / CUDA (in development) |
| 8379 | @end enumerate\n") |
| 8380 | (home-page "https://github.com/VcDevel/Vc") |
| 8381 | ;; "No support_???.cpp file exists for this architecture." |
| 8382 | (supported-systems '("x86_64-linux" "i686-linux")) |
| 8383 | (license license:bsd-3))) |
| 8384 | |
| 8385 | (define-public reducelcs |
| 8386 | ;; This is the last commit which is available upstream, no |
| 8387 | ;; release happened since 2010. |
| 8388 | (let ((commit "963f74f7279ba6fc0ea7d8ddfd361ea190c80313") |
| 8389 | (revision "2")) |
| 8390 | (package |
| 8391 | (name "reducelcs") |
| 8392 | (version (git-version "1.0" revision commit)) |
| 8393 | (source |
| 8394 | (origin |
| 8395 | (method git-fetch) |
| 8396 | (uri (git-reference |
| 8397 | (url "https://github.com/gdv/Reduce-Expand-for-LCS") |
| 8398 | (commit commit))) |
| 8399 | (file-name (git-file-name name version)) |
| 8400 | (sha256 |
| 8401 | (base32 |
| 8402 | "03chvd9wb2z08r7ka2npr49dbimjvzn2gfm7cnp5l079vbw1dfny")))) |
| 8403 | (build-system gnu-build-system) |
| 8404 | (inputs (list openlibm)) |
| 8405 | (arguments |
| 8406 | (list |
| 8407 | #:tests? #f ; no tests |
| 8408 | #:phases |
| 8409 | #~(modify-phases %standard-phases |
| 8410 | (delete 'configure) ; No configure script exists. |
| 8411 | (replace 'install ; No install phase exists. |
| 8412 | (lambda* (#:key outputs #:allow-other-keys) |
| 8413 | (let* ((out (assoc-ref outputs "out")) |
| 8414 | (bin (string-append out "/bin"))) |
| 8415 | (install-file "Approximation" bin) |
| 8416 | (install-file "CollectResults" bin) |
| 8417 | (install-file "GenerateInstances" bin))))))) |
| 8418 | (synopsis "Approximate Longest Commons Subsequence computation tool") |
| 8419 | (description |
| 8420 | "@code{reduceLCS} is an implementation of the Reduce-Expand |
| 8421 | algorithm for LCS. It is a fast program to compute the approximate |
| 8422 | Longest Commons Subsequence of a set of strings.") |
| 8423 | (home-page "https://github.com/gdv/Reduce-Expand-for-LCS") |
| 8424 | (license license:gpl3+)))) |
| 8425 | |
| 8426 | (define-public java-smtinterpol |
| 8427 | (package |
| 8428 | (name "java-smtinterpol") |
| 8429 | (version "2.5") |
| 8430 | (source (origin |
| 8431 | (method git-fetch) |
| 8432 | (uri (git-reference |
| 8433 | (url "https://github.com/ultimate-pa/smtinterpol") |
| 8434 | (commit version))) |
| 8435 | (file-name (git-file-name name version)) |
| 8436 | (modules '((guix build utils))) |
| 8437 | (snippet #~(begin |
| 8438 | (delete-file-recursively "jacoco") |
| 8439 | (delete-file-recursively "libs") |
| 8440 | (delete-file-recursively "sonar"))) |
| 8441 | (sha256 |
| 8442 | (base32 |
| 8443 | "0bq5l7g830a8hxw1xyyfp2ph6jqk8ak0ichlymdglpnpngf6322f")))) |
| 8444 | (build-system ant-build-system) |
| 8445 | (arguments |
| 8446 | (list #:build-target "dist" |
| 8447 | #:test-target "runtests" |
| 8448 | #:phases |
| 8449 | #~(modify-phases %standard-phases |
| 8450 | (add-after 'unpack 'fix-build.xml |
| 8451 | (lambda _ |
| 8452 | (substitute* "build.xml" |
| 8453 | (("<tstamp>") "<!--") |
| 8454 | (("</tstamp>") "-->") |
| 8455 | (("executable=\"git\"") |
| 8456 | (string-append "executable=\"" |
| 8457 | (which "sh") |
| 8458 | "\"")) |
| 8459 | (("<property file=.*/>" all) |
| 8460 | (string-append all |
| 8461 | "<property environment=\"env\" />")) |
| 8462 | (("<classpath>" all) |
| 8463 | (string-append |
| 8464 | all |
| 8465 | "<pathelement path=\"${env.CLASSPATH}\" />")) |
| 8466 | (("<fileset file=\".*/libs/.*/>") "") |
| 8467 | (("<junit") |
| 8468 | "<junit haltonfailure=\"yes\"")) |
| 8469 | (call-with-output-file "describe" |
| 8470 | (lambda (port) |
| 8471 | (format port "echo ~a" #$version))))) |
| 8472 | (add-before 'check 'delete-failing-tests |
| 8473 | (lambda _ |
| 8474 | (delete-file |
| 8475 | (string-append "SMTInterpolTest/src/de/uni_freiburg" |
| 8476 | "/informatik/ultimate/smtinterpol/convert/" |
| 8477 | "EqualityDestructorTest.java")))) |
| 8478 | (replace 'install |
| 8479 | (lambda* (#:key outputs #:allow-other-keys) |
| 8480 | (let* ((out (assoc-ref outputs "out")) |
| 8481 | (java (string-append out "/share/java"))) |
| 8482 | (for-each (lambda (f) (install-file f java)) |
| 8483 | (find-files "dist" "\\.jar$")))))))) |
| 8484 | (native-inputs (list java-junit)) |
| 8485 | (home-page "http://ultimate.informatik.uni-freiburg.de/smtinterpol/") |
| 8486 | (synopsis "Interpolating SMT solver") |
| 8487 | (description "SMTInterpol is an @acronym{SMT, Satisfiability Modulo Theories} |
| 8488 | solver, that can compute Craig interpolants for various theories.") |
| 8489 | (license license:lgpl3+))) |
| 8490 | |
| 8491 | (define-public yices |
| 8492 | (package |
| 8493 | (name "yices") |
| 8494 | (version "2.7.0") |
| 8495 | (source (origin |
| 8496 | (method git-fetch) |
| 8497 | (uri (git-reference |
| 8498 | (url "https://github.com/SRI-CSL/yices2/") |
| 8499 | (commit (string-append "yices-" version)))) |
| 8500 | (sha256 |
| 8501 | (base32 "1jikmka2bi2as08lsvpf43r7s4lscpg0g4lg7dr68aba1jk9wb5j")) |
| 8502 | (file-name (git-file-name name version)))) |
| 8503 | (build-system gnu-build-system) |
| 8504 | (arguments |
| 8505 | (list #:configure-flags |
| 8506 | #~(list #$@(if (%current-target-system) |
| 8507 | '() |
| 8508 | (list (string-append "--build=" |
| 8509 | (%current-system)))) |
| 8510 | "--enable-mcsat" |
| 8511 | ;; XXX: Ewww, static linkage |
| 8512 | (string-append |
| 8513 | "--with-static-libpoly=" |
| 8514 | (search-input-file %build-inputs "lib/libpoly.a")) |
| 8515 | (string-append |
| 8516 | "--with-static-gmp=" |
| 8517 | (search-input-file %build-inputs "lib/libgmp.a")) |
| 8518 | (string-append |
| 8519 | "--with-pic-libpoly=" |
| 8520 | (search-input-file %build-inputs "lib/libpicpoly.a"))) |
| 8521 | #:phases |
| 8522 | #~(modify-phases %standard-phases |
| 8523 | (add-after 'unpack 'fix-build-files |
| 8524 | (lambda _ |
| 8525 | (substitute* "Makefile.build" |
| 8526 | (("SHELL=.*") "") |
| 8527 | (("/sbin/ldconfig") (which "ldconfig"))) |
| 8528 | (substitute* (find-files "etc" "install-yices.*") |
| 8529 | (("/usr/bin/install") (which "install")) |
| 8530 | (("/bin/ln") (which "ln")) |
| 8531 | (("/sbin/ldconfig") (which "ldconfig")) |
| 8532 | (("install_dir=.*") |
| 8533 | (string-append "install_dir=" #$output)))))))) |
| 8534 | (inputs (list cudd gmp gperf libpoly)) |
| 8535 | (native-inputs (list autoconf automake bash-minimal python-minimal-wrapper)) |
| 8536 | (home-page "https://yices.csl.sri.com/") |
| 8537 | (synopsis "Satisfiability modulo theories solver") |
| 8538 | (description "Yices is a solver for @acronym{SMT, satisfiability modulo |
| 8539 | theories} problems. It can process input in SMT-LIB format or its own |
| 8540 | s-expression-based format.") |
| 8541 | (license license:gpl3+))) |
| 8542 | |
| 8543 | (define-public symfpu |
| 8544 | (package |
| 8545 | (name "symfpu") |
| 8546 | (version "1.2.0") |
| 8547 | (source |
| 8548 | (origin |
| 8549 | (method git-fetch) |
| 8550 | (uri (git-reference |
| 8551 | (url "https://github.com/martin-cs/symfpu") |
| 8552 | (commit (string-append "symfpu-" version "-dual-license")))) |
| 8553 | (file-name (git-file-name name version)) |
| 8554 | (sha256 |
| 8555 | (base32 "13a9y0spyi6pggbhjgwi9g2qy822h1zakzhhwvm8qgk5c4njv3c6")) |
| 8556 | (patches (search-patches "symfpu-fix-rounding-test-case.patch")))) |
| 8557 | (build-system copy-build-system) |
| 8558 | (arguments |
| 8559 | (list |
| 8560 | #:install-plan |
| 8561 | #~`(("symfpu.pc" "lib/pkgconfig/symfpu.pc") |
| 8562 | ("core" "include/symfpu/core" #:exclude ("Makefile")) |
| 8563 | ("utils" "include/symfpu/utils" #:exclude ("Makefile"))) |
| 8564 | #:phases |
| 8565 | #~(modify-phases %standard-phases |
| 8566 | ;; Make sure that the tests exit with a zero exit status by default. |
| 8567 | ;; Generated tests have assert(3) statements which exit with a |
| 8568 | ;; non-zero exit status on test failure. |
| 8569 | (add-after 'unpack 'fix-tests |
| 8570 | (lambda _ |
| 8571 | (substitute* "applications/test.cpp" |
| 8572 | (("return 1") "return 0")))) |
| 8573 | (add-before 'install 'check |
| 8574 | (lambda* (#:key tests? #:allow-other-keys) |
| 8575 | (when tests? |
| 8576 | ;; To ensure the test application builds prior to 'install, |
| 8577 | ;; set up a symlink and modify CXXFLAGS to find the headers. |
| 8578 | (symlink #$source "symfpu") |
| 8579 | (invoke "make" "CXXFLAGS=-I." "test") |
| 8580 | |
| 8581 | ;; Run tests in their breadth (i.e., --allTests) but on a very |
| 8582 | ;; small value range as otherwise the tests run for a long time. |
| 8583 | (invoke "./test" |
| 8584 | "--allTests" |
| 8585 | "--printC" |
| 8586 | "--start=0" |
| 8587 | "--end=125" |
| 8588 | "--verbose") |
| 8589 | |
| 8590 | ;; Test script generates C code which we then compile & execute. |
| 8591 | (for-each |
| 8592 | (lambda (file) |
| 8593 | (let ((case (string-drop-right file (string-length ".c")))) |
| 8594 | (format #t "Running test case ~a~%" case) |
| 8595 | (invoke "g++" "-std=gnu++11" "-o" case file) |
| 8596 | (invoke (string-append "./" case)))) |
| 8597 | (find-files "." "^testC..*\\.c$"))))) |
| 8598 | (add-before 'install 'build-pkgconfig |
| 8599 | (lambda* (#:key outputs #:allow-other-keys) |
| 8600 | (with-output-to-file "symfpu.pc" |
| 8601 | (lambda _ |
| 8602 | (format #t |
| 8603 | "prefix=~a~@ |
| 8604 | exec_prefix=${prefix}~@ |
| 8605 | includedir=${prefix}/include~@ |
| 8606 | ~@ |
| 8607 | ~@ |
| 8608 | Name: symfpu~@ |
| 8609 | Version: ~a~@ |
| 8610 | Description: library for IEEE-754 floats~@ |
| 8611 | Cflags: -I${includedir}~%" |
| 8612 | (assoc-ref outputs "out") |
| 8613 | #$version)))))))) |
| 8614 | (synopsis |
| 8615 | "Concrete and symbolic implementation of IEEE-754 floating-point numbers") |
| 8616 | (description |
| 8617 | "SoftFPU is a C++ library implementing concrete and symbolic |
| 8618 | mantics for floating point numbers as defined in the IEEE-754 Standard |
| 8619 | r Floating-Point Arithmetic. It is templated in terms of the |
| 8620 | t-vectors, propositions, floating-point formats and rounding mode types |
| 8621 | ed. This allow the same code to be executed as an arbitrary precision |
| 8622 | brary or to be used to build symbolic representations of floating-point |
| 8623 | erations.") |
| 8624 | (home-page "https://github.com/martin-cs/symfpu") |
| 8625 | (license (list license:bsd-3 license:gpl3+)))) |
| 8626 | |
| 8627 | (define-public bitwuzla |
| 8628 | (package |
| 8629 | (name "bitwuzla") |
| 8630 | (version "0.9.1") |
| 8631 | (source |
| 8632 | (origin |
| 8633 | (method git-fetch) |
| 8634 | (uri (git-reference |
| 8635 | (url "https://github.com/bitwuzla/bitwuzla") |
| 8636 | (commit version))) |
| 8637 | (file-name (git-file-name name version)) |
| 8638 | (sha256 |
| 8639 | (base32 "085cph4vdr8j64wmia88bmrd84vgs51rkpismdh7b1f5s0nsvr6y")))) |
| 8640 | (build-system meson-build-system) |
| 8641 | (arguments |
| 8642 | `(#:configure-flags '("-Dtesting=enabled" "-Ddefault_library=shared" |
| 8643 | "-Dkissat=true"))) |
| 8644 | (native-inputs (list googletest pkg-config)) |
| 8645 | (inputs (list cadical-2.1 |
| 8646 | gmp |
| 8647 | kissat |
| 8648 | mpfr |
| 8649 | symfpu)) |
| 8650 | (synopsis "SMT solver optimized for the theory of bit-vectors") |
| 8651 | (description |
| 8652 | "Bitwuzla is a @acronym{SMT, Satisfiability Modulo Theories} solver |
| 8653 | for the theories of fixed-size bit-vectors, floating-point arithmetic, |
| 8654 | arrays, uninterpreted functions and their combinations.") |
| 8655 | (home-page "https://bitwuzla.github.io/") |
| 8656 | (license license:expat))) |
| 8657 | |
| 8658 | (define-public z3 |
| 8659 | (package |
| 8660 | (name "z3") |
| 8661 | (version "4.13.0") |
| 8662 | (home-page "https://github.com/Z3Prover/z3") |
| 8663 | (source (origin |
| 8664 | (method git-fetch) |
| 8665 | (uri (git-reference (url home-page) |
| 8666 | (commit (string-append "z3-" version)))) |
| 8667 | (file-name (git-file-name name version)) |
| 8668 | (sha256 |
| 8669 | (base32 |
| 8670 | "0j46lckf3zgx2xjay7z6nvlgh47gisbbl4s3m5zn280a13fwz1ih")))) |
| 8671 | (build-system cmake-build-system) |
| 8672 | (arguments |
| 8673 | (list |
| 8674 | #:imported-modules (append %cmake-build-system-modules |
| 8675 | %pyproject-build-system-modules) |
| 8676 | #:modules '((guix build cmake-build-system) |
| 8677 | (guix build utils) |
| 8678 | ((guix build pyproject-build-system) #:prefix py:)) |
| 8679 | #:configure-flags |
| 8680 | #~(list "-DZ3_BUILD_PYTHON_BINDINGS=ON" |
| 8681 | "-DZ3_LINK_TIME_OPTIMIZATION=ON" |
| 8682 | (string-append |
| 8683 | "-DCMAKE_INSTALL_PYTHON_PKG_DIR=" |
| 8684 | #$output "/lib/python" |
| 8685 | #$(version-major+minor (package-version python-wrapper)) |
| 8686 | "/site-packages")) |
| 8687 | #:phases |
| 8688 | #~(modify-phases %standard-phases |
| 8689 | (replace 'check |
| 8690 | (lambda* (#:key parallel-build? tests? #:allow-other-keys) |
| 8691 | (when tests? |
| 8692 | (invoke "make" "test-z3" |
| 8693 | (format #f "-j~a" |
| 8694 | (if parallel-build? |
| 8695 | (parallel-job-count) |
| 8696 | 1))) |
| 8697 | (invoke "./test-z3" "/a")))) |
| 8698 | (add-after 'install 'compile-python-modules |
| 8699 | (assoc-ref py:%standard-phases 'compile-bytecode)) |
| 8700 | ;; This step is missing in the CMake build system, do it here. |
| 8701 | (add-after 'compile-python-modules 'fix-z3-library-path |
| 8702 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 8703 | (let* ((dest (string-append (py:site-packages inputs outputs) |
| 8704 | "/z3/lib/libz3.so")) |
| 8705 | (z3-lib (string-append #$output "/lib/libz3.so"))) |
| 8706 | (mkdir-p (dirname dest)) |
| 8707 | (symlink z3-lib dest))))))) |
| 8708 | (native-inputs |
| 8709 | (list which python-wrapper)) |
| 8710 | (synopsis "Theorem prover") |
| 8711 | (description "Z3 is a theorem prover and @dfn{satisfiability modulo |
| 8712 | theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.") |
| 8713 | (license license:expat))) |
| 8714 | |
| 8715 | (define-public ocaml-z3 |
| 8716 | (package |
| 8717 | (inherit z3) |
| 8718 | (name "ocaml-z3") |
| 8719 | (build-system gnu-build-system) |
| 8720 | (arguments |
| 8721 | `(#:tests? #f; no ml tests |
| 8722 | #:phases |
| 8723 | (modify-phases %standard-phases |
| 8724 | (add-before 'configure 'bootstrap |
| 8725 | (lambda* (#:key outputs #:allow-other-keys) |
| 8726 | (let ((out (assoc-ref outputs "out"))) |
| 8727 | (setenv "OCAMLFIND_LDCONF" "ignore") |
| 8728 | (setenv "OCAMLFIND_DESTDIR" (string-append out "/lib/ocaml/site-lib")) |
| 8729 | (mkdir-p (string-append out "/lib/ocaml/site-lib")) |
| 8730 | (substitute* "scripts/mk_util.py" |
| 8731 | (("LIBZ3 = LIBZ3") |
| 8732 | (string-append "LIBZ3 = LIBZ3 + ' -dllpath " out "/lib'")) |
| 8733 | ;; Do not build z3 again, use the library passed as input |
| 8734 | ;; instead |
| 8735 | (("z3linkdep,") "\"\",") |
| 8736 | (("z3linkdep)") "\"\")")) |
| 8737 | (invoke "python" "scripts/mk_make.py")))) |
| 8738 | (replace 'configure |
| 8739 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 8740 | (invoke "./configure" |
| 8741 | "--ml" |
| 8742 | (string-append "--prefix=" (assoc-ref outputs "out"))))) |
| 8743 | (add-after 'configure 'change-directory |
| 8744 | (lambda _ |
| 8745 | (chdir "build") |
| 8746 | #t)) |
| 8747 | (replace 'build |
| 8748 | (lambda _ |
| 8749 | (invoke "make" "ml"))) |
| 8750 | (replace 'install |
| 8751 | (lambda* (#:key outputs #:allow-other-keys) |
| 8752 | (invoke "ocamlfind" "install" "-destdir" |
| 8753 | (string-append (assoc-ref outputs "out") "/lib/ocaml/site-lib") |
| 8754 | "z3" "api/ml/META" "api/ml/z3enums.mli" "api/ml/z3enums.cmi" |
| 8755 | "api/ml/z3enums.cmx" "api/ml/z3native.mli" |
| 8756 | "api/ml/z3native.cmi" "api/ml/z3native.cmx" |
| 8757 | "../src/api/ml/z3.mli" "api/ml/z3.cmi" "api/ml/z3.cmx" |
| 8758 | "api/ml/libz3ml.a" "api/ml/z3ml.a" "api/ml/z3ml.cma" |
| 8759 | "api/ml/z3ml.cmxa" "api/ml/z3ml.cmxs" "api/ml/dllz3ml.so")))))) |
| 8760 | (native-inputs |
| 8761 | `(("which" ,which) |
| 8762 | ("python" ,python-wrapper) |
| 8763 | ("ocaml" ,ocaml) |
| 8764 | ("ocaml-findlib" ,ocaml-findlib))) |
| 8765 | (propagated-inputs |
| 8766 | (list ocaml-zarith)) |
| 8767 | (inputs |
| 8768 | (list z3)))) |
| 8769 | |
| 8770 | (define-public elpa |
| 8771 | (package |
| 8772 | (name "elpa") |
| 8773 | (version "2025.06.001") |
| 8774 | (source |
| 8775 | (origin |
| 8776 | (method git-fetch) |
| 8777 | (uri (git-reference |
| 8778 | (url "https://gitlab.mpcdf.mpg.de/elpa/elpa") |
| 8779 | (commit (string-append "new_release_" version)))) |
| 8780 | (file-name (git-file-name name version)) |
| 8781 | (sha256 |
| 8782 | (base32 "1j2mqa8g76z6xmwji99320v6q98p823glvxjsdcdpaji59wgvdql")))) |
| 8783 | (build-system gnu-build-system) |
| 8784 | (arguments |
| 8785 | (list #:configure-flags |
| 8786 | #~`("--enable-openmp" "--with-mpi=no" |
| 8787 | ;; ELPA unfortunately does not support runtime dispatch, so we |
| 8788 | ;; can only enable the "generic" kernels. See the "Cross |
| 8789 | ;; compilation" section of INSTALL.md. |
| 8790 | "--enable-generic-kernels" |
| 8791 | "--disable-sse" |
| 8792 | "--disable-sse-assembly" ;Require SSE3 |
| 8793 | "--disable-avx" |
| 8794 | "--disable-avx2" |
| 8795 | "--disable-avx512" |
| 8796 | #$(string-append "CFLAGS=-O3 -funsafe-loop-optimizations " |
| 8797 | "-funsafe-math-optimizations " |
| 8798 | "-ftree-vect-loop-version -ftree-vectorize " |
| 8799 | (let ((system (or (%current-target-system) |
| 8800 | (%current-system)))) |
| 8801 | (cond |
| 8802 | ((or (string-prefix? "x86_64" system) |
| 8803 | (string-prefix? "i686" system)) |
| 8804 | "-msse2") |
| 8805 | (else ""))))) |
| 8806 | #:parallel-tests? #f ;tests are multi-threaded, via BLAS |
| 8807 | #:phases |
| 8808 | #~(modify-phases %standard-phases |
| 8809 | (add-before 'bootstrap 'patch-shebangs-early |
| 8810 | (lambda _ |
| 8811 | (patch-shebang "generate_automake_test_programs.py"))) |
| 8812 | (add-before 'configure 'patch-header-generation |
| 8813 | (lambda _ |
| 8814 | (substitute* "configure" |
| 8815 | (("^ *make.*top_srcdir=\"\\$srcdir\"" &) |
| 8816 | (string-append & " CPP=\"$CPP\""))) #t)) |
| 8817 | (add-before 'check 'setup-tests |
| 8818 | (lambda _ |
| 8819 | ;; Decrease test time and RAM use by computing fewer |
| 8820 | ;; eigenvalues. The flags are (MATRIX-SIZE, EIGENVALUES, |
| 8821 | ;; BLOCK-SIZE), where the default is (500, 250, 16) for C |
| 8822 | ;; tests and (5000, 150, 16) for Fortran. This also causes |
| 8823 | ;; several tests to pass that otherwise would otherwise |
| 8824 | ;; fail with matrix size 5000; possibly due to floating |
| 8825 | ;; point tolerances that are too tight. |
| 8826 | (setenv "TEST_FLAGS" "1500 50 16") ;from elpa.spec |
| 8827 | (setenv "OMP_NUM_THREADS" |
| 8828 | (number->string (parallel-job-count))) |
| 8829 | (substitute* "Makefile" |
| 8830 | ;; Test scripts are generated, patch the shebang |
| 8831 | (("#!/bin/bash") |
| 8832 | (string-append "#!" (which "sh"))))))))) |
| 8833 | (native-inputs |
| 8834 | (list autoconf-2.71 |
| 8835 | automake |
| 8836 | libtool |
| 8837 | gfortran |
| 8838 | perl |
| 8839 | python)) |
| 8840 | (inputs (list openblas)) |
| 8841 | (home-page "https://elpa.mpcdf.mpg.de") |
| 8842 | (synopsis "Eigenvalue solvers for symmetric matrices") |
| 8843 | (description |
| 8844 | "The ELPA library provides efficient and scalable direct eigensolvers for |
| 8845 | symmetric matrices.") |
| 8846 | (license license:lgpl3) |
| 8847 | (properties '((tunable? . #t))))) |
| 8848 | |
| 8849 | (define-public elpa-openmpi |
| 8850 | (package/inherit elpa |
| 8851 | (name "elpa-openmpi") |
| 8852 | (inputs |
| 8853 | (modify-inputs inputs |
| 8854 | (prepend openmpi scalapack zlib))) |
| 8855 | (arguments |
| 8856 | (substitute-keyword-arguments arguments |
| 8857 | ((#:configure-flags cf #~()) |
| 8858 | #~(cons "--with-mpi=yes" |
| 8859 | (delete "--with-mpi=no" #$cf))) |
| 8860 | ((#:phases phases #~%standard-phases) |
| 8861 | #~(modify-phases #$phases |
| 8862 | (add-before 'check 'mpi-setup |
| 8863 | (lambda _ |
| 8864 | ;; Tests use 2 mpi tasks by default, use our remaining build |
| 8865 | ;; cores as OpenMP threads. |
| 8866 | (setenv "OMP_NUM_THREADS" |
| 8867 | (number->string (max (quotient (parallel-job-count) 2) |
| 8868 | 1))) |
| 8869 | (#$%openmpi-setup))))))) |
| 8870 | (synopsis "Eigenvalue solvers for symmetric matrices (with MPI support)"))) |
| 8871 | |
| 8872 | (define-public elemental |
| 8873 | ;; The build of 0.87.7 is failed for a long time due to new version of GCC. The |
| 8874 | ;; latest commit has fixes. |
| 8875 | ;; See https://github.com/elemental/Elemental/issues/254 |
| 8876 | (let ((commit "6eb15a0da2a4998bf1cf971ae231b78e06d989d9") |
| 8877 | (revision "0")) |
| 8878 | (package |
| 8879 | (name "elemental") |
| 8880 | (version (git-version "0.87.7" revision commit)) |
| 8881 | (source (origin |
| 8882 | (method git-fetch) |
| 8883 | (uri (git-reference |
| 8884 | (url "https://github.com/elemental/Elemental") |
| 8885 | (commit commit))) |
| 8886 | (file-name (git-file-name name version)) |
| 8887 | (sha256 |
| 8888 | (base32 |
| 8889 | "06xcs4ic60ndcf2hq19gr8yjwdsnphpcyhapab41rkw726z4lm7p")))) |
| 8890 | (build-system cmake-build-system) |
| 8891 | (arguments |
| 8892 | (list |
| 8893 | #:build-type "Release" ;default RelWithDebInfo not supported |
| 8894 | #:configure-flags |
| 8895 | #~(list "-DEL_DISABLE_PARMETIS:BOOL=YES" |
| 8896 | "-DEL_AVOID_COMPLEX_MPI:BOOL=NO" |
| 8897 | "-DEL_CACHE_WARNINGS:BOOL=YES" |
| 8898 | "-DEL_TESTS:BOOL=YES" |
| 8899 | "-DCMAKE_INSTALL_LIBDIR=lib" |
| 8900 | "-DGFORTRAN_LIB=gfortran") |
| 8901 | #:phases |
| 8902 | #~(modify-phases %standard-phases |
| 8903 | (add-before 'check 'mpi-setup |
| 8904 | #$%openmpi-setup) |
| 8905 | (add-before 'check 'setup-tests |
| 8906 | (lambda _ ;; Parallelism is done at the MPI layer. |
| 8907 | (setenv "OMP_NUM_THREADS" "1"))) |
| 8908 | (add-after 'install 'remove-tests |
| 8909 | (lambda _ |
| 8910 | ;; Tests are installed, with no easy configuration |
| 8911 | ;; switch to prevent this, so delete them. |
| 8912 | (delete-file-recursively |
| 8913 | (string-append #$output "/bin/test"))))))) |
| 8914 | (native-inputs |
| 8915 | (list gfortran)) |
| 8916 | (inputs |
| 8917 | (list `(,gfortran "lib") |
| 8918 | gmp |
| 8919 | metis |
| 8920 | mpc |
| 8921 | mpfr |
| 8922 | openmpi |
| 8923 | qd |
| 8924 | openblas)) |
| 8925 | (home-page "https://github.com/elemental/Elemental") |
| 8926 | (synopsis "Dense and sparse-direct linear algebra and optimization") |
| 8927 | (description "Elemental is a modern C++ library for distributed-memory |
| 8928 | dense and sparse-direct linear algebra, conic optimization, and lattice |
| 8929 | reduction.") |
| 8930 | (license license:bsd-2)))) |
| 8931 | |
| 8932 | (define-public mcrl2 |
| 8933 | (package |
| 8934 | (name "mcrl2") |
| 8935 | (version "202507.0") |
| 8936 | (source (origin |
| 8937 | (method url-fetch) |
| 8938 | (uri (string-append |
| 8939 | "https://www.mcrl2.org/download/release/mcrl2-" |
| 8940 | version ".tar.gz")) |
| 8941 | (sha256 |
| 8942 | (base32 |
| 8943 | "08w7v2dx1s164q3vc5lzf864nlxrf8s0kgsa26mmkgfqfqcwdgjj")))) |
| 8944 | (inputs |
| 8945 | (list boost glu mesa qtbase)) |
| 8946 | (build-system cmake-build-system) |
| 8947 | (arguments (list #:tests? #f)) |
| 8948 | (synopsis "Toolset for the mCRL2 formal specification language") |
| 8949 | (description |
| 8950 | "@dfn{mCRL2} (micro Common Representation Language 2) is a formal |
| 8951 | specification language for describing concurrent discrete event systems. Its |
| 8952 | toolset supports analysis and automatic verification, linearisation, simulation, |
| 8953 | state-space exploration and generation, and tools to optimise and analyse |
| 8954 | specifications. Also, state spaces can be manipulated, visualised and |
| 8955 | analysed.") |
| 8956 | (home-page "https://mcrl2.org") |
| 8957 | (license license:boost1.0))) |
| 8958 | |
| 8959 | (define-public mcrl2-minimal |
| 8960 | (package |
| 8961 | (inherit mcrl2) |
| 8962 | (name "mcrl2-minimal") |
| 8963 | (inputs |
| 8964 | (list boost)) |
| 8965 | (arguments |
| 8966 | (list #:tests? #f |
| 8967 | #:configure-flags #~(list "-DMCRL2_ENABLE_GUI_TOOLS=OFF"))))) |
| 8968 | |
| 8969 | (define-public tcalc |
| 8970 | (package |
| 8971 | (name "tcalc") |
| 8972 | (version "2.0") |
| 8973 | (source |
| 8974 | (origin |
| 8975 | (method url-fetch) |
| 8976 | (uri (string-append |
| 8977 | "https://drive.usercontent.google.com/download" |
| 8978 | "?id=1gICzFCnJEQk10n5ioqOVrSjHd4R_u0Eq")) |
| 8979 | (file-name (string-append "tcalc-" version ".tar.gz")) |
| 8980 | (sha256 |
| 8981 | (base32 |
| 8982 | "0jq806m4dqfia85nppfm75mml9w57g0cgv4cdw9bp3zymda83s0m")))) |
| 8983 | (build-system gnu-build-system) |
| 8984 | (arguments |
| 8985 | (list |
| 8986 | #:configure-flags #~(list "CFLAGS=-fcommon"))) |
| 8987 | (synopsis "The terminal calculator") |
| 8988 | (description |
| 8989 | "The terminal calculator is a small program to help users of the GNU/Linux |
| 8990 | terminal do calculations simply and quickly. The formula to be calculated can |
| 8991 | be fed to @command{tcalc} through the command line.") |
| 8992 | (home-page |
| 8993 | "https://sites.google.com/site/mohammedisam2000/tcalc-the-gnulinux-terminal-calculator") |
| 8994 | (license license:gpl3+))) |
| 8995 | |
| 8996 | (define-public tiny-bignum |
| 8997 | (let ((commit "1d7a1f9b8e77316187a6b3eae8e68d60a6f9a4d4")) |
| 8998 | (package |
| 8999 | (name "tiny-bignum") |
| 9000 | (version (git-version "0" "0" commit)) |
| 9001 | (source |
| 9002 | (origin |
| 9003 | (method git-fetch) |
| 9004 | (uri (git-reference |
| 9005 | (url "https://github.com/kokke/tiny-bignum-c") |
| 9006 | (commit commit))) |
| 9007 | (file-name (git-file-name "tiny-bignum" commit)) |
| 9008 | (sha256 |
| 9009 | (base32 "0vj71qlhlaa7d92bfar1kwqv6582dqrby8x3kdw0yzh82k2023g6")))) |
| 9010 | (build-system gnu-build-system) |
| 9011 | (arguments |
| 9012 | `(#:phases |
| 9013 | (modify-phases %standard-phases |
| 9014 | (delete 'configure) |
| 9015 | (add-after 'unpack 'patch-tests |
| 9016 | (lambda _ |
| 9017 | (substitute* "scripts/test_rand.py" |
| 9018 | (("\t") " ") |
| 9019 | (("\" % (\\w+)" _ symbol) (string-append "\" % int(" symbol ")"))) |
| 9020 | #t)) |
| 9021 | (replace 'check |
| 9022 | (lambda* (#:key tests? #:allow-other-keys) |
| 9023 | (when tests? |
| 9024 | (invoke "make" "test")) |
| 9025 | #t)) |
| 9026 | (replace 'install |
| 9027 | (lambda* (#:key outputs #:allow-other-keys) |
| 9028 | (let ((share (string-append (assoc-ref outputs "out") "/share")) |
| 9029 | (doc (string-append (assoc-ref outputs "out") "/doc"))) |
| 9030 | (mkdir-p share) |
| 9031 | (install-file "bn.c" share) |
| 9032 | (install-file "bn.h" share) |
| 9033 | (mkdir-p doc) |
| 9034 | (install-file "LICENSE" doc) |
| 9035 | (install-file "README.md" doc)) |
| 9036 | #t))))) |
| 9037 | (native-inputs |
| 9038 | `(("python" ,python-wrapper))) |
| 9039 | (home-page "https://github.com/kokke/tiny-bignum-c") |
| 9040 | (synopsis "Small portable multiple-precision unsigned integer arithmetic in C") |
| 9041 | (description |
| 9042 | "This library provides portable Arbitrary-precision unsigned integer |
| 9043 | arithmetic in C, for calculating with large numbers. Basic arithmetic (+, -, |
| 9044 | *, /, %) and bitwise operations (&, |, ^. <<, >>) plus increments, decrements |
| 9045 | and comparisons are supported.") |
| 9046 | (license license:unlicense)))) |
| 9047 | |
| 9048 | (define-public sundials |
| 9049 | (package |
| 9050 | (name "sundials") |
| 9051 | (version "7.1.1") |
| 9052 | (source |
| 9053 | (origin |
| 9054 | (method url-fetch) |
| 9055 | (uri (string-append "https://github.com/LLNL/sundials/releases/download/v" |
| 9056 | version "/sundials-" version ".tar.gz")) |
| 9057 | (sha256 |
| 9058 | (base32 |
| 9059 | "1fwlgbcdxz30dzsqw3y1b6ic1rhzfadghj7cq7yxsj14npgnwzga")))) |
| 9060 | (build-system cmake-build-system) |
| 9061 | (native-inputs |
| 9062 | (list pkg-config python-minimal-wrapper)) |
| 9063 | (inputs |
| 9064 | (list openblas suitesparse)) |
| 9065 | (arguments |
| 9066 | (list #:configure-flags |
| 9067 | #~(list "-DCMAKE_C_FLAGS=-O2 -g -fcommon" |
| 9068 | |
| 9069 | "-DSUNDIALS_INDEX_SIZE=32" |
| 9070 | ;; Incompatible with 32-bit indices. |
| 9071 | ;;"-DBUILD_FORTRAN_MODULE_INTERFACE:BOOL=ON" |
| 9072 | |
| 9073 | "-DEXAMPLES_ENABLE_C:BOOL=ON" |
| 9074 | "-DEXAMPLES_ENABLE_CXX:BOOL=ON" |
| 9075 | ;; Requires -DBUILD_FORTRAN_MODULE_INTERFACE:BOOL=ON. |
| 9076 | ;;"-DEXAMPLES_ENABLE_F2003:BOOL=ON" |
| 9077 | "-DEXAMPLES_INSTALL:BOOL=OFF" |
| 9078 | |
| 9079 | "-DENABLE_KLU:BOOL=ON" |
| 9080 | (string-append "-DKLU_INCLUDE_DIR=" |
| 9081 | (dirname |
| 9082 | (search-input-file %build-inputs |
| 9083 | "include/klu.h"))) |
| 9084 | (string-append "-DKLU_LIBRARY_DIR=" |
| 9085 | (dirname |
| 9086 | (search-input-file %build-inputs |
| 9087 | "lib/libklu.so")))))) |
| 9088 | (home-page "https://computation.llnl.gov/projects/sundials") |
| 9089 | (synopsis "Suite of nonlinear and differential/algebraic equation solvers") |
| 9090 | (description "SUNDIALS is a family of software packages implemented with |
| 9091 | the goal of providing robust time integrators and nonlinear solvers that can |
| 9092 | easily be incorporated into existing simulation codes.") |
| 9093 | (properties |
| 9094 | '((release-monitoring-url |
| 9095 | . "https://computing.llnl.gov/projects/sundials/sundials-software"))) |
| 9096 | (license license:bsd-3))) |
| 9097 | |
| 9098 | (define-public sundials-openmpi |
| 9099 | (package/inherit sundials |
| 9100 | (name "sundials-openmpi") |
| 9101 | (propagated-inputs |
| 9102 | (list openmpi |
| 9103 | ;; Support for the below requires MPI. |
| 9104 | hypre-openmpi |
| 9105 | petsc-openmpi)) |
| 9106 | (arguments |
| 9107 | (substitute-keyword-arguments arguments |
| 9108 | ((#:configure-flags flags #~()) |
| 9109 | #~(cons* "-DENABLE_MPI:BOOL=ON" |
| 9110 | "-DENABLE_HYPRE:BOOL=ON" |
| 9111 | (string-append "-DHYPRE_INCLUDE_DIR=" |
| 9112 | (dirname |
| 9113 | (search-input-file %build-inputs |
| 9114 | "include/HYPRE.h"))) |
| 9115 | (string-append "-DHYPRE_LIBRARY_DIR=" |
| 9116 | (dirname |
| 9117 | (search-input-file %build-inputs |
| 9118 | "lib/libHYPRE.so"))) |
| 9119 | "-DENABLE_PETSC:BOOL=ON" |
| 9120 | (string-append "-DPETSC_INCLUDE_DIRS=" |
| 9121 | (dirname |
| 9122 | (search-input-file %build-inputs |
| 9123 | "include/petsc.h"))) |
| 9124 | #$flags)) |
| 9125 | ((#:phases phases #~%standard-phases) |
| 9126 | #~(modify-phases #$phases |
| 9127 | (add-before 'check 'mpi-setup |
| 9128 | #$%openmpi-setup))))) |
| 9129 | (synopsis "SUNDIALS with MPI support"))) |
| 9130 | |
| 9131 | (define-public sundials-julia |
| 9132 | (package |
| 9133 | (inherit sundials) |
| 9134 | (name "sundials-julia") |
| 9135 | (version "5.2.0") |
| 9136 | (source |
| 9137 | (origin |
| 9138 | (method git-fetch) |
| 9139 | (uri (git-reference |
| 9140 | (url "https://github.com/LLNL/sundials") |
| 9141 | (commit (string-append "v" version)))) |
| 9142 | (file-name (git-file-name name version)) |
| 9143 | (sha256 |
| 9144 | (base32 |
| 9145 | "0nx4sqhmi126m14myzm7syv2053harav9snl0a247wnkcgs5rxrv")))) |
| 9146 | (inputs |
| 9147 | (modify-inputs inputs |
| 9148 | (prepend gfortran openblas))) |
| 9149 | (arguments |
| 9150 | '(#:configure-flags `("-DCMAKE_C_FLAGS=-O2 -g -fcommon" |
| 9151 | "-DSUNDIALS_INDEX_SIZE=32" |
| 9152 | "-DKLU_ENABLE:BOOL=ON" |
| 9153 | ,(string-append "-DKLU_INCLUDE_DIR=" |
| 9154 | (assoc-ref %build-inputs "suitesparse") |
| 9155 | "/include") |
| 9156 | ,(string-append "-DKLU_LIBRARY_DIR=" |
| 9157 | (assoc-ref %build-inputs "suitesparse") |
| 9158 | "/lib") |
| 9159 | "-DLAPACK_ENABLE:BOOL=ON"))) |
| 9160 | (synopsis "SUNDIALS with LAPACK support as required by julia-sundials-jll"))) |
| 9161 | |
| 9162 | (define-public combinatorial-blas |
| 9163 | (package |
| 9164 | (name "combinatorial-blas") |
| 9165 | (version "1.6.2") |
| 9166 | (source |
| 9167 | (origin |
| 9168 | (method url-fetch) |
| 9169 | (uri (string-append "http://eecs.berkeley.edu/~aydin/CombBLAS_FILES/" |
| 9170 | "CombBLAS_beta_" |
| 9171 | (match (string-split version #\.) |
| 9172 | ((major minor patch) |
| 9173 | (string-append major minor "_" patch))) ;e.g. "16_2" |
| 9174 | ".tgz")) |
| 9175 | (sha256 |
| 9176 | (base32 |
| 9177 | "0gzxgd2ybnh49h57rh47vrqnsyk11jn206j5kf9y7p5vksc79ffz")) |
| 9178 | (patches (search-patches "combinatorial-blas-awpm.patch" |
| 9179 | "combinatorial-blas-io-fix.patch")))) |
| 9180 | (build-system cmake-build-system) |
| 9181 | (inputs |
| 9182 | `(("mpi" ,openmpi) |
| 9183 | ("test-data" ,(origin |
| 9184 | (method url-fetch) |
| 9185 | (uri (string-append "https://people.eecs.berkeley.edu/~aydin/" |
| 9186 | "CombBLAS_FILES/testdata_combblas1.6.1.tgz")) |
| 9187 | (sha256 |
| 9188 | (base32 |
| 9189 | "01y2781cy3fww7znmidrp85mf8zx0c905w5vzvk1mgrmhhynim87")))))) |
| 9190 | (arguments |
| 9191 | `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES" |
| 9192 | "-DCMAKE_CXX_FLAGS=-DUSE_FUNNEL") |
| 9193 | #:parallel-tests? #f ;tests use 'mpiexec -n4' |
| 9194 | #:phases |
| 9195 | (modify-phases %standard-phases |
| 9196 | (add-after 'unpack 'fix-tests |
| 9197 | (lambda _ |
| 9198 | ;; Skip failing tests (SIGFPE and SIGSEGV). |
| 9199 | (substitute* "ReleaseTests/CMakeLists.txt" |
| 9200 | (("^.*SpAsgnTest.*$") "") |
| 9201 | (("^.*IndexingTest.*$") "")))) |
| 9202 | (add-before 'check 'mpi-setup |
| 9203 | ,%openmpi-setup) |
| 9204 | (add-before 'check 'test-setup |
| 9205 | (lambda* (#:key inputs #:allow-other-keys) |
| 9206 | (setenv "OMP_NUM_THREADS" "2") |
| 9207 | (invoke "tar" "xf" (assoc-ref inputs "test-data"))))))) |
| 9208 | (home-page "https://people.eecs.berkeley.edu/~aydin/CombBLAS/html/") |
| 9209 | (synopsis "Linear algebra primitives for graph analytics") |
| 9210 | (description "The Combinatorial BLAS (CombBLAS) is an extensible |
| 9211 | distributed-memory parallel graph library offering a small but powerful set of |
| 9212 | linear algebra primitives specifically targeting graph analytics.") |
| 9213 | (license (list |
| 9214 | license:gpl2+ ;include/psort/(funnel|sort)*.h |
| 9215 | license:x11 ;usort and psort |
| 9216 | license:bsd-3)))) ;CombBLAS and MersenneTwister.h |
| 9217 | |
| 9218 | (define-public dune-common |
| 9219 | (package |
| 9220 | (name "dune-common") |
| 9221 | (version "2.10.0") |
| 9222 | (source |
| 9223 | (origin |
| 9224 | (method url-fetch) |
| 9225 | (uri (string-append "https://dune-project.org/download/" |
| 9226 | version "/dune-common-" version ".tar.gz")) |
| 9227 | (sha256 |
| 9228 | (base32 |
| 9229 | "1pdgxlxb570fm7smk1zv9b3iq1wzjg6g0s4361xs2w5qrf6drh4l")) |
| 9230 | (patches (search-patches "dune-common-skip-failing-tests.patch")))) |
| 9231 | (build-system cmake-build-system) |
| 9232 | (arguments |
| 9233 | `(#:phases |
| 9234 | (modify-phases %standard-phases |
| 9235 | (add-after 'build 'build-tests |
| 9236 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9237 | (apply invoke "make" "build_tests" |
| 9238 | `(,@(if parallel-build? |
| 9239 | `("-j" ,(number->string (parallel-job-count))) |
| 9240 | '()) |
| 9241 | ,@make-flags))))))) |
| 9242 | (inputs |
| 9243 | (list gmp metis openblas python superlu)) |
| 9244 | (native-inputs |
| 9245 | (list gfortran pkg-config)) |
| 9246 | (home-page "https://dune-project.org/") |
| 9247 | (synopsis "Distributed and Unified Numerics Environment") |
| 9248 | (description "DUNE, the Distributed and Unified Numerics Environment is a |
| 9249 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with |
| 9250 | grid-based methods. It supports the easy implementation of methods like |
| 9251 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite |
| 9252 | Differences} (FD).") |
| 9253 | ;; GPL version 2 with "runtime exception" to make it behave like LGPLv2. |
| 9254 | (license license:gpl2))) |
| 9255 | |
| 9256 | (define-public dune-geometry |
| 9257 | (package |
| 9258 | (name "dune-geometry") |
| 9259 | (version "2.10.0") |
| 9260 | (source |
| 9261 | (origin |
| 9262 | (method url-fetch) |
| 9263 | (uri (string-append "https://dune-project.org/download/" |
| 9264 | version "/dune-geometry-" version ".tar.gz")) |
| 9265 | (sha256 |
| 9266 | (base32 |
| 9267 | "00vkidb931zvpq3nmw8ikyg8pr3jqisfq2qxwj9hqzj7634qms98")))) |
| 9268 | (build-system cmake-build-system) |
| 9269 | (arguments |
| 9270 | `(#:phases |
| 9271 | (modify-phases %standard-phases |
| 9272 | (add-after 'build 'build-tests |
| 9273 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9274 | (apply invoke "make" "build_tests" |
| 9275 | `(,@(if parallel-build? |
| 9276 | `("-j" ,(number->string (parallel-job-count))) |
| 9277 | '()) |
| 9278 | ,@make-flags))))))) |
| 9279 | (inputs |
| 9280 | (list dune-common |
| 9281 | ;; Optional |
| 9282 | openblas gmp python)) |
| 9283 | (native-inputs |
| 9284 | (list gfortran pkg-config)) |
| 9285 | (home-page "https://dune-project.org/") |
| 9286 | (synopsis "Distributed and Unified Numerics Environment") |
| 9287 | (description "DUNE, the Distributed and Unified Numerics Environment is a |
| 9288 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with |
| 9289 | grid-based methods. It supports the easy implementation of methods like |
| 9290 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite |
| 9291 | Differences} (FD). |
| 9292 | |
| 9293 | This package contains the basic DUNE geometry classes.") |
| 9294 | ;; GPL version 2 with "runtime exception" |
| 9295 | (license license:gpl2))) |
| 9296 | |
| 9297 | (define-public dune-uggrid |
| 9298 | (package |
| 9299 | (name "dune-uggrid") |
| 9300 | (version "2.10.0") |
| 9301 | (source |
| 9302 | (origin |
| 9303 | (method url-fetch) |
| 9304 | (uri (string-append "https://dune-project.org/download/" |
| 9305 | version "/dune-uggrid-" version ".tar.gz")) |
| 9306 | (sha256 |
| 9307 | (base32 |
| 9308 | "1wm1jy8ssfzpskhk7z34ahmw0q0iyna0dgph8kskv6j2i8v7skip")))) |
| 9309 | (build-system cmake-build-system) |
| 9310 | (arguments |
| 9311 | `(#:phases |
| 9312 | (modify-phases %standard-phases |
| 9313 | (add-after 'build 'build-tests |
| 9314 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9315 | (apply invoke "make" "build_tests" |
| 9316 | `(,@(if parallel-build? |
| 9317 | `("-j" ,(number->string (parallel-job-count))) |
| 9318 | '()) |
| 9319 | ,@make-flags))))))) |
| 9320 | (inputs |
| 9321 | (list dune-common)) |
| 9322 | (native-inputs |
| 9323 | (list gfortran pkg-config)) |
| 9324 | (home-page "https://dune-project.org/") |
| 9325 | (synopsis "Distributed and Unified Numerics Environment") |
| 9326 | (description "DUNE, the Distributed and Unified Numerics Environment is a |
| 9327 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with |
| 9328 | grid-based methods. It supports the easy implementation of methods like |
| 9329 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite |
| 9330 | Differences} (FD). |
| 9331 | |
| 9332 | This package contains the DUNE UG grid classes.") |
| 9333 | (license license:lgpl2.1))) |
| 9334 | |
| 9335 | (define-public dune-grid |
| 9336 | (package |
| 9337 | (name "dune-grid") |
| 9338 | (version "2.10.0") |
| 9339 | (source |
| 9340 | (origin |
| 9341 | (method url-fetch) |
| 9342 | (uri (string-append "https://dune-project.org/download/" |
| 9343 | version "/dune-grid-" version ".tar.gz")) |
| 9344 | (sha256 |
| 9345 | (base32 |
| 9346 | "0mh06g3sryx3s0d7zgzsz6j18vbzb0f46wq7aw6ahj2hswb7rsrg")))) |
| 9347 | (build-system cmake-build-system) |
| 9348 | (arguments |
| 9349 | `(#:phases |
| 9350 | (modify-phases %standard-phases |
| 9351 | (add-after 'build 'build-tests |
| 9352 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9353 | (apply invoke "make" "build_tests" |
| 9354 | `(,@(if parallel-build? |
| 9355 | `("-j" ,(number->string (parallel-job-count))) |
| 9356 | '()) |
| 9357 | ,@make-flags))))))) |
| 9358 | (inputs |
| 9359 | (list dune-common |
| 9360 | dune-geometry |
| 9361 | gmp |
| 9362 | metis |
| 9363 | openblas |
| 9364 | python)) |
| 9365 | (propagated-inputs |
| 9366 | (list dune-uggrid)) |
| 9367 | (native-inputs |
| 9368 | (list gfortran pkg-config)) |
| 9369 | (home-page "https://dune-project.org/") |
| 9370 | (synopsis "Distributed and Unified Numerics Environment") |
| 9371 | (description "DUNE, the Distributed and Unified Numerics Environment is a |
| 9372 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with |
| 9373 | grid-based methods. It supports the easy implementation of methods like |
| 9374 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite |
| 9375 | Differences} (FD). |
| 9376 | |
| 9377 | This package contains the basic DUNE grid classes.") |
| 9378 | ;; GPL version 2 with "runtime exception" |
| 9379 | (license license:gpl2))) |
| 9380 | |
| 9381 | (define-public dune-istl |
| 9382 | (package |
| 9383 | (name "dune-istl") |
| 9384 | (version "2.10.0") |
| 9385 | (source |
| 9386 | (origin |
| 9387 | (method url-fetch) |
| 9388 | (uri (string-append "https://dune-project.org/download/" |
| 9389 | version "/dune-istl-" version ".tar.gz")) |
| 9390 | (sha256 |
| 9391 | (base32 |
| 9392 | "0rk95rkj87gpb3gn40jl532rybs2lxkhn7g6b30m9kbzz7yfjfbc")))) |
| 9393 | (build-system cmake-build-system) |
| 9394 | (arguments |
| 9395 | `(#:phases |
| 9396 | (modify-phases %standard-phases |
| 9397 | ;; XXX: istl/test/matrixtest.cc includes <fenv.h> and fails to find |
| 9398 | ;; the stdlib types when the gfortran header is used. Remove gfortran |
| 9399 | ;; from CPLUS_INCLUDE_PATH as a workaround. |
| 9400 | (add-after 'set-paths 'hide-gfortran |
| 9401 | (lambda* (#:key inputs #:allow-other-keys) |
| 9402 | (let ((gfortran (assoc-ref inputs "gfortran"))) |
| 9403 | (setenv "CPLUS_INCLUDE_PATH" |
| 9404 | (string-join |
| 9405 | (delete (string-append gfortran "/include/c++") |
| 9406 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) |
| 9407 | ":")) |
| 9408 | #t))) |
| 9409 | (add-after 'build 'build-tests |
| 9410 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9411 | (apply invoke "make" "build_tests" |
| 9412 | `(,@(if parallel-build? |
| 9413 | `("-j" ,(number->string (parallel-job-count))) |
| 9414 | '()) |
| 9415 | ,@make-flags))))))) |
| 9416 | (inputs |
| 9417 | (list dune-common |
| 9418 | ;; Optional |
| 9419 | metis |
| 9420 | suitesparse |
| 9421 | superlu |
| 9422 | openblas |
| 9423 | gmp |
| 9424 | python)) |
| 9425 | (native-inputs |
| 9426 | (list gfortran pkg-config)) |
| 9427 | (home-page "https://dune-project.org/") |
| 9428 | (synopsis "Distributed and Unified Numerics Environment") |
| 9429 | (description "DUNE, the Distributed and Unified Numerics Environment is a |
| 9430 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with |
| 9431 | grid-based methods. |
| 9432 | |
| 9433 | This is the iterative solver template library which provides generic sparse |
| 9434 | matrix/vector classes and a variety of solvers based on these classes. A |
| 9435 | special feature is the use of templates to exploit the recursive block |
| 9436 | structure of finite element matrices at compile time. Available solvers |
| 9437 | include Krylov methods, (block-) incomplete decompositions and |
| 9438 | aggregation-based algebraic multigrid.") |
| 9439 | ;; GPL version 2 with "runtime exception" |
| 9440 | (license license:gpl2))) |
| 9441 | |
| 9442 | (define-public dune-localfunctions |
| 9443 | (package |
| 9444 | (name "dune-localfunctions") |
| 9445 | (version "2.10.0") |
| 9446 | (source |
| 9447 | (origin |
| 9448 | (method url-fetch) |
| 9449 | (uri (string-append "https://dune-project.org/download/" |
| 9450 | version "/dune-localfunctions-" version ".tar.gz")) |
| 9451 | (sha256 |
| 9452 | (base32 |
| 9453 | "0a5hyd7fps18178dq41nxa21h0i9ah6sw7di8qkc4i1rh052rzc1")))) |
| 9454 | (build-system cmake-build-system) |
| 9455 | (arguments |
| 9456 | `(#:phases |
| 9457 | (modify-phases %standard-phases |
| 9458 | ;; XXX: localfunctions/test/lagrangeshapefunctiontest.cc includes <fenv.h> |
| 9459 | ;; and fails to find the stdlib types when the gfortran header is used. |
| 9460 | ;; Hide gfortran from CPLUS_INCLUDE_PATH to ensure we get the GCC header. |
| 9461 | (add-after 'set-paths 'hide-gfortran |
| 9462 | (lambda* (#:key inputs #:allow-other-keys) |
| 9463 | (let ((gfortran (assoc-ref inputs "gfortran"))) |
| 9464 | (setenv "CPLUS_INCLUDE_PATH" |
| 9465 | (string-join |
| 9466 | (delete (string-append gfortran "/include/c++") |
| 9467 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) |
| 9468 | ":")) |
| 9469 | #t))) |
| 9470 | (add-after 'build 'build-tests |
| 9471 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9472 | (apply invoke "make" "build_tests" |
| 9473 | `(,@(if parallel-build? |
| 9474 | `("-j" ,(number->string (parallel-job-count))) |
| 9475 | '()) |
| 9476 | ,@make-flags))))))) |
| 9477 | (inputs |
| 9478 | (list dune-common |
| 9479 | dune-geometry |
| 9480 | ;; Optional |
| 9481 | metis |
| 9482 | superlu |
| 9483 | gmp)) |
| 9484 | (native-inputs |
| 9485 | (list gfortran pkg-config)) |
| 9486 | (home-page "https://dune-project.org/") |
| 9487 | (synopsis "Distributed and Unified Numerics Environment") ; TODO |
| 9488 | (description "This DUNE module provides interface and implementation for |
| 9489 | shape functions defined on the DUNE reference elements. In addition to the |
| 9490 | shape function, interpolation operators and special keys are provided which |
| 9491 | can be used to assemble global function spaces on finite-element grids. |
| 9492 | |
| 9493 | This package provides an interface and implementation for shape functions |
| 9494 | defined on the DUNE reference elements. In addition to the shape function, |
| 9495 | interpolation operators and special keys are provided which can be used to |
| 9496 | assemble global function spaces on finite-element grids.") |
| 9497 | ;; GPL version 2 with "runtime exception" |
| 9498 | (license license:gpl2))) |
| 9499 | |
| 9500 | (define-public dune-alugrid |
| 9501 | (package |
| 9502 | (name "dune-alugrid") |
| 9503 | (version "2.10.0") |
| 9504 | (source |
| 9505 | (origin |
| 9506 | (method git-fetch) |
| 9507 | (uri (git-reference |
| 9508 | (url "https://gitlab.dune-project.org/extensions/dune-alugrid.git") |
| 9509 | (commit (string-append "v" version)))) |
| 9510 | (file-name (git-file-name name version)) |
| 9511 | (sha256 |
| 9512 | (base32 |
| 9513 | "0289vqf9azhgqda04qa5prn201xnsd9i0r8gy6jn0g6wfy9bcpav")))) |
| 9514 | (build-system cmake-build-system) |
| 9515 | (arguments |
| 9516 | `(#:phases |
| 9517 | (modify-phases %standard-phases |
| 9518 | (add-after 'unpack 'patch-include |
| 9519 | (lambda _ |
| 9520 | (substitute* "dune/alugrid/test/test-alugrid.cc" |
| 9521 | (("doc/grids/gridfactory/testgrids") |
| 9522 | "doc/dune-grid/grids/gridfactory/testgrids")) |
| 9523 | #t)) |
| 9524 | (add-after 'build 'build-tests |
| 9525 | (lambda* (#:key inputs make-flags parallel-build? #:allow-other-keys) |
| 9526 | (setenv "CPLUS_INCLUDE_PATH" |
| 9527 | (string-append (assoc-ref inputs "dune-grid") "/share")) |
| 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-geometry |
| 9536 | dune-grid |
| 9537 | ;; Optional |
| 9538 | metis |
| 9539 | openblas |
| 9540 | python |
| 9541 | superlu |
| 9542 | gmp |
| 9543 | zlib)) |
| 9544 | (native-inputs |
| 9545 | (list gfortran pkg-config)) |
| 9546 | (home-page "https://dune-project.org/") |
| 9547 | (synopsis "Distributed and Unified Numerics Environment") |
| 9548 | (description "ALUGrid is an adaptive, loadbalancing, unstructured |
| 9549 | implementation of the DUNE grid interface supporting either simplices or |
| 9550 | cubes.") |
| 9551 | (license license:gpl2+))) |
| 9552 | |
| 9553 | (define-public dune-subgrid |
| 9554 | ; dune-subgrid does not tag its releases. |
| 9555 | ; The following commit is the last commit on the releases/2.10 branch |
| 9556 | ; as of 2024-11-14. |
| 9557 | (let ((commit "e71cc9c2514356c7cd989f0c13661f10c37c58df")) |
| 9558 | (package |
| 9559 | (name "dune-subgrid") |
| 9560 | (version (git-version "2.10.0" "1" commit)) |
| 9561 | (source |
| 9562 | (origin |
| 9563 | (method git-fetch) |
| 9564 | (uri (git-reference |
| 9565 | (url "https://gitlab.dune-project.org/extensions/dune-subgrid") |
| 9566 | (commit commit))) |
| 9567 | (file-name (git-file-name name version)) |
| 9568 | (sha256 |
| 9569 | (base32 |
| 9570 | "1vahmj2r9r684n8rgnqqb8zhi3wibkxjsv1kql804azx71dslx0d")))) |
| 9571 | (build-system cmake-build-system) |
| 9572 | (arguments |
| 9573 | `(#:phases |
| 9574 | (modify-phases %standard-phases |
| 9575 | (add-after 'build 'build-tests |
| 9576 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9577 | (apply invoke "make" "build_tests" |
| 9578 | `(,@(if parallel-build? |
| 9579 | `("-j" ,(number->string (parallel-job-count))) |
| 9580 | '()) |
| 9581 | ,@make-flags))))))) |
| 9582 | (inputs |
| 9583 | (list dune-common |
| 9584 | dune-geometry |
| 9585 | dune-grid |
| 9586 | ;; Optional |
| 9587 | metis |
| 9588 | openblas |
| 9589 | gmp)) |
| 9590 | (native-inputs |
| 9591 | (list gfortran pkg-config)) |
| 9592 | (home-page "http://numerik.mi.fu-berlin.de/dune-subgrid/index.php") |
| 9593 | (synopsis "Distributed and Unified Numerics Environment") |
| 9594 | (description "The dune-subgrid module marks elements of |
| 9595 | another hierarchical dune grid. The set of marked elements can then be |
| 9596 | accessed as a hierarchical dune grid in its own right. Dune-Subgrid |
| 9597 | provides the full grid interface including adaptive mesh refinement.") |
| 9598 | (license license:gpl2+)))) |
| 9599 | |
| 9600 | (define-public dune-typetree |
| 9601 | (package |
| 9602 | (name "dune-typetree") |
| 9603 | (version "2.10.0") |
| 9604 | (source |
| 9605 | (origin |
| 9606 | (method url-fetch) |
| 9607 | (uri (string-append "https://dune-project.org/download/" |
| 9608 | version "/dune-typetree-" version ".tar.gz")) |
| 9609 | (sha256 |
| 9610 | (base32 |
| 9611 | "0k756c543r79jz51jfnvi6knnxv7y19xg69yb15b0hrv4gq015pf")))) |
| 9612 | (build-system cmake-build-system) |
| 9613 | (arguments |
| 9614 | `(#:phases |
| 9615 | (modify-phases %standard-phases |
| 9616 | (add-after 'build 'build-tests |
| 9617 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9618 | (apply invoke "make" "build_tests" |
| 9619 | `(,@(if parallel-build? |
| 9620 | `("-j" ,(number->string (parallel-job-count))) |
| 9621 | '()) |
| 9622 | ,@make-flags))))))) |
| 9623 | (inputs |
| 9624 | (list dune-common |
| 9625 | ;; Optional |
| 9626 | openblas |
| 9627 | python |
| 9628 | metis |
| 9629 | superlu |
| 9630 | gmp)) |
| 9631 | (native-inputs |
| 9632 | (list gfortran pkg-config)) |
| 9633 | (home-page "https://dune-project.org/") |
| 9634 | (synopsis "Distributed and Unified Numerics Environment") |
| 9635 | (description "TypeTree is a template library for constructing and |
| 9636 | operating on statically typed trees of objects.") |
| 9637 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. |
| 9638 | (license (list license:lgpl3+ license:gpl2)))) |
| 9639 | |
| 9640 | (define-public dune-functions |
| 9641 | (package |
| 9642 | (name "dune-functions") |
| 9643 | (version "2.10.0") |
| 9644 | (source |
| 9645 | (origin |
| 9646 | (method url-fetch) |
| 9647 | (uri (string-append "https://dune-project.org/download/" |
| 9648 | version "/dune-functions-" version ".tar.gz")) |
| 9649 | (sha256 |
| 9650 | (base32 |
| 9651 | "1v2yyiqacspa7fkz5pbhd9hcz8rk5bhyhlhwvr3jjgmniiy0x2hp")))) |
| 9652 | (build-system cmake-build-system) |
| 9653 | (arguments |
| 9654 | `(#:phases |
| 9655 | (modify-phases %standard-phases |
| 9656 | (add-after 'unpack 'disable-failing-tests |
| 9657 | (lambda _ |
| 9658 | (setenv "ARGS" |
| 9659 | ;; unable to load GMSH file in this test |
| 9660 | "--exclude-regex gridviewfunctionspacebasistest") |
| 9661 | #t)) |
| 9662 | (add-after 'build 'build-tests |
| 9663 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 9664 | (apply invoke "make" "build_tests" |
| 9665 | `(,@(if parallel-build? |
| 9666 | `("-j" ,(number->string (parallel-job-count))) |
| 9667 | '()) |
| 9668 | ,@make-flags))))))) |
| 9669 | (inputs |
| 9670 | (list dune-common |
| 9671 | dune-istl |
| 9672 | dune-localfunctions |
| 9673 | dune-grid |
| 9674 | dune-geometry |
| 9675 | dune-typetree |
| 9676 | openblas |
| 9677 | metis |
| 9678 | python |
| 9679 | superlu |
| 9680 | gmp)) |
| 9681 | (native-inputs |
| 9682 | (list gfortran pkg-config)) |
| 9683 | (home-page "https://dune-project.org/") |
| 9684 | (synopsis "Distributed and Unified Numerics Environment") |
| 9685 | (description "The dune-functions module provides an abstraction layer for |
| 9686 | global finite element functions. Its two main concepts are functions |
| 9687 | implemented as callable objects, and bases of finite element spaces.") |
| 9688 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. |
| 9689 | (license (list license:lgpl3+ license:gpl2)))) |
| 9690 | |
| 9691 | (define-public dune-pdelab |
| 9692 | ;; This was the last commit on the releases/2.8 branch as of 2023-04-12, |
| 9693 | ;; unfortunately there was no tag for any 2.8 release. |
| 9694 | (let ((commit "d5dddb6b1c21b95e867ff53cca159ad676689f5c")) |
| 9695 | (package |
| 9696 | (name "dune-pdelab") |
| 9697 | (version (git-version "2.8.0" "0" commit)) |
| 9698 | (source |
| 9699 | (origin |
| 9700 | (method git-fetch) |
| 9701 | (uri (git-reference |
| 9702 | (url "https://gitlab.dune-project.org/pdelab/dune-pdelab") |
| 9703 | (commit commit))) |
| 9704 | (file-name (git-file-name name version)) |
| 9705 | (sha256 |
| 9706 | (base32 |
| 9707 | "0l2idjp59a6x46vdd30xhhsnv7chql0z7msdsyra2h6pqm6xiqxk")))) |
| 9708 | (build-system cmake-build-system) |
| 9709 | (arguments '(#:tests? #f)) ; XXX: the tests cannot be compiled |
| 9710 | (inputs |
| 9711 | (list dune-common |
| 9712 | dune-istl |
| 9713 | dune-localfunctions |
| 9714 | dune-geometry |
| 9715 | dune-grid |
| 9716 | dune-typetree |
| 9717 | dune-functions |
| 9718 | ;; Optional |
| 9719 | openblas |
| 9720 | eigen |
| 9721 | metis |
| 9722 | python |
| 9723 | superlu |
| 9724 | gmp)) |
| 9725 | (native-inputs |
| 9726 | (list gfortran pkg-config)) |
| 9727 | (home-page "https://dune-project.org/") |
| 9728 | (synopsis "Differential equations solver toolbox") |
| 9729 | (description "PDELab is a partial differential equations solver toolbox |
| 9730 | built on top of DUNE, the Distributed and Unified Numerics Environment.") |
| 9731 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. |
| 9732 | (license (list license:lgpl3+ license:gpl2))))) |
| 9733 | |
| 9734 | (define add-openmpi-to-dune-package |
| 9735 | (let ((dune-package? |
| 9736 | (lambda (p) (string-prefix? "dune-" (package-name p))))) |
| 9737 | (package-mapping |
| 9738 | (lambda (p) |
| 9739 | (if (dune-package? p) |
| 9740 | (package (inherit p) |
| 9741 | (name (string-append (package-name p) "-openmpi")) |
| 9742 | (inputs (modify-inputs inputs |
| 9743 | (append openmpi))) |
| 9744 | (arguments |
| 9745 | (substitute-keyword-arguments arguments |
| 9746 | ((#:phases phases '%standard-phases) |
| 9747 | `(modify-phases ,phases |
| 9748 | (add-before 'check 'mpi-setup |
| 9749 | ,%openmpi-setup))))) |
| 9750 | (synopsis (string-append (package-synopsis p) " (with MPI support)"))) |
| 9751 | p)) |
| 9752 | (negate dune-package?)))) |
| 9753 | |
| 9754 | (define-public dune-common-openmpi |
| 9755 | (add-openmpi-to-dune-package dune-common)) |
| 9756 | |
| 9757 | (define-public dune-geometry-openmpi |
| 9758 | (add-openmpi-to-dune-package dune-geometry)) |
| 9759 | |
| 9760 | (define-public dune-istl-openmpi |
| 9761 | (add-openmpi-to-dune-package dune-istl)) |
| 9762 | |
| 9763 | (define-public dune-typetree-openmpi |
| 9764 | (add-openmpi-to-dune-package dune-typetree)) |
| 9765 | |
| 9766 | (define-public dune-uggrid-openmpi |
| 9767 | (add-openmpi-to-dune-package dune-uggrid)) |
| 9768 | |
| 9769 | (define-public dune-grid-openmpi |
| 9770 | (add-openmpi-to-dune-package dune-grid)) |
| 9771 | |
| 9772 | (define-public dune-alugrid-openmpi |
| 9773 | (add-openmpi-to-dune-package dune-alugrid)) |
| 9774 | |
| 9775 | (define-public dune-subgrid-openmpi |
| 9776 | (add-openmpi-to-dune-package dune-subgrid)) |
| 9777 | |
| 9778 | (define-public dune-localfunctions-openmpi |
| 9779 | (add-openmpi-to-dune-package dune-localfunctions)) |
| 9780 | |
| 9781 | (define-public dune-functions-openmpi |
| 9782 | (add-openmpi-to-dune-package dune-functions)) |
| 9783 | |
| 9784 | (define-public dune-pdelab-openmpi |
| 9785 | (add-openmpi-to-dune-package dune-pdelab)) |
| 9786 | |
| 9787 | (define-public nauty |
| 9788 | (package |
| 9789 | (name "nauty") |
| 9790 | (version "2.9.3") |
| 9791 | (source |
| 9792 | (origin |
| 9793 | (method url-fetch) |
| 9794 | (uri (string-append |
| 9795 | "https://pallini.di.uniroma1.it/" |
| 9796 | "nauty" (string-join (string-split version #\.) "_") ".tar.gz")) |
| 9797 | (sha256 |
| 9798 | (base32 "0nqvri1jfi95xswrcvn9dkyriy7pkjry6nwqhdc0z2pq0jpfvi4z")))) |
| 9799 | (build-system gnu-build-system) |
| 9800 | (outputs '("out" "lib")) |
| 9801 | (arguments |
| 9802 | (list |
| 9803 | #:test-target "checks" |
| 9804 | #:configure-flags #~(list "--enable-generic") ;prevent -march-native |
| 9805 | #:phases |
| 9806 | #~(modify-phases %standard-phases |
| 9807 | (add-after 'unpack 'normalize-pkgconfig-files-location |
| 9808 | (lambda _ |
| 9809 | (substitute* "makefile.in" |
| 9810 | (("^(pkgconfigexecdir=).*" _ prefix) |
| 9811 | (string-append prefix "${libdir}/pkgconfig\n")))))))) |
| 9812 | (inputs (list gmp)) ;for sumlines |
| 9813 | (home-page "https://pallini.di.uniroma1.it/") |
| 9814 | (synopsis "Library for graph automorphisms") |
| 9815 | (description "@code{nauty} (No AUTomorphisms, Yes?) is a set of |
| 9816 | procedures for computing automorphism groups of graphs and digraphs. |
| 9817 | |
| 9818 | @code{nauty} computes graph information in the form of a set of |
| 9819 | generators, the size of the group, and the orbits of the group; it can |
| 9820 | also produce a canonical label. The @code{nauty} suite is written in |
| 9821 | C and comes with a command-line interface, a collection of |
| 9822 | command-line tools, and an Application Programming Interface (API). |
| 9823 | |
| 9824 | This package provides the static libraries required to run programs |
| 9825 | compiled against the nauty library.") |
| 9826 | (license license:asl2.0))) |
| 9827 | |
| 9828 | (define-public nodesoup |
| 9829 | (package |
| 9830 | (name "nodesoup") |
| 9831 | ;; Package has no release, using the latest commit. |
| 9832 | (properties '((commit . "3158ad082bb0cd1abee75418b12b35522dbca74f") |
| 9833 | (revision . "0"))) |
| 9834 | (version (git-version "0.1.0" ;CMakeLists.txt shows this version. |
| 9835 | (assoc-ref properties 'revision) |
| 9836 | (assoc-ref properties 'commit))) |
| 9837 | (source |
| 9838 | (origin |
| 9839 | (method git-fetch) |
| 9840 | (uri (git-reference |
| 9841 | (url "https://github.com/olvb/nodesoup") |
| 9842 | (commit (assoc-ref properties 'commit)))) |
| 9843 | (file-name (git-file-name name version)) |
| 9844 | (sha256 |
| 9845 | (base32 "0ahx04jh4743v84ckn670yc1qz62nqf7bb75fappnlxp03lyllml")))) |
| 9846 | (build-system cmake-build-system) |
| 9847 | (arguments |
| 9848 | (list #:tests? #f ;No tests provided by package. |
| 9849 | #:configure-flags |
| 9850 | #~(list "-DBUILD_DEMO=OFF" |
| 9851 | "-DBUILD_SHARED_LIBS=ON"))) |
| 9852 | (native-inputs (list pkg-config)) |
| 9853 | (inputs (list cairo)) |
| 9854 | (home-page "https://github.com/olvb/nodesoup") |
| 9855 | (synopsis "C++ implementation of Fruchterman-Reingold and Kamada Kawai algorithms") |
| 9856 | (description "This library implements the Fruchterman-Reingold force-directed |
| 9857 | graph layout algorithm. It applies repulsion between all vertex pairs (to avoid overlap) |
| 9858 | and attraction between connected vertices (to pull them together). Forces decay with |
| 9859 | distance, and a global temperature limits maximum displacement per iteration, causing the |
| 9860 | layout to sta0bilize gradually.") |
| 9861 | (license license:unlicense))) |
| 9862 | |
| 9863 | (define-public speedcrunch |
| 9864 | (package |
| 9865 | (name "speedcrunch") |
| 9866 | (version "0.12.0") |
| 9867 | (source |
| 9868 | (origin |
| 9869 | (method git-fetch) |
| 9870 | (uri (git-reference |
| 9871 | (url "https://bitbucket.org/heldercorreia/speedcrunch.git") |
| 9872 | (commit (string-append "release-" version)))) |
| 9873 | (file-name (git-file-name name version)) |
| 9874 | (sha256 |
| 9875 | (base32 |
| 9876 | "0vh7cd1915bjqzkdp3sk25ngy8cq624mkh8c53c5bnzk357kb0fk")))) |
| 9877 | (build-system qt-build-system) |
| 9878 | (inputs (list qtbase-5 qtwayland-5)) |
| 9879 | (native-inputs (list qttools-5)) |
| 9880 | (arguments |
| 9881 | `(#:phases |
| 9882 | (modify-phases %standard-phases |
| 9883 | (add-after 'unpack 'chdir-to-src |
| 9884 | (lambda _ (chdir "src") #t))))) |
| 9885 | (synopsis "High-precision scientific calculator") |
| 9886 | (description |
| 9887 | "SpeedCrunch is a high-precision scientific calculator. It features a |
| 9888 | syntax-highlighted scrollable display and is designed to be fully used via |
| 9889 | keyboard. Some distinctive features are auto-completion of functions and |
| 9890 | variables, a formula book, and quick insertion of constants from various |
| 9891 | fields of knowledge.") |
| 9892 | (home-page "https://speedcrunch.org/") |
| 9893 | (license license:gpl2+))) |
| 9894 | |
| 9895 | (define-public minisat |
| 9896 | ;; This is the last commit which is available upstream, no |
| 9897 | ;; release happened since 2010. |
| 9898 | (let ((commit "37dc6c67e2af26379d88ce349eb9c4c6160e8543") |
| 9899 | (revision "1")) |
| 9900 | (package |
| 9901 | (name "minisat") |
| 9902 | (version (string-append "2.2.0-" revision "." (string-take commit 7))) |
| 9903 | (source |
| 9904 | (origin |
| 9905 | (method git-fetch) |
| 9906 | (uri (git-reference |
| 9907 | (url "https://github.com/niklasso/minisat") |
| 9908 | (commit commit))) |
| 9909 | (file-name (string-append name "-" version "-checkout")) |
| 9910 | (sha256 |
| 9911 | (base32 |
| 9912 | "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq")) |
| 9913 | (patches |
| 9914 | (search-patches "minisat-friend-declaration.patch" |
| 9915 | "minisat-install.patch")))) |
| 9916 | (build-system gnu-build-system) |
| 9917 | (arguments |
| 9918 | '(#:make-flags (list (string-append "prefix=" %output)) |
| 9919 | #:tests? #f ;no check target |
| 9920 | #:phases |
| 9921 | (modify-phases %standard-phases |
| 9922 | (delete 'configure)))) |
| 9923 | (inputs |
| 9924 | `(("zlib:static" ,zlib "static") |
| 9925 | ("zlib" ,zlib))) |
| 9926 | (synopsis |
| 9927 | "Small, yet efficient, SAT solver") |
| 9928 | (description |
| 9929 | "MiniSat is a minimalistic, open-source SAT solver, developed to help |
| 9930 | researchers and developers alike to get started on SAT.") |
| 9931 | (home-page |
| 9932 | "http://minisat.se/MiniSat.html") |
| 9933 | (license license:expat)))) |
| 9934 | |
| 9935 | (define-public kissat |
| 9936 | (package |
| 9937 | (name "kissat") |
| 9938 | (version "4.0.4") |
| 9939 | (source |
| 9940 | (origin |
| 9941 | (method git-fetch) |
| 9942 | (uri (git-reference |
| 9943 | (url "https://github.com/arminbiere/kissat") |
| 9944 | (commit (string-append "rel-" version)))) |
| 9945 | (file-name (git-file-name name version)) |
| 9946 | (sha256 |
| 9947 | (base32 |
| 9948 | "1snimig4cp97p570nin2i38my72zvwypldyhr125i1z6cd9pa046")))) |
| 9949 | (build-system gnu-build-system) |
| 9950 | (inputs (list xz gzip lzip bzip2 p7zip)) |
| 9951 | (native-inputs (list drat-trim)) |
| 9952 | (arguments |
| 9953 | (list |
| 9954 | #:test-target "test" |
| 9955 | #:configure-flags #~(list "-shared") |
| 9956 | #:phases |
| 9957 | #~(modify-phases %standard-phases |
| 9958 | (add-after 'unpack 'patch-source |
| 9959 | (lambda* (#:key inputs #:allow-other-keys) |
| 9960 | (substitute* "test/testfile.c" |
| 9961 | ;; Don't check if /etc/passwd isn't writable. |
| 9962 | ;; When building in a container/chroot, this fails spuriously. |
| 9963 | ((".*/etc/passwd.*") "")) |
| 9964 | (substitute* "scripts/generate-build-header.sh" |
| 9965 | ;; by default BUILD includes the build date which |
| 9966 | ;; makes the build not reproducible. |
| 9967 | (("^BUILD=.*$") |
| 9968 | "BUILD=guix\n")) |
| 9969 | (substitute* "src/file.c" |
| 9970 | (("(bzip2|gzip|lzma|xz) -c" all cmd) |
| 9971 | (string-append (search-input-file inputs |
| 9972 | (string-append "bin/" cmd)) |
| 9973 | " -c")) |
| 9974 | (("7z ([ax])" all mode) |
| 9975 | (string-append (search-input-file inputs "bin/7z") |
| 9976 | " " mode)) |
| 9977 | ;; Since we hard-coded the paths, we no longer need to find |
| 9978 | ;; them. |
| 9979 | (("bool found = kissat_find_executable \\(name\\);") |
| 9980 | "bool found = true;")) |
| 9981 | (substitute* "test/testmain.c" |
| 9982 | ;; SIGINT is ignored inside invoke. |
| 9983 | (("^[ \t]*SIGNAL[ \t]*\\(SIGINT\\)") "")))) |
| 9984 | (replace 'configure |
| 9985 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 9986 | ;; The configure script does not support standard GNU options. |
| 9987 | (apply invoke "./configure" configure-flags))) |
| 9988 | (replace 'install |
| 9989 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 9990 | (let ((out (assoc-ref outputs "out"))) |
| 9991 | (install-file "build/kissat" (string-append out "/bin")) |
| 9992 | (install-file "build/libkissat.so" (string-append out "/lib")) |
| 9993 | (install-file "src/kissat.h" |
| 9994 | (string-append out "/include")))))))) |
| 9995 | (home-page "https://github.com/arminbiere/kissat") |
| 9996 | (synopsis "Bare-metal SAT solver") |
| 9997 | (description |
| 9998 | "Kissat is a bare-metal SAT-solver written in C. It is a port of CaDiCaL |
| 9999 | back to C with improved data structures, better scheduling of inprocessing and |
| 10000 | optimized algorithms and implementation.") |
| 10001 | (license license:expat))) |
| 10002 | |
| 10003 | (define-public aiger |
| 10004 | (package |
| 10005 | (name "aiger") |
| 10006 | (version "1.9.20") |
| 10007 | (source (origin |
| 10008 | (method git-fetch) |
| 10009 | (uri (git-reference |
| 10010 | (url "https://github.com/arminbiere/aiger") |
| 10011 | (commit (string-append "rel-" version)))) |
| 10012 | (file-name (git-file-name name version)) |
| 10013 | (sha256 |
| 10014 | (base32 |
| 10015 | "1bjm3362l6qskmfi0gyz2h30cr157xkv8yjivmm9iwl37chk22c2")))) |
| 10016 | (outputs (list "out" "static")) |
| 10017 | (build-system gnu-build-system) |
| 10018 | (arguments |
| 10019 | (list #:make-flags #~(list (string-append "CFLAGS=-g -O2")) |
| 10020 | #:phases |
| 10021 | #~(modify-phases %standard-phases |
| 10022 | (add-after 'unpack 'patch-source |
| 10023 | (lambda* (#:key inputs #:allow-other-keys) |
| 10024 | (substitute* "aiger.c" |
| 10025 | (("\"(gzip|xz)" all cmd) |
| 10026 | (string-append |
| 10027 | "\"" |
| 10028 | (search-input-file inputs (string-append "bin/" cmd))))))) |
| 10029 | (add-after 'unpack 'patch-build-files |
| 10030 | (lambda _ |
| 10031 | (substitute* "makefile.in" |
| 10032 | (("test -d .*") "true") |
| 10033 | (("/usr/local") #$output)))) |
| 10034 | (replace 'configure |
| 10035 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 10036 | (apply invoke "./configure.sh" configure-flags))) |
| 10037 | (add-after 'install 'install-static |
| 10038 | (lambda _ |
| 10039 | (apply invoke #$(ar-for-target) "rcs" "libaiger.a" |
| 10040 | (find-files "." "\\.o$")) |
| 10041 | (let* ((lib (string-append #$output:static "/lib")) |
| 10042 | (incl (string-append #$output:static "/include/aiger"))) |
| 10043 | (mkdir-p lib) |
| 10044 | (mkdir-p incl) |
| 10045 | (install-file "libaiger.a" lib) |
| 10046 | (for-each (lambda (f) (install-file f incl)) |
| 10047 | (find-files "." "\\.h$"))))) |
| 10048 | (replace 'check |
| 10049 | (lambda* (#:key tests? #:allow-other-keys) |
| 10050 | (when tests? |
| 10051 | (setenv "CC" #$(cc-for-target)) |
| 10052 | (invoke "make" "-f" "test.mk"))))))) |
| 10053 | (inputs (list gzip xz)) |
| 10054 | (home-page "https://fmv.jku.at/aiger") |
| 10055 | (synopsis "Utilities for And-Inverter Graphs") |
| 10056 | (description "AIGER is a format, library and set of utilities for |
| 10057 | @acronym{AIG, And-Inverter Graphs}s. The focus is on conversion utilities and a |
| 10058 | generic reader and writer API.") |
| 10059 | (license (list license:expat |
| 10060 | license:bsd-3)))) ; bliftoaig |
| 10061 | |
| 10062 | (define-public cudd |
| 10063 | (package |
| 10064 | (name "cudd") |
| 10065 | (version "3.0.0") |
| 10066 | (source (origin |
| 10067 | (method git-fetch) |
| 10068 | (uri (git-reference |
| 10069 | (url "https://github.com/cuddorg/cudd") |
| 10070 | (commit (string-append "cudd-" version)))) |
| 10071 | (file-name (git-file-name name version)) |
| 10072 | (sha256 |
| 10073 | (base32 |
| 10074 | "0hyw9q42ir92vcaa7bwv6f631n85rfsxp463rnmklniq1wf6dyn9")))) |
| 10075 | (build-system gnu-build-system) |
| 10076 | (arguments (list #:configure-flags #~(list "--enable-shared"))) |
| 10077 | (native-inputs |
| 10078 | (list gcc-13)) ;XXX: 1 test fails with gcc@14. |
| 10079 | ;; The original home-page was lost to time, so we reference the "unofficial" |
| 10080 | ;; Github mirror. For what it's worth, the author of the library appears to |
| 10081 | ;; have been involved with this mirror at some point in time. |
| 10082 | (home-page "https://github.com/cuddorg/cudd") |
| 10083 | (synopsis "Manipulate decision diagrams") |
| 10084 | (description "@acronym{CUDD, Colorado University Decision Diagrams} is a |
| 10085 | library for manipulating decision diagrams. It supports binary decision |
| 10086 | diagrams, algebraic decision diagrams, and zero-suppressed binary decision |
| 10087 | diagrams.") |
| 10088 | (license license:bsd-3))) |
| 10089 | |
| 10090 | (define-public libpoly |
| 10091 | (package |
| 10092 | (name "libpoly") |
| 10093 | (version "0.2.1") |
| 10094 | (source (origin |
| 10095 | (method git-fetch) |
| 10096 | (uri (git-reference |
| 10097 | (url "https://github.com/SRI-CSL/libpoly") |
| 10098 | (commit (string-append "v" version)))) |
| 10099 | (file-name (git-file-name name version)) |
| 10100 | (sha256 |
| 10101 | (base32 |
| 10102 | "1nyiddvxzziagz7zrl2in8k1mypaj8z7vmm633h9mk4iiy586ddq")))) |
| 10103 | (build-system cmake-build-system) |
| 10104 | (inputs (list gmp)) |
| 10105 | (native-inputs |
| 10106 | (list python-minimal-wrapper)) |
| 10107 | (home-page "https://github.com/SRI-CSL/libpoly") |
| 10108 | (synopsis "Manipulate polynomials") |
| 10109 | (description "LibPoly is a C library for manipulating polynomials to support |
| 10110 | symbolic reasoning engines that need to reason about polynomial constraints.") |
| 10111 | (license license:lgpl3+))) |
| 10112 | |
| 10113 | (define-public libtaylor |
| 10114 | ;; Project proves no release or tagged versions, use the latest commit. |
| 10115 | (let ((commit "88709f03efda5b81ff460ccef67d4fd0e7d050cc") |
| 10116 | (revision "0")) |
| 10117 | (package |
| 10118 | (name "libtaylor") |
| 10119 | (version (git-version "0" revision commit)) |
| 10120 | (source |
| 10121 | (origin |
| 10122 | (method git-fetch) |
| 10123 | (uri (git-reference |
| 10124 | (url "https://github.com/uekstrom/libtaylor") |
| 10125 | (commit commit))) |
| 10126 | (file-name (git-file-name name commit)) |
| 10127 | (sha256 |
| 10128 | (base32 "17gp97vqlpmigf1rf1f5s8lavcswfvpyvqnxxjpdrz5dw9f51y6f")))) |
| 10129 | (build-system cmake-build-system) |
| 10130 | (arguments |
| 10131 | '(#:phases |
| 10132 | (modify-phases %standard-phases |
| 10133 | (delete 'check) |
| 10134 | (add-after 'install 'check |
| 10135 | (lambda* (#:key tests? #:allow-other-keys #:rest args) |
| 10136 | (when tests? |
| 10137 | (apply (assoc-ref %standard-phases 'check) args))))))) |
| 10138 | (home-page "https://github.com/uekstrom/libtaylor") |
| 10139 | (synopsis "C++ library for automatic differentiation") |
| 10140 | (description |
| 10141 | "This is a header-only C++ library for calculating analytical |
| 10142 | derivatives and taylor expansions of composite functions.") |
| 10143 | (license license:expat)))) |
| 10144 | |
| 10145 | (define-public lingeling |
| 10146 | (package |
| 10147 | (name "lingeling") |
| 10148 | (version "1.0.0") |
| 10149 | (source (origin |
| 10150 | (method git-fetch) |
| 10151 | (uri (git-reference |
| 10152 | (url "https://github.com/arminbiere/lingeling") |
| 10153 | (commit (string-append "rel-" version)))) |
| 10154 | (file-name (git-file-name name version)) |
| 10155 | (sha256 |
| 10156 | (base32 |
| 10157 | "0hszkhyni7jcw580f41rrrnwz42x56sqvd8zpcjdagvdiag76lc1")))) |
| 10158 | (build-system gnu-build-system) |
| 10159 | (arguments |
| 10160 | (list #:test-target "test" |
| 10161 | #:modules `((ice-9 match) |
| 10162 | ,@%default-gnu-modules) |
| 10163 | #:configure-flags #~(list "--aiger=.") |
| 10164 | #:phases |
| 10165 | #~(modify-phases %standard-phases |
| 10166 | (add-after 'unpack 'unpack-aiger |
| 10167 | (lambda* (#:key inputs #:allow-other-keys) |
| 10168 | (invoke #$(ar-for-target) "x" |
| 10169 | (search-input-file inputs "lib/libaiger.a") |
| 10170 | "aiger.o") |
| 10171 | (copy-file |
| 10172 | (search-input-file inputs "include/aiger/aiger.h") |
| 10173 | "aiger.h"))) |
| 10174 | (add-after 'unpack 'hard-code-commit |
| 10175 | (lambda _ |
| 10176 | (substitute* "mkconfig.sh" |
| 10177 | (("`\\./getgitid`") "")))) |
| 10178 | (add-after 'unpack 'patch-source |
| 10179 | (lambda* (#:key inputs #:allow-other-keys) |
| 10180 | (substitute* (list "treengeling.c" "lgldimacs.c") |
| 10181 | (("\"(gunzip|xz|bzcat|7z)" all cmd) |
| 10182 | (string-append |
| 10183 | "\"" |
| 10184 | (search-input-file inputs (string-append "bin/" cmd))))))) |
| 10185 | (replace 'configure |
| 10186 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 10187 | (apply invoke "./configure.sh" configure-flags))) |
| 10188 | (replace 'install |
| 10189 | (lambda* (#:key outputs #:allow-other-keys) |
| 10190 | (let ((bin (string-append (assoc-ref outputs "out") |
| 10191 | "/bin"))) |
| 10192 | (mkdir-p bin) |
| 10193 | (for-each |
| 10194 | (lambda (file) |
| 10195 | (install-file file bin)) |
| 10196 | '("blimc" "ilingeling" "lglddtrace" "lglmbt" |
| 10197 | "lgluntrace" "lingeling" "plingeling" |
| 10198 | "treengeling"))))) |
| 10199 | (add-after 'install 'wrap-path |
| 10200 | (lambda* (#:key outputs #:allow-other-keys) |
| 10201 | (with-directory-excursion (string-append |
| 10202 | (assoc-ref outputs "out") |
| 10203 | "/bin") |
| 10204 | (for-each |
| 10205 | (lambda (file) |
| 10206 | (wrap-program |
| 10207 | file |
| 10208 | '("PATH" suffix |
| 10209 | #$(map (lambda (input) |
| 10210 | (file-append (this-package-input input) "/bin")) |
| 10211 | '("gzip" "bzip2" "xz" "p7zip"))))) |
| 10212 | ;; These programs use sprintf on buffers with magic |
| 10213 | ;; values to construct commands (yes, eww), so we |
| 10214 | ;; can't easily substitute* them. |
| 10215 | '("lglddtrace" "lgluntrace" "lingeling" "plingeling")))))))) |
| 10216 | (inputs (list `(,aiger "static") bash-minimal gzip bzip2 xz p7zip)) |
| 10217 | (home-page "http://fmv.jku.at/lingeling") |
| 10218 | (synopsis "SAT solver") |
| 10219 | (description "This package provides a range of SAT solvers, including |
| 10220 | the sequential @command{lingeling} and its parallel variants |
| 10221 | @command{plingeling} and @command{treengeling}. A bounded model checker is |
| 10222 | also included.") |
| 10223 | (license license:expat))) |
| 10224 | |
| 10225 | (define-public cadical |
| 10226 | (package |
| 10227 | (name "cadical") |
| 10228 | (version "2.2.1") |
| 10229 | (source (origin |
| 10230 | (method git-fetch) |
| 10231 | (uri (git-reference |
| 10232 | (url "https://github.com/arminbiere/cadical") |
| 10233 | (commit (string-append "rel-" version)))) |
| 10234 | (file-name (git-file-name name version)) |
| 10235 | (sha256 |
| 10236 | (base32 "09p4nm8jyvhnsgpmbawzlk8b932k33s922a2rxm77sy8s31mm13m")))) |
| 10237 | (build-system gnu-build-system) |
| 10238 | (arguments |
| 10239 | (list #:test-target "test" |
| 10240 | #:configure-flags #~(list "-shared") |
| 10241 | #:modules `(((guix build copy-build-system) #:prefix copy:) |
| 10242 | (guix build gnu-build-system) |
| 10243 | (guix build utils) |
| 10244 | (ice-9 regex)) |
| 10245 | #:imported-modules %copy-build-system-modules |
| 10246 | #:phases |
| 10247 | #~(modify-phases %standard-phases |
| 10248 | ;; By default, cadical defines the DATE macro to have a $(date) |
| 10249 | ;; value. This makes the build not reproducible. If the macro |
| 10250 | ;; is not defined it uses __DATE__ and __TIME__, which we patch |
| 10251 | ;; to return a fixed date. Thus, achieving a reproducible build. |
| 10252 | ;; |
| 10253 | ;; An upstream patch for respecting SOURCE_DATE_EPOCH is pending. |
| 10254 | ;; See also <https://github.com/arminbiere/cadical/pull/164>. |
| 10255 | (add-after 'unpack 'no-build-date |
| 10256 | (lambda _ |
| 10257 | (substitute* "scripts/make-build-header.sh" |
| 10258 | (("\\[ x\"\\$DATE\" = x\" \" \\]") "true")))) |
| 10259 | (replace 'configure |
| 10260 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 10261 | (apply invoke "./configure" configure-flags))) |
| 10262 | (replace 'install |
| 10263 | (lambda args |
| 10264 | (apply |
| 10265 | (assoc-ref copy:%standard-phases 'install) |
| 10266 | #:install-plan |
| 10267 | `(("build" "bin" #:include ("cadical" "mobical")) |
| 10268 | ("build" "lib" #:include-regexp ("libcadical\\.(a|so)$")) |
| 10269 | ("src" "include" #:include ("cadical.h" "cadical.hpp")) |
| 10270 | ;; Internal headers used by cadiback. |
| 10271 | ("src" "include/cadical" #:include-regexp ("\\.hpp$"))) |
| 10272 | args)))))) |
| 10273 | (home-page "https://github.com/arminbiere/cadical") |
| 10274 | (synopsis "SAT solver") |
| 10275 | (description "This package provides a SAT solver based on conflict-driven |
| 10276 | clause learning.") |
| 10277 | (license license:expat))) |
| 10278 | |
| 10279 | (define-public cadical-2.1 |
| 10280 | (package |
| 10281 | (inherit cadical) |
| 10282 | (name "cadical") |
| 10283 | (version "2.1.3") |
| 10284 | (source (origin |
| 10285 | (method git-fetch) |
| 10286 | (uri (git-reference |
| 10287 | (url "https://github.com/arminbiere/cadical") |
| 10288 | (commit (string-append "rel-" version)))) |
| 10289 | (file-name (git-file-name name version)) |
| 10290 | (patches (search-patches "cadical-add-shared-library.patch")) |
| 10291 | (sha256 (base32 |
| 10292 | "1gl0xd6zyxb127w8k0mps9m2izaqb7im7j91by4lkknmm7xhwyav")))) |
| 10293 | (arguments (substitute-keyword-arguments (package-arguments cadical) |
| 10294 | ((#:configure-flags _) |
| 10295 | #~(list)) |
| 10296 | ((#:phases phases) |
| 10297 | #~(modify-phases #$phases |
| 10298 | (add-before 'configure 'set-shared-flags |
| 10299 | (lambda _ |
| 10300 | (setenv "CXXFLAGS" "-DPIC -fPIC"))) |
| 10301 | (replace 'check |
| 10302 | (lambda args |
| 10303 | ;; Tests are incorrectly linked upstream. |
| 10304 | ;; Since we don't install them, just work around this in the |
| 10305 | ;; check phase. |
| 10306 | (setenv "LD_LIBRARY_PATH" |
| 10307 | (string-append (getcwd) "/build")) |
| 10308 | (apply (assoc-ref %standard-phases |
| 10309 | 'check) args) |
| 10310 | (unsetenv "LD_LIBRARY_PATH"))))))))) |
| 10311 | |
| 10312 | (define-public cadiback |
| 10313 | (let ((commit "789329d8fcda851085ed72f1b07d8c3f46243b8a") |
| 10314 | (revision "1")) |
| 10315 | (package |
| 10316 | (name "cadiback") |
| 10317 | ;; Note: version taken from VERSION file |
| 10318 | (version (git-version "0.2.1" revision commit)) |
| 10319 | (source (origin |
| 10320 | (method git-fetch) |
| 10321 | (uri (git-reference |
| 10322 | (url "https://github.com/arminbiere/cadiback") |
| 10323 | (commit commit))) |
| 10324 | (file-name (git-file-name name version)) |
| 10325 | (sha256 |
| 10326 | (base32 "137jxf9g7c1979pcgcqgfff1mqk5hs41a84780px8gpcrh469cks")))) |
| 10327 | (build-system gnu-build-system) |
| 10328 | (arguments |
| 10329 | (list #:test-target "test" |
| 10330 | #:modules `(((guix build copy-build-system) #:prefix copy:) |
| 10331 | (guix build gnu-build-system) |
| 10332 | (guix build utils) |
| 10333 | (ice-9 regex)) |
| 10334 | #:imported-modules %copy-build-system-modules |
| 10335 | #:phases |
| 10336 | #~(modify-phases %standard-phases |
| 10337 | (add-after 'unpack 'patch-build-files |
| 10338 | (lambda* (#:key inputs #:allow-other-keys) |
| 10339 | (substitute* "configure" |
| 10340 | (("\\$CADICAL/src") "$CADICAL/include/cadical") |
| 10341 | (("\\$CADICAL/build") "$CADICAL/lib")) |
| 10342 | (substitute* "generate" |
| 10343 | (("\\[ -d .git \\]" all) (string-append ": " all)) |
| 10344 | (("GITID=.*") (string-append "GITID=\"" #$commit "\""))) |
| 10345 | (substitute* "makefile.in" |
| 10346 | (("\\.\\./cadical/build") |
| 10347 | (dirname |
| 10348 | (search-input-file inputs "lib/libcadical.a"))) |
| 10349 | (("\\.\\./cadical/src") |
| 10350 | (search-input-directory inputs "include/cadical"))))) |
| 10351 | (replace 'configure |
| 10352 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 10353 | (setenv "CADICAL" #$(this-package-input "cadical")) |
| 10354 | (apply invoke "./configure" configure-flags))) |
| 10355 | (replace 'install |
| 10356 | (lambda args |
| 10357 | (apply |
| 10358 | (assoc-ref copy:%standard-phases 'install) |
| 10359 | #:install-plan |
| 10360 | `(("." "bin" #:include ("cadiback"))) |
| 10361 | args)))))) |
| 10362 | (inputs (list cadical)) |
| 10363 | (home-page "https://github.com/arminbiere/cadiback") |
| 10364 | (synopsis "Backbone extractor for cadical") |
| 10365 | (description "This package provides a tool to determine the backbone of |
| 10366 | a satisfiable formula. The backbone is the set of literals that are set to |
| 10367 | true in all models.") |
| 10368 | (license license:expat)))) |
| 10369 | |
| 10370 | (define cadiback-for-cryptominisat |
| 10371 | (let ((commit "ea65a9442fc2604ee5f4ffd0f0fdd0bf481d5b42") |
| 10372 | (revision "1")) |
| 10373 | (package |
| 10374 | (inherit cadiback) |
| 10375 | (name "cadiback-for-cryptominisat") |
| 10376 | (version (git-version "0.2.1" revision commit)) |
| 10377 | (source (origin |
| 10378 | (method git-fetch) |
| 10379 | (uri (git-reference |
| 10380 | (url "https://github.com/meelgroup/cadiback") |
| 10381 | (commit commit))) |
| 10382 | (file-name (git-file-name name version)) |
| 10383 | (sha256 |
| 10384 | (base32 "1zznrlj4zp1mc7s4pfw11aq773q2lr9yl6pph630zg5mqijaim5g")))) |
| 10385 | (arguments |
| 10386 | (substitute-keyword-arguments arguments |
| 10387 | ((#:phases phases) |
| 10388 | #~(modify-phases #$phases |
| 10389 | (add-after 'patch-build-files 'fix-prefix |
| 10390 | (lambda _ |
| 10391 | (substitute* "makefile.in" |
| 10392 | (("/usr") #$output)))) |
| 10393 | (replace 'install |
| 10394 | (lambda args |
| 10395 | (mkdir-p (string-append #$output "/include")) |
| 10396 | (mkdir-p (string-append #$output "/lib")) |
| 10397 | (apply (assoc-ref %standard-phases 'install) args)))))))))) |
| 10398 | |
| 10399 | (define-public louvain-community |
| 10400 | (let ((commit "681a711a530ded0b25af72ee4881d453a80ac8ac") |
| 10401 | (revision "2")) |
| 10402 | (package |
| 10403 | (name "louvain-community") |
| 10404 | (version (git-version "1.0.0" revision commit)) |
| 10405 | (source (origin |
| 10406 | (method git-fetch) |
| 10407 | (uri (git-reference |
| 10408 | (url "https://github.com/meelgroup/louvain-community") |
| 10409 | (commit commit))) |
| 10410 | (file-name (git-file-name name version)) |
| 10411 | (sha256 |
| 10412 | (base32 |
| 10413 | "1ria6s5p7iw86mq1arbrhlbadll1k79j9y5c1bdg76zdwjfs17cs")))) |
| 10414 | (build-system cmake-build-system) |
| 10415 | (arguments |
| 10416 | (list #:tests? #f ; tests appear to require missing files |
| 10417 | #:phases |
| 10418 | #~(modify-phases %standard-phases |
| 10419 | (add-after 'unpack 'encode-git-hash |
| 10420 | (lambda _ |
| 10421 | (substitute* "CMakeLists.txt" |
| 10422 | (("GIT-hash-notfound") #$commit)))) |
| 10423 | (add-after 'unpack 'no-tune-native |
| 10424 | (lambda _ |
| 10425 | (substitute* "CMakeLists.txt" |
| 10426 | (("-mtune=native") "")))) |
| 10427 | ;; Refer to the library in ${LOUVAIN_COMMUNITIES_LIBRARIES} by |
| 10428 | ;; full path. This ensures that we find references to it in |
| 10429 | ;; software using this library via CMake. |
| 10430 | ;; |
| 10431 | ;; CMake expects module to set this variable to a full path. |
| 10432 | ;; See <https://cmake.org/cmake/help/v4.3/module/SelectLibraryConfigurations.html#command:select_library_configurations>. |
| 10433 | (add-after 'unpack 'cmake-lib-full-path |
| 10434 | (lambda* (#:key outputs #:allow-other-keys) |
| 10435 | (substitute* "louvain_communitiesConfig.cmake.in" |
| 10436 | (("louvain_communities") |
| 10437 | (string-append |
| 10438 | (assoc-ref outputs "out") |
| 10439 | "/lib/liblouvain_communities.so")))))))) |
| 10440 | (native-inputs (list python)) |
| 10441 | (home-page "https://github.com/meelgroup/louvain-community") |
| 10442 | (synopsis "Multi-criteria community detection") |
| 10443 | (description "This package provides a C++ implementation of the Louvain |
| 10444 | community detection algorithm.") |
| 10445 | (properties '((tunable? . #t))) |
| 10446 | (license license:lgpl3+)))) |
| 10447 | |
| 10448 | (define-public cryptominisat |
| 10449 | (package |
| 10450 | (name "cryptominisat") |
| 10451 | (version "5.11.22") |
| 10452 | (source |
| 10453 | (origin |
| 10454 | (method git-fetch) |
| 10455 | (uri (git-reference |
| 10456 | (url "https://github.com/msoos/cryptominisat") |
| 10457 | (commit version))) |
| 10458 | (file-name (git-file-name name version)) |
| 10459 | (sha256 |
| 10460 | (base32 |
| 10461 | "1c85gfqvy90yhh9jwmiiz2bz4i86prgpfyx1gbzl42hn2ixkcjgm")) |
| 10462 | (modules '((guix build utils))) |
| 10463 | (snippet |
| 10464 | #~(begin |
| 10465 | (substitute* "src/backbone.cpp" |
| 10466 | (("\"\\.\\./cadiback/cadiback\\.h\"") "<cadiback.h>")))))) |
| 10467 | (build-system cmake-build-system) |
| 10468 | (arguments |
| 10469 | (list |
| 10470 | #:build-type "Release" |
| 10471 | #:configure-flags #~(list "-DENABLE_TESTING=ON" "-DSTATS=ON") |
| 10472 | #:phases |
| 10473 | #~(modify-phases %standard-phases |
| 10474 | (add-after 'unpack 'patch-source |
| 10475 | (lambda* (#:key inputs #:allow-other-keys) |
| 10476 | (substitute* "CMakeLists.txt" |
| 10477 | (("add_subdirectory\\(utils/lingeling-ala\\)") "")) |
| 10478 | ;; Transitively included in vendored gtest.h. Fixed in |
| 10479 | ;; upstream: |
| 10480 | ;; https://github.com/msoos/cryptominisat/pull/686 |
| 10481 | (substitute* "tests/assump_test.cpp" |
| 10482 | (("#include <vector>") |
| 10483 | "#include <vector>\n#include <algorithm>")) |
| 10484 | (substitute* "tests/CMakeLists.txt" |
| 10485 | (("add_subdirectory\\(\\$\\{GTEST_PREFIX\\} gtest\\)") |
| 10486 | "find_package(GTest REQUIRED)") |
| 10487 | (("add_subdirectory\\(\\$\\{PROJECT_SOURCE_DIR\\}/utils/.*\\)") |
| 10488 | ""))))))) |
| 10489 | (inputs (list boost |
| 10490 | cadical |
| 10491 | cadiback-for-cryptominisat |
| 10492 | gmp |
| 10493 | louvain-community |
| 10494 | python |
| 10495 | python-numpy |
| 10496 | sqlite |
| 10497 | zlib)) |
| 10498 | (native-inputs (list googletest lingeling python python-wrapper python-lit)) |
| 10499 | (synopsis "Incremental SAT solver") |
| 10500 | (description |
| 10501 | "CryptoMiniSat is an incremental SAT solver with both command line and |
| 10502 | library (C++, C, Python) interfaces. The command-line interface takes a |
| 10503 | @acronym{CNF, Conjunctive Normal Form} as an input in the DIMACS format with |
| 10504 | the extension of XOR clauses. The library interfaces mimic this and also |
| 10505 | allow incremental solving, including assumptions.") |
| 10506 | (home-page "https://github.com/msoos/cryptominisat") |
| 10507 | (license license:expat))) |
| 10508 | |
| 10509 | (define-public libqalculate |
| 10510 | (package |
| 10511 | (name "libqalculate") |
| 10512 | (version "5.11.0") |
| 10513 | (source |
| 10514 | (origin |
| 10515 | (method git-fetch) |
| 10516 | (uri (git-reference |
| 10517 | (url "https://github.com/Qalculate/libqalculate/") |
| 10518 | (commit (string-append "v" version)))) |
| 10519 | (file-name (git-file-name name version)) |
| 10520 | (sha256 |
| 10521 | (base32 "0kmjgssrwm9djn8pb44vyajzrzxsmxzkjrdz2hvbslfql9ykc04p")))) |
| 10522 | (build-system gnu-build-system) |
| 10523 | (native-inputs |
| 10524 | (list autoconf |
| 10525 | automake |
| 10526 | doxygen |
| 10527 | gettext-minimal |
| 10528 | libtool |
| 10529 | pkg-config)) |
| 10530 | (inputs |
| 10531 | (list gmp |
| 10532 | mpfr |
| 10533 | libxml2 |
| 10534 | curl |
| 10535 | icu4c |
| 10536 | gnuplot |
| 10537 | libiconv |
| 10538 | readline)) |
| 10539 | (home-page "https://qalculate.github.io/") |
| 10540 | (synopsis "Multi-purpose calculator CLI and library") |
| 10541 | (description |
| 10542 | "Qalculate! is a multi-purpose calculator; this package contains its |
| 10543 | command line interface @code{qalc} and library @code{libqalculate}. Features |
| 10544 | include: |
| 10545 | @itemize |
| 10546 | @item arbitrary precision and interval arithmetic |
| 10547 | @item currency conversion |
| 10548 | @item physical constants |
| 10549 | @item plotting via gnuplot |
| 10550 | @item symbolic calculations (including integrals and equations) |
| 10551 | @item uncertainty propagation |
| 10552 | @item unit calculations and conversions |
| 10553 | @item user-defined functions |
| 10554 | @end itemize") |
| 10555 | (license license:gpl2+))) |
| 10556 | |
| 10557 | (define-public qalculate-gtk |
| 10558 | (package |
| 10559 | (name "qalculate-gtk") |
| 10560 | (version "5.11.0") |
| 10561 | (source |
| 10562 | (origin |
| 10563 | (method git-fetch) |
| 10564 | (uri (git-reference |
| 10565 | (url "https://github.com/Qalculate/qalculate-gtk/") |
| 10566 | (commit (string-append "v" version)))) |
| 10567 | (file-name (git-file-name name version)) |
| 10568 | (sha256 |
| 10569 | (base32 "03ppnhkzbvr8xzl2b6lsxd3i0lrhvch3blzp5g54pr6k9yjdnl0i")))) |
| 10570 | (build-system glib-or-gtk-build-system) |
| 10571 | (native-inputs |
| 10572 | (list pkg-config |
| 10573 | intltool |
| 10574 | automake |
| 10575 | autoconf |
| 10576 | libtool |
| 10577 | file)) |
| 10578 | (inputs |
| 10579 | (list gmp |
| 10580 | mpfr |
| 10581 | libqalculate |
| 10582 | libxml2 |
| 10583 | glib |
| 10584 | gtk+)) |
| 10585 | (home-page "https://qalculate.github.io/") |
| 10586 | (synopsis "Qalculate! desktop calculator (GTK interface)") |
| 10587 | (description "@code{qalculate-gtk} is the GTK frontend for the Qalculate! |
| 10588 | multi-purpose calculator.") |
| 10589 | (license license:gpl2+))) |
| 10590 | |
| 10591 | (define-public qalculate-qt |
| 10592 | (package |
| 10593 | (name "qalculate-qt") |
| 10594 | (version "5.11.0") |
| 10595 | (source |
| 10596 | (origin |
| 10597 | (method git-fetch) |
| 10598 | (uri (git-reference |
| 10599 | (url "https://github.com/Qalculate/qalculate-qt") |
| 10600 | (commit (string-append "v" version)))) |
| 10601 | (file-name (git-file-name name version)) |
| 10602 | (sha256 |
| 10603 | (base32 "1gy344widrbmvfk9v8yx349afiqqyfmm12cajhf99v74kw1xivz6")))) |
| 10604 | (build-system gnu-build-system) |
| 10605 | (arguments |
| 10606 | (list #:tests? #f ; There are no tests. |
| 10607 | #:imported-modules |
| 10608 | `(,@%default-gnu-imported-modules ,@%qt-build-system-modules) |
| 10609 | #:phases |
| 10610 | #~(modify-phases %standard-phases |
| 10611 | (replace 'configure |
| 10612 | (lambda* (#:key inputs #:allow-other-keys) |
| 10613 | (substitute* "qalculate-qt.pro" |
| 10614 | (("/usr/local") #$output) |
| 10615 | (("\\$\\$LRELEASE") |
| 10616 | (string-append |
| 10617 | (search-input-file inputs "bin/lrelease")))) |
| 10618 | (invoke "qmake"))) |
| 10619 | (add-after 'install 'qt-wrap |
| 10620 | (lambda args |
| 10621 | (apply (assoc-ref |
| 10622 | (@ (guix build qt-build-system) %standard-phases) |
| 10623 | 'qt-wrap) |
| 10624 | #:qtbase #$(this-package-input "qtbase") args)))))) |
| 10625 | (native-inputs (list pkg-config qttools)) |
| 10626 | (inputs (list gmp |
| 10627 | libqalculate |
| 10628 | mpfr |
| 10629 | qtbase)) |
| 10630 | (home-page "https://qalculate.github.io") |
| 10631 | (synopsis "Qalculate! desktop calculator (Qt interface)") |
| 10632 | (description "@code{qalculate-qt} is the Qt frontend for the Qalculate! |
| 10633 | multi-purpose calculator.") |
| 10634 | (license license:gpl2+))) |
| 10635 | |
| 10636 | (define-public numdiff |
| 10637 | (package |
| 10638 | (name "numdiff") |
| 10639 | (version "5.9.0") |
| 10640 | (source |
| 10641 | (origin |
| 10642 | (method url-fetch) |
| 10643 | (uri (string-append "mirror://savannah/numdiff/numdiff-" |
| 10644 | version ".tar.gz")) |
| 10645 | (sha256 |
| 10646 | (base32 |
| 10647 | "1vzmjh8mhwwysn4x4m2vif7q2k8i19x8azq7pzmkwwj4g48lla47")))) |
| 10648 | (build-system gnu-build-system) |
| 10649 | (arguments |
| 10650 | '(#:tests? #f ; There are no tests. |
| 10651 | #:phases |
| 10652 | (modify-phases %standard-phases |
| 10653 | (add-before 'compress-documentation 'delete-precompressed-info-file |
| 10654 | (lambda _ |
| 10655 | (delete-file (string-append (assoc-ref %outputs "out") |
| 10656 | "/share/info/numdiff.info.gz")) |
| 10657 | #t))))) |
| 10658 | (home-page "https://nongnu.org/numdiff/") |
| 10659 | (synopsis "Compare files with numeric fields") |
| 10660 | (description |
| 10661 | "Numdiff compares files line by line and field by field, ignoring small |
| 10662 | numeric differences and differences in numeric formats.") |
| 10663 | (license license:gpl3+))) |
| 10664 | |
| 10665 | (define-public why3 |
| 10666 | (package |
| 10667 | (name "why3") |
| 10668 | (version "1.7.2") |
| 10669 | (source (origin |
| 10670 | (method git-fetch) |
| 10671 | (uri (git-reference |
| 10672 | (url "https://gitlab.inria.fr/why3/why3") |
| 10673 | (commit version))) |
| 10674 | (file-name (git-file-name name version)) |
| 10675 | (sha256 |
| 10676 | (base32 |
| 10677 | "0fq8wg8ji2v2ssz1d681glmk8glps1irnmdlhqfklaggx01hlf4p")))) |
| 10678 | (build-system ocaml-build-system) |
| 10679 | (arguments |
| 10680 | (list #:phases |
| 10681 | #~(modify-phases %standard-phases |
| 10682 | (add-before 'configure 'bootstrap |
| 10683 | (lambda _ |
| 10684 | (invoke "./autogen.sh") |
| 10685 | (setenv "CONFIG_SHELL" (which "sh")) |
| 10686 | (substitute* "configure" |
| 10687 | (("#! /bin/sh") (string-append "#!" (which "sh"))) |
| 10688 | ;; find ocaml-num in the correct directory |
| 10689 | (("\\$DIR/nums.cma") "$DIR/num.cma") |
| 10690 | (("\\$DIR/num.cmi") "$DIR/core/num.cmi")))) |
| 10691 | (add-after 'configure 'fix-makefile |
| 10692 | (lambda _ |
| 10693 | (substitute* "Makefile" |
| 10694 | ;; find ocaml-num in the correct directory |
| 10695 | (("site-lib/num") "site-lib")))) |
| 10696 | (add-after 'install 'install-lib |
| 10697 | (lambda _ |
| 10698 | (invoke "make" "byte") |
| 10699 | (invoke "make" "install-lib")))))) |
| 10700 | (native-inputs (list autoconf |
| 10701 | automake |
| 10702 | coq |
| 10703 | ocaml |
| 10704 | ocaml-findlib |
| 10705 | which)) |
| 10706 | (propagated-inputs (list camlzip |
| 10707 | lablgtk3 |
| 10708 | ocaml-graph |
| 10709 | ocaml-lablgtk3-sourceview3 |
| 10710 | ocaml-menhir |
| 10711 | ocaml-ppx-deriving |
| 10712 | ocaml-ppx-sexp-conv |
| 10713 | ocaml-num |
| 10714 | ocaml-re |
| 10715 | ocaml-sexplib |
| 10716 | ocaml-zarith)) |
| 10717 | (inputs (list coq-flocq |
| 10718 | emacs-minimal |
| 10719 | zlib)) |
| 10720 | (home-page "https://why3.lri.fr") |
| 10721 | (synopsis "Deductive program verification") |
| 10722 | (description "Why3 provides a language for specification and programming, |
| 10723 | called WhyML, and relies on external theorem provers, both automated and |
| 10724 | interactive, to discharge verification conditions. Why3 comes with a standard |
| 10725 | library of logical theories (integer and real arithmetic, Boolean operations, |
| 10726 | sets and maps, etc.) and basic programming data structures (arrays, queues, |
| 10727 | hash tables, etc.). A user can write WhyML programs directly and get |
| 10728 | correct-by-construction OCaml programs through an automated extraction |
| 10729 | mechanism. WhyML is also used as an intermediate language for the verification |
| 10730 | of C, Java, or Ada programs.") |
| 10731 | (license license:lgpl2.1))) |
| 10732 | |
| 10733 | (define-public frama-c |
| 10734 | (package |
| 10735 | (name "frama-c") |
| 10736 | (version "29.0") |
| 10737 | (source (origin |
| 10738 | (method url-fetch) |
| 10739 | (uri (string-append "https://frama-c.com/download/frama-c-" |
| 10740 | version "-Copper.tar.gz")) |
| 10741 | (sha256 |
| 10742 | (base32 |
| 10743 | "14vlvynp3yfmnkixm676c1ip0jlkiqjzmrp9f9c990zzs2wb7yyj")))) |
| 10744 | (build-system dune-build-system) |
| 10745 | (arguments |
| 10746 | (list #:phases |
| 10747 | #~(modify-phases %standard-phases |
| 10748 | (add-before 'build 'set-env |
| 10749 | (lambda _ |
| 10750 | (setenv "CC" "gcc"))) |
| 10751 | (add-after 'install 'wrap-programs |
| 10752 | (lambda _ |
| 10753 | (let ((ocamlpath |
| 10754 | `(,(string-append #$output "/lib/ocaml/site-lib") |
| 10755 | ,@(search-path-as-string->list |
| 10756 | (getenv "OCAMLPATH"))))) |
| 10757 | (for-each |
| 10758 | (lambda (program) |
| 10759 | (wrap-program (string-append #$output "/bin/" program) |
| 10760 | `("OCAMLPATH" ":" prefix ,ocamlpath))) |
| 10761 | '("frama-c" "frama-c-gui")))))))) |
| 10762 | (inputs |
| 10763 | (list bash-minimal gmp zlib)) |
| 10764 | (propagated-inputs (list |
| 10765 | graphviz |
| 10766 | lablgtk3 |
| 10767 | ocaml-graph |
| 10768 | ocaml-odoc |
| 10769 | ocaml-lablgtk3-sourceview3 |
| 10770 | ocaml-yaml |
| 10771 | ocaml-yojson |
| 10772 | ocaml-zarith |
| 10773 | ocaml-ppx-deriving |
| 10774 | ocaml-ppx-deriving-yojson |
| 10775 | ocaml-ppx-deriving-yaml |
| 10776 | ocaml-ppx-import |
| 10777 | ocaml-unionfind |
| 10778 | why3)) |
| 10779 | (native-inputs (list dune-site time ocaml-menhir ocaml-graph)) |
| 10780 | (native-search-paths |
| 10781 | (list (search-path-specification |
| 10782 | (variable "FRAMAC_SHARE") |
| 10783 | (files '("share/frama-c")) |
| 10784 | (separator #f)) |
| 10785 | (search-path-specification |
| 10786 | (variable "FRAMAC_LIB") |
| 10787 | (files '("lib/frama-c")) |
| 10788 | (separator #f)))) |
| 10789 | (home-page "https://frama-c.com") |
| 10790 | (synopsis "C source code analysis platform") |
| 10791 | (description "Frama-C is an extensible and collaborative platform dedicated |
| 10792 | to source-code analysis of C software. The Frama-C analyzers assist you in |
| 10793 | various source-code-related activities, from the navigation through unfamiliar |
| 10794 | projects up to the certification of critical software.") |
| 10795 | (license license:lgpl2.1+))) |
| 10796 | |
| 10797 | (define-public blitz |
| 10798 | (package |
| 10799 | (name "blitz") |
| 10800 | (version "1.0.2") |
| 10801 | (source |
| 10802 | (origin |
| 10803 | (method git-fetch) |
| 10804 | (uri (git-reference |
| 10805 | (url "https://github.com/blitzpp/blitz") |
| 10806 | (commit version))) |
| 10807 | (file-name (git-file-name name version)) |
| 10808 | (sha256 |
| 10809 | (base32 "0c88gc72j3zggyk4yrrip6i0v7xkx97l140vpy3xhxs2i7xy1461")))) |
| 10810 | (build-system cmake-build-system) |
| 10811 | (arguments |
| 10812 | (list |
| 10813 | #:configure-flags #~(list "-DBUILD_DOC=ON") |
| 10814 | #:modules '((guix build cmake-build-system) |
| 10815 | ((guix build gnu-build-system) #:prefix gnu:) |
| 10816 | (guix build utils)) |
| 10817 | #:phases |
| 10818 | #~(modify-phases %standard-phases |
| 10819 | (add-after 'build 'build-doc |
| 10820 | (lambda _ |
| 10821 | (invoke "make" "-j" (number->string (parallel-job-count)) |
| 10822 | "blitz-doc"))) |
| 10823 | (replace 'check |
| 10824 | (lambda* (#:rest args) |
| 10825 | (apply (assoc-ref gnu:%standard-phases 'check) |
| 10826 | ;; The default "check" target also includes examples and |
| 10827 | ;; benchmarks. |
| 10828 | #:test-target "check-testsuite" args)))))) |
| 10829 | (native-inputs |
| 10830 | (list python texinfo)) |
| 10831 | (synopsis "C++ template class library for multidimensional arrays") |
| 10832 | (description "Blitz++ is a C++ template class library that provides |
| 10833 | high-performance multidimensional array containers for scientific computing.") |
| 10834 | (home-page "https://github.com/blitzpp/blitz") |
| 10835 | (license (list license:artistic2.0 |
| 10836 | license:bsd-3 |
| 10837 | license:lgpl3+)))) |
| 10838 | |
| 10839 | (define-public fxdiv |
| 10840 | ;; There is currently no tag in this repo. |
| 10841 | (let ((commit "63058eff77e11aa15bf531df5dd34395ec3017c8") |
| 10842 | (version "0.0") |
| 10843 | (revision "1")) |
| 10844 | (package |
| 10845 | (name "fxdiv") |
| 10846 | (version (git-version version revision commit)) |
| 10847 | (home-page "https://github.com/Maratyszcza/FXdiv") |
| 10848 | (source (origin |
| 10849 | (method git-fetch) |
| 10850 | (uri (git-reference (url home-page) (commit commit))) |
| 10851 | (file-name (git-file-name name version)) |
| 10852 | (sha256 |
| 10853 | (base32 |
| 10854 | "0zwzh8gmbx4m6b18s5nf13b0dk5yjkd1fs8f421bl7fz5f9gjd9f")) |
| 10855 | (patches (search-patches "fxdiv-system-libraries.patch")))) |
| 10856 | (build-system cmake-build-system) |
| 10857 | (inputs |
| 10858 | (list googletest-1.8 googlebenchmark)) |
| 10859 | (synopsis |
| 10860 | "C++ library for division via fixed-point multiplication by inverse") |
| 10861 | (description |
| 10862 | "On modern CPUs and GPUs, integer division is several times slower than |
| 10863 | multiplication. FXdiv implements an algorithm to replace an integer division |
| 10864 | with a multiplication and two shifts. This algorithm improves performance |
| 10865 | when an application performs repeated divisions by the same divisor.") |
| 10866 | (license license:expat)))) |
| 10867 | |
| 10868 | (define-public fp16 |
| 10869 | ;; There is currently no tag in this repo. |
| 10870 | (let ((commit "0a92994d729ff76a58f692d3028ca1b64b145d91") |
| 10871 | (version "0.0") |
| 10872 | (revision "1")) |
| 10873 | (package |
| 10874 | (name "fp16") |
| 10875 | (version (git-version version revision commit)) |
| 10876 | (home-page "https://github.com/Maratyszcza/FP16") |
| 10877 | (source (origin |
| 10878 | (method git-fetch) |
| 10879 | (uri (git-reference (url home-page) (commit commit))) |
| 10880 | (file-name (git-file-name name version)) |
| 10881 | (sha256 |
| 10882 | (base32 |
| 10883 | "05mm4vrxsac35hjf5djif9r6rdxj9ippg97ia3p6q6b8lrp7srwv")) |
| 10884 | (patches (search-patches "fp16-implicit-double.patch" |
| 10885 | "fp16-system-libraries.patch")))) |
| 10886 | (build-system cmake-build-system) |
| 10887 | (arguments |
| 10888 | (list |
| 10889 | #:imported-modules |
| 10890 | (append %cmake-build-system-modules |
| 10891 | %pyproject-build-system-modules) |
| 10892 | #:modules |
| 10893 | `(((guix build pyproject-build-system) #:select (site-packages)) |
| 10894 | (guix build cmake-build-system) |
| 10895 | (guix build utils)) |
| 10896 | #:phases |
| 10897 | #~(modify-phases %standard-phases |
| 10898 | (add-after 'install 'move-python-files |
| 10899 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 10900 | ;; Python files get installed to $includedir (!). |
| 10901 | ;; Move them to the usual Python site directory. |
| 10902 | (let* ((include (string-append #$output "/include")) |
| 10903 | (site (site-packages inputs outputs)) |
| 10904 | (target (string-append site "/fp16"))) |
| 10905 | (mkdir-p target) |
| 10906 | (for-each (lambda (file) |
| 10907 | (rename-file file |
| 10908 | (string-append target "/" |
| 10909 | (basename file)))) |
| 10910 | (find-files include "\\.py$")))))))) |
| 10911 | (native-inputs (list python-wrapper)) |
| 10912 | (inputs (list psimd googletest-1.8 googlebenchmark)) |
| 10913 | (synopsis "C++ library for half-precision floating point formats") |
| 10914 | (description |
| 10915 | "This header-only C++ library implements conversion to and from |
| 10916 | half-precision floating point formats.") |
| 10917 | (license license:expat)))) |
| 10918 | |
| 10919 | (define-public fparser |
| 10920 | (package |
| 10921 | (name "fparser") |
| 10922 | (version "4.5.1") |
| 10923 | (source |
| 10924 | (origin |
| 10925 | (method git-fetch) |
| 10926 | (uri (git-reference |
| 10927 | (url "https://github.com/thliebig/fparser") |
| 10928 | (commit "e625e262620036a52d1dc9abc122d2bf67397e40"))) |
| 10929 | (file-name (git-file-name name version)) |
| 10930 | (sha256 |
| 10931 | (base32 "11gkdqcbk26bwrn5si6vmbd0gsni5kg56j32jhmp2j4h1jrww54k")))) |
| 10932 | (arguments |
| 10933 | (list |
| 10934 | #:tests? #f)) ;No tests |
| 10935 | (build-system cmake-build-system) |
| 10936 | (home-page "http://warp.povusers.org/FunctionParser/") |
| 10937 | (synopsis "Function parser library for C++") |
| 10938 | (description |
| 10939 | "FunctionParser is a C++ library for parsing and evaluating mathematical expressions. |
| 10940 | This package is based on a maintained fork of |
| 10941 | @url{http://warp.povusers.org/FunctionParser/, the original project}.") |
| 10942 | (license license:lgpl3))) |
| 10943 | |
| 10944 | (define-public soplex |
| 10945 | (package |
| 10946 | (name "soplex") |
| 10947 | (version "8.0.1") |
| 10948 | (source |
| 10949 | (origin |
| 10950 | (method git-fetch) |
| 10951 | (uri (git-reference |
| 10952 | (url "https://github.com/scipopt/soplex") |
| 10953 | (commit (string-append "v" version)))) |
| 10954 | (file-name (git-file-name name version)) |
| 10955 | (sha256 |
| 10956 | (base32 "1j0xqm99pdvj6l52q4wk96aj0vnq3xgm2gdyli4g8gfb1g1m9p9l")))) |
| 10957 | (build-system cmake-build-system) |
| 10958 | (arguments |
| 10959 | (list |
| 10960 | #:configure-flags |
| 10961 | #~(list "-DPAPILO=OFF"))) |
| 10962 | (inputs (list boost gmp mpfr zlib)) |
| 10963 | (home-page "https://soplex.zib.de/") |
| 10964 | (synopsis "Sequential object-oriented simPlex linear programming solver") |
| 10965 | (description |
| 10966 | "SoPlex is an optimization package for solving linear |
| 10967 | programming problems (LPs) based on an advanced implementation of the primal |
| 10968 | and dual revised simplex algorithm. It provides special support for the exact |
| 10969 | solution of LPs with rational input data. It can be used as a standalone |
| 10970 | solver reading MPS or LP format files via a command line interface as well as |
| 10971 | embedded into other programs via a C++ class library.") |
| 10972 | (license license:asl2.0))) |
| 10973 | |
| 10974 | (define-public scip |
| 10975 | (package |
| 10976 | (name "scip") |
| 10977 | (version "10.1.0") |
| 10978 | (source |
| 10979 | (origin |
| 10980 | (method git-fetch) |
| 10981 | (uri (git-reference |
| 10982 | (url "https://github.com/scipopt/scip") |
| 10983 | (commit (string-append "v" version)))) |
| 10984 | (file-name (git-file-name name version)) |
| 10985 | (sha256 |
| 10986 | (base32 "0w2wq3048fxkip7zm44r5g3vgbhs42j292akw7v3x29p4vy52b04")))) |
| 10987 | (build-system cmake-build-system) |
| 10988 | (arguments |
| 10989 | (list |
| 10990 | #:build-type "Release" |
| 10991 | #:parallel-tests? #f |
| 10992 | #:configure-flags |
| 10993 | #~(list "-DPAPILO=OFF" |
| 10994 | "-DZIMPL=OFF" |
| 10995 | "-DAMPL=ON" |
| 10996 | "-DLAPACK=ON" |
| 10997 | "-DIPOPT=OFF" |
| 10998 | (string-append |
| 10999 | "-DSOPLEX_DIR=" #$(this-package-input "soplex"))))) |
| 11000 | (inputs (list boost |
| 11001 | gmp |
| 11002 | lapack |
| 11003 | mpfr |
| 11004 | readline |
| 11005 | soplex |
| 11006 | zlib)) |
| 11007 | (native-inputs (list perl python-minimal-wrapper)) |
| 11008 | (home-page "https://www.scipopt.org/") |
| 11009 | (synopsis "Solving constraint integer programs") |
| 11010 | (description |
| 11011 | "SCIP is a solver for mixed integer programming (MIP) and mixed |
| 11012 | integer nonlinear programming (MINLP). It is a framework for constraint |
| 11013 | integer programming and branch-cut-and-price, allowing total control |
| 11014 | of the solution process and access to detailed information down to the |
| 11015 | internals of the solver.") |
| 11016 | (license license:asl2.0))) |
| 11017 | |
| 11018 | (define-public or-tools |
| 11019 | (package |
| 11020 | (name "or-tools") |
| 11021 | (version "9.15") |
| 11022 | (source |
| 11023 | (origin |
| 11024 | (method git-fetch) |
| 11025 | (uri (git-reference |
| 11026 | (url "https://github.com/google/or-tools") |
| 11027 | (commit (string-append "v" version)))) |
| 11028 | (file-name (git-file-name name version)) |
| 11029 | (sha256 |
| 11030 | (base32 "0hb608s6c7aiyr8vaj0gi0jf45z39wvwvrgfq8x5dzgyzy06zszp")))) |
| 11031 | (build-system cmake-build-system) |
| 11032 | (arguments |
| 11033 | (list |
| 11034 | #:tests? #f ;TODO: requires protobuf-matchers |
| 11035 | #:configure-flags |
| 11036 | #~(list "-DBUILD_CXX=ON" |
| 11037 | "-DBUILD_DEPS=OFF" |
| 11038 | "-DBUILD_DOTNET=OFF" |
| 11039 | "-DBUILD_EXAMPLES=OFF" |
| 11040 | "-DBUILD_JAVA=OFF" |
| 11041 | "-DBUILD_PYTHON=OFF" |
| 11042 | "-DBUILD_SAMPLES=OFF" |
| 11043 | "-DBUILD_SHARED_LIBS=ON" |
| 11044 | "-DUSE_COINOR=OFF" |
| 11045 | "-DUSE_CPLEX=OFF" |
| 11046 | "-DUSE_GLPK=ON" |
| 11047 | "-DUSE_HIGHS=OFF" |
| 11048 | "-DUSE_SCIP=ON" |
| 11049 | (string-append "-DSCIP_DIR=" #$(this-package-input "scip"))))) |
| 11050 | (native-inputs |
| 11051 | (list benchmark |
| 11052 | googletest |
| 11053 | pkg-config |
| 11054 | python-minimal-wrapper)) |
| 11055 | (inputs |
| 11056 | (list abseil-cpp |
| 11057 | eigen |
| 11058 | glpk |
| 11059 | gmp |
| 11060 | mpfr |
| 11061 | protobuf-6 |
| 11062 | re2-next |
| 11063 | scip |
| 11064 | zlib)) |
| 11065 | (home-page "https://developers.google.com/optimization") |
| 11066 | (synopsis "Software suite for combinatorial optimization") |
| 11067 | (description |
| 11068 | "OR-Tools is a C++ portable software suite, tuned for solving |
| 11069 | combinatorial optimization problems in vehicle routing, flows, integer, linear |
| 11070 | and constraint programming.") |
| 11071 | (license license:asl2.0))) |
| 11072 | |
| 11073 | (define-public scilab |
| 11074 | (package |
| 11075 | (name "scilab") |
| 11076 | (version "2025.1.0") |
| 11077 | (source |
| 11078 | (origin |
| 11079 | (method git-fetch) |
| 11080 | (uri (git-reference |
| 11081 | (url "https://gitlab.com/scilab/scilab") |
| 11082 | (commit version))) |
| 11083 | (file-name (git-file-name name version)) |
| 11084 | (sha256 |
| 11085 | (base32 |
| 11086 | "1db23hla27lfrf1qvk3p4465qqizxb1a6qkjh4k6rzdxgvxdbxng")) |
| 11087 | (patches (search-patches "scilab-better-compiler-detection.patch" |
| 11088 | "scilab-tbx_build_help.patch")) |
| 11089 | (modules '((guix build utils) |
| 11090 | (ice-9 ftw))) |
| 11091 | (snippet |
| 11092 | #~(begin |
| 11093 | ;; Delete everything except for scilab itself: |
| 11094 | (for-each (lambda (file) |
| 11095 | (unless (member file '("." ".." "scilab")) |
| 11096 | (delete-file-recursively file))) |
| 11097 | (scandir ".")) |
| 11098 | (for-each (lambda (file) |
| 11099 | (unless (member file '("." "..")) |
| 11100 | (rename-file (string-append "scilab/" file) file))) |
| 11101 | (scandir "scilab")) |
| 11102 | |
| 11103 | ;; Some clean-up in scilab: |
| 11104 | (for-each delete-file-recursively |
| 11105 | '("scilab" |
| 11106 | "config" |
| 11107 | "libs/GetWindowsVersion" |
| 11108 | "Visual-Studio-settings")) |
| 11109 | (for-each delete-file |
| 11110 | (append |
| 11111 | (list "aclocal.m4" |
| 11112 | "configure" |
| 11113 | "m4/ax_cxx_compile_stdcxx.m4" |
| 11114 | "m4/lib-ld.m4" |
| 11115 | "m4/libtool.m4" |
| 11116 | "m4/ltoptions.m4" |
| 11117 | "m4/ltsugar.m4" |
| 11118 | "m4/ltversion.m4" |
| 11119 | "m4/lt~obsolete.m4" |
| 11120 | "m4/pkg.m4" |
| 11121 | "Scilab.sln") |
| 11122 | (find-files "." "^Makefile\\.in$") |
| 11123 | (find-files "." "\\.bat$"))) |
| 11124 | |
| 11125 | ;; And finally some files in the modules directory: |
| 11126 | (for-each |
| 11127 | (lambda (file) |
| 11128 | (delete-file |
| 11129 | (string-append "modules/dynamic_link/src/scripts/" file))) |
| 11130 | '("aclocal.m4" |
| 11131 | "configure" |
| 11132 | "compile" |
| 11133 | "config.guess" |
| 11134 | "config.sub" |
| 11135 | "depcomp" |
| 11136 | "install-sh" |
| 11137 | "ltmain.sh" |
| 11138 | "missing")) |
| 11139 | (delete-file-recursively "modules/dynamic_link/src/scripts/m4") |
| 11140 | (for-each delete-file |
| 11141 | '("modules/ast/src/cpp/parse/scanscilab.cpp" |
| 11142 | "modules/ast/src/cpp/parse/bison/parsescilab.output" |
| 11143 | "modules/ast/includes/parse/parsescilab.hxx" |
| 11144 | "modules/ast/src/cpp/parse/parsescilab.cpp")))))) |
| 11145 | (build-system gnu-build-system) |
| 11146 | (native-inputs |
| 11147 | (list autoconf-2.71 |
| 11148 | autoconf-archive |
| 11149 | automake |
| 11150 | bison |
| 11151 | coreutils-minimal |
| 11152 | eigen |
| 11153 | flex |
| 11154 | gfortran |
| 11155 | libtool |
| 11156 | ocaml |
| 11157 | ocaml-findlib |
| 11158 | pkg-config)) |
| 11159 | (inputs (list `(,pcre "bin") |
| 11160 | `(,pcre "out") |
| 11161 | arpack-ng |
| 11162 | bash-minimal |
| 11163 | curl |
| 11164 | fftw |
| 11165 | gettext-minimal |
| 11166 | hdf5 |
| 11167 | libarchive |
| 11168 | libx11 |
| 11169 | libxml2 |
| 11170 | matio |
| 11171 | ocaml-num |
| 11172 | openblas |
| 11173 | rapidjson |
| 11174 | readline |
| 11175 | suitesparse |
| 11176 | tcl |
| 11177 | tk)) |
| 11178 | (arguments |
| 11179 | (let* ((tcl (this-package-input "tcl")) |
| 11180 | (tk (this-package-input "tk"))) |
| 11181 | (list |
| 11182 | #:configure-flags |
| 11183 | #~(list |
| 11184 | "--enable-relocatable" |
| 11185 | "--disable-static-system-lib" |
| 11186 | "--enable-build-parser" |
| 11187 | ;; Disable all java code. |
| 11188 | "--without-gui" |
| 11189 | "--without-javasci" |
| 11190 | "--disable-build-help" |
| 11191 | "--with-external-scirenderer" |
| 11192 | ;; Tcl and Tk library locations. |
| 11193 | (string-append "--with-tcl-include=" #$tcl "/include") |
| 11194 | (string-append "--with-tcl-library=" #$tcl "/lib") |
| 11195 | (string-append "--with-tk-include=" #$tk "/include") |
| 11196 | (string-append "--with-tk-library=" #$tk "/lib") |
| 11197 | (string-append "--with-eigen-include=" |
| 11198 | (search-input-directory %build-inputs "include/eigen3")) |
| 11199 | ;; Find and link to the OCaml Num package |
| 11200 | "OCAMLC=ocamlfind ocamlc -package num" |
| 11201 | "OCAMLOPT=ocamlfind ocamlopt -package num -linkpkg") |
| 11202 | #:phases |
| 11203 | #~(modify-phases %standard-phases |
| 11204 | ;; The Num library is specified with the OCAMLC and |
| 11205 | ;; OCAMLOPT variables above. |
| 11206 | (add-after 'unpack 'fix-ocaml-num |
| 11207 | (lambda _ |
| 11208 | (substitute* |
| 11209 | '("modules/scicos/Makefile.modelica.am" |
| 11210 | "modules/scicos/src/translator/makefile.mak" |
| 11211 | "modules/scicos/src/modelica_compiler/makefile.mak") |
| 11212 | (("nums\\.cmx?a") "")))) |
| 11213 | ;; See https://gitlab.com/scilab/scilab/-/issues/17462 |
| 11214 | (add-after 'unpack 'fix-call-scilab-examples |
| 11215 | (lambda _ |
| 11216 | (substitute* |
| 11217 | (find-files "modules/call_scilab/examples" "\\.c$") |
| 11218 | (("StartScilab\\((.*), NULL\\)" all args) |
| 11219 | (string-append "StartScilab(" args ", 0)"))))) |
| 11220 | (add-after 'unpack 'fix-linking |
| 11221 | (lambda _ |
| 11222 | (substitute* "modules/Makefile.am" |
| 11223 | (("libscilab_cli_la_LDFLAGS = .*\\)" all) |
| 11224 | (string-append all " -lcurl"))))) |
| 11225 | (add-after 'unpack 'set-version |
| 11226 | (lambda _ |
| 11227 | (substitute* "modules/core/includes/version.h.in" |
| 11228 | (("branch-[a-z0-9\\.]*") ; version |
| 11229 | #$(version-major+minor (package-version this-package)))))) |
| 11230 | (add-after 'unpack 'restrain-to-scilab-cli |
| 11231 | (lambda _ |
| 11232 | ;; Install only scilab-cli.desktop |
| 11233 | (substitute* "desktop/Makefile.am" |
| 11234 | (("desktop_DATA =") |
| 11235 | "desktop_DATA = scilab-cli.desktop\nDUMMY =")) |
| 11236 | ;; Replace scilab with scilab-cli for tests. |
| 11237 | (substitute* "Makefile.incl.am" |
| 11238 | (("scilab-bin") "scilab-cli-bin") |
| 11239 | (("scilab -nwni") "scilab-cli") |
| 11240 | ;; Do not install tests, demos and examples. |
| 11241 | ;; This saves up to 140 Mo in the final output. |
| 11242 | (("(TESTS|DEMOS|EXAMPLES)_DIR=.*" all kind) |
| 11243 | (string-append kind "_DIR="))))) |
| 11244 | (add-before 'check 'disable-failing-tests |
| 11245 | (lambda _ |
| 11246 | (substitute* "Makefile" |
| 11247 | (("TESTS = .*") |
| 11248 | "TESTS =\n")) |
| 11249 | (substitute* "modules/functions_manager/Makefile" |
| 11250 | (("check:.*") |
| 11251 | "check:\n")) |
| 11252 | (substitute* "modules/types/Makefile" |
| 11253 | (("\\$\\(MAKE\\) \\$\\(AM_MAKEFLAGS\\) check-am") |
| 11254 | "")))) |
| 11255 | ;; These generated files are assumed to be present during |
| 11256 | ;; the build. |
| 11257 | (add-after 'bootstrap 'bootstrap-dynamic_link-scripts |
| 11258 | (lambda _ |
| 11259 | (with-directory-excursion "modules/dynamic_link/src/scripts" |
| 11260 | ((assoc-ref %standard-phases 'bootstrap)) |
| 11261 | (substitute* "compilerDetection.sh" |
| 11262 | (("PATHTOCONFIGURE=.*") |
| 11263 | "PATHTOCONFIGURE=${BASH_SOURCE[0]%/*}/\n") |
| 11264 | (("PROGNAME.*") "\n"))))) |
| 11265 | (add-before 'build 'pre-build |
| 11266 | (lambda* (#:key inputs #:allow-other-keys) |
| 11267 | ;; Fix scilab script. |
| 11268 | (substitute* "bin/scilab" |
| 11269 | (("/bin/ls") |
| 11270 | (search-input-file inputs "bin/ls"))) |
| 11271 | ;; Fix core.start. |
| 11272 | (substitute* "modules/core/etc/core.start" |
| 11273 | (("'SCI/modules") |
| 11274 | "SCI+'/modules")))) |
| 11275 | ;; Prevent race condition |
| 11276 | (add-after 'pre-build 'build-parsers |
| 11277 | (lambda* (#:key (make-flags #~'()) #:allow-other-keys) |
| 11278 | (with-directory-excursion "modules/ast" |
| 11279 | (apply invoke "make" |
| 11280 | "src/cpp/parse/parsescilab.cpp" |
| 11281 | "src/cpp/parse/scanscilab.cpp" |
| 11282 | make-flags)))) |
| 11283 | ;; The startup script is mostly there to define the following env |
| 11284 | ;; variables properly. We can do this with guix directly. |
| 11285 | (add-after 'install 'rewrap-scilab-cli |
| 11286 | (lambda _ |
| 11287 | (define (bin path) (string-append #$output "/bin/" path)) |
| 11288 | (delete-file (bin "scilab-cli")) |
| 11289 | (wrap-program (bin "scilab-cli-bin") |
| 11290 | `("SCI" = (,(string-append #$output "/share/scilab"))) |
| 11291 | `("LD_LIBRARY_PATH" ":" prefix |
| 11292 | (,(string-append #$output "/lib/scilab"))) |
| 11293 | `("TCL_LIBRARY" = (,(string-append #$tcl "/lib"))) |
| 11294 | `("TK_LIBRARY" = (,(string-append #$tk "/lib")))) |
| 11295 | (copy-file (bin "scilab-cli-bin") (bin "scilab-cli")) |
| 11296 | (copy-file (bin ".scilab-cli-bin-real") (bin "scilab-cli-bin")) |
| 11297 | (delete-file (bin ".scilab-cli-bin-real")) |
| 11298 | (substitute* (bin "scilab-cli") |
| 11299 | ;; Also set SCIHOME to sensible XDG base dirs value. |
| 11300 | (("\\.scilab-cli-bin-real\"") |
| 11301 | (string-append |
| 11302 | "scilab-cli-bin\" -scihome " |
| 11303 | "\"${XDG_STATE_HOME:-$HOME/.local/state}/scilab/" |
| 11304 | #$(package-version this-package) "\"")) |
| 11305 | (("export SCI=") |
| 11306 | "unset LANGUAGE\nexport SCI=")))) |
| 11307 | (add-after 'rewrap-scilab-cli 'sanity-check |
| 11308 | (lambda _ |
| 11309 | (setenv "HOME" (getcwd)) |
| 11310 | (invoke (string-append #$output "/bin/scilab-cli") |
| 11311 | "-e" "\"quit;\""))))))) |
| 11312 | (home-page "https://www.scilab.org/") |
| 11313 | (synopsis "Software for engineers and scientists") |
| 11314 | (description "This package provides the non-graphical version of the Scilab |
| 11315 | software for engineers and scientists. Scilab is used for signal processing, |
| 11316 | statistical analysis, image enhancement, fluid dynamics simulations, numerical |
| 11317 | optimization, and modeling, simulation of explicit and implicit dynamical |
| 11318 | systems and symbolic manipulations.") |
| 11319 | (license (list license:gpl2 license:bsd-3)))) |
| 11320 | |
| 11321 | (define-public ruy |
| 11322 | (let ((commit "caa244343de289f913c505100e6a463d46c174de") |
| 11323 | (version "0") |
| 11324 | (revision "1")) |
| 11325 | (package |
| 11326 | (name "ruy") |
| 11327 | (version (git-version version revision commit)) |
| 11328 | (source (origin |
| 11329 | (method git-fetch) |
| 11330 | (uri (git-reference |
| 11331 | (url "https://github.com/google/ruy") |
| 11332 | (commit commit))) |
| 11333 | (file-name (git-file-name name version)) |
| 11334 | (sha256 |
| 11335 | (base32 |
| 11336 | "0j2g90nzam4h52zwx2vpanj8m17068cfb1zi4hcy0pyk52kb11dy")))) |
| 11337 | (build-system cmake-build-system) |
| 11338 | (arguments |
| 11339 | (list |
| 11340 | #:configure-flags |
| 11341 | #~(list "-DRUY_FIND_CPUINFO=ON" |
| 11342 | ;; Needed to make sure code is relocatable for use in |
| 11343 | ;; tensorflow. |
| 11344 | "-DCMAKE_CXX_FLAGS=-fPIC "))) |
| 11345 | (inputs (list cpuinfo)) |
| 11346 | (native-inputs (list googletest-1.12)) |
| 11347 | (home-page "https://github.com/google/ruy") |
| 11348 | (synopsis "Matrix multiplication library") |
| 11349 | (description |
| 11350 | "Ruy is a matrix multiplication library. Its focus is to cover the |
| 11351 | matrix multiplication needs of neural network inference engines. Its initial |
| 11352 | user has been TensorFlow Lite, where it is used by default on the ARM CPU |
| 11353 | architecture.") |
| 11354 | (license license:asl2.0)))) |
| 11355 | |
| 11356 | (define-public bliss |
| 11357 | (package |
| 11358 | (name "bliss") |
| 11359 | (version "0.77") |
| 11360 | (source (origin |
| 11361 | (method url-fetch) |
| 11362 | (uri (string-append |
| 11363 | "https://users.aalto.fi/~tjunttil/bliss/downloads/bliss-" |
| 11364 | version ".zip")) |
| 11365 | (sha256 |
| 11366 | (base32 |
| 11367 | "193jb63kdwfas2cf61xj3fgkvhb6v2mnbwwpr0jas3zk6j0bkj5c")))) |
| 11368 | (build-system cmake-build-system) |
| 11369 | (arguments |
| 11370 | (list |
| 11371 | ;; There are no tests |
| 11372 | #:tests? #f |
| 11373 | #:configure-flags #~(list "-DUSE_GMP=ON") ; Used by igraph |
| 11374 | #:phases |
| 11375 | #~(modify-phases %standard-phases |
| 11376 | ;; Ensure that GMP is used, otherwise the BigNum type changes. |
| 11377 | (add-after 'unpack 'define-use-gmp |
| 11378 | (lambda _ |
| 11379 | (substitute* "src/bignum.hh" |
| 11380 | (("#pragma once.*" all) |
| 11381 | (string-append all "#define BLISS_USE_GMP"))))) |
| 11382 | ;; Move headers under the bliss/ prefix. This is a Guix choice, |
| 11383 | ;; since there are no upstream installation instructions and the |
| 11384 | ;; header names are sufficiently generic to cause confusions with |
| 11385 | ;; other packages (e.g. "heap.hh"). |
| 11386 | (add-after 'define-use-gmp 'move-headers |
| 11387 | (lambda _ |
| 11388 | (substitute* (find-files "src") |
| 11389 | (("#include \"(.*)\"" _ path) |
| 11390 | (string-append "#include <bliss/" path ">"))) |
| 11391 | (mkdir-p "include/bliss") |
| 11392 | (for-each |
| 11393 | (lambda (file) |
| 11394 | (rename-file file |
| 11395 | (string-append "include/bliss/" (basename file)))) |
| 11396 | (find-files "src" "\\.(h|hh)$")) |
| 11397 | (substitute* "Doxyfile" |
| 11398 | (("INPUT *=.*") "INPUT = bliss")))) |
| 11399 | (add-after 'move-headers 'patch-cmake |
| 11400 | (lambda _ |
| 11401 | (let ((port (open-file "CMakeLists.txt" "a"))) |
| 11402 | (display |
| 11403 | (apply |
| 11404 | string-append |
| 11405 | ;; Install the executable and the shared library. |
| 11406 | "install(TARGETS bliss)\n" |
| 11407 | "install(TARGETS bliss-executable)\n" |
| 11408 | "install(DIRECTORY include/bliss DESTINATION include)\n" |
| 11409 | "target_link_libraries(bliss PUBLIC ${GMP_LIBRARIES})\n" |
| 11410 | ;; Missing include directories. |
| 11411 | (map |
| 11412 | (lambda (name) |
| 11413 | (string-append |
| 11414 | "target_include_directories(" name " PUBLIC\n" |
| 11415 | "${CMAKE_CURRENT_SOURCE_DIR}/include" |
| 11416 | " ${GMP_INCLUDE_DIR})\n")) |
| 11417 | '("bliss" "bliss_static" "bliss-executable"))) |
| 11418 | port) |
| 11419 | (close-port port)))) |
| 11420 | (add-after 'build 'build-doc |
| 11421 | (lambda _ |
| 11422 | (mkdir "doc") |
| 11423 | (with-directory-excursion "doc" |
| 11424 | (let ((srcdir (string-append "../../bliss-" #$version))) |
| 11425 | (copy-recursively (string-append srcdir "/include/bliss") |
| 11426 | "bliss") |
| 11427 | (invoke "doxygen" (string-append srcdir "/Doxyfile")))))) |
| 11428 | (add-after 'install 'install-doc |
| 11429 | (lambda _ |
| 11430 | (copy-recursively |
| 11431 | "doc/html" (string-append #$output "/share/doc/" |
| 11432 | #$name "-" #$version "/html"))))))) |
| 11433 | (native-inputs (list doxygen graphviz unzip)) |
| 11434 | (propagated-inputs (list gmp)) |
| 11435 | (home-page "https://users.aalto.fi/~tjunttil/bliss/index.html") |
| 11436 | (synopsis "Tool for computing automorphism groups and canonical labelings of graphs") |
| 11437 | (description "@code{bliss} is a library for computing automorphism groups |
| 11438 | +and canonical forms of graphs. It has both a command line user interface as |
| 11439 | +well as C++ and C programming language APIs.") |
| 11440 | (license license:lgpl3))) |
| 11441 | |
| 11442 | (define-public python-mathics-scanner |
| 11443 | ;; TODO: Package name has been changed upstream, as seen in pyproject.toml: |
| 11444 | ;; name = "Mathics3_Scanner" |
| 11445 | ;; See: <https://codeberg.org/guix/guix/issues/11317>. |
| 11446 | (package |
| 11447 | (name "python-mathics-scanner") |
| 11448 | (version "10.0.1") |
| 11449 | (source |
| 11450 | (origin |
| 11451 | (method git-fetch) |
| 11452 | (uri (git-reference |
| 11453 | (url "https://github.com/Mathics3/Mathics3-scanner") |
| 11454 | (commit version))) |
| 11455 | (file-name (git-file-name name version)) |
| 11456 | (sha256 |
| 11457 | (base32 |
| 11458 | "1ma9bdla9na2cc8g9b1jsnhnvs6jmai9dwqr4fzk5w3c2ykjd5vd")))) |
| 11459 | (build-system pyproject-build-system) |
| 11460 | (arguments |
| 11461 | (list |
| 11462 | #:phases |
| 11463 | #~(modify-phases %standard-phases |
| 11464 | (add-after 'unpack 'make-json-tables |
| 11465 | (lambda _ |
| 11466 | ;; Generate JSON character/operator tables (character-tables.json, |
| 11467 | ;; operators.json) which are pre-generated in the PyPI tarball |
| 11468 | ;; but not in git. The Makefile runs this script before |
| 11469 | ;; 'make dist'. Unlike in mathics-core, running the script here |
| 11470 | ;; works because it writes to its own source tree being built; |
| 11471 | ;; in mathics-core, the script tries to write to the installed |
| 11472 | ;; python-mathics-scanner package which is not allowed. |
| 11473 | (invoke "bash" "./admin-tools/make-JSON-tables.sh")))))) |
| 11474 | (propagated-inputs (list python-chardet python-click python-pyyaml)) |
| 11475 | (native-inputs (list python-pytest python-setuptools)) |
| 11476 | (home-page "https://mathics.org/") |
| 11477 | (synopsis |
| 11478 | "Character tables and tokenizer for Mathics and the Wolfram language") |
| 11479 | (description |
| 11480 | "This package provides character tables and a tokenizer for Mathics and |
| 11481 | the Wolfram language.") |
| 11482 | (license license:gpl3+))) |
| 11483 | |
| 11484 | (define-public python-mathics-pygments |
| 11485 | ;; TODO: Package name has been changed upstream, as seen in pyproject.toml: |
| 11486 | ;; name = "Mathics3_pygments" |
| 11487 | ;; See: <https://codeberg.org/guix/guix/issues/11317>. |
| 11488 | (package |
| 11489 | (name "python-mathics-pygments") |
| 11490 | (version "10.0.0") |
| 11491 | (source |
| 11492 | (origin |
| 11493 | (method git-fetch) |
| 11494 | (uri (git-reference |
| 11495 | (url "https://github.com/Mathics3/Mathics3-pygments") |
| 11496 | (commit version))) |
| 11497 | (file-name (git-file-name name version)) |
| 11498 | (sha256 |
| 11499 | (base32 "0j290iagz0k17rzjj09wa7jwmkhdqps21z8z8cliy2hnybx4zlkj")))) |
| 11500 | (build-system pyproject-build-system) |
| 11501 | (native-inputs |
| 11502 | (list python-pytest |
| 11503 | python-setuptools)) |
| 11504 | (propagated-inputs |
| 11505 | (list python-mathics-scanner |
| 11506 | python-pygments)) |
| 11507 | (home-page "https://mathics.org/") |
| 11508 | (synopsis "Wolfram language lexer for Pygments") |
| 11509 | (description |
| 11510 | "This package provides a Wolfram language lexer for Pygments.") |
| 11511 | (license license:expat))) |
| 11512 | |
| 11513 | (define-public python-mathics-core |
| 11514 | ;; TODO: Package name has been changed upstream, as seen in pyproject.toml: |
| 11515 | ;; name = "Mathics3" |
| 11516 | ;; See: <https://codeberg.org/guix/guix/issues/11317>. |
| 11517 | (package |
| 11518 | (name "python-mathics-core") |
| 11519 | (version "10.0.1") |
| 11520 | (source |
| 11521 | (origin |
| 11522 | (method git-fetch) |
| 11523 | (uri (git-reference |
| 11524 | (url "https://github.com/Mathics3/mathics-core") |
| 11525 | (commit version))) |
| 11526 | (file-name (git-file-name name version)) |
| 11527 | (sha256 |
| 11528 | (base32 "1wglm61i050g2sam8zrlqyav7m22jq0vkcq9wzi5364661lgh5a9")))) |
| 11529 | (arguments |
| 11530 | (list |
| 11531 | #:phases |
| 11532 | #~(modify-phases %standard-phases |
| 11533 | (add-before 'build 'set-home |
| 11534 | (lambda _ |
| 11535 | (setenv "HOME" "/tmp"))) |
| 11536 | (add-before 'check 'prepare-locales |
| 11537 | (lambda _ |
| 11538 | ;; Otherwise 210 tests fail because the real output would use |
| 11539 | ;; unicode arrow characters. With this, only 18 (symbolic) |
| 11540 | ;; tests fail. |
| 11541 | (setenv "MATHICS_CHARACTER_ENCODING" "ASCII")))))) |
| 11542 | (build-system pyproject-build-system) |
| 11543 | (native-inputs (list python-pytest python-setuptools)) |
| 11544 | (inputs (list llvm)) |
| 11545 | (propagated-inputs |
| 11546 | (list python-dateutil |
| 11547 | python-mathics-scanner |
| 11548 | python-mpmath |
| 11549 | python-numpy |
| 11550 | python-palettable |
| 11551 | python-pillow |
| 11552 | python-pint |
| 11553 | python-pympler |
| 11554 | python-requests |
| 11555 | python-scipy |
| 11556 | python-sympy |
| 11557 | python-timed-threads)) |
| 11558 | (synopsis "Computer algebra system") |
| 11559 | (home-page "https://mathics.org/") |
| 11560 | (description |
| 11561 | "This package provides a @acronym{Computer Algebra System, CAS}, an |
| 11562 | alternative to Wolfram Mathematica. |
| 11563 | |
| 11564 | However, it contains just the Mathics3 Kernel: Python modules for WL Built-in |
| 11565 | functions, variables, core primitives, e.g., Symbol, a parser to create |
| 11566 | Expressions, and an evaluator to execute them.") |
| 11567 | (license license:gpl3))) |
| 11568 | |
| 11569 | (define-public python-mathicsscript |
| 11570 | ;; TODO: Package name has been changed upstream, as seen in pyproject.toml: |
| 11571 | ;; name = "Mathics3-Frontend-CLI" |
| 11572 | ;; See: <https://codeberg.org/guix/guix/issues/11317>. |
| 11573 | (package |
| 11574 | (name "python-mathicsscript") |
| 11575 | (version "10.0.0") |
| 11576 | (source |
| 11577 | (origin |
| 11578 | (method url-fetch) |
| 11579 | (uri (pypi-uri "mathicsscript" version)) |
| 11580 | (sha256 |
| 11581 | (base32 "0krgcbvnkan60bsj87w6qhm450cwy84m50bx0031r2pprh4dbb5f")))) |
| 11582 | (build-system pyproject-build-system) |
| 11583 | (arguments |
| 11584 | `(#:tests? #f ;XXX: 1 of 3 failed |
| 11585 | #:phases |
| 11586 | (modify-phases %standard-phases |
| 11587 | (add-before 'build 'set-home-env |
| 11588 | (lambda _ |
| 11589 | (setenv "HOME" "/tmp")))))) |
| 11590 | (propagated-inputs (list python-click |
| 11591 | python-colorama |
| 11592 | python-columnize |
| 11593 | python-mathics-pygments |
| 11594 | python-mathics-scanner |
| 11595 | python-mathics-core |
| 11596 | python-networkx |
| 11597 | python-prompt-toolkit |
| 11598 | python-pygments |
| 11599 | python-term-background)) |
| 11600 | (native-inputs (list python-pytest python-setuptools)) |
| 11601 | (home-page "https://mathics.org/") |
| 11602 | (synopsis "Command-line interface to Mathics3") |
| 11603 | (description "This package provides a command-line interface to |
| 11604 | Mathics3.") |
| 11605 | (license license:gpl3))) |
| 11606 | |
| 11607 | (define-public python-mathics-django |
| 11608 | ;; TODO: Package name has been changed upstream, as seen in pyproject.toml: |
| 11609 | ;; name = "Mathics3-Frontend-django" |
| 11610 | ;; See: <https://codeberg.org/guix/guix/issues/11317>. |
| 11611 | (package |
| 11612 | (name "python-mathics-django") |
| 11613 | (version "10.0.0") |
| 11614 | (source |
| 11615 | (origin |
| 11616 | (method git-fetch) |
| 11617 | (uri (git-reference |
| 11618 | (url "https://github.com/Mathics3/Mathics3-Frontend-django") |
| 11619 | (commit version))) |
| 11620 | (file-name (git-file-name name version)) |
| 11621 | (sha256 |
| 11622 | (base32 "0320h1cp390gm0gjs3isjkcmksgbjvla9wd0ysmqjx3f106xvr5j")))) |
| 11623 | (build-system pyproject-build-system) |
| 11624 | (arguments |
| 11625 | `(#:phases |
| 11626 | (modify-phases %standard-phases |
| 11627 | (delete 'check) |
| 11628 | (add-after 'build 'check |
| 11629 | (lambda _ |
| 11630 | (setenv "PYTHONPATH" (getcwd)) |
| 11631 | (setenv "DJANGO_SETTINGS_MODULE" "mathics_django.settings") |
| 11632 | (invoke "django-admin" "test")))))) |
| 11633 | (propagated-inputs (list python-django |
| 11634 | python-mathics-scanner |
| 11635 | python-mathics-core |
| 11636 | python-matplotlib |
| 11637 | python-networkx |
| 11638 | python-pygments |
| 11639 | python-requests)) |
| 11640 | (native-inputs (list python-pytest python-setuptools python-wheel)) |
| 11641 | (home-page "https://mathics.org/") |
| 11642 | (synopsis "A Django front end for Mathics3.") |
| 11643 | (description "This package provides a Django front end for Mathics3.") |
| 11644 | (license license:gpl3))) |
| 11645 | |
| 11646 | (define-public python-mathics3-notebook-frontends |
| 11647 | (package |
| 11648 | (name "python-mathics3-notebook-frontends") |
| 11649 | (version "1.0.0") |
| 11650 | (source |
| 11651 | (origin |
| 11652 | (method git-fetch) |
| 11653 | (uri (git-reference |
| 11654 | (url "https://github.com/Mathics3/Mathics3-notebook-frontends") |
| 11655 | (commit version))) |
| 11656 | (file-name (git-file-name name version)) |
| 11657 | (sha256 |
| 11658 | (base32 "16fhjb1kcv9wa3b95zcakrvsr96qw75qikwdcnjiz6jncn9dli2n")))) |
| 11659 | (build-system pyproject-build-system) |
| 11660 | (arguments |
| 11661 | (list #:tests? #f)) ; no tests |
| 11662 | (native-inputs |
| 11663 | (list python-setuptools)) |
| 11664 | (propagated-inputs |
| 11665 | (list python-chardet |
| 11666 | python-charset-normalizer |
| 11667 | python-mathics-core |
| 11668 | python-requests |
| 11669 | python-urllib3)) |
| 11670 | (home-page "https://mathics.org/") |
| 11671 | (synopsis "Mathics frontend for Jupyter Notebook") |
| 11672 | (description |
| 11673 | "This package provides a Mathics3 frontend for @url{https://jupyter.org/, |
| 11674 | Jupyter Notebook} and @url{https://marimo.io/, Marimo}.") |
| 11675 | (license license:gpl3+))) |
| 11676 | |
| 11677 | (define-public lie |
| 11678 | (package |
| 11679 | (name "lie") |
| 11680 | (version "2.2.2") |
| 11681 | ;; Original: <http://www-math.univ-poitiers.fr/~maavl/LiE/conLiE.tar.gz> |
| 11682 | ;; This source has the license file added as allowed on |
| 11683 | ;; <http://www-math.univ-poitiers.fr/~maavl/LiE/>. |
| 11684 | (source |
| 11685 | (origin |
| 11686 | (method git-fetch) |
| 11687 | (uri (git-reference |
| 11688 | (url "https://github.com/daym/LiE") |
| 11689 | (commit (string-append "v" version)))) |
| 11690 | (file-name (git-file-name name version)) |
| 11691 | (sha256 |
| 11692 | (base32 "0qb9y08mdl2wr77lf61wv4xks429sw99xacb9gh91w242z0nbcqn")))) |
| 11693 | (build-system gnu-build-system) |
| 11694 | (arguments |
| 11695 | `(#:parallel-build? #f |
| 11696 | ;; There are test input files under progs/--but no expected results. |
| 11697 | #:tests? #f |
| 11698 | #:phases |
| 11699 | (modify-phases %standard-phases |
| 11700 | (replace 'configure |
| 11701 | (lambda* (#:key outputs #:allow-other-keys) |
| 11702 | (substitute* "make_lie" |
| 11703 | (("`/bin/pwd`") |
| 11704 | (string-append (assoc-ref outputs "out") |
| 11705 | "/bin"))))) |
| 11706 | (add-after 'install 'install-lie-program |
| 11707 | (lambda* (#:key outputs #:allow-other-keys) |
| 11708 | (for-each |
| 11709 | (lambda (name) |
| 11710 | (install-file name |
| 11711 | (string-append (assoc-ref outputs "out") |
| 11712 | "/bin"))) |
| 11713 | '("lie" "Lie.exe"))))))) |
| 11714 | (native-inputs |
| 11715 | (list bison)) |
| 11716 | (inputs |
| 11717 | (list readline)) |
| 11718 | (synopsis "Lie group computer algebra module") |
| 11719 | (description "This package provides a computer algebra module for Lie |
| 11720 | groups. Documentation is available on |
| 11721 | @url{http://www-math.univ-poitiers.fr/~maavl/pdf/LiE-manual.pdf}.") |
| 11722 | (home-page "http://www-math.univ-poitiers.fr/~maavl/LiE/") |
| 11723 | ;; <http://www-math.univ-poitiers.fr/~maavl/LiE/> says LGPL. |
| 11724 | (license license:lgpl3+))) |
| 11725 | |
| 11726 | (define-public exprtk |
| 11727 | (package |
| 11728 | (name "exprtk") |
| 11729 | (version "0.0.3") |
| 11730 | (source |
| 11731 | (origin |
| 11732 | (method git-fetch) |
| 11733 | (uri (git-reference |
| 11734 | (url "https://github.com/ArashPartow/exprtk") |
| 11735 | (commit version))) |
| 11736 | (file-name (git-file-name name version)) |
| 11737 | (sha256 |
| 11738 | (base32 "0pszh11w29nc256qhil51g3635n06ncf0ihg7g4h86jrhqsk7183")))) |
| 11739 | (build-system copy-build-system) |
| 11740 | (arguments |
| 11741 | '(#:install-plan '(("exprtk.hpp" "include/")))) |
| 11742 | (synopsis "C++ Mathematical Expression Parsing And Evaluation Library") |
| 11743 | (description "ExprTk is a C++ headers only library for mathematical |
| 11744 | expression parsing and evaluation.") |
| 11745 | (home-page "https://www.partow.net/programming/exprtk/index.html") |
| 11746 | (license license:expat))) |
| 11747 | |
| 11748 | (define-public highs |
| 11749 | (package |
| 11750 | (name "highs") |
| 11751 | (version "1.15.1") |
| 11752 | (source |
| 11753 | (origin |
| 11754 | (method git-fetch) |
| 11755 | (uri (git-reference |
| 11756 | (url "https://github.com/ERGO-Code/HiGHS") |
| 11757 | (commit (string-append "v" version)))) |
| 11758 | (file-name (git-file-name name version)) |
| 11759 | (sha256 |
| 11760 | (base32 "11hh958jvfqrc7rm3xcwx2p71i49cb4cyafajlmkr8xzyb00y851")))) |
| 11761 | (build-system cmake-build-system) |
| 11762 | (home-page "https://highs.dev") |
| 11763 | (synopsis "High performance software for linear optimization") |
| 11764 | (description |
| 11765 | "HiGHS provides serial and parallel solvers for large-scale sparse |
| 11766 | linear programming (LP), mixed-integer programming (MIP), and quadratic |
| 11767 | programming (QP) models.") |
| 11768 | (license license:expat))) |
| 11769 | |
| 11770 | (define-public trilinos-zoltan |
| 11771 | (package |
| 11772 | (name "trilinos-zoltan") |
| 11773 | (version "16.1.0") |
| 11774 | (source |
| 11775 | (origin |
| 11776 | (method git-fetch) |
| 11777 | (uri (git-reference (url "https://github.com/trilinos/Trilinos") |
| 11778 | (commit (string-append "trilinos-release-" |
| 11779 | (string-replace-substring |
| 11780 | version "." "-"))))) |
| 11781 | (file-name (git-file-name "trilinos" version)) |
| 11782 | (sha256 (base32 "1snn8vzxwrk9qsvv9wsv4zf99cvcja4shgjpsavp893v9gvgp2gm")))) |
| 11783 | (build-system cmake-build-system) |
| 11784 | (inputs (list openmpi |
| 11785 | perl |
| 11786 | python |
| 11787 | python-wrapper |
| 11788 | tcsh |
| 11789 | pt-scotch |
| 11790 | zlib)) |
| 11791 | (arguments |
| 11792 | (list |
| 11793 | #:configure-flags |
| 11794 | #~(list "-DTrilinos_ENABLE_Zoltan=ON" |
| 11795 | "-DBUILD_SHARED_LIBS=ON" |
| 11796 | "-DTPL_ENABLE_MPI=ON" |
| 11797 | "-DTPL_ENABLE_METIS=OFF" |
| 11798 | "-DTPL_ENABLE_Scotch=ON" |
| 11799 | "-DTPL_ENABLE_Zlib=ON" |
| 11800 | "-DTrilinos_ENABLE_Fortran=OFF" |
| 11801 | "-DZoltan_ENABLE_TESTS=ON" |
| 11802 | ;; disable failing tests |
| 11803 | "-DZoltan_ch_brack2_3_zoltan_parallel_DISABLE=ON" |
| 11804 | "-DZoltan_ch_grid20x19_zoltan_parallel_DISABLE=ON" |
| 11805 | "-DZoltan_hg_felix_zoltan_parallel_DISABLE=ON" |
| 11806 | "-DZoltan_hg_ibm03_zoltan_parallel_DISABLE=ON" |
| 11807 | "-DZoltan_ch_degenerate_zoltan_parallel_DISABLE=ON" |
| 11808 | "-DZoltan_ch_degenerateAA_zoltan_parallel_DISABLE=ON" |
| 11809 | "-DZoltan_ch_ewgt_scotch_parallel_DISABLE=ON" |
| 11810 | "-DZoltan_ch_hammond_zoltan_parallel_DISABLE=ON" |
| 11811 | "-DZoltan_ch_hammond_scotch_parallel_DISABLE=ON" |
| 11812 | "-DZoltan_ch_hammond2_zoltan_parallel_DISABLE=ON" |
| 11813 | "-DZoltan_ch_hughes_zoltan_parallel_DISABLE=ON" |
| 11814 | "-DZoltan_ch_simple_scotch_parallel_DISABLE=ON" |
| 11815 | "-DZoltan_hg_cage10_zoltan_parallel_DISABLE=ON" |
| 11816 | "-DZoltan_ch_vwgt_scotch_parallel_DISABLE=ON"))) |
| 11817 | (home-page "https://trilinos.github.io/") |
| 11818 | (synopsis |
| 11819 | "Parallel partitioning, load balancing and data-management services") |
| 11820 | (description |
| 11821 | "The Zoltan library is a collection of data management services for parallel, |
| 11822 | unstructured, adaptive, and dynamic applications. It simplifies the |
| 11823 | load-balancing, data movement, unstructured communication, and memory usage |
| 11824 | difficulties that arise in dynamic applications such as adaptive |
| 11825 | finite-element methods, particle methods, and crash simulations. Zoltan's |
| 11826 | data-structure neutral design also lets a wide range of applications use it |
| 11827 | without imposing restrictions on application data structures. Its object-based |
| 11828 | interface provides a simple and inexpensive way for application developers to |
| 11829 | use the library and researchers to make new capabilities available under a |
| 11830 | common interface. |
| 11831 | ") |
| 11832 | (license license:bsd-3))) |
| 11833 | |
| 11834 | (define-public xdmf |
| 11835 | (package |
| 11836 | (name "xdmf") |
| 11837 | ;; Project does not publish releases / tags |
| 11838 | (properties '((commit . "04a84bab0eb1568e0f1a27c8fb60c6931efda003") |
| 11839 | (revision . "0"))) |
| 11840 | (version (git-version "3.0.0" |
| 11841 | (assoc-ref properties 'revision) |
| 11842 | (assoc-ref properties 'commit))) |
| 11843 | (source |
| 11844 | (origin |
| 11845 | (method git-fetch) |
| 11846 | (uri (git-reference |
| 11847 | (url "https://gitlab.kitware.com/xdmf/xdmf") |
| 11848 | (commit (assoc-ref properties 'commit)))) |
| 11849 | (file-name (git-file-name name version)) |
| 11850 | (patches |
| 11851 | (search-patches "xdmf-3.0.0-hdf5.patch")) |
| 11852 | (sha256 |
| 11853 | (base32 "06k4vibkvgxlzkn06x470aq5q18p7yhql8awrpdz3czys3z8i288")))) |
| 11854 | (build-system cmake-build-system) |
| 11855 | (arguments |
| 11856 | (list #:tests? #f)) ;has no tests |
| 11857 | (inputs |
| 11858 | (list boost hdf5 libxml2)) |
| 11859 | (home-page "https://www.xdmf.org/index.html") |
| 11860 | (synopsis "XDMF library") |
| 11861 | (description |
| 11862 | "This package provides the eXtensible Data Model and Format (XDMF) C++ |
| 11863 | library.") |
| 11864 | (license license:bsd-4))) |