| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 |
|
| 26 | (define-module (gnu packages simulation)
|
| 27 | #:use-module (gnu packages)
|
| 28 | #:use-module (gnu packages algebra)
|
| 29 | #:use-module (gnu packages admin)
|
| 30 | #:use-module (gnu packages base)
|
| 31 | #:use-module (gnu packages bash)
|
| 32 | #:use-module (gnu packages bison)
|
| 33 | #:use-module (gnu packages boost)
|
| 34 | #:use-module (gnu packages check)
|
| 35 | #:use-module (gnu packages cmake)
|
| 36 | #:use-module (gnu packages compression)
|
| 37 | #:use-module (gnu packages cpp)
|
| 38 | #:use-module (gnu packages curl)
|
| 39 | #:use-module (gnu packages engineering)
|
| 40 | #:use-module (gnu packages compiler-tools)
|
| 41 | #:use-module (gnu packages fontutils)
|
| 42 | #:use-module (gnu packages gettext)
|
| 43 | #:use-module (gnu packages gcc)
|
| 44 | #:use-module (gnu packages geo)
|
| 45 | #:use-module (gnu packages gl)
|
| 46 | #:use-module (gnu packages graphics)
|
| 47 | #:use-module (gnu packages gtk)
|
| 48 | #:use-module (gnu packages image)
|
| 49 | #:use-module (gnu packages iso-codes)
|
| 50 | #:use-module (gnu packages image-processing)
|
| 51 | #:use-module (gnu packages linux)
|
| 52 | #:use-module (gnu packages m4)
|
| 53 | #:use-module (gnu packages maths)
|
| 54 | #:use-module (gnu packages mpi)
|
| 55 | #:use-module (gnu packages multiprecision)
|
| 56 | #:use-module (gnu packages ncurses)
|
| 57 | #:use-module (gnu packages pdf)
|
| 58 | #:use-module (gnu packages pkg-config)
|
| 59 | #:use-module (gnu packages pretty-print)
|
| 60 | #:use-module (gnu packages protobuf)
|
| 61 | #:use-module (gnu packages python)
|
| 62 | #:use-module (gnu packages python-build)
|
| 63 | #:use-module (gnu packages python-science)
|
| 64 | #:use-module (gnu packages python-xyz)
|
| 65 | #:use-module (gnu packages qt)
|
| 66 | #:use-module (gnu packages readline)
|
| 67 | #:use-module (gnu packages serialization)
|
| 68 | #:use-module (gnu packages sqlite)
|
| 69 | #:use-module (gnu packages ssh)
|
| 70 | #:use-module (gnu packages textutils)
|
| 71 | #:use-module (gnu packages tls)
|
| 72 | #:use-module (gnu packages version-control)
|
| 73 | #:use-module (gnu packages video)
|
| 74 | #:use-module (gnu packages xiph)
|
| 75 | #:use-module (gnu packages xml)
|
| 76 | #:use-module (gnu packages xorg)
|
| 77 | #:use-module (guix download)
|
| 78 | #:use-module (guix gexp)
|
| 79 | #:use-module (guix git-download)
|
| 80 | #:use-module (guix svn-download)
|
| 81 | #:use-module (guix build-system cmake)
|
| 82 | #:use-module (guix build-system gnu)
|
| 83 | #:use-module (guix build-system pyproject)
|
| 84 | #:use-module ((guix licenses) #:prefix license:)
|
| 85 | #:use-module (guix packages)
|
| 86 | #:use-module (guix gexp)
|
| 87 | #:use-module (guix utils)
|
| 88 | #:use-module (ice-9 ftw)
|
| 89 | #:use-module (ice-9 match)
|
| 90 | #:use-module (ice-9 regex)
|
| 91 | #:use-module (srfi srfi-1))
|
| 92 |
|
| 93 | (define-public openfoam-org
|
| 94 | (package
|
| 95 | (name "openfoam-org")
|
| 96 | (version "14")
|
| 97 | (source
|
| 98 | (origin
|
| 99 | (method git-fetch)
|
| 100 | (uri (git-reference
|
| 101 | (url "https://github.com/OpenFOAM/OpenFOAM-dev")
|
| 102 | (commit (string-append "version-" version))))
|
| 103 | (file-name (git-file-name name version))
|
| 104 | (sha256
|
| 105 | (base32 "11dbxzhnml51vjdq4v91y4vc67hkm84lpj4px8i9nrh3v756z230"))))
|
| 106 | (build-system gnu-build-system)
|
| 107 | (native-inputs (list bison flex git))
|
| 108 | (inputs (list bash-completion
|
| 109 | boost
|
| 110 | cgal
|
| 111 | cgns
|
| 112 | cli11
|
| 113 | cmake-minimal
|
| 114 | coreutils
|
| 115 | curl
|
| 116 | double-conversion
|
| 117 | eigen
|
| 118 | expat
|
| 119 | ffmpeg
|
| 120 | findutils
|
| 121 | fmt
|
| 122 | freetype
|
| 123 | gdal
|
| 124 | gl2ps
|
| 125 | glew
|
| 126 | gmp
|
| 127 | gmsh
|
| 128 | gnuplot
|
| 129 | hdf5
|
| 130 | jsoncpp
|
| 131 | libjpeg-turbo
|
| 132 | libogg
|
| 133 | libpng
|
| 134 | libharu
|
| 135 | libtheora
|
| 136 | libtiff
|
| 137 | libx11
|
| 138 | libxml2
|
| 139 | libxslt
|
| 140 | libxt
|
| 141 | lz4
|
| 142 | metis
|
| 143 | mpfr
|
| 144 | ncurses
|
| 145 | netcdf
|
| 146 | nlohmann-json
|
| 147 | openmpi
|
| 148 | paraview
|
| 149 | proj
|
| 150 | protobuf
|
| 151 | pt-scotch32
|
| 152 | pugixml
|
| 153 | python
|
| 154 | python-mpi4py
|
| 155 | qt5compat
|
| 156 | qtbase
|
| 157 | qtsvg
|
| 158 | qttools
|
| 159 | qtwebengine
|
| 160 | readline
|
| 161 | trilinos-zoltan
|
| 162 | utfcpp
|
| 163 | vtk-9.5
|
| 164 | xz
|
| 165 | zlib))
|
| 166 | (propagated-inputs (list python-openpmd-api)) |
| 167 | (outputs '("debug" |
| 168 | "out"))
|
| 169 | (arguments
|
| 170 | (list
|
| 171 | |
| 172 | |
| 173 | #:strip-directories
|
| 174 | #~(list (string-append "OpenFOAM-"
|
| 175 | #$(package-version this-package)
|
| 176 | "/platforms/linux64GccDPInt32Opt/bin")
|
| 177 | (string-append "OpenFOAM-"
|
| 178 | #$(package-version this-package)
|
| 179 | "/platforms/linux64GccDPInt32Opt/lib"))
|
| 180 |
|
| 181 | #:modules '((ice-9 ftw)
|
| 182 | (ice-9 regex)
|
| 183 | (ice-9 string-fun)
|
| 184 | (srfi srfi-1)
|
| 185 | (guix build gnu-build-system)
|
| 186 | (guix build utils))
|
| 187 |
|
| 188 | #:phases
|
| 189 | #~(modify-phases %standard-phases
|
| 190 | (add-after 'unpack 'rename-self
|
| 191 | (lambda _
|
| 192 | (let* ((old-build-path (getcwd))
|
| 193 | (root-path (canonicalize-path (string-append
|
| 194 | old-build-path "/..")))
|
| 195 | (new-build-path (string-append root-path "/OpenFOAM-"
|
| 196 | #$(package-version
|
| 197 | this-package))))
|
| 198 | (chdir root-path)
|
| 199 | (rename-file old-build-path new-build-path)
|
| 200 | (chdir new-build-path))))
|
| 201 | (add-before 'configure 'patch-version
|
| 202 | (lambda _
|
| 203 | (substitute* "etc/bashrc"
|
| 204 | (("export WM_PROJECT_VERSION=.*$")
|
| 205 | (string-append "export WM_PROJECT_VERSION="
|
| 206 | #$(package-version this-package) "\n")))))
|
| 207 | (add-before 'configure 'patch-foamcleanpath
|
| 208 | (lambda _
|
| 209 | (substitute* "bin/foamCleanPath"
|
| 210 | (("getconf")
|
| 211 | (which "getconf")))))
|
| 212 | (add-before 'configure 'patch-shell-path
|
| 213 | (lambda _
|
| 214 | (substitute* "wmake/makefiles/general"
|
| 215 | (("/bin/sh")
|
| 216 | (which "sh")))))
|
| 217 | |
| 218 | (add-before 'configure 'patch-HOME-path
|
| 219 | (lambda _
|
| 220 | (setenv "HOME" "/tmp")))
|
| 221 | (add-before 'configure 'patch-bash-completion
|
| 222 | (lambda _
|
| 223 | (substitute* "etc/bashrc"
|
| 224 | |
| 225 | (("^.*bash_completion.*$" all)
|
| 226 | (string-append "#" all)))))
|
| 227 | (add-before 'configure 'patch-rpaths
|
| 228 | (lambda _
|
| 229 | (letrec* ((libraries '(#$(this-package-input "boost")
|
| 230 | #$(this-package-input "cgal")
|
| 231 | #$(this-package-input "gmp")
|
| 232 | #$(this-package-input "metis")
|
| 233 | #$(this-package-input "mpfr")
|
| 234 | #$(this-package-input "pt-scotch32")
|
| 235 | #$(this-package-input "openmpi")
|
| 236 | #$(this-package-input "zlib")
|
| 237 | #$(this-package-input "paraview")))
|
| 238 | (rpaths (fold-right (lambda (lib rpaths)
|
| 239 | (string-append rpaths "-rpath="
|
| 240 | lib "/lib,")) ""
|
| 241 | libraries))
|
| 242 | (openfoam-lib (string-append #$output
|
| 243 | "/share/OpenFOAM-"
|
| 244 | #$(package-version this-package)
|
| 245 | "/platforms/linux64GccDPInt32Opt/lib"))
|
| 246 | (ldflags (string-append "-Wl,"
|
| 247 | rpaths
|
| 248 | "-rpath="
|
| 249 | openfoam-lib
|
| 250 | ","
|
| 251 | "-rpath="
|
| 252 | openfoam-lib
|
| 253 | "/dummy,"
|
| 254 | "-rpath="
|
| 255 | openfoam-lib
|
| 256 | "/paraview-"
|
| 257 | #$(version-major+minor (package-version
|
| 258 | (this-package-input
|
| 259 | "paraview"))))))
|
| 260 | (substitute* "wmake/rules/linux64Gcc/c++"
|
| 261 | (("-fPIC" all)
|
| 262 | (string-append all " " ldflags))))))
|
| 263 | (add-before 'configure 'patch-paraview
|
| 264 | (lambda _
|
| 265 | (substitute* "etc/config.sh/paraview"
|
| 266 | (("ldd")
|
| 267 | (which "ldd")))
|
| 268 | (substitute* "bin/paraFoam"
|
| 269 | (("paraview \"\\$@\"")
|
| 270 | (string-append #$paraview "/bin/paraview \"$@\"")))))
|
| 271 | (add-before 'configure 'patch-mpi
|
| 272 | (lambda _
|
| 273 | (substitute* "etc/config.sh/mpi"
|
| 274 | (("mpicc")
|
| 275 | (string-append #$(this-package-input "openmpi") "/bin/mpicc")))))
|
| 276 | (add-before 'configure 'patch-paraview
|
| 277 | (lambda _
|
| 278 | (substitute* "etc/config.sh/paraview"
|
| 279 | (("\\$paraviewBinDir/paraview")
|
| 280 | "$paraviewBinDir/.paraview-real")
|
| 281 | (("libpqCore-pv")
|
| 282 | "libpqCore"))))
|
| 283 | (add-before 'configure 'patch-vtk-include-path
|
| 284 | (lambda _
|
| 285 | (let* ((vtk-version #$(version-major+minor (package-version (this-package-input
|
| 286 | "vtk"))))
|
| 287 | (vtk-inc (string-append #$(this-package-input "vtk")
|
| 288 | "/include/vtk-" vtk-version))
|
| 289 | (vtk-inc-flag (string-append "-I" vtk-inc)))
|
| 290 | (substitute* "wmake/makefiles/general"
|
| 291 | (("SYS_INC =" all)
|
| 292 | (string-append all " " vtk-inc-flag))))))
|
| 293 | (replace 'configure
|
| 294 | (lambda _
|
| 295 | (substitute* "etc/bashrc"
|
| 296 | (("export ParaView_TYPE=.*$")
|
| 297 | "export ParaView_TYPE=system\n")
|
| 298 | (("export SCOTCH_TYPE=.*$")
|
| 299 | "export SCOTCH_TYPE=system\n")
|
| 300 | (("export METIS_TYPE=.*$")
|
| 301 | "export METIS_TYPE=system\n")
|
| 302 | (("export ZOLTAN_TYPE=.*$")
|
| 303 | "export ZOLTAN_TYPE=system\n"))
|
| 304 | (substitute* "etc/config.sh/scotch"
|
| 305 | (("export SCOTCH_ARCH_PATH=.*$")
|
| 306 | (string-append "export SCOTCH_ARCH_PATH="
|
| 307 | #$(this-package-input "pt-scotch32") "\n")))
|
| 308 | (substitute* "etc/config.sh/metis"
|
| 309 | (("export METIS_ARCH_PATH=.*$")
|
| 310 | (string-append "export METIS_ARCH_PATH="
|
| 311 | #$(this-package-input "metis") "\n")))
|
| 312 | (substitute* "etc/config.sh/zoltan"
|
| 313 | (("export ZOLTAN_ARCH_PATH=.*$")
|
| 314 | (string-append "export ZOLTAN_ARCH_PATH="
|
| 315 | #$(this-package-input "trilinos-zoltan") "\n")))))
|
| 316 | (replace 'build
|
| 317 | (lambda _
|
| 318 | |
| 319 | (invoke "bash" "-c"
|
| 320 | (format #f "source ./etc/bashrc && ./Allwmake -j~a"
|
| 321 | (parallel-job-count)))))
|
| 322 | (add-after 'build 'cleanup
|
| 323 | |
| 324 | (lambda _
|
| 325 | (when (file-exists? "platforms/linux64GccDPInt32Opt/src")
|
| 326 | (delete-file-recursively "platforms/linux64GccDPInt32Opt/src"))
|
| 327 | (when (file-exists?
|
| 328 | "platforms/linux64GccDPInt32OptSYSTEMOPENMPI")
|
| 329 | (delete-file-recursively
|
| 330 | "platforms/linux64GccDPInt32OptSYSTEMOPENMPI"))
|
| 331 | (for-each delete-file
|
| 332 | (find-files "." "\\.o$"))
|
| 333 | (for-each delete-file
|
| 334 | (find-files "." "\\.dep$"))
|
| 335 | |
| 336 | |
| 337 | ))
|
| 338 | (replace 'check
|
| 339 | (lambda* (#:key tests? #:allow-other-keys)
|
| 340 | (when tests?
|
| 341 | (when (file-exists? "test")
|
| 342 | (with-directory-excursion "test"
|
| 343 | (invoke "bash" "-c"
|
| 344 | (format #f "source ../etc/bashrc && ./Allrun -j~a"
|
| 345 | (parallel-job-count)))))
|
| 346 | |
| 347 | |
| 348 | |
| 349 | )))
|
| 350 | (replace 'install
|
| 351 | (lambda _
|
| 352 | (let ((install-path (string-append #$output "/share/OpenFOAM-"
|
| 353 | #$(package-version
|
| 354 | this-package))))
|
| 355 | (mkdir-p install-path) |
| 356 | |
| 357 | (copy-recursively "." install-path))))
|
| 358 | (add-after 'install 'add-symbolic-link
|
| 359 | (lambda _
|
| 360 | (let* ((bin (string-append #$output "/bin"))
|
| 361 | (lib (string-append #$output "/lib"))
|
| 362 | (etc (string-append #$output "/etc"))
|
| 363 | (openfoam (string-append #$output "/share/OpenFOAM-"
|
| 364 | #$(package-version this-package)))
|
| 365 | (build-bin (string-append openfoam
|
| 366 | "/platforms/linux64GccDPInt32Opt/bin"))
|
| 367 | (build-lib (string-append openfoam
|
| 368 | "/platforms/linux64GccDPInt32Opt/lib"))
|
| 369 | (foam-bin (string-append openfoam "/bin")))
|
| 370 | |
| 371 | (mkdir-p bin)
|
| 372 | (for-each (lambda (file)
|
| 373 | (symlink file
|
| 374 | (string-append bin "/"
|
| 375 | (basename file))))
|
| 376 | (find-files build-bin))
|
| 377 | (for-each (lambda (file)
|
| 378 | (symlink file
|
| 379 | (string-append bin "/"
|
| 380 | (basename file))))
|
| 381 | (find-files foam-bin))
|
| 382 | |
| 383 | (symlink build-lib lib)
|
| 384 | |
| 385 | (mkdir-p etc)
|
| 386 | (symlink (string-append openfoam "/etc/bashrc")
|
| 387 | (string-append etc "/bashrc"))) #t))
|
| 388 | (add-after 'add-symbolic-link 'wrap
|
| 389 | (lambda* (#:key python inputs outputs #:allow-other-keys)
|
| 390 | (let* ((bin (string-append #$output "/bin"))
|
| 391 | (openfoam-version #$(package-version this-package))
|
| 392 | (openfoam-root (string-append #$output "/share/OpenFOAM-"
|
| 393 | openfoam-version))
|
| 394 | (openmpi-version #$(package-version (this-package-input
|
| 395 | "openmpi")))
|
| 396 | (paraview-version #$(package-version (this-package-input
|
| 397 | "paraview")))
|
| 398 | (paraview-version-major+minor #$(version-major+minor (package-version
|
| 399 | (this-package-input
|
| 400 | "paraview")))))
|
| 401 | (for-each (lambda (program)
|
| 402 | |
| 403 | |
| 404 | (wrap-program program
|
| 405 | `("WM_PROJECT_INST_DIR" =
|
| 406 | (,openfoam-root))
|
| 407 | `("WM_PROJECT_DIR" =
|
| 408 | (,openfoam-root))
|
| 409 | '("WM_PROJECT" =
|
| 410 | ("OpenFOAM"))
|
| 411 | `("WM_PROJECT_VERSION" =
|
| 412 | (,openfoam-version))
|
| 413 | '("WM_COMPILER_TYPE" =
|
| 414 | ("system"))
|
| 415 | '("WM_COMPILER" =
|
| 416 | ("Gcc"))
|
| 417 | '("WM_ARCH_OPTION" =
|
| 418 | ("64"))
|
| 419 | '("WM_PRECISION_OPTION" =
|
| 420 | ("DP"))
|
| 421 | '("WM_LABEL_SIZE" =
|
| 422 | ("32"))
|
| 423 | '("WM_COMPILE_OPTION" =
|
| 424 | ("Opt"))
|
| 425 | '("WM_MPLIB" =
|
| 426 | ("SYSTEMOPENMPI"))
|
| 427 | '("WM_OSTYPE" =
|
| 428 | ("POSIX"))
|
| 429 | '("WM_OPTIONS" =
|
| 430 | ("linux64GccDPInt32Opt"))
|
| 431 | `("WM_PROJECT_USER_DIR" =
|
| 432 | (,(string-append "$HOME/OpenFOAM/$USER-"
|
| 433 | openfoam-version)))
|
| 434 | `("WM_THIRD_PARTY_DIR" =
|
| 435 | (,(string-append openfoam-root "/ThirdParty-"
|
| 436 | openfoam-version)))
|
| 437 | '("WM_LABEL_OPTION" =
|
| 438 | ("Int32"))
|
| 439 | '("WM_LINK_LANGUAGE" =
|
| 440 | ("c++"))
|
| 441 | '("WM_COMPILER_LIB_ARCH" =
|
| 442 | ("64"))
|
| 443 | `("WM_DIR" =
|
| 444 | (,(string-append openfoam-root "/wmake")))
|
| 445 | '("WM_LDFLAGS" =
|
| 446 | ("-m64"))
|
| 447 | '("WM_CC" =
|
| 448 | ("gcc"))
|
| 449 | '("WM_CFLAGS" =
|
| 450 | ("-m64 -fPIC"))
|
| 451 | '("WM_CXX" =
|
| 452 | ("g++"))
|
| 453 | '("WM_CXXFLAGS" =
|
| 454 | ("-m64 -fPIC -std=c++0x"))
|
| 455 |
|
| 456 | `("FOAM_INST_DIR" =
|
| 457 | (,openfoam-root))
|
| 458 | `("FOAM_APP" =
|
| 459 | (,(string-append openfoam-root "/applications")))
|
| 460 | `("FOAM_SRC" =
|
| 461 | (,(string-append openfoam-root "/src")))
|
| 462 | `("FOAM_ETC" =
|
| 463 | (,(string-append openfoam-root "/etc")))
|
| 464 | `("FOAM_TUTORIALS" =
|
| 465 | (,(string-append openfoam-root "/tutorials")))
|
| 466 | `("FOAM_UTILITIES" =
|
| 467 | (,(string-append openfoam-root
|
| 468 | "/applications/utilities")))
|
| 469 | `("FOAM_SOLVERS" =
|
| 470 | (,(string-append openfoam-root
|
| 471 | "/applications/solvers")))
|
| 472 | `("FOAM_MPI" =
|
| 473 | (,(string-append "openmpi-" openmpi-version)))
|
| 474 | `("FOAM_RUN" =
|
| 475 | (,(string-append "$HOME/OpenFOAM/$USER-"
|
| 476 | openfoam-version "/run")))
|
| 477 | `("FOAM_EXT_LIBBIN" =
|
| 478 | (,(string-append openfoam-root "/ThirdParty-"
|
| 479 | openfoam-version
|
| 480 | "/platforms/linux64GccDPInt32/lib")))
|
| 481 | `("FOAM_APPBIN" =
|
| 482 | (,(string-append openfoam-root
|
| 483 | "/platforms/linux64GccDPInt32Opt/bin")))
|
| 484 | `("FOAM_JOB_DIR" =
|
| 485 | (,(string-append openfoam-root "/jobControl")))
|
| 486 | `("FOAM_LIBBIN" =
|
| 487 | (,(string-append openfoam-root
|
| 488 | "/platforms/linux64GccDPInt32Opt/lib")))
|
| 489 | `("FOAM_SITE_LIBBIN" =
|
| 490 | (,(string-append openfoam-root "/site/"
|
| 491 | openfoam-version
|
| 492 | "/platforms/linux64GccDPInt32Opt/lib")))
|
| 493 | `("FOAM_SITE_APPBIN" =
|
| 494 | (,(string-append openfoam-root "/site/"
|
| 495 | openfoam-version
|
| 496 | "/platforms/linux64GccDPInt32Opt/bin")))
|
| 497 | `("FOAM_USER_LIBBIN" =
|
| 498 | (,(string-append "$HOME/OpenFOAM/$USER-"
|
| 499 | openfoam-version
|
| 500 | "/platforms/linux64GccDPInt32Opt/lib")))
|
| 501 | `("FOAM_USER_APPBIN" =
|
| 502 | (,(string-append "$HOME/OpenFOAM/$USER-"
|
| 503 | openfoam-version
|
| 504 | "/platforms/linux64GccDPInt32Opt/bin")))
|
| 505 | `("FOAM_MODULES" =
|
| 506 | (,(string-append openfoam-root
|
| 507 | "/applications/modules")))
|
| 508 | '("FOAM_SIGFPE" =
|
| 509 | (""))
|
| 510 | '("FOAM_SETTINGS" =
|
| 511 | (""))
|
| 512 |
|
| 513 | `("ParaView_INCLUDE_DIR" =
|
| 514 | (,(string-append #$(this-package-input
|
| 515 | "paraview")
|
| 516 | "/include/paraview-"
|
| 517 | paraview-version-major+minor)))
|
| 518 | '("ParaView_GL" =
|
| 519 | ("mesa"))
|
| 520 | `("ParaView_VERSION" =
|
| 521 | (,paraview-version))
|
| 522 | `("ParaView_MAJOR" =
|
| 523 | (,paraview-version-major+minor))
|
| 524 | `("ParaView_DIR" =
|
| 525 | (,#$(this-package-input "paraview")))
|
| 526 | `("PV_PLUGIN_PATH" =
|
| 527 | (,(string-append openfoam-root
|
| 528 | "/platforms/linux64GccDPInt32Opt/lib/paraview-"
|
| 529 | paraview-version-major+minor)))
|
| 530 |
|
| 531 | `("MPI_ARCH_PATH" =
|
| 532 | (,#$(this-package-input "openmpi")))
|
| 533 | `("OPAL_PREFIX" =
|
| 534 | (,#$(this-package-input "openmpi")))
|
| 535 | '("MPI_BUFFER_SIZE" =
|
| 536 | ("20000000"))
|
| 537 |
|
| 538 | `("LD_LIBRARY_PATH" prefix
|
| 539 | (,(string-append openfoam-root "/ThirdParty-"
|
| 540 | openfoam-version
|
| 541 | "/platforms/linux64Gcc/gperftools-svn/lib") ,
|
| 542 | (string-append #$(this-package-input
|
| 543 | "paraview") "/lib")
|
| 544 | ,(string-append openfoam-root
|
| 545 | "/platforms/linux64GccDPInt32Opt/lib/openmpi-"
|
| 546 | openmpi-version)
|
| 547 | ,(string-append openfoam-root "/ThirdParty-"
|
| 548 | openfoam-version
|
| 549 | "/platforms/linux64GccDPInt32/lib/openmpi-"
|
| 550 | openmpi-version)
|
| 551 | ,(string-append #$(this-package-input
|
| 552 | "openmpi") "/lib")
|
| 553 | ,(string-append #$(this-package-input
|
| 554 | "openmpi") "/lib64")
|
| 555 | ,(string-append "$HOME/OpenFOAM/$USER-"
|
| 556 | openfoam-version
|
| 557 | "/platforms/linux64GccDPInt32Opt/lib")
|
| 558 | ,(string-append openfoam-root "/site/"
|
| 559 | openfoam-version
|
| 560 | "/platforms/linux64GccDPInt32Opt/lib")
|
| 561 | ,(string-append openfoam-root
|
| 562 | "/platforms/linux64GccDPInt32Opt/lib")
|
| 563 | ,(string-append openfoam-root "/ThirdParty-"
|
| 564 | openfoam-version
|
| 565 | "/platforms/linux64GccDPInt32/lib")
|
| 566 | ,(string-append openfoam-root
|
| 567 | "/platforms/linux64GccDPInt32Opt/lib/openmpi-system")
|
| 568 | ,(string-append openfoam-root
|
| 569 | "/platforms/linux64GccDPInt32Opt/lib/paraview-"
|
| 570 | paraview-version-major+minor)))
|
| 571 | `("PATH" prefix
|
| 572 | (,(string-append openfoam-root "/ThirdParty-"
|
| 573 | openfoam-version
|
| 574 | "/platforms/linux64Gcc/gperftools-svn/bin") ,
|
| 575 | (string-append #$(this-package-input
|
| 576 | "paraview") "/bin")
|
| 577 | ,(string-append openfoam-root "/ThirdParty-"
|
| 578 | openfoam-version
|
| 579 | "/platforms/linux64Gcc/cmake-*/bin")
|
| 580 | ,(string-append #$(this-package-input
|
| 581 | "openmpi") "/bin")
|
| 582 | ,(string-append openfoam-root "/bin")
|
| 583 | ,(string-append openfoam-root "/wmake")
|
| 584 | ,(string-append "$HOME/OpenFOAM/$USER-"
|
| 585 | openfoam-version
|
| 586 | "/platforms/linux64GccDPInt32Opt/bin")
|
| 587 | ,(string-append openfoam-root "/site/"
|
| 588 | openfoam-version
|
| 589 | "/platforms/linux64GccDPInt32Opt/bin")
|
| 590 | ,(string-append openfoam-root
|
| 591 | "/platforms/linux64GccDPInt32Opt/bin")))))
|
| 592 | (find-files bin))))))))
|
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | |
| 603 | |
| 604 | |
| 605 | (home-page "https://openfoam.org")
|
| 606 | (synopsis "Framework for numerical simulation of fluid flow")
|
| 607 | (description
|
| 608 | "OpenFOAM provides a set of solvers and methods for tackling
|
| 609 | problems in the field of Computational Fluid Dynamics (CFD). It is written in
|
| 610 | C++. Governing equations such as the Navier-Stokes equations can be solved in
|
| 611 | integral form. Physical processes such as phase change, droplet transport and
|
| 612 | chemical reaction can be modelled. Numerical methods are included to deal with
|
| 613 | sharp gradients, such as those encountered in flows with shock waves and flows
|
| 614 | with gas/liquid interfaces. Large problems may be split into smaller, connected
|
| 615 | problems for efficient solution on parallel systems.")
|
| 616 | (license license:gpl3+)))
|
| 617 |
|
| 618 | (define-public openfoam-com
|
| 619 | |
| 620 | (package
|
| 621 | (inherit openfoam-org)
|
| 622 | (name "openfoam-com")
|
| 623 | (version "2512")
|
| 624 | (source
|
| 625 | (origin
|
| 626 | (method git-fetch)
|
| 627 | (uri (git-reference
|
| 628 | (url "https://gitlab.com/openfoam/core/openfoam")
|
| 629 | (commit (string-append "OpenFOAM-v" version))))
|
| 630 | (file-name (git-file-name name version))
|
| 631 | (sha256
|
| 632 | (base32 "0v2dy7zcr1s6jc0z8gx726ljai3jnihzydiisszab8vcq79c19dr"))))
|
| 633 | (synopsis
|
| 634 | "Framework for numerical simulation of fluid flow (from openfoam.com)")
|
| 635 | (home-page "https://www.openfoam.com")))
|
| 636 |
|
| 637 | (define-public open-simulation-interface
|
| 638 | (package
|
| 639 | (name "open-simulation-interface")
|
| 640 | (version "3.5.0")
|
| 641 | (source (origin
|
| 642 | (method git-fetch)
|
| 643 | (uri (git-reference
|
| 644 | (url (string-append "https://github.com/"
|
| 645 | "OpenSimulationInterface/"
|
| 646 | "open-simulation-interface"))
|
| 647 | (commit (string-append "v" version))))
|
| 648 | (file-name (git-file-name name version))
|
| 649 | (sha256
|
| 650 | (base32
|
| 651 | "09vclrvsawx608kk0vnzywr71xn11qzwxzh2j508zjfn0kvhyx7q"))))
|
| 652 | (build-system cmake-build-system)
|
| 653 | (arguments (list #:tests? #f |
| 654 | #:phases
|
| 655 | #~(modify-phases %standard-phases
|
| 656 | (add-after 'unpack 'fix-cmake
|
| 657 | (lambda _
|
| 658 | (substitute* "CMakeLists.txt"
|
| 659 | (("-targets\\.cmake") "_targets.cmake")))))))
|
| 660 | (native-inputs (list protobuf))
|
| 661 | (home-page
|
| 662 | "https://github.com/OpenSimulationInterface/open-simulation-interface")
|
| 663 | (synopsis "Generic interface for environmental perception")
|
| 664 | (description "The Open Simulation Interface is a generic interface based on
|
| 665 | Google's protocol buffers for the environmental perception of automated driving
|
| 666 | functions in virtual scenarios.")
|
| 667 | (license license:mpl2.0)))
|
| 668 |
|
| 669 | (define-public python-open-simulation-interface
|
| 670 | (package/inherit open-simulation-interface
|
| 671 | (name "python-open-simulation-interface")
|
| 672 | (build-system pyproject-build-system)
|
| 673 | (arguments '())
|
| 674 | (native-inputs
|
| 675 | (modify-inputs native-inputs
|
| 676 | (append python-pytest python-setuptools)))
|
| 677 | (propagated-inputs
|
| 678 | (list python-pyyaml
|
| 679 | python-protobuf))))
|
| 680 |
|
| 681 | (define-public esmini
|
| 682 | (package
|
| 683 | (name "esmini")
|
| 684 | (version "3.5.0")
|
| 685 | (source
|
| 686 | (origin
|
| 687 | (method git-fetch)
|
| 688 | (uri (git-reference
|
| 689 | (url "https://github.com/esmini/esmini")
|
| 690 | (commit (string-append "v" version))))
|
| 691 | (file-name (git-file-name name version))
|
| 692 | (modules '((guix build utils) (ice-9 ftw)))
|
| 693 | (snippet
|
| 694 | #~(begin
|
| 695 | (with-directory-excursion "externals"
|
| 696 | (for-each
|
| 697 | (lambda (dir) (unless (member dir '("." ".." "expr" "yaml"))
|
| 698 | (delete-file-recursively dir)))
|
| 699 | (scandir ".")))
|
| 700 | (substitute* "CMakeLists.txt"
|
| 701 | (("add_subdirectory\\(externals/fmt\\)") "")
|
| 702 | (("set_.*_libs\\(\\)") ""))
|
| 703 | (with-directory-excursion "EnvironmentSimulator"
|
| 704 | (with-directory-excursion "Applications/esmini-dyn/"
|
| 705 | (substitute* "CMakeLists.txt"
|
| 706 | (("\\$ORIGIN") "$ORIGIN/../lib")))
|
| 707 | (with-directory-excursion "Modules/RoadManager"
|
| 708 | (substitute* (find-files "." "CMakeLists\\.txt$")
|
| 709 | (("\\$\\{EXTERNALS_.*\\}/[^ )\n]*") "")
|
| 710 | (("add_library\\(\n") "add_library("))
|
| 711 | (substitute* (find-files "." "CMakeLists\\.txt$")
|
| 712 | (("add_library\\(.*pugixml_lib") "find_package(pugixml")
|
| 713 | (("pugixml_lib") "pugixml")))
|
| 714 | (with-directory-excursion "Modules/Controllers"
|
| 715 | (substitute* "ControllerSumo.cpp"
|
| 716 | (("#include <utils/geom/PositionVector\\.h>") ""))))
|
| 717 | (with-directory-excursion "support/cmake/external"
|
| 718 | (for-each make-file-writable (scandir "."))
|
| 719 | (call-with-output-file "gtest.cmake"
|
| 720 | (lambda (out)
|
| 721 | (display "find_package(GTest REQUIRED)" out)))
|
| 722 | (call-with-output-file "osg.cmake"
|
| 723 | (lambda (out)
|
| 724 | (display "include_guard()\n" out)
|
| 725 | (display "include(FindPkgConfig)\n" out)
|
| 726 | (format out "pkg_check_modules(OSG REQUIRED~@{ ~a~})"
|
| 727 | "openscenegraph"
|
| 728 | "osgdb_jpeg"
|
| 729 | "osgdb_png"
|
| 730 | "osgdb_osg"
|
| 731 | "osgdb_serializers_osg"
|
| 732 | "osgdb_serializers_osgsim")))
|
| 733 | (call-with-output-file "osi.cmake"
|
| 734 | (lambda (out)
|
| 735 | (display "\
|
| 736 | find_package(open_simulation_interface REQUIRED)
|
| 737 | set(EXTERNALS_OSI_INCLUDES \"${OPEN_SIMULATION_INTERFACE_INCLUDE_DIRS}\")
|
| 738 | set(OSI_LIBRARIES open_simulation_interface::open_simulation_interface)
|
| 739 | " out)
|
| 740 | ))
|
| 741 | (call-with-output-file "sumo.cmake"
|
| 742 | (lambda (out)
|
| 743 | (display "set(SUMO_LIBRARIES sumocpp tracicpp)"
|
| 744 | out))))))
|
| 745 | (sha256
|
| 746 | (base32
|
| 747 | "13xlkhg6z2z1j99l0j5m77lkcvsqkgmy19yjikqy32x1r0hm17df"))))
|
| 748 | (build-system cmake-build-system)
|
| 749 | (arguments
|
| 750 | (list
|
| 751 | #:configure-flags
|
| 752 | #~(list "-DDYN_PROTOBUF=TRUE"
|
| 753 | |
| 754 | "-DUSE_IMPLOT=FALSE"
|
| 755 | "-DDOWNLOAD_EXTERNALS=FALSE")
|
| 756 | #:phases
|
| 757 | #~(modify-phases %standard-phases
|
| 758 | (add-after 'unpack 'fix-cmake
|
| 759 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 760 | (substitute* "support/cmake/common/locations.cmake"
|
| 761 | (("\\$\\{CMAKE_SOURCE_DIR\\}/bin")
|
| 762 | (string-append (assoc-ref outputs "out") "/bin")))))
|
| 763 | (replace 'check
|
| 764 | (lambda* (#:key tests? #:allow-other-keys)
|
| 765 | (with-directory-excursion "EnvironmentSimulator/Unittest/"
|
| 766 | (for-each invoke (find-files "_test$")))))
|
| 767 | (add-after 'install 'move-libraries
|
| 768 | (lambda* (#:key outputs #:allow-other-keys)
|
| 769 | (let ((out (assoc-ref outputs "out")))
|
| 770 | (mkdir-p (string-append out "/lib"))
|
| 771 | (with-directory-excursion (string-append out "/bin")
|
| 772 | (for-each
|
| 773 | (lambda (f)
|
| 774 | (rename-file f (string-append out "/lib/"
|
| 775 | (basename f))))
|
| 776 | (find-files "." "\\.(a|so)$")))))))))
|
| 777 | (inputs (list fmt
|
| 778 | mesa
|
| 779 | openscenegraph
|
| 780 | `(,openscenegraph "pluginlib")
|
| 781 | open-simulation-interface
|
| 782 | protobuf
|
| 783 | pugixml
|
| 784 | sumo))
|
| 785 | (native-inputs (list googletest pkg-config))
|
| 786 | (home-page "https://github.com/esmini/esmini")
|
| 787 | (synopsis "Basic OpenSCENARIO player")
|
| 788 | (description "@command{esmini} is a tool to play OpenSCENARIO files.
|
| 789 | It is provided as both a standalone application and a shared library and has
|
| 790 | some support for generating and analysing traffic scenarios..")
|
| 791 | (license license:mpl2.0)))
|
| 792 |
|
| 793 | (define-public python-fenics-dijitso
|
| 794 | (package
|
| 795 | (name "python-fenics-dijitso")
|
| 796 | (version "2019.1.0")
|
| 797 | (source
|
| 798 | (origin
|
| 799 | (method url-fetch)
|
| 800 | (uri (pypi-uri "fenics-dijitso" version))
|
| 801 | (sha256
|
| 802 | (base32 "0lhqsq8ypdak0ahr2jnyvg07yrqp6wicjxi6k56zx24wp3qg60sc"))))
|
| 803 | (build-system pyproject-build-system)
|
| 804 | (arguments
|
| 805 | (list
|
| 806 | #:phases
|
| 807 | #~(modify-phases %standard-phases
|
| 808 | (add-after 'build 'mpi-setup
|
| 809 | #$%openmpi-setup)
|
| 810 | (replace 'check
|
| 811 | (lambda* (#:key tests? #:allow-other-keys)
|
| 812 | (when tests?
|
| 813 | (setenv "HOME" "/tmp")
|
| 814 | (with-directory-excursion "test"
|
| 815 | |
| 816 | |
| 817 | (substitute* "runtests.sh"
|
| 818 | (("for p in 1 4 8 16; do") "for p in 1; do"))
|
| 819 | (invoke "./runtests.sh"))))))))
|
| 820 | (native-inputs
|
| 821 | (list python-pytest
|
| 822 | |
| 823 | python-pytest-cov
|
| 824 | python-setuptools))
|
| 825 | (inputs
|
| 826 | (list openmpi python-numpy))
|
| 827 | (propagated-inputs
|
| 828 | (list python-mpi4py))
|
| 829 | (home-page "https://bitbucket.org/fenics-project/dijitso/")
|
| 830 | (synopsis "Distributed just-in-time building of shared libraries")
|
| 831 | (description
|
| 832 | "Dijitso provides a core component of the @code{FEniCS} framework,
|
| 833 | namely the just-in-time compilation of C++ code that is generated from
|
| 834 | Python modules. It is called from within a C++ library, using ctypes
|
| 835 | to import the dynamic shared library directly.
|
| 836 |
|
| 837 | As long as the compiled code can provide a simple factory function to
|
| 838 | a class implementing a predefined C++ interface, there is no limit to
|
| 839 | the complexity of that interface. Parallel support depends on the
|
| 840 | @code{mpi4py} interface.")
|
| 841 | (license license:lgpl3+)))
|
| 842 |
|
| 843 | (define-public python-fenics-ufl
|
| 844 | (package
|
| 845 | (name "python-fenics-ufl")
|
| 846 | (version "2025.2.0")
|
| 847 | (source
|
| 848 | (origin
|
| 849 | (method url-fetch)
|
| 850 | (uri (pypi-uri "fenics_ufl" version))
|
| 851 | (sha256
|
| 852 | (base32 "1k2r7s1c7dqlgkah4jr08lqy4z17h49r94yxjm7ca16vgvqvq1xg"))))
|
| 853 | (build-system pyproject-build-system)
|
| 854 | (inputs (list python-numpy))
|
| 855 | (native-inputs (list python-pytest python-setuptools))
|
| 856 | (home-page "https://bitbucket.org/fenics-project/ufl/")
|
| 857 | (synopsis "Unified language for form-compilers")
|
| 858 | (description
|
| 859 | "The Unified Form Language (UFL) is a domain specific language for
|
| 860 | declaration of finite element discretizations of variational forms. More
|
| 861 | precisely, it defines a flexible interface for choosing finite element spaces
|
| 862 | and defining expressions for weak forms in a notation close to mathematical
|
| 863 | notation.
|
| 864 |
|
| 865 | UFL is part of the FEniCS Project.")
|
| 866 | (license license:lgpl3+)))
|
| 867 |
|
| 868 | (define-public python-fenics-ufl-2019
|
| 869 | (package/inherit python-fenics-ufl
|
| 870 | (name "python-fenics-ufl")
|
| 871 | (version "2019.1.0")
|
| 872 | (source
|
| 873 | (origin
|
| 874 | (method url-fetch)
|
| 875 | (uri (pypi-uri "fenics-ufl" version))
|
| 876 | (sha256
|
| 877 | (base32 "10dz8x3lm68x2w3kkqcjask38h0zkhhak26jdbkppr8g9y8wny7p"))))
|
| 878 | (inputs '())
|
| 879 | (propagated-inputs (list python-numpy-1))))
|
| 880 |
|
| 881 | |
| 882 | |
| 883 | |
| 884 | |
| 885 | |
| 886 | (define-public python-fenics-fiat
|
| 887 | (package
|
| 888 | (name "python-fenics-fiat")
|
| 889 | (version "2019.1.0")
|
| 890 | (source
|
| 891 | (origin
|
| 892 | (method url-fetch)
|
| 893 | (uri (pypi-uri "fenics-fiat" version))
|
| 894 | (sha256
|
| 895 | (base32 "13sc7lma3d2mh43an7i4kkdbbk4cmvxjk45wi43xnjd7qc38zg4b"))))
|
| 896 | (build-system pyproject-build-system)
|
| 897 | (arguments
|
| 898 | (list
|
| 899 | #:test-flags
|
| 900 | #~(list
|
| 901 | |
| 902 | |
| 903 | |
| 904 | |
| 905 | "--ignore=test/regression/"
|
| 906 | "--ignore=test/unit/test_quadrature.py"
|
| 907 | "--ignore=test/unit/test_reference_element.py"
|
| 908 | "-k" (string-join
|
| 909 | (list "not test_nodality"
|
| 910 | "test_basis_values")
|
| 911 | " and not "))))
|
| 912 | (native-inputs
|
| 913 | (list python-pytest
|
| 914 | python-setuptools
|
| 915 | python-wheel))
|
| 916 | (propagated-inputs
|
| 917 | (list python-numpy
|
| 918 | python-sympy))
|
| 919 | (home-page "https://bitbucket.org/fenics-project/fiat/")
|
| 920 | (synopsis "Tabulation of finite element function spaces")
|
| 921 | (description
|
| 922 | "The FInite element Automatic Tabulator (FIAT) supports generation of
|
| 923 | arbitrary order instances of the Lagrange elements on lines, triangles, and
|
| 924 | tetrahedra. It is also capable of generating arbitrary order instances of
|
| 925 | Jacobi-type quadrature rules on the same element shapes. Further, H(div) and
|
| 926 | H(curl) conforming finite element spaces such as the families of
|
| 927 | Raviart-Thomas, Brezzi-Douglas-Marini and Nedelec are supported on triangles
|
| 928 | and tetrahedra. Upcoming versions will also support Hermite and nonconforming
|
| 929 | elements.
|
| 930 |
|
| 931 | FIAT is part of the FEniCS Project.")
|
| 932 | (license license:lgpl3+)))
|
| 933 |
|
| 934 | (define-public python-fenics-ffc
|
| 935 | (package
|
| 936 | (name "python-fenics-ffc")
|
| 937 | (version "2019.1.0.post0")
|
| 938 | (source
|
| 939 | (origin
|
| 940 | (method url-fetch)
|
| 941 | (uri (pypi-uri "fenics-ffc" version))
|
| 942 | (sha256
|
| 943 | (base32 "1f2a44ha65fg3a1prrbrsz4dgvibsv0j5c3pi2m52zi93bhwwgg9"))))
|
| 944 | (build-system pyproject-build-system)
|
| 945 | (arguments
|
| 946 | (list
|
| 947 | #:phases
|
| 948 | #~(modify-phases %standard-phases
|
| 949 | (replace 'check
|
| 950 | (lambda _
|
| 951 | (setenv "HOME" (getcwd))
|
| 952 | (with-directory-excursion "test"
|
| 953 | |
| 954 | |
| 955 | |
| 956 | |
| 957 | |
| 958 | (invoke "pytest" "unit/" "--ignore=unit/ufc/")
|
| 959 | (with-directory-excursion "uflacs"
|
| 960 | (invoke "pytest" "unit/"))))))))
|
| 961 | (native-inputs (list python-pytest python-setuptools))
|
| 962 | (propagated-inputs (list python-fenics-dijitso python-fenics-fiat
|
| 963 | python-fenics-ufl-2019
|
| 964 | python-numpy-1))
|
| 965 | (home-page "https://bitbucket.org/fenics-project/ffc/")
|
| 966 | (synopsis "Compiler for finite element variational forms")
|
| 967 | (description
|
| 968 | "The FEniCS Form Compiler (FFC) is a compiler for finite element
|
| 969 | variational forms. From a high-level description of the form, it generates
|
| 970 | efficient low-level C++ code that can be used to assemble the corresponding
|
| 971 | discrete operator (tensor). In particular, a bilinear form may be assembled
|
| 972 | into a matrix and a linear form may be assembled into a vector. FFC may be
|
| 973 | used either from the command line (by invoking the @code{ffc} command) or as a
|
| 974 | Python module (@code{import ffc}).
|
| 975 |
|
| 976 | FFC is part of the FEniCS Project.")
|
| 977 | |
| 978 | |
| 979 | (license (list license:public-domain license:lgpl3+))))
|
| 980 |
|
| 981 | (define-public fenics-dolfin
|
| 982 | (package
|
| 983 | (name "fenics-dolfin")
|
| 984 | (version "2019.1.0.post0")
|
| 985 | (source
|
| 986 | (origin
|
| 987 | (method url-fetch)
|
| 988 | (uri (string-append "https://bitbucket.org/fenics-project/dolfin/get/"
|
| 989 | version ".tar.gz"))
|
| 990 | (file-name (string-append name "-" version ".tar.gz"))
|
| 991 | (sha256
|
| 992 | (base32 "1m91hwcq5gfj4qqswp8l8kj58nia48f0n4kq13w0xqj4biq7rla0"))
|
| 993 | (patches (search-patches "fenics-dolfin-algorithm.patch"
|
| 994 | "fenics-dolfin-demo-init.patch"
|
| 995 | "fenics-dolfin-boost.patch"
|
| 996 | "fenics-dolfin-config-slepc.patch"
|
| 997 | "fenics-dolfin-hdf5-version-check.patch"
|
| 998 | "fenics-dolfin-integer-types.patch"))
|
| 999 | (modules '((guix build utils)))
|
| 1000 | (snippet '(begin
|
| 1001 | |
| 1002 | (delete-file-recursively "test/unit/cpp/catch")
|
| 1003 | (substitute* "test/unit/cpp/main.cpp"
|
| 1004 | |
| 1005 | (("#include.*")
|
| 1006 | "#include <catch.hpp>\n"))
|
| 1007 | (substitute* "test/unit/cpp/CMakeLists.txt"
|
| 1008 | |
| 1009 | (("(^set\\(CATCH_INCLUDE_DIR ).*(/catch\\))" _ front back)
|
| 1010 | (string-append front "$ENV{CATCH_DIR}/include" back "\n")))))))
|
| 1011 | (build-system cmake-build-system)
|
| 1012 | (inputs (list openblas
|
| 1013 | boost-1.83
|
| 1014 | eigen
|
| 1015 | hdf5-parallel-openmpi
|
| 1016 | libxml2
|
| 1017 | python-3
|
| 1018 | pt-scotch32
|
| 1019 | suitesparse
|
| 1020 | zlib))
|
| 1021 | (native-inputs (list catch-framework pkg-config python-setuptools))
|
| 1022 | (propagated-inputs (list python-fenics-ffc petsc-openmpi slepc-openmpi))
|
| 1023 | (arguments
|
| 1024 | (list
|
| 1025 | #:configure-flags
|
| 1026 | #~`("-DDOLFIN_ENABLE_DOCS:BOOL=OFF" "-DDOLFIN_ENABLE_HDF5:BOOL=ON"
|
| 1027 | "-DDOLFIN_ENABLE_MPI:BOOL=ON"
|
| 1028 | "-DDOLFIN_ENABLE_PARMETIS:BOOL=OFF"
|
| 1029 | "-DDOLFIN_ENABLE_SCOTCH:BOOL=ON"
|
| 1030 | "-DDOLFIN_ENABLE_SUNDIALS:BOOL=OFF"
|
| 1031 | "-DDOLFIN_ENABLE_TRILINOS:BOOL=OFF")
|
| 1032 | #:phases
|
| 1033 | #~(modify-phases %standard-phases
|
| 1034 | (add-after 'patch-usr-bin-file 'mpi-setup
|
| 1035 | #$%openmpi-setup)
|
| 1036 | (add-after 'patch-source-shebangs 'set-paths
|
| 1037 | (lambda _
|
| 1038 | |
| 1039 | (setenv "BLAS_DIR"
|
| 1040 | #$(this-package-input "openblas"))
|
| 1041 | (setenv "CATCH_DIR"
|
| 1042 | #$(this-package-input "catch"))
|
| 1043 | (setenv "LAPACK_DIR"
|
| 1044 | #$(this-package-input "openblas"))
|
| 1045 | (setenv "PETSC_DIR"
|
| 1046 | #$(this-package-input "petsc"))
|
| 1047 | (setenv "SLEPC_DIR"
|
| 1048 | #$(this-package-input "slepc"))
|
| 1049 | (setenv "SCOTCH_DIR"
|
| 1050 | #$(this-package-input "scotch"))
|
| 1051 | (setenv "UMFPACK_DIR"
|
| 1052 | #$(this-package-input "suitesparse"))))
|
| 1053 | (add-before 'check 'pre-check
|
| 1054 | (lambda _
|
| 1055 | |
| 1056 | |
| 1057 | |
| 1058 | |
| 1059 | |
| 1060 | |
| 1061 | |
| 1062 | |
| 1063 | |
| 1064 | |
| 1065 | |
| 1066 | |
| 1067 | |
| 1068 | |
| 1069 | (call-with-output-file "CTestCustom.cmake"
|
| 1070 | (lambda (port)
|
| 1071 | (display (string-append "set(CTEST_CUSTOM_TESTS_IGNORE "
|
| 1072 | "demo_bcs_serial "
|
| 1073 | "demo_bcs_mpi "
|
| 1074 | "demo_eigenvalue_serial "
|
| 1075 | "demo_eigenvalue_mpi "
|
| 1076 | "demo_navier-stokes_serial "
|
| 1077 | "demo_navier-stokes_mpi "
|
| 1078 | "demo_stokes-taylor-hood_serial "
|
| 1079 | "demo_stokes-taylor-hood_mpi "
|
| 1080 | "demo_subdomains_serial "
|
| 1081 | "demo_advection-diffusion_serial "
|
| 1082 | "demo_advection-diffusion_mpi "
|
| 1083 | "demo_auto-adaptive-navier-stokes_serial "
|
| 1084 | "demo_contact-vi-snes_serial "
|
| 1085 | "demo_contact-vi-snes_mpi "
|
| 1086 | "demo_contact-vi-tao_serial "
|
| 1087 | "demo_contact-vi-tao_mpi "
|
| 1088 | "demo_curl-curl_serial "
|
| 1089 | "demo_curl-curl_mpi "
|
| 1090 | "demo_dg-advection-diffusion_serial "
|
| 1091 | "demo_dg-advection-diffusion_mpi "
|
| 1092 | "demo_elasticity_serial "
|
| 1093 | "demo_elasticity_mpi "
|
| 1094 | "demo_elastodynamics_serial "
|
| 1095 | "demo_elastodynamics_mpi "
|
| 1096 | "demo_lift-drag_serial "
|
| 1097 | "demo_lift-drag_mpi "
|
| 1098 | "demo_mesh-quality_serial "
|
| 1099 | "demo_mesh-quality_mpi "
|
| 1100 | "demo_multimesh-stokes_serial "
|
| 1101 | "demo_stokes-iterative_mpi"
|
| 1102 | ")\n") port)))))
|
| 1103 | (replace 'check
|
| 1104 | (lambda* (#:key tests? #:allow-other-keys)
|
| 1105 | (when tests?
|
| 1106 | (invoke "make" "unittests")
|
| 1107 | (invoke "make" "demos")
|
| 1108 | (invoke "ctest" "-R" "unittests")
|
| 1109 | (invoke "ctest" "-R" "demo" "-R" "serial")
|
| 1110 | (invoke "ctest" "-R" "demo" "-R" "mpi")))))))
|
| 1111 | (home-page "https://bitbucket.org/fenics-project/dolfin/")
|
| 1112 | (synopsis "Problem solving environment for differential equations")
|
| 1113 | (description
|
| 1114 | "DOLFIN is a computational framework for finding numerical
|
| 1115 | solutions to problems described by differential equations. Numerical
|
| 1116 | models in DOLFIN are constructed using general families of finite
|
| 1117 | elements. Data structures are provided for discretizing the governing
|
| 1118 | system on a computational mesh. A compact syntax, similar to
|
| 1119 | mathematical notation, is made available for defining function spaces
|
| 1120 | and expressing variational forms. Interfaces to specialized matrix
|
| 1121 | solvers are provided for solving the resultant linear systems.
|
| 1122 |
|
| 1123 | @code{fenics-dolfin} is part of the FEniCS project. It is the C++
|
| 1124 | user interface to the FEniCS core components and external libraries.")
|
| 1125 | |
| 1126 | |
| 1127 | |
| 1128 | |
| 1129 | |
| 1130 | |
| 1131 | |
| 1132 | |
| 1133 | |
| 1134 | |
| 1135 | |
| 1136 | |
| 1137 | |
| 1138 | (license (list license:public-domain license:zlib license:expat
|
| 1139 | license:lgpl3+))))
|
| 1140 |
|
| 1141 | (define-public fenics
|
| 1142 | (package/inherit fenics-dolfin
|
| 1143 | (name "fenics")
|
| 1144 | (build-system pyproject-build-system)
|
| 1145 | (arguments
|
| 1146 | (list
|
| 1147 | #:test-flags
|
| 1148 | #~(list
|
| 1149 | "unit"
|
| 1150 | |
| 1151 | "--deselect"
|
| 1152 | "unit/nls/test_PETScSNES_solver.py::test_snes_set_from_options"
|
| 1153 | |
| 1154 | "--deselect=unit/common/test_timer.py::test_context_manager_named"
|
| 1155 | "--deselect=unit/common/test_timer.py::test_context_manager_anonymous"
|
| 1156 | |
| 1157 | |
| 1158 | "--ignore=unit/io/test_XDMF.py"
|
| 1159 | |
| 1160 | "--deselect=unit/common/test_timer.py::test_context_manager_named"
|
| 1161 | "--deselect=unit/common/test_timer.py::test_context_manager_anonymous"
|
| 1162 | |
| 1163 | "--ignore=unit/common/test_timer.py")
|
| 1164 | #:phases
|
| 1165 | #~(modify-phases %standard-phases
|
| 1166 | (add-after 'unpack 'relax-requirements
|
| 1167 | (lambda _
|
| 1168 | (substitute* "python/setup.py"
|
| 1169 | (("pybind11==") "pybind11>="))))
|
| 1170 | (add-after 'unpack 'set-dolfin-pc-file-name
|
| 1171 | (lambda* (#:key inputs #:allow-other-keys)
|
| 1172 | |
| 1173 | |
| 1174 | (let ((pc-file (search-input-file inputs
|
| 1175 | "/lib/pkgconfig/dolfin.pc")))
|
| 1176 | (substitute* "python/dolfin/jit/jit.py"
|
| 1177 | (("pkgconfig\\.parse\\(\"dolfin\"\\)")
|
| 1178 | (string-append "pkgconfig.parse(\"" pc-file "\")"))))))
|
| 1179 | (add-after 'patch-source-shebangs 'set-paths
|
| 1180 | (lambda _
|
| 1181 | |
| 1182 | (setenv "PYBIND11_DIR" #$(this-package-input "pybind11"))
|
| 1183 | |
| 1184 | (chdir "python")))
|
| 1185 | (add-after 'build 'mpi-setup #$%openmpi-setup)
|
| 1186 | (add-before 'check 'pre-check
|
| 1187 | (lambda _
|
| 1188 | |
| 1189 | |
| 1190 | |
| 1191 | |
| 1192 | (substitute* "demo/test.py"
|
| 1193 | (("(.*stem !.*)" line)
|
| 1194 | (format #f "~a
|
| 1195 | excludeList = [~{ '~a',~% ~}]
|
| 1196 | demos = [d for d in demos if d[0].stem not in excludeList]~%"
|
| 1197 | line
|
| 1198 | (list "built-in-meshes"
|
| 1199 | "hyperelasticity"
|
| 1200 | "elasticity"
|
| 1201 | "multimesh-quadrature"
|
| 1202 | "multimesh-marking"
|
| 1203 | "mixed-poisson-sphere"
|
| 1204 | "mesh-quality"
|
| 1205 | "lift-drag"
|
| 1206 | "elastodynamics"
|
| 1207 | "dg-advection-diffusion"
|
| 1208 | "curl-curl"
|
| 1209 | "contact-vi-tao"
|
| 1210 | "contact-vi-snes"
|
| 1211 | "collision-detection"
|
| 1212 | "buckling-tao"
|
| 1213 | "auto-adaptive-navier-stokes"
|
| 1214 | "advection-diffusion"
|
| 1215 | "subdomains"
|
| 1216 | "stokes-taylor-hood"
|
| 1217 | "stokes-mini"
|
| 1218 | "navier-stokes"
|
| 1219 | "eigenvalue"))))
|
| 1220 | |
| 1221 | (substitute* "test/unit/la/test_vector.py"
|
| 1222 | ((" numpy.float\\(42.0\\),") "")
|
| 1223 | (("^.*numpy.int\\(42.0\\).*$") ""))
|
| 1224 | (substitute* "test/unit/la/test_la_basic.py"
|
| 1225 | ((" int,") " ")
|
| 1226 | (("\\[int,") "["))
|
| 1227 | (setenv "HOME" (getcwd))
|
| 1228 | |
| 1229 | (setenv "OPENBLAS_NUM_THREADS" "1")))
|
| 1230 | (replace 'check
|
| 1231 | (lambda* (#:key tests? test-flags #:allow-other-keys)
|
| 1232 | (when tests?
|
| 1233 | (with-directory-excursion "test"
|
| 1234 | (apply invoke "pytest" test-flags)))))
|
| 1235 | (add-after 'install 'install-demo-files
|
| 1236 | (lambda _
|
| 1237 | (let* ((demos (string-append #$output
|
| 1238 | "/share/python-dolfin/demo")))
|
| 1239 | (mkdir-p demos)
|
| 1240 | (with-directory-excursion "demo"
|
| 1241 | (for-each (lambda (file)
|
| 1242 | (let* ((dir (dirname file))
|
| 1243 | (tgt-dir (string-append demos "/" dir)))
|
| 1244 | (unless (equal? "." dir)
|
| 1245 | (mkdir-p tgt-dir)
|
| 1246 | (install-file file tgt-dir))))
|
| 1247 | (find-files "." ".*\\.(py|gz|xdmf)$")))))))))
|
| 1248 | (inputs
|
| 1249 | (modify-inputs inputs
|
| 1250 | (delete "python")
|
| 1251 | (prepend pybind11-2 python-matplotlib)))
|
| 1252 | (native-inputs
|
| 1253 | (modify-inputs native-inputs
|
| 1254 | (prepend cmake-minimal
|
| 1255 | python-decorator
|
| 1256 | python-numpy-1
|
| 1257 | python-ply
|
| 1258 | python-pytest
|
| 1259 | python-setuptools)))
|
| 1260 | (propagated-inputs
|
| 1261 | (list fenics-dolfin
|
| 1262 | python-petsc4py
|
| 1263 | python-slepc4py
|
| 1264 | |
| 1265 | python-pkgconfig))
|
| 1266 | (home-page "https://fenicsproject.org/")
|
| 1267 | (synopsis "High-level environment for solving differential equations")
|
| 1268 | (description
|
| 1269 | "@code{fenics} is a computing platform for solving general classes of
|
| 1270 | problems that involve differential equations. @code{fenics} facilitates
|
| 1271 | access to efficient methods for dealing with ordinary differential
|
| 1272 | equations (ODEs) and partial differential equations (PDEs). Systems of
|
| 1273 | equations such as these are commonly encountered in areas of engineering,
|
| 1274 | mathematics and the physical sciences. It is particularly well-suited to
|
| 1275 | problems that can be solved using the Finite Element Method (FEM).
|
| 1276 |
|
| 1277 | @code{fenics} is the top level of the set of packages that are developed
|
| 1278 | within the FEniCS project. It provides the python user interface to the
|
| 1279 | FEniCS core components and external libraries.")
|
| 1280 | (license license:lgpl3+)))
|
| 1281 |
|
| 1282 | (define-public fullswof-2d
|
| 1283 | (let ((revision 505)
|
| 1284 | (release "1.09.01"))
|
| 1285 | (package
|
| 1286 | (name "fullswof-2d")
|
| 1287 | (version release)
|
| 1288 | (source (origin
|
| 1289 | (method svn-fetch)
|
| 1290 | (uri (svn-reference
|
| 1291 | (url (string-append "https://subversion.renater.fr/"
|
| 1292 | "anonscm/svn/fullswof-2d/tags/"
|
| 1293 | "release-" version))
|
| 1294 | (revision revision)))
|
| 1295 | (file-name (string-append "fullswof-2d-" version "-checkout"))
|
| 1296 | (sha256
|
| 1297 | (base32
|
| 1298 | "16v08dx7h7n4wyddzbwimazwyj74ynis12mpjfkay4243npy44b8"))))
|
| 1299 | (build-system gnu-build-system)
|
| 1300 | (native-inputs
|
| 1301 | (list inetutils)) |
| 1302 | (arguments
|
| 1303 | `(#:phases
|
| 1304 | (modify-phases %standard-phases
|
| 1305 | (delete 'configure) |
| 1306 | (add-after 'build 'build-tools
|
| 1307 | (lambda _
|
| 1308 | (with-directory-excursion "Tools/ConvertFormat"
|
| 1309 | (invoke "make" "../../bin/asc2xyz")
|
| 1310 | (invoke "make" "../../bin/xyz2asc"))
|
| 1311 | (with-directory-excursion "Tools/ExtractWindow"
|
| 1312 | (invoke "make" "../../bin/cropxyz"))
|
| 1313 | #t))
|
| 1314 | (replace 'check |
| 1315 | (lambda _
|
| 1316 | (invoke "make" "benchref")))
|
| 1317 | (replace 'install |
| 1318 | (lambda* (#:key outputs #:allow-other-keys)
|
| 1319 | (let* ((out (assoc-ref outputs "out"))
|
| 1320 | (bin (string-append out "/bin"))
|
| 1321 | (doc (string-append
|
| 1322 | out "/share/doc/" ,name "-" ,version))
|
| 1323 | (examples (string-append doc "/Examples")))
|
| 1324 | (with-directory-excursion "bin"
|
| 1325 | (for-each (lambda (binary) (install-file binary bin))
|
| 1326 | (list "asc2xyz" "xyz2asc" "cropxyz"
|
| 1327 | "FullSWOF_2D")))
|
| 1328 | (with-directory-excursion "doc"
|
| 1329 | (for-each (lambda (pdf) (install-file pdf doc))
|
| 1330 | (list "Documentation.pdf" "refman.pdf")))
|
| 1331 | (with-directory-excursion "Tools"
|
| 1332 | (for-each (lambda (dir)
|
| 1333 | (copy-file
|
| 1334 | (string-append dir "/README.txt")
|
| 1335 | (string-append doc "/README_" dir ".txt")))
|
| 1336 | (list "ConvertFormat" "ExtractWindow")))
|
| 1337 | (copy-recursively "Examples" examples)
|
| 1338 | #t))))))
|
| 1339 | (home-page "https://www.idpoisson.fr/fullswof/")
|
| 1340 | (synopsis "Two dimensional flow solver for flood modelling")
|
| 1341 | (description "@code{FullSWOF_2d} is a numerical tool for solving
|
| 1342 | the shallow water equations on structured grids. The name FullSWOF
|
| 1343 | refers to the Full form of the Shallow Water equations for Overland
|
| 1344 | Flow. The discretized system of equations is solved using the finite
|
| 1345 | volume method. A choice of shock-capturing methods is available to
|
| 1346 | locate the transition boundaries between the wet areas and the dry
|
| 1347 | areas in the model. A semi-implicit method is used to advance the
|
| 1348 | solution in time. The tool is typically applied to the modelling of
|
| 1349 | river flooding.")
|
| 1350 | (license license:cecill))))
|
| 1351 |
|
| 1352 | (define-public python-meshio
|
| 1353 | (package
|
| 1354 | (name "python-meshio")
|
| 1355 | (version "5.3.5")
|
| 1356 | (source
|
| 1357 | (origin
|
| 1358 | |
| 1359 | |
| 1360 | (method url-fetch)
|
| 1361 | (uri (pypi-uri "meshio" version))
|
| 1362 | (sha256
|
| 1363 | (base32 "0vaqhygr2d186qixvfckzqf4447674ylnc0rl5pa16zjv6mh27zj"))))
|
| 1364 | (build-system pyproject-build-system)
|
| 1365 | (arguments
|
| 1366 | (list
|
| 1367 | #:test-flags
|
| 1368 | |
| 1369 | |
| 1370 | #~(list "--deselect=tests/test_dolfin.py::test_dolfin[mesh3]"
|
| 1371 | "--deselect=tests/test_gmsh.py::test_gmsh22[False-mesh9]"
|
| 1372 | "--deselect=tests/test_gmsh.py::test_gmsh22[False-mesh10]"
|
| 1373 | "--deselect=tests/test_gmsh.py::test_gmsh22[False-mesh11]"
|
| 1374 | "--deselect=tests/test_gmsh.py::test_gmsh22[False-mesh12]"
|
| 1375 | "--deselect=tests/test_gmsh.py::test_gmsh22[False-mesh13]"
|
| 1376 | "--deselect=tests/test_gmsh.py::test_gmsh22[False-mesh14]"
|
| 1377 | "--deselect=tests/test_gmsh.py::test_gmsh40[False-mesh8]"
|
| 1378 | "--deselect=tests/test_gmsh.py::test_gmsh40[False-mesh9]"
|
| 1379 | "--deselect=tests/test_gmsh.py::test_gmsh40[False-mesh10]"
|
| 1380 | "--deselect=tests/test_gmsh.py::test_gmsh40[False-mesh11]"
|
| 1381 | "--deselect=tests/test_gmsh.py::test_gmsh40[False-mesh12]"
|
| 1382 | "--deselect=tests/test_gmsh.py::test_gmsh40[False-mesh13]"
|
| 1383 | "--deselect=tests/test_gmsh.py::test_gmsh41[False-mesh8]"
|
| 1384 | "--deselect=tests/test_gmsh.py::test_gmsh41[False-mesh9]"
|
| 1385 | "--deselect=tests/test_gmsh.py::test_gmsh41[False-mesh10]"
|
| 1386 | "--deselect=tests/test_gmsh.py::test_gmsh41[False-mesh11]"
|
| 1387 | "--deselect=tests/test_gmsh.py::test_gmsh41[False-mesh12]"
|
| 1388 | "--deselect=tests/test_gmsh.py::test_gmsh41[False-mesh13]"
|
| 1389 | "--deselect=tests/test_ugrid.py::test_io[1e-07-.ugrid-mesh0]"
|
| 1390 | "--deselect=tests/test_ugrid.py::test_io[1e-07-.ugrid-mesh1]"
|
| 1391 | "--deselect=tests/test_ugrid.py::test_io[1e-07-.ugrid-mesh2]"
|
| 1392 | "--deselect=tests/test_ugrid.py::test_io[1e-07-.ugrid-mesh3]"
|
| 1393 | "--deselect=tests/test_ugrid.py::test_io[1e-07-.ugrid-mesh4]"
|
| 1394 | "--deselect=tests/test_ugrid.py::test_io[1e-07-.ugrid-mesh5]"
|
| 1395 | |
| 1396 | |
| 1397 | "--deselect=tests/test_xdmf.py"
|
| 1398 | "--deselect=tests/test_hmf.py"
|
| 1399 | "--deselect=tests/test_cgns.py::test[mesh0]")))
|
| 1400 | (inputs (list python-h5py python-netcdf4))
|
| 1401 | (native-inputs (list python-pytest python-setuptools))
|
| 1402 | (propagated-inputs (list python-numpy python-rich))
|
| 1403 | (home-page "https://github.com/nschloe/meshio")
|
| 1404 | (synopsis "I/O for mesh files")
|
| 1405 | (description
|
| 1406 | "There are various file formats available for representing unstructured
|
| 1407 | meshes and mesh data. The @code{meshio} package is able to read and write
|
| 1408 | mesh files in many formats and to convert files from one format to another.
|
| 1409 | Formats such as cgns, h5m, gmsh, xdmf and vtk are supported. The package
|
| 1410 | provides command-line tools and a collection of Python modules for
|
| 1411 | programmatic use.")
|
| 1412 | (license license:expat)))
|
| 1413 |
|
| 1414 | (define-public python-pygmsh
|
| 1415 | (package
|
| 1416 | (name "python-pygmsh")
|
| 1417 | (version "7.1.17")
|
| 1418 | (source
|
| 1419 | (origin
|
| 1420 | (method git-fetch)
|
| 1421 | (uri (git-reference
|
| 1422 | (url "https://github.com/nschloe/pygmsh")
|
| 1423 | (commit (string-append "v" version))))
|
| 1424 | (file-name (git-file-name name version))
|
| 1425 | (sha256
|
| 1426 | (base32
|
| 1427 | "11flp2c4ynk1fhanf4mqyzrpd0gjbnv6afrwwc7xi3mb6ms69lr0"))))
|
| 1428 | (build-system pyproject-build-system)
|
| 1429 | (arguments
|
| 1430 | (list
|
| 1431 | #:phases
|
| 1432 | #~(modify-phases %standard-phases
|
| 1433 | (add-after 'unpack 'workaround-gmsh-detection-failure
|
| 1434 | (lambda _
|
| 1435 | |
| 1436 | |
| 1437 | (substitute* "pyproject.toml"
|
| 1438 | (("\"gmsh\",") "")))))))
|
| 1439 | (native-inputs (list python-flit-core python-pytest))
|
| 1440 | (propagated-inputs (list gmsh python-meshio python-numpy))
|
| 1441 | (home-page "https://github.com/nschloe/pygmsh")
|
| 1442 | (synopsis "Python frontend for Gmsh")
|
| 1443 | (description "The goal of @code{pygmsh} is to combine the power of
|
| 1444 | Gmsh with the versatility of Python. The package generalises many of
|
| 1445 | the methods and functions that comprise the Gmsh Python API. In this
|
| 1446 | way the meshing of complex geometries using high-level abstractions is
|
| 1447 | made possible. The package provides a Python library together with a
|
| 1448 | command-line utility for mesh optimisation.")
|
| 1449 | (license license:gpl3+)))
|
| 1450 |
|
| 1451 | (define-public python-simpy
|
| 1452 | (package
|
| 1453 | (name "python-simpy")
|
| 1454 | (version "4.1.1")
|
| 1455 | (source
|
| 1456 | (origin
|
| 1457 | (method url-fetch)
|
| 1458 | (uri (pypi-uri "simpy" version))
|
| 1459 | (sha256
|
| 1460 | (base32 "19h1a3wxygyi819njmnl8cbmzvflqv3hpki0iq71xcc4g057bl06"))))
|
| 1461 | (build-system pyproject-build-system)
|
| 1462 | (arguments
|
| 1463 | (list
|
| 1464 | |
| 1465 | #:test-flags
|
| 1466 | |
| 1467 | #~(list "--ignore=docs/")))
|
| 1468 | (native-inputs
|
| 1469 | (list python-pytest
|
| 1470 | python-setuptools
|
| 1471 | python-setuptools-scm))
|
| 1472 | (home-page "https://gitlab.com/team-simpy/simpy")
|
| 1473 | (synopsis "Process-based discrete-event simulation framework")
|
| 1474 | (description
|
| 1475 | "SimPy is a process-based discrete-event simulation framework based
|
| 1476 | on standard Python. Processes in SimPy are defined by Python generator
|
| 1477 | functions and can, for example, be used to model active components like
|
| 1478 | customers, vehicles or agents. SimPy also provides various types of shared
|
| 1479 | resources to model limited capacity congestion points (like servers, checkout
|
| 1480 | counters and tunnels).")
|
| 1481 | (license license:bsd-2)))
|
| 1482 |
|
| 1483 | (define %commonroad-dont-install-license-at-root
|
| 1484 | #~(substitute* "setup.py"
|
| 1485 | (("data_files=\\[\\('.', \\['LICENSE.txt'\\]\\)\\],")
|
| 1486 | "")))
|
| 1487 |
|
| 1488 | (define-public python-commonroad-vehicle-models
|
| 1489 | (package
|
| 1490 | (name "python-commonroad-vehicle-models")
|
| 1491 | (version "3.0.2")
|
| 1492 | (source (origin
|
| 1493 | (method url-fetch)
|
| 1494 | (uri (pypi-uri "commonroad-vehicle-models" version))
|
| 1495 | (sha256
|
| 1496 | (base32
|
| 1497 | "13jg0cys7y4n7rg548w6mxk9g10gd5qxmj4ynrlriczpffqy6kc7"))))
|
| 1498 | (build-system pyproject-build-system)
|
| 1499 | (arguments
|
| 1500 | (list
|
| 1501 | #:test-flags
|
| 1502 | #~(list "--ignore=scripts/test_vehicle.py" |
| 1503 | "-k" "not test_std") |
| 1504 | #:phases
|
| 1505 | #~(modify-phases %standard-phases
|
| 1506 | (add-after 'unpack 'fix-setup.py
|
| 1507 | (lambda _
|
| 1508 | #$%commonroad-dont-install-license-at-root)))))
|
| 1509 | (native-inputs
|
| 1510 | (list python-matplotlib
|
| 1511 | python-pytest
|
| 1512 | python-scipy
|
| 1513 | python-setuptools))
|
| 1514 | (propagated-inputs (list python-numpy python-omegaconf))
|
| 1515 | (home-page "https://commonroad.in.tum.de/")
|
| 1516 | (synopsis "CommonRoad vehicle models")
|
| 1517 | (description "This package provides vehicle models used in CommonRoad
|
| 1518 | benchmarks. Varying abstraction levels are used ranging from kinematic single
|
| 1519 | track models to multi-body models.")
|
| 1520 | (license license:bsd-3)))
|
| 1521 |
|
| 1522 | (define-public python-commonroad-io
|
| 1523 | (package
|
| 1524 | (name "python-commonroad-io")
|
| 1525 | (version "2022.3")
|
| 1526 | (source (origin
|
| 1527 | (method url-fetch)
|
| 1528 | (uri (pypi-uri "commonroad-io" version))
|
| 1529 | (sha256
|
| 1530 | (base32
|
| 1531 | "1cj9zj567mca8xb8sx9h3nnl2cccv6vh8h73imgpq61cimk9mvas"))))
|
| 1532 | (build-system pyproject-build-system)
|
| 1533 | (arguments
|
| 1534 | (list
|
| 1535 | #:tests? #f |
| 1536 | #:phases
|
| 1537 | #~(modify-phases %standard-phases
|
| 1538 | (add-after 'unpack 'fix-setup.py
|
| 1539 | (lambda _
|
| 1540 | (substitute* "setup.py"
|
| 1541 | (("protobuf==3.20.1") "protobuf >= 3.20.1"))
|
| 1542 | #$%commonroad-dont-install-license-at-root)))))
|
| 1543 | (propagated-inputs (list python-commonroad-vehicle-models
|
| 1544 | python-iso3166
|
| 1545 | python-lxml
|
| 1546 | python-matplotlib
|
| 1547 | python-networkx
|
| 1548 | python-numpy
|
| 1549 | python-omegaconf
|
| 1550 | python-pillow
|
| 1551 | python-protobuf
|
| 1552 | python-rtree
|
| 1553 | python-scipy
|
| 1554 | python-shapely
|
| 1555 | python-tqdm))
|
| 1556 | (native-inputs (list python-lxml python-setuptools))
|
| 1557 | (home-page "https://commonroad.in.tum.de/")
|
| 1558 | (synopsis "Read, write, and visualize CommonRoad scenarios")
|
| 1559 | (description "This package provides methods to read, write, and visualize
|
| 1560 | CommonRoad scenarios and planning problems. It can be used as a framework for
|
| 1561 | implementing motion planning algorithms to solve CommonRoad Benchmarks
|
| 1562 | and is the basis for other tools of the CommonRoad Framework.")
|
| 1563 | (license license:bsd-3)))
|
| 1564 |
|
| 1565 | (define-public python-commonroad-route-planner
|
| 1566 | (package
|
| 1567 | (name "python-commonroad-route-planner")
|
| 1568 | (version "2022.3")
|
| 1569 | (source (origin
|
| 1570 | (method git-fetch)
|
| 1571 | (uri (git-reference
|
| 1572 | (url "https://gitlab.lrz.de/tum-cps/commonroad-route-planner")
|
| 1573 | (commit version)))
|
| 1574 | (file-name (git-file-name name version))
|
| 1575 | (sha256
|
| 1576 | (base32
|
| 1577 | "0xn0l7bzmj56d4mlqacvbl8mdvsffkg2fn2lzfmis5jl4vp99ipf"))))
|
| 1578 | (arguments
|
| 1579 | (list
|
| 1580 | #:tests? #f |
| 1581 | #:phases
|
| 1582 | #~(modify-phases %standard-phases
|
| 1583 | (add-after 'unpack 'fix-setup.py
|
| 1584 | (lambda _
|
| 1585 | #$%commonroad-dont-install-license-at-root)))))
|
| 1586 | (build-system pyproject-build-system)
|
| 1587 | (native-inputs (list python-setuptools))
|
| 1588 | (propagated-inputs (list python-commonroad-io
|
| 1589 | python-matplotlib
|
| 1590 | python-networkx
|
| 1591 | python-numpy
|
| 1592 | python-setuptools
|
| 1593 | python-shapely))
|
| 1594 | (home-page "https://gitlab.lrz.de/tum-cps/commonroad-route-planner")
|
| 1595 | (synopsis "Route planner for CommonRoad scenarios")
|
| 1596 | (description
|
| 1597 | "This package provides functions for route planning, that is finding
|
| 1598 | sequences that lead from a given start lanelet to some goal lanelet(s).")
|
| 1599 | (license license:bsd-3)))
|
| 1600 |
|
| 1601 | (define-public sumo
|
| 1602 | (package
|
| 1603 | (name "sumo")
|
| 1604 | (version "1.27.1")
|
| 1605 | (source (origin
|
| 1606 | (method git-fetch)
|
| 1607 | (uri (git-reference
|
| 1608 | (url "https://github.com/eclipse/sumo")
|
| 1609 | (commit (string-append "v"
|
| 1610 | (string-replace-substring version
|
| 1611 | "." "_")))))
|
| 1612 | (file-name (git-file-name name version))
|
| 1613 | (sha256
|
| 1614 | (base32
|
| 1615 | "0l2bqxs5xjxx23aagxw5wvr1sz325ldnyx1l5gvhbvhvpxqg64xh"))))
|
| 1616 | (build-system cmake-build-system)
|
| 1617 | (arguments
|
| 1618 | (list
|
| 1619 | #:phases
|
| 1620 | #~(modify-phases %standard-phases
|
| 1621 | (add-after 'unpack 'disable-problematic-tests
|
| 1622 | (lambda _
|
| 1623 | (substitute* "CMakeLists.txt"
|
| 1624 | |
| 1625 | (("add_test\\(exampletest .*") ""))
|
| 1626 | (substitute* "src/traci_testclient/CMakeLists.txt"
|
| 1627 | |
| 1628 | (("add_test\\(NAME libtracitest .*") "")))))))
|
| 1629 | (inputs (list eigen
|
| 1630 | freetype
|
| 1631 | fontconfig
|
| 1632 | ffmpeg
|
| 1633 | fox
|
| 1634 | gdal
|
| 1635 | glu
|
| 1636 | gperftools |
| 1637 | libjpeg-turbo
|
| 1638 | libtiff
|
| 1639 | libx11
|
| 1640 | libxcursor
|
| 1641 | libxft
|
| 1642 | libxi
|
| 1643 | libxrandr
|
| 1644 | libxrender
|
| 1645 | openscenegraph
|
| 1646 | proj
|
| 1647 | python
|
| 1648 | xerces-c
|
| 1649 | zlib))
|
| 1650 | (native-inputs (list googletest python))
|
| 1651 | (home-page "https://eclipse.org/sumo")
|
| 1652 | (synopsis "Traffic simulator")
|
| 1653 | (description "@acronym{SUMO, Simulation of Urban MObility} is a traffic
|
| 1654 | simulation package designed to handle large road networks and different modes
|
| 1655 | of transportation -- including road vehicles, public transport and pedestrians.
|
| 1656 | Included with SUMO is a wealth of supporting tools which automate core tasks
|
| 1657 | for the creation, the execution and evaluation of traffic simulations,
|
| 1658 | such as network import, route calculations, visualization and emission
|
| 1659 | calculation. SUMO can be enhanced with custom models and provides various
|
| 1660 | APIs to remotely control the simulation.")
|
| 1661 | (license (list license:epl2.0 license:gpl2+))))
|