guix_mirror_bot pushed a commit to branch next-master
in repository guix.

commit 46472cea00e1afee080b6c9fc6acac57369971b5
Author: Nicolas Graves <[email protected]>
AuthorDate: Tue Jan 6 14:05:57 2026 +0100

    gnu: gemmi: Switch to pyproject.
    
    * gnu/packages/chemistry.scm (gemmi):
    [arguments]<#:imported-modules, #:modules, #:phases>: Switch to
    pyproject-build-system.
    
    Change-Id: Id2bd46050b2820945d5a9d90e17e1c5d1e61c40e
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/chemistry.scm | 89 +++++++++++++++++++++++-----------------------
 1 file changed, 45 insertions(+), 44 deletions(-)

diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 7d15852207..e798301430 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -1049,56 +1049,57 @@ integrals for Gaussian type functions.")
     (build-system cmake-build-system)
     (arguments
      (list
-      #:modules '((guix build cmake-build-system)
-                  (guix build utils)
-                  ((guix build python-build-system)
-                   #:select (site-packages)))
       #:imported-modules (append %cmake-build-system-modules
-                                 '((guix build python-build-system)))
+                                 %pyproject-build-system-modules)
+      #:modules
+      '((guix build cmake-build-system)
+        (guix build utils)
+        ((guix build pyproject-build-system) #:select (site-packages)))
       #:configure-flags
       #~(list "-DUSE_PYTHON=ON"
               (string-append "-DPYTHON_INSTALL_DIR="
                              (site-packages %build-inputs %outputs)))
       #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'patch-includes
-            (lambda _
-              (substitute* (list "src/json.cpp"
-                                 "src/sprintf.cpp"
-                                 "include/gemmi/dirwalk.hpp"
-                                 "include/gemmi/cif.hpp"
-                                 "include/gemmi/json.hpp"
-                                 "python/gemmi.cpp"
-                                 "python/serial.h"
-                                 "include/gemmi/atof.hpp"
-                                 "include/gemmi/numb.hpp"
-                                 "include/gemmi/fourier.hpp")
-                (("<stb/stb_sprintf.h>") "<stb_sprintf.h>")
-                (("\"third_party/tinydir.h\"") "<tinydir.h>")
-                (("\"third_party/tao/pegtl.hpp\"") "<tao/pegtl.hpp>")
-                (("\"\\.\\./third_party/sajson.h\"") "<sajson.h>")
-                (("\"gemmi/third_party/tao/pegtl/parse_error.hpp\"")
-                 "<tao/pegtl/parse_error.hpp>")
-                (("\"third_party/fast_float.h\"")
-                 "<fast_float/fast_float.h>")
-                (("\"third_party/pocketfft_hdronly.h\"")
-                 "<pocketfft_hdronly.h>")
-                (("\"\\.\\./third_party/serializer.h\"")
-                 "<zpp/serializer.h>"))))
-          (add-after 'unpack 'change-bin-prefix
-            (lambda _
-              (substitute* "CMakeLists.txt"
-                (("install\\(TARGETS program DESTINATION bin\\)")
-                 (string-append
-                  "install(TARGETS program DESTINATION "
-                  #$output:bin "/bin)")))))
-          (replace 'check
-            (lambda* (#:key tests? #:allow-other-keys)
-              (when tests?
-                (with-directory-excursion "../source"
-                  (setenv "PYTHONPATH" "../build/py")
-                  (invoke "python3" "-m" "unittest" "discover" "-v"
-                          "-s" "tests"))))))))
+      (with-extensions (list (pyproject-guile-json))
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'patch-includes
+              (lambda _
+                (substitute* (list "src/json.cpp"
+                                   "src/sprintf.cpp"
+                                   "include/gemmi/dirwalk.hpp"
+                                   "include/gemmi/cif.hpp"
+                                   "include/gemmi/json.hpp"
+                                   "python/gemmi.cpp"
+                                   "python/serial.h"
+                                   "include/gemmi/atof.hpp"
+                                   "include/gemmi/numb.hpp"
+                                   "include/gemmi/fourier.hpp")
+                  (("<stb/stb_sprintf.h>") "<stb_sprintf.h>")
+                  (("\"third_party/tinydir.h\"") "<tinydir.h>")
+                  (("\"third_party/tao/pegtl.hpp\"") "<tao/pegtl.hpp>")
+                  (("\"\\.\\./third_party/sajson.h\"") "<sajson.h>")
+                  (("\"gemmi/third_party/tao/pegtl/parse_error.hpp\"")
+                   "<tao/pegtl/parse_error.hpp>")
+                  (("\"third_party/fast_float.h\"")
+                   "<fast_float/fast_float.h>")
+                  (("\"third_party/pocketfft_hdronly.h\"")
+                   "<pocketfft_hdronly.h>")
+                  (("\"\\.\\./third_party/serializer.h\"")
+                   "<zpp/serializer.h>"))))
+            (add-after 'unpack 'change-bin-prefix
+              (lambda _
+                (substitute* "CMakeLists.txt"
+                  (("install\\(TARGETS program DESTINATION bin\\)")
+                   (string-append
+                    "install(TARGETS program DESTINATION "
+                    #$output:bin "/bin)")))))
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "../source"
+                    (setenv "PYTHONPATH" "../build/py")
+                    (invoke "python3" "-m" "unittest" "discover" "-v"
+                            "-s" "tests")))))))))
     (inputs (list python zlib))
     (native-inputs
      (list fast-float

Reply via email to