summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2026-01-06 17:17:34 +0100
committerRutherther <rutherther@ditigal.xyz>2026-01-25 21:23:57 +0100
commitaa0c014b92eedea6df1cabe6e26ee7d15114ddad (patch)
tree8ee047e26bef47f0894d132343ca5ffe6280442d /gnu/packages/maths.scm
parentef18864eb233ef97a85d9b5968d632212dbabe59 (diff)
gnu: gmsh: Switch to pyproject.
* gnu/packages/maths.scm (gmsh): [arguments]<#:imported-modules, #:modules, #:phases>: Switch to pyproject-build-system. Change-Id: Ia3506c1e8e9ebff9c24a7e2b5ba66555187f6068 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com> Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm60
1 files changed, 31 insertions, 29 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a7ada240052..dc5ef2b1ea9 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3661,6 +3661,37 @@ supports the propositional fragment of PDDL2.2.")
(snippet
'(delete-file-recursively "contrib/metis"))))
(build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list "-DENABLE_SYSTEM_CONTRIB:BOOL=ON"
+ "-DENABLE_BUILD_SHARED:BOOL=ON"
+ "-DENABLE_BUILD_DYNAMIC:BOOL=ON")
+ #:imported-modules (append %cmake-build-system-modules
+ %pyproject-build-system-modules)
+ #:modules '(((guix build pyproject-build-system) #:select (site-packages))
+ (guix build cmake-build-system)
+ (guix build utils))
+ #:phases
+ (with-extensions (list (pyproject-guile-json))
+ #~(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 #$output
+ "/lib/libgmsh.so")))
+ (substitute* "api/gmsh.py"
+ (("find_library\\(\"gmsh\"\\)")
+ (simple-format #f "\"~a\"" libgmsh))))))))))
(inputs
(list fltk
fontconfig
@@ -3676,35 +3707,6 @@ supports the propositional fragment of PDDL2.2.")
opencascade-occt))
(native-inputs
(list python-wrapper))
- (arguments
- (list #:configure-flags
- #~(list "-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 #$output
- "/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