Skip to content
Snippets Groups Projects
Verified Commit 1499666a authored by FARGES Olivier's avatar FARGES Olivier
Browse files

add gmsh-edix

parent db373277
No related branches found
No related tags found
No related merge requests found
(define-module (edix packages gmsh-edix)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix licenses)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system cmake)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages python)
#:use-module (gnu packages gl)
#:use-module (gnu packages gcc)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages xorg)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages fltk)
#:use-module (gnu packages algebra)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages compression)
)
(define-public gmsh-edix
(package
(name "gmsh")
(version "4.12.2")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.onelab.info/gmsh/gmsh.git")
(commit
(string-append "gmsh_"
(string-replace-substring version "." "_")))))
(file-name (git-file-name name version))
(sha256
(base32 "1kmmk8zf3m9a8qmdhqkyglg6blnh41z9bz05vysycsnnqwy5njnm"))
(modules '((guix build utils)))
(snippet
'(delete-file-recursively "contrib/metis"))))
(build-system cmake-build-system)
(propagated-inputs
(list fltk
gfortran
glu
gmp
hdf5
libx11
libxext
mesa
metis
openblas
opencascade-occt))
(inputs
(list fontconfig
libxft
python))
(arguments
`(#:configure-flags `("-DENABLE_SYSTEM_CONTRIB:BOOL=ON"
"-DENABLE_BUILD_SHARED:BOOL=ON"
"-DENABLE_BUILD_DYNAMIC:BOOL=ON")
#:imported-modules (,@%cmake-build-system-modules
(guix build python-build-system))
#:modules (((guix build python-build-system) #:select (site-packages))
(guix build cmake-build-system)
(guix build utils))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Use the standard Guix site-package path for
;; installation of the Python API.
(substitute* "CMakeLists.txt"
(("include\\(GNUInstallDirs\\)\n")
(string-append "include(GNUInstallDirs)\n"
" set(GMSH_PY_LIB "
(site-packages inputs outputs) ")\n"))
(("\\$\\{GMSH\\_PY\\} DESTINATION \\$\\{GMSH\\_LIB\\}")
"${GMSH_PY} DESTINATION ${GMSH_PY_LIB}"))
;; Find the shared library.
(let ((libgmsh (string-append (assoc-ref outputs "out")
"/lib/libgmsh.so")))
(substitute* "api/gmsh.py"
(("find_library\\(\"gmsh\"\\)")
(simple-format #f "\"~a\"" libgmsh)))))))))
(home-page "https://gmsh.info/")
(synopsis "3D finite element grid generator")
(description "Gmsh is a 3D finite element grid generator with a built-in
CAD engine and post-processor. Its design goal is to provide a fast, light
and user-friendly meshing tool with parametric input and advanced
visualization capabilities. Gmsh is built around four modules: geometry,
mesh, solver and post-processing. The specification of any input to these
modules is done either interactively using the graphical user interface or in
ASCII text files using Gmsh's own scripting language.")
(license (list gpl2+))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment