efraim pushed a commit to branch rust-team
in repository guix.

commit 4d478f0b404a86a0849722536f11fde0b1857bb8
Author: Efraim Flashner <[email protected]>
AuthorDate: Mon Dec 30 16:02:50 2024 +0200

    gnu: maturin: Update to 1.8.0.
    
    * gnu/packages/rust-apps.scm (maturin): Update to 1.8.0.
    [source]: Remove snippet.
    [arguments]: Don't run the tests in release mode.  Adjust the custom
    'install-completions phase to install the bash completions in the
    correct directory and to install the nushell completions.
    [cargo-inputs]: Add rust-pretty-assertions-1, rust-same-file-1,
    rust-schemars-0.8, rust-xid-unicode-0.2.  Replace
    rust-cargo-metadata-0.18 with 0.19, rust-cbindgen-0.26 with 0.27,
    rust-clap-complete-command-0.5 with 0.6, rust-fs-err-2 with 3,
    rust-goblin-0.7 with 0.9, rust-minijinja-1 with 2, rust-pep440-rs-0.3
    with 0.6, rust-pep508-0.2 with 0.6, rust-pyproject-toml-0.8 with 0.11,
    rust-rustls-0.21 with 0.23, rust-target-lexicon-0.12 with 0.13,
    rust-thiserror-1 with 2, rust-toml-edit-0.21 with 0.22, rust-zip-0.6
    with 2.
    [cargo-development-inputs]: Add rust-fs4-0.12, rust-rstest-0.22.
    Replace rust-trycmd-0.14 with 0.15, rust-which-5 with 7.
    * gnu/packages/patches/maturin-no-cross-compile.patch: Update patch.
    
    Change-Id: Iad445c26556efe4527085876a759d65d4f72621d
---
 .../patches/maturin-no-cross-compile.patch         | 32 ++++++----
 gnu/packages/rust-apps.scm                         | 68 ++++++++++++----------
 2 files changed, 57 insertions(+), 43 deletions(-)

diff --git a/gnu/packages/patches/maturin-no-cross-compile.patch 
b/gnu/packages/patches/maturin-no-cross-compile.patch
index 98af33d3c7..d391d4028c 100644
--- a/gnu/packages/patches/maturin-no-cross-compile.patch
+++ b/gnu/packages/patches/maturin-no-cross-compile.patch
@@ -2,36 +2,46 @@ Remove dependencies on xwin and zig.  We're not offering 
cross-compilation
 options using these crates.
 
 diff --git a/Cargo.toml b/Cargo.toml
-index 6704e46..ff126a9 100644
+index 24305db..c7641f9 100644
 --- a/Cargo.toml
 +++ b/Cargo.toml
-@@ -83,16 +83,6 @@ version = "0.1.16"
+@@ -95,16 +95,6 @@ version = "0.1.24"
  [dependencies.cargo-options]
  version = "0.7.2"
  
 -[dependencies.cargo-xwin]
--version = "0.16.2"
+-version = "0.18.3"
 -optional = true
 -default-features = false
 -
 -[dependencies.cargo-zigbuild]
--version = "0.18.0"
+-version = "0.19.7"
 -optional = true
 -default-features = false
 -
  [dependencies.cargo_metadata]
- version = "0.18.0"
+ version = "0.19.0"
+ 
+@@ -364,10 +354,6 @@ version = "7.0.0"
  
-@@ -321,8 +311,6 @@ version = "5.0.0"
  [features]
  cli-completion = ["dep:clap_complete_command"]
