guix_mirror_bot pushed a commit to branch python-team
in repository guix.

commit 92221d99c3058102613b5f11e02f287d98789a7b
Author: Nicolas Graves <[email protected]>
AuthorDate: Sat Sep 13 16:53:28 2025 +0200

    gnu: maturin: Improve style.
    
    * gnu/packages/rust-apps.scm (maturin)[arguments]: Improve style.
    <#:phases>: Use G-expressions.
    
    Change-Id: Icf2fd08db952c5dbd71a2c8cbb8b153d21aff61c
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/rust-apps.scm | 104 ++++++++++++++++++++++-----------------------
 1 file changed, 52 insertions(+), 52 deletions(-)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 641682ea9a..78862b478a 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -1815,15 +1815,17 @@ specified image or color, easing the process of theme 
creation.")
               (patches (search-patches "maturin-no-cross-compile.patch"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:modules ((guix build cargo-build-system)
+     (list
+      #:modules '((guix build cargo-build-system)
                   ((guix build pyproject-build-system) #:prefix py:)
                   (guix build utils))
-       #:imported-modules ((guix build cargo-build-system)
+      #:imported-modules `((guix build cargo-build-system)
                            (guix build cargo-utils)
+                           (guix build json)
                            ,@%pyproject-build-system-modules)
-       #:install-source? #f
-       #:cargo-test-flags
-       '("--"
+      #:install-source? #f
+      #:cargo-test-flags
+      ''("--"
          ;; Not all files are included.
          "--skip=build_options::test::test_find_bridge_bin"
          "--skip=build_options::test::test_find_bridge_cffi"
@@ -1835,56 +1837,54 @@ specified image or color, easing the process of theme 
creation.")
          "--skip=metadata::test::test_merge_metadata_from_pyproject_toml"
          
"--skip=metadata::test::test_merge_metadata_from_pyproject_toml_with_customized_python_source_dir"
          "--skip=pyproject_toml::tests::test_warn_missing_maturin_version")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'build 'build-python-module
-           (lambda _
-             ;; Match the features from the cargo-build-system and Cargo.toml.
-             (setenv "MATURIN_SETUP_ARGS" "--features=default")
-             ((assoc-ref py:%standard-phases 'build))))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'build 'build-python-module
+            (lambda _
+              ;; Match the features from the cargo-build-system and Cargo.toml.
+              (setenv "MATURIN_SETUP_ARGS" "--features=default")
+              ((assoc-ref py:%standard-phases 'build))))
 
-         ;; We can't use the pyproject install phase because maturin is a
-         ;; binary, not a python script.
-         (add-after 'install 'install-python-module
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (wheel (car (find-files "dist" "\\.whl$")))
-                   (site-dir (py:site-packages inputs outputs))
-                   (pyversion
+          ;; We can't use the pyproject install phase because maturin is a
+          ;; binary, not a python script.
+          (add-after 'install 'install-python-module
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let ((wheel (car (find-files "dist" "\\.whl$")))
+                    (site-dir (py:site-packages inputs outputs))
+                    (pyversion
                      (string-append "python"
                                     (py:python-version
-                                      (assoc-ref inputs "python-wrapper")))))
-               (invoke "python" "-m" "zipfile" "-e" wheel site-dir)
-               (mkdir-p (string-append out "/bin"))
-               (for-each delete-file
-                         (find-files (string-append out "/lib/" pyversion)
-                                     "^maturin$")))))
-         (add-after 'install 'install-completions
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (share (string-append out "/share"))
-                    (maturin (string-append out "/bin/maturin")))
-               ;; TODO? fig, powershell
-               (mkdir-p (string-append out "/etc/bash_completion.d"))
-               (with-output-to-file
-                 (string-append out "/etc/bash_completion.d/maturin")
-                 (lambda _ (invoke maturin "completions" "bash")))
-               (mkdir-p (string-append share "/fish/vendor_completions.d"))
-               (with-output-to-file
-                 (string-append share 
"/fish/vendor_completions.d/maturin.fish")
-                 (lambda _ (invoke maturin "completions" "fish")))
-               (mkdir-p (string-append share "/zsh/site-functions"))
-               (with-output-to-file
-                 (string-append share "/zsh/site-functions/_maturin")
-                 (lambda _ (invoke maturin "completions" "zsh")))
-               (mkdir-p (string-append share "/elvish/lib"))
-               (with-output-to-file
-                 (string-append share "/elvish/lib/maturin")
-                 (lambda _ (invoke maturin "completions" "elvish")))
-               (mkdir-p (string-append share "/nushell/vendor/autoload"))
-               (with-output-to-file
-                 (string-append share "/nushell/vendor/autoload/maturin")
-                 (lambda _ (invoke maturin "completions" "nushell")))))))))
+                                     (assoc-ref inputs "python-wrapper")))))
+                (invoke "python" "-m" "zipfile" "-e" wheel site-dir)
+                (mkdir-p (string-append #$output "/bin"))
+                (for-each delete-file
+                          (find-files (string-append #$output "/lib/" 
pyversion)
+                                      "^maturin$")))))
+          (add-after 'install 'install-completions
+            (lambda _
+              (let ((share (string-append #$output "/share"))
+                    (maturin (string-append #$output "/bin/maturin")))
+                ;; TODO? fig, powershell
+                (mkdir-p (string-append #$output "/etc/bash_completion.d"))
+                (with-output-to-file
+                    (string-append #$output "/etc/bash_completion.d/maturin")
+                  (lambda _ (invoke maturin "completions" "bash")))
+                (mkdir-p (string-append share "/fish/vendor_completions.d"))
+                (with-output-to-file
+                    (string-append share 
"/fish/vendor_completions.d/maturin.fish")
+                  (lambda _ (invoke maturin "completions" "fish")))
+                (mkdir-p (string-append share "/zsh/site-functions"))
+                (with-output-to-file
+                    (string-append share "/zsh/site-functions/_maturin")
+                  (lambda _ (invoke maturin "completions" "zsh")))
+                (mkdir-p (string-append share "/elvish/lib"))
+                (with-output-to-file
+                    (string-append share "/elvish/lib/maturin")
+                  (lambda _ (invoke maturin "completions" "elvish")))
+                (mkdir-p (string-append share "/nushell/vendor/autoload"))
+                (with-output-to-file
+                    (string-append share "/nushell/vendor/autoload/maturin")
+                  (lambda _ (invoke maturin "completions" "nushell")))))))))
     (propagated-inputs
      (list python-tomli))
     (inputs (cons bzip2 (cargo-inputs 'maturin)))

Reply via email to