- cross-compile = [
+-cross-compile = [
 -    "zig",
 -    "xwin",
- ]
+-]
  default = [
      "full",
-@@ -341,7 +329,6 @@ log = ["tracing-subscriber"]
+     "rustls",
+@@ -375,7 +361,6 @@ default = [
+ faster-tests = []
+ full = [
+     "cli-completion",
+-    "cross-compile",
+     "scaffolding",
+     "upload",
+ ]
+@@ -384,7 +369,6 @@ log = []
  native-tls = [
      "dep:native-tls",
      "ureq?/native-tls",
@@ -39,7 +49,7 @@ index 6704e46..ff126a9 100644
      "dep:rustls-pemfile",
  ]
  password-storage = [
-@@ -351,7 +338,6 @@ password-storage = [
+@@ -394,7 +378,6 @@ password-storage = [
  rustls = [
      "dep:rustls",
      "ureq?/tls",
@@ -47,7 +57,7 @@ index 6704e46..ff126a9 100644
      "dep:rustls-pemfile",
  ]
  scaffolding = [
-@@ -369,5 +355,3 @@ upload = [
+@@ -416,5 +399,3 @@ upload = [
      "wild",
      "dep:dirs",
  ]
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 61c0055f45..2a0ba76ded 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -1806,21 +1806,15 @@ on the terminal in a visually appealing way.")
 (define-public maturin
   (package
     (name "maturin")
-    (version "1.4.0")
+    (version "1.8.0")
     (source (origin
               (method url-fetch)
               (uri (crate-uri "maturin" version))
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1ia5xziazpcpc1wwg8jlz5nmza87cz7nb039gg38jgw3704p4dls"))
-              (patches (search-patches "maturin-no-cross-compile.patch"))
-              (snippet
-               #~(begin (use-modules (guix build utils))
-                        ;; Remove support for x86_64h-apple-darwin.
-                        ;; This target causes maturin to fail to build.
-                        (substitute* "src/target.rs"
-                          (("\\| Architecture::X86_64h ") ""))))))
+                "0qqhd14szg5vb49z26vgjpj2wpa8vhnvjxf6yiam8zpcc3bm761x"))
+              (patches (search-patches "maturin-no-cross-compile.patch"))))
     (build-system cargo-build-system)
     (arguments
      `(#:modules ((guix build cargo-build-system)
@@ -1831,7 +1825,7 @@ on the terminal in a visually appealing way.")
                            ,@%pyproject-build-system-modules)
        #:install-source? #f
        #:cargo-test-flags
-       '("--release" "--"
+       '("--"
          ;; Not all files are included.
          "--skip=build_options::test::test_find_bridge_bin"
          "--skip=build_options::test::test_find_bridge_cffi"
@@ -1849,13 +1843,13 @@ on the terminal in a visually appealing way.")
         ("rust-bytesize" ,rust-bytesize-1)
         ("rust-cargo-config2" ,rust-cargo-config2-0.1)
         ("rust-cargo-options" ,rust-cargo-options-0.7)
-        ;("rust-cargo-xwin" ,rust-cargo-xwin-0.16)
-        ;("rust-cargo-zigbuild" ,rust-cargo-zigbuild-0.18)
-        ("rust-cargo-metadata" ,rust-cargo-metadata-0.18)
-        ("rust-cbindgen" ,rust-cbindgen-0.26)
+        ;("rust-cargo-xwin" ,rust-cargo-xwin-0.18)
+        ;("rust-cargo-zigbuild" ,rust-cargo-zigbuild-0.19)
+        ("rust-cargo-metadata" ,rust-cargo-metadata-0.19)
+        ("rust-cbindgen" ,rust-cbindgen-0.27)
         ("rust-cc" ,rust-cc-1)
         ("rust-clap" ,rust-clap-4)
-        ("rust-clap-complete-command" ,rust-clap-complete-command-0.5)
+        ("rust-clap-complete-command" ,rust-clap-complete-command-0.6)
         ("rust-configparser" ,rust-configparser-3)
         ("rust-console" ,rust-console-0.15)
         ("rust-dialoguer" ,rust-dialoguer-0.11)
@@ -1863,55 +1857,61 @@ on the terminal in a visually appealing way.")
         ("rust-dunce" ,rust-dunce-1)
         ("rust-fat-macho" ,rust-fat-macho-0.4)
         ("rust-flate2" ,rust-flate2-1)
-        ("rust-fs-err" ,rust-fs-err-2)
+        ("rust-fs-err" ,rust-fs-err-3)
         ("rust-glob" ,rust-glob-0.3)
-        ("rust-goblin" ,rust-goblin-0.7)
+        ("rust-goblin" ,rust-goblin-0.9)
         ("rust-ignore" ,rust-ignore-0.4)
         ("rust-indexmap" ,rust-indexmap-2)
         ("rust-itertools" ,rust-itertools-0.12)
         ("rust-keyring" ,rust-keyring-2)
         ("rust-lddtree" ,rust-lddtree-0.3)
-        ("rust-minijinja" ,rust-minijinja-1)
+        ("rust-minijinja" ,rust-minijinja-2)
         ("rust-multipart" ,rust-multipart-0.18)
         ("rust-native-tls" ,rust-native-tls-0.2)
         ("rust-normpath" ,rust-normpath-1)
         ("rust-once-cell" ,rust-once-cell-1)
         ("rust-path-slash" ,rust-path-slash-0.2)
-        ("rust-pep440-rs" ,rust-pep440-rs-0.3)
-        ("rust-pep508-rs" ,rust-pep508-rs-0.2)
+        ("rust-pep440-rs" ,rust-pep440-rs-0.6)
+        ("rust-pep508-rs" ,rust-pep508-rs-0.6)
         ("rust-platform-info" ,rust-platform-info-2)
-        ("rust-pyproject-toml" ,rust-pyproject-toml-0.8)
+        ("rust-pretty-assertions" ,rust-pretty-assertions-1)
+        ("rust-pyproject-toml" ,rust-pyproject-toml-0.11)
         ("rust-python-pkginfo" ,rust-python-pkginfo-0.6)
         ("rust-regex" ,rust-regex-1)
         ("rust-rustc-version" ,rust-rustc-version-0.4)
-        ("rust-rustls" ,rust-rustls-0.21)
+        ("rust-rustls" ,rust-rustls-0.23)
         ("rust-rustls-pemfile" ,rust-rustls-pemfile-2)
+        ("rust-same-file" ,rust-same-file-1)
+        ("rust-schemars" ,rust-schemars-0.8)
         ("rust-semver" ,rust-semver-1)
         ("rust-serde" ,rust-serde-1)
         ("rust-serde-json" ,rust-serde-json-1)
         ("rust-sha2" ,rust-sha2-0.10)
         ("rust-tar" ,rust-tar-0.4)
-        ("rust-target-lexicon" ,rust-target-lexicon-0.12)
+        ("rust-target-lexicon" ,rust-target-lexicon-0.13)
         ("rust-tempfile" ,rust-tempfile-3)
         ("rust-textwrap" ,rust-textwrap-0.16)
-        ("rust-thiserror" ,rust-thiserror-1)
+        ("rust-thiserror" ,rust-thiserror-2)
         ("rust-time" ,rust-time-0.3)
         ("rust-toml" ,rust-toml-0.8)
-        ("rust-toml-edit" ,rust-toml-edit-0.21)
+        ("rust-toml-edit" ,rust-toml-edit-0.22)
         ("rust-tracing" ,rust-tracing-0.1)
         ("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3)
+        ("rust-unicode-xid" ,rust-unicode-xid-0.2)
         ("rust-ureq" ,rust-ureq-2)
         ("rust-url" ,rust-url-2)
         ("rust-wild" ,rust-wild-2)
-        ("rust-zip" ,rust-zip-0.6))
+        ("rust-zip" ,rust-zip-2))
        #:cargo-development-inputs
        (("rust-expect-test" ,rust-expect-test-1)
+        ("rust-fs4" ,rust-fs4-0.12)
         ("rust-indoc" ,rust-indoc-2)
         ("rust-pretty-assertions" ,rust-pretty-assertions-1)
+        ("rust-rstest" ,rust-rstest-0.22)
         ("rust-rustversion" ,rust-rustversion-1)
         ("rust-time" ,rust-time-0.3)
-        ("rust-trycmd" ,rust-trycmd-0.14)
-        ("rust-which" ,rust-which-5))
+        ("rust-trycmd" ,rust-trycmd-0.15)
+        ("rust-which" ,rust-which-7))
        #:phases
        (modify-phases %standard-phases
          (add-after 'build 'build-python-module
@@ -1941,10 +1941,10 @@ on the terminal in a visually appealing way.")
              (let* ((out (assoc-ref outputs "out"))
                     (share (string-append out "/share"))
                     (maturin (string-append out "/bin/maturin")))
-               ;; TODO? fig, nushell, powershell
-               (mkdir-p (string-append share "/bash-completion/completions"))
+               ;; TODO? fig, powershell
+               (mkdir-p (string-append out "/etc/bash_completion.d"))
                (with-output-to-file
-                 (string-append share "/bash-completion/completions/maturin")
+                 (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
@@ -1957,7 +1957,11 @@ on the terminal in a visually appealing way.")
                (mkdir-p (string-append share "/elvish/lib"))
                (with-output-to-file
                  (string-append share "/elvish/lib/maturin")
-                 (lambda _ (invoke maturin "completions" "elvish")))))))))
+                 (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 (list bzip2))

Reply via email to