diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-08-13 00:19:43 +0100 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2026-08-19 08:31:56 +0900 |
| commit | aeb265f1f9b2266aedf9b0ba0166cc0de2e0b577 (patch) | |
| tree | a6090a331e440cf911cfc03873b2c6fa163f57dd /gnu/packages | |
| parent | b92bb40b16f3936e39b53dfefaddc9bb1f94096d (diff) | |
gnu: maturin: Move to (gnu packages build-tools).
Authors were parsed from git history with the following command:
git log --all --grep="maturin:" \
--pretty=format:";;; Copyright © %as %aN <%aE>"
* gnu/packages/rust-apps.scm (vtracer, uv)[native-inputs]: Replace
maturing with (@ (gnu packages build-tools) maturin).
(maturing): Deprecate variable and move from here ...
* gnu/packages/build-tools.scm: ... to here.
* gnu/packages/embedded.scm: Replace rust-apps with build-tools module.
* gnu/packages/python-crypto.scm: Likewise.
* gnu/packages/python-web.scm: Likewise.
* gnu/packages/time.scm: Likewise.
* gnu/packages/machine-learning.scm: Remove rust-apps module.
* gnu/packages/python-compression.scm: Likewise.
* gnu/packages/python-science.scm: Likewise.
* gnu/packages/python-xyz.scm: Likewise.
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/build-tools.scm | 114 | ||||
| -rw-r--r-- | gnu/packages/embedded.scm | 4 | ||||
| -rw-r--r-- | gnu/packages/machine-learning.scm | 1 | ||||
| -rw-r--r-- | gnu/packages/python-compression.scm | 1 | ||||
| -rw-r--r-- | gnu/packages/python-crypto.scm | 2 | ||||
| -rw-r--r-- | gnu/packages/python-science.scm | 1 | ||||
| -rw-r--r-- | gnu/packages/python-web.scm | 2 | ||||
| -rw-r--r-- | gnu/packages/python-xyz.scm | 1 | ||||
| -rw-r--r-- | gnu/packages/rust-apps.scm | 112 | ||||
| -rw-r--r-- | gnu/packages/time.scm | 2 |
10 files changed, 123 insertions, 117 deletions
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index c686d472402..454253cc617 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2015 宋文武 <iyzsong@envs.net> | 2 | ;;; Copyright © 2015 宋文武 <iyzsong@envs.net> |
| 3 | ;;; Copyright © 2016, 2018, 2020, 2023 Efraim Flashner <efraim@flashner.co.il> | 3 | ;;; Copyright © 2016, 2018, 2020, 2023, 2024 Efraim Flashner <efraim@flashner.co.il> |
| 4 | ;;; Copyright © 2017, 2018, 2024 Ricardo Wurmus <rekado@elephly.net> | 4 | ;;; Copyright © 2017, 2018, 2024 Ricardo Wurmus <rekado@elephly.net> |
| 5 | ;;; Copyright © 2017 Corentin Bocquillon <corentin@nybble.fr> | 5 | ;;; Copyright © 2017 Corentin Bocquillon <corentin@nybble.fr> |
| 6 | ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr> | 6 | ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr> |
| @@ -21,12 +21,15 @@ | |||
| 21 | ;;; Copyright © 2022, 2023 Juliana Sims <juli@incana.org> | 21 | ;;; Copyright © 2022, 2023 Juliana Sims <juli@incana.org> |
| 22 | ;;; Copyright © 2024 Evgeny Pisemsky <mail@pisemsky.site> | 22 | ;;; Copyright © 2024 Evgeny Pisemsky <mail@pisemsky.site> |
| 23 | ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org> | 23 | ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org> |
| 24 | ;;; Copyright © 2025,2026 Anderson Torres <anderson.torres.8519@gmail.com> | ||
| 25 | ;;; Copyright © 2025 Aiden Isik <aidenisik+git@member.fsf.org> | 24 | ;;; Copyright © 2025 Aiden Isik <aidenisik+git@member.fsf.org> |
| 26 | ;;; Copyright © 2025 Josep Bigorra <jjbigorra@gmail.com> | 25 | ;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space> |
| 27 | ;;; Copyright © 2025 John Kehayias <john.kehayias@protonmail.com> | 26 | ;;; Copyright © 2025 John Kehayias <john.kehayias@protonmail.com> |
| 27 | ;;; Copyright © 2025 Josep Bigorra <jjbigorra@gmail.com> | ||
| 28 | ;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> | ||
| 29 | ;;; Copyright © 2025, 2026 Anderson Torres <anderson.torres.8519@gmail.com> | ||
| 28 | ;;; Copyright © 2026 Nemin <bergengocia@protonmail.com> | 30 | ;;; Copyright © 2026 Nemin <bergengocia@protonmail.com> |
| 29 | ;;; Copyright © 2026 Nguyễn Gia Phong <cnx@loang.net> | 31 | ;;; Copyright © 2026 Nguyễn Gia Phong <cnx@loang.net> |
| 32 | ;;; Copyright © 2026 Yan Abu Arab <yanabuarab@gmail.com> | ||
| 30 | ;;; | 33 | ;;; |
| 31 | ;;; This file is part of GNU Guix. | 34 | ;;; This file is part of GNU Guix. |
| 32 | ;;; | 35 | ;;; |
| @@ -87,6 +90,7 @@ | |||
| 87 | #:use-module (gnu packages version-control) | 90 | #:use-module (gnu packages version-control) |
| 88 | #:use-module (gnu packages xml) | 91 | #:use-module (gnu packages xml) |
| 89 | #:use-module (gnu packages) | 92 | #:use-module (gnu packages) |
| 93 | #:use-module (guix build-system cargo) | ||
| 90 | #:use-module (guix build-system cmake) | 94 | #:use-module (guix build-system cmake) |
| 91 | #:use-module (guix build-system copy) | 95 | #:use-module (guix build-system copy) |
| 92 | #:use-module (guix build-system gnu) | 96 | #:use-module (guix build-system gnu) |
| @@ -416,6 +420,110 @@ files and generates build instructions for the Ninja build system.") | |||
| 416 | ;; X11 license. | 420 | ;; X11 license. |
| 417 | (license (list license:bsd-3 license:x11))))) | 421 | (license (list license:bsd-3 license:x11))))) |
| 418 | 422 | ||
| 423 | (define-public maturin | ||
| 424 | (package | ||
| 425 | (name "maturin") | ||
| 426 | (version "1.11.5") | ||
| 427 | (source (origin | ||
| 428 | (method url-fetch) | ||
| 429 | (uri (crate-uri "maturin" version)) | ||
| 430 | (file-name (string-append name "-" version ".tar.gz")) | ||
| 431 | (sha256 | ||
| 432 | (base32 | ||
| 433 | "1w36bxbxn455bh5ymv1i2crqkvpkzjni06b25gj7bb14sq4h7s10")) | ||
| 434 | (patches (search-patches "maturin-no-cross-compile.patch")))) | ||
| 435 | (build-system cargo-build-system) | ||
| 436 | (arguments | ||
| 437 | (list | ||
| 438 | #:modules '((guix build cargo-build-system) | ||
| 439 | ((guix build pyproject-build-system) #:prefix py:) | ||
| 440 | (guix build utils)) | ||
| 441 | #:imported-modules `((guix build cargo-build-system) | ||
| 442 | (guix build cargo-utils) | ||
| 443 | ,@%pyproject-build-system-modules) | ||
| 444 | #:install-source? #f | ||
| 445 | #:cargo-test-flags | ||
| 446 | ''("--" | ||
| 447 | ;; A sample pyproject.toml is not provided by the package for the | ||
| 448 | ;; tests to run. | ||
| 449 | "--skip=build_options::tests::test_find_bridge_bin" | ||
| 450 | "--skip=build_options::tests::test_find_bridge_cffi" | ||
| 451 | "--skip=build_options::tests::test_find_bridge_pyo3" | ||
| 452 | "--skip=build_options::tests::test_find_bridge_pyo3_abi3" | ||
| 453 | "--skip=build_options::tests::test_find_bridge_pyo3_feature" | ||
| 454 | "--skip=metadata::tests::test_implicit_readme" | ||
| 455 | "--skip=metadata::tests::test_merge_metadata_from_pyproject_dynamic_license_test" | ||
| 456 | "--skip=metadata::tests::test_merge_metadata_from_pyproject_toml" | ||
| 457 | "--skip=metadata::tests::test_merge_metadata_from_pyproject_toml_with_customized_python_source_dir" | ||
| 458 | "--skip=metadata::tests::test_pep639" | ||
| 459 | "--skip=module_writer::mock_writer::metadata_hello_world_pep639" | ||
| 460 | "--skip=pyproject_toml::tests::test_warn_missing_maturin_version") | ||
| 461 | #:phases | ||
| 462 | #~(modify-phases %standard-phases | ||
| 463 | (add-after 'build 'build-python-module | ||
| 464 | (lambda _ | ||
| 465 | ;; Match the features from the cargo-build-system and Cargo.toml. | ||
| 466 | (setenv "MATURIN_SETUP_ARGS" "--features=default") | ||
| 467 | ((assoc-ref py:%standard-phases 'build)))) | ||
| 468 | |||
| 469 | ;; We can't use the pyproject install phase because maturin is a | ||
| 470 | ;; binary, not a python script. | ||
| 471 | (add-after 'install 'install-python-module | ||
| 472 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 473 | (let ((wheel (car (find-files "dist" "\\.whl$"))) | ||
| 474 | (site-dir (py:site-packages inputs outputs)) | ||
| 475 | (pyversion | ||
| 476 | (string-append "python" | ||
| 477 | (py:python-version | ||
| 478 | (assoc-ref inputs "python-wrapper"))))) | ||
| 479 | (invoke "python" "-m" "zipfile" "-e" wheel site-dir) | ||
| 480 | (mkdir-p (string-append #$output "/bin")) | ||
| 481 | (for-each delete-file | ||
| 482 | (find-files (string-append #$output "/lib/" pyversion) | ||
| 483 | "^maturin$"))))) | ||
| 484 | (add-after 'install 'install-completions | ||
| 485 | (lambda _ | ||
| 486 | (let ((share (string-append #$output "/share")) | ||
| 487 | (maturin (string-append #$output "/bin/maturin"))) | ||
| 488 | ;; TODO? fig, powershell | ||
| 489 | (mkdir-p (string-append #$output "/etc/bash_completion.d")) | ||
| 490 | (with-output-to-file | ||
| 491 | (string-append #$output "/etc/bash_completion.d/maturin") | ||
| 492 | (lambda _ (invoke maturin "completions" "bash"))) | ||
| 493 | (mkdir-p (string-append share "/fish/vendor_completions.d")) | ||
| 494 | (with-output-to-file | ||
| 495 | (string-append share "/fish/vendor_completions.d/maturin.fish") | ||
| 496 | (lambda _ (invoke maturin "completions" "fish"))) | ||
| 497 | (mkdir-p (string-append share "/zsh/site-functions")) | ||
| 498 | (with-output-to-file | ||
| 499 | (string-append share "/zsh/site-functions/_maturin") | ||
| 500 | (lambda _ (invoke maturin "completions" "zsh"))) | ||
| 501 | (mkdir-p (string-append share "/elvish/lib")) | ||
| 502 | (with-output-to-file | ||
| 503 | (string-append share "/elvish/lib/maturin") | ||
| 504 | (lambda _ (invoke maturin "completions" "elvish"))) | ||
| 505 | (mkdir-p (string-append share "/nushell/vendor/autoload")) | ||
| 506 | (with-output-to-file | ||
| 507 | (string-append share "/nushell/vendor/autoload/maturin") | ||
| 508 | (lambda _ (invoke maturin "completions" "nushell"))))))))) | ||
| 509 | (propagated-inputs | ||
| 510 | (list python-tomli)) | ||
| 511 | (inputs (append | ||
| 512 | (list (list zstd "lib") | ||
| 513 | bzip2) | ||
| 514 | (cargo-inputs 'maturin))) | ||
| 515 | (native-inputs | ||
| 516 | (list pkg-config | ||
| 517 | python-wheel | ||
| 518 | python-wrapper | ||
| 519 | python-setuptools-rust)) | ||
| 520 | (home-page "https://github.com/pyo3/maturin") | ||
| 521 | (synopsis "Build and publish crates and python packages") | ||
| 522 | (description | ||
| 523 | "Build and publish crates with @code{pyo3}, @code{rust-cpython} and | ||
| 524 | @code{cffi} bindings as well as rust binaries as python packages.") | ||
| 525 | (license (list license:expat license:asl2.0)))) | ||
| 526 | |||
| 419 | (define-public meson | 527 | (define-public meson |
| 420 | (package | 528 | (package |
| 421 | (name "meson") | 529 | (name "meson") |
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index d57d25191cc..d163ac5a57f 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm | |||
| @@ -54,6 +54,7 @@ | |||
| 54 | #:use-module (gnu packages base) | 54 | #:use-module (gnu packages base) |
| 55 | #:use-module (gnu packages bison) | 55 | #:use-module (gnu packages bison) |
| 56 | #:use-module (gnu packages boost) | 56 | #:use-module (gnu packages boost) |
| 57 | #:use-module (gnu packages build-tools) | ||
| 57 | #:use-module (gnu packages check) | 58 | #:use-module (gnu packages check) |
| 58 | #:use-module (gnu packages compression) | 59 | #:use-module (gnu packages compression) |
| 59 | #:use-module (gnu packages cross-base) | 60 | #:use-module (gnu packages cross-base) |
| @@ -79,7 +80,6 @@ | |||
| 79 | #:use-module (gnu packages qt) | 80 | #:use-module (gnu packages qt) |
| 80 | #:use-module (gnu packages readline) | 81 | #:use-module (gnu packages readline) |
| 81 | #:use-module (gnu packages rust) | 82 | #:use-module (gnu packages rust) |
| 82 | #:use-module (gnu packages rust-apps) | ||
| 83 | #:use-module (gnu packages swig) | 83 | #:use-module (gnu packages swig) |
| 84 | #:use-module (gnu packages texinfo) | 84 | #:use-module (gnu packages texinfo) |
| 85 | #:use-module (gnu packages tls) | 85 | #:use-module (gnu packages tls) |
| @@ -1409,7 +1409,7 @@ hardware. The utility support USB and UART as serial link.") | |||
| 1409 | python-pyyaml)) | 1409 | python-pyyaml)) |
| 1410 | (native-inputs | 1410 | (native-inputs |
| 1411 | (append | 1411 | (append |
| 1412 | (list maturin ;TODO: Move to build-tools module someday | 1412 | (list maturin |
| 1413 | python-wrapper | 1413 | python-wrapper |
| 1414 | python-jinja2 | 1414 | python-jinja2 |
| 1415 | python-pytest | 1415 | python-pytest |
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 483cc6d8bc4..6b5f8d038e2 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm | |||
| @@ -121,7 +121,6 @@ | |||
| 121 | #:use-module (gnu packages rocm) | 121 | #:use-module (gnu packages rocm) |
| 122 | #:use-module (gnu packages rpc) | 122 | #:use-module (gnu packages rpc) |
| 123 | #:use-module (gnu packages rust) | 123 | #:use-module (gnu packages rust) |
| 124 | #:use-module (gnu packages rust-apps) | ||
| 125 | #:use-module (gnu packages sdl) | 124 | #:use-module (gnu packages sdl) |
| 126 | #:use-module (gnu packages serialization) | 125 | #:use-module (gnu packages serialization) |
| 127 | #:use-module (gnu packages sphinx) | 126 | #:use-module (gnu packages sphinx) |
diff --git a/gnu/packages/python-compression.scm b/gnu/packages/python-compression.scm index b4d3d15666e..d0e9e7919c8 100644 --- a/gnu/packages/python-compression.scm +++ b/gnu/packages/python-compression.scm | |||
| @@ -57,7 +57,6 @@ | |||
| 57 | #:use-module (gnu packages python-web) | 57 | #:use-module (gnu packages python-web) |
| 58 | #:use-module (gnu packages python-xyz) | 58 | #:use-module (gnu packages python-xyz) |
| 59 | #:use-module (gnu packages rust) | 59 | #:use-module (gnu packages rust) |
| 60 | #:use-module (gnu packages rust-apps) | ||
| 61 | #:use-module (gnu packages sphinx)) | 60 | #:use-module (gnu packages sphinx)) |
| 62 | 61 | ||
| 63 | (define-public python-backports-zstd | 62 | (define-public python-backports-zstd |
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 15fc169a9c6..d6ed694e972 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm | |||
| @@ -62,6 +62,7 @@ | |||
| 62 | #:use-module (guix utils) | 62 | #:use-module (guix utils) |
| 63 | #:use-module (gnu packages) | 63 | #:use-module (gnu packages) |
| 64 | #:use-module (gnu packages nss) | 64 | #:use-module (gnu packages nss) |
| 65 | #:use-module (gnu packages build-tools) | ||
| 65 | #:use-module (gnu packages bash) | 66 | #:use-module (gnu packages bash) |
| 66 | #:use-module (gnu packages check) | 67 | #:use-module (gnu packages check) |
| 67 | #:use-module (gnu packages crypto) | 68 | #:use-module (gnu packages crypto) |
| @@ -79,7 +80,6 @@ | |||
| 79 | #:use-module (gnu packages python-web) | 80 | #:use-module (gnu packages python-web) |
| 80 | #:use-module (gnu packages python-xyz) | 81 | #:use-module (gnu packages python-xyz) |
| 81 | #:use-module (gnu packages rust) | 82 | #:use-module (gnu packages rust) |
| 82 | #:use-module (gnu packages rust-apps) | ||
| 83 | #:use-module (gnu packages security-token) | 83 | #:use-module (gnu packages security-token) |
| 84 | #:use-module (gnu packages swig) | 84 | #:use-module (gnu packages swig) |
| 85 | #:use-module (gnu packages time) | 85 | #:use-module (gnu packages time) |
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index c18a1a5929a..6cc1af1e4b6 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm | |||
| @@ -103,7 +103,6 @@ | |||
| 103 | #:use-module (gnu packages python-xyz) | 103 | #:use-module (gnu packages python-xyz) |
| 104 | #:use-module (gnu packages qt) | 104 | #:use-module (gnu packages qt) |
| 105 | #:use-module (gnu packages rust) | 105 | #:use-module (gnu packages rust) |
| 106 | #:use-module (gnu packages rust-apps) | ||
| 107 | #:use-module (gnu packages serialization) | 106 | #:use-module (gnu packages serialization) |
| 108 | #:use-module (gnu packages simulation) | 107 | #:use-module (gnu packages simulation) |
| 109 | #:use-module (gnu packages sphinx) | 108 | #:use-module (gnu packages sphinx) |
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 39e2074519f..4674c54deb8 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm | |||
| @@ -109,6 +109,7 @@ | |||
| 109 | #:use-module (gnu packages admin) | 109 | #:use-module (gnu packages admin) |
| 110 | #:use-module (gnu packages base) | 110 | #:use-module (gnu packages base) |
| 111 | #:use-module (gnu packages bash) | 111 | #:use-module (gnu packages bash) |
| 112 | #:use-module (gnu packages build-tools) | ||
| 112 | #:use-module (gnu packages check) | 113 | #:use-module (gnu packages check) |
| 113 | #:use-module (gnu packages cmake) | 114 | #:use-module (gnu packages cmake) |
| 114 | #:use-module (gnu packages compression) | 115 | #:use-module (gnu packages compression) |
| @@ -144,7 +145,6 @@ | |||
| 144 | #:use-module (gnu packages rdf) | 145 | #:use-module (gnu packages rdf) |
| 145 | #:use-module (gnu packages rpc) | 146 | #:use-module (gnu packages rpc) |
| 146 | #:use-module (gnu packages rust) | 147 | #:use-module (gnu packages rust) |
| 147 | #:use-module (gnu packages rust-apps) | ||
| 148 | #:use-module (gnu packages serialization) | 148 | #:use-module (gnu packages serialization) |
| 149 | #:use-module (gnu packages sphinx) | 149 | #:use-module (gnu packages sphinx) |
| 150 | #:use-module (gnu packages texinfo) | 150 | #:use-module (gnu packages texinfo) |
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 7f1b28ef224..3803b328a0d 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm | |||
| @@ -296,7 +296,6 @@ | |||
| 296 | #:use-module (gnu packages regex) | 296 | #:use-module (gnu packages regex) |
| 297 | #:use-module (gnu packages rpc) | 297 | #:use-module (gnu packages rpc) |
| 298 | #:use-module (gnu packages rust) | 298 | #:use-module (gnu packages rust) |
| 299 | #:use-module (gnu packages rust-apps) | ||
| 300 | #:use-module (gnu packages scanner) | 299 | #:use-module (gnu packages scanner) |
| 301 | #:use-module (gnu packages search) | 300 | #:use-module (gnu packages search) |
| 302 | #:use-module (gnu packages serialization) | 301 | #:use-module (gnu packages serialization) |
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 6ae020731dd..7d0872b97e1 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm | |||
| @@ -2540,109 +2540,8 @@ on the terminal in a visually appealing way.") | |||
| 2540 | specified image or color, easing the process of theme creation.") | 2540 | specified image or color, easing the process of theme creation.") |
| 2541 | (license license:gpl2))) | 2541 | (license license:gpl2))) |
| 2542 | 2542 | ||
| 2543 | (define-public maturin | 2543 | ;; Deprecated on <2026-08-12>. |
| 2544 | (package | 2544 | (define-deprecated/public-alias maturin (@ (gnu packages build-tools) maturin)) |
| 2545 | (name "maturin") | ||
| 2546 | (version "1.11.5") | ||
| 2547 | (source (origin | ||
| 2548 | (method url-fetch) | ||
| 2549 | (uri (crate-uri "maturin" version)) | ||
| 2550 | (file-name (string-append name "-" version ".tar.gz")) | ||
| 2551 | (sha256 | ||
| 2552 | (base32 | ||
| 2553 | "1w36bxbxn455bh5ymv1i2crqkvpkzjni06b25gj7bb14sq4h7s10")) | ||
| 2554 | (patches (search-patches "maturin-no-cross-compile.patch")))) | ||
| 2555 | (build-system cargo-build-system) | ||
| 2556 | (arguments | ||
| 2557 | (list | ||
| 2558 | #:modules '((guix build cargo-build-system) | ||
| 2559 | ((guix build pyproject-build-system) #:prefix py:) | ||
| 2560 | (guix build utils)) | ||
| 2561 | #:imported-modules `((guix build cargo-build-system) | ||
| 2562 | (guix build cargo-utils) | ||
| 2563 | ,@%pyproject-build-system-modules) | ||
| 2564 | #:install-source? #f | ||
| 2565 | #:cargo-test-flags | ||
| 2566 | ''("--" | ||
| 2567 | ;; A sample pyproject.toml is not provided by the package for the | ||
| 2568 | ;; tests to run. | ||
| 2569 | "--skip=build_options::tests::test_find_bridge_bin" | ||
| 2570 | "--skip=build_options::tests::test_find_bridge_cffi" | ||
| 2571 | "--skip=build_options::tests::test_find_bridge_pyo3" | ||
| 2572 | "--skip=build_options::tests::test_find_bridge_pyo3_abi3" | ||
| 2573 | "--skip=build_options::tests::test_find_bridge_pyo3_feature" | ||
| 2574 | "--skip=metadata::tests::test_implicit_readme" | ||
| 2575 | "--skip=metadata::tests::test_merge_metadata_from_pyproject_dynamic_license_test" | ||
| 2576 | "--skip=metadata::tests::test_merge_metadata_from_pyproject_toml" | ||
| 2577 | "--skip=metadata::tests::test_merge_metadata_from_pyproject_toml_with_customized_python_source_dir" | ||
| 2578 | "--skip=metadata::tests::test_pep639" | ||
| 2579 | "--skip=module_writer::mock_writer::metadata_hello_world_pep639" | ||
| 2580 | "--skip=pyproject_toml::tests::test_warn_missing_maturin_version") | ||
| 2581 | #:phases | ||
| 2582 | #~(modify-phases %standard-phases | ||
| 2583 | (add-after 'build 'build-python-module | ||
| 2584 | (lambda _ | ||
| 2585 | ;; Match the features from the cargo-build-system and Cargo.toml. | ||
| 2586 | (setenv "MATURIN_SETUP_ARGS" "--features=default") | ||
| 2587 | ((assoc-ref py:%standard-phases 'build)))) | ||
| 2588 | |||
| 2589 | ;; We can't use the pyproject install phase because maturin is a | ||
| 2590 | ;; binary, not a python script. | ||
| 2591 | (add-after 'install 'install-python-module | ||
| 2592 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 2593 | (let ((wheel (car (find-files "dist" "\\.whl$"))) | ||
| 2594 | (site-dir (py:site-packages inputs outputs)) | ||
| 2595 | (pyversion | ||
| 2596 | (string-append "python" | ||
| 2597 | (py:python-version | ||
| 2598 | (assoc-ref inputs "python-wrapper"))))) | ||
| 2599 | (invoke "python" "-m" "zipfile" "-e" wheel site-dir) | ||
| 2600 | (mkdir-p (string-append #$output "/bin")) | ||
| 2601 | (for-each delete-file | ||
| 2602 | (find-files (string-append #$output "/lib/" pyversion) | ||
| 2603 | "^maturin$"))))) | ||
| 2604 | (add-after 'install 'install-completions | ||
| 2605 | (lambda _ | ||
| 2606 | (let ((share (string-append #$output "/share")) | ||
| 2607 | (maturin (string-append #$output "/bin/maturin"))) | ||
| 2608 | ;; TODO? fig, powershell | ||
| 2609 | (mkdir-p (string-append #$output "/etc/bash_completion.d")) | ||
| 2610 | (with-output-to-file | ||
| 2611 | (string-append #$output "/etc/bash_completion.d/maturin") | ||
| 2612 | (lambda _ (invoke maturin "completions" "bash"))) | ||
| 2613 | (mkdir-p (string-append share "/fish/vendor_completions.d")) | ||
| 2614 | (with-output-to-file | ||
| 2615 | (string-append share "/fish/vendor_completions.d/maturin.fish") | ||
| 2616 | (lambda _ (invoke maturin "completions" "fish"))) | ||
| 2617 | (mkdir-p (string-append share "/zsh/site-functions")) | ||
| 2618 | (with-output-to-file | ||
| 2619 | (string-append share "/zsh/site-functions/_maturin") | ||
| 2620 | (lambda _ (invoke maturin "completions" "zsh"))) | ||
| 2621 | (mkdir-p (string-append share "/elvish/lib")) | ||
| 2622 | (with-output-to-file | ||
| 2623 | (string-append share "/elvish/lib/maturin") | ||
| 2624 | (lambda _ (invoke maturin "completions" "elvish"))) | ||
| 2625 | (mkdir-p (string-append share "/nushell/vendor/autoload")) | ||
| 2626 | (with-output-to-file | ||
| 2627 | (string-append share "/nushell/vendor/autoload/maturin") | ||
| 2628 | (lambda _ (invoke maturin "completions" "nushell"))))))))) | ||
| 2629 | (propagated-inputs | ||
| 2630 | (list python-tomli)) | ||
| 2631 | (inputs (append | ||
| 2632 | (list (list zstd "lib") | ||
| 2633 | bzip2) | ||
| 2634 | (cargo-inputs 'maturin))) | ||
| 2635 | (native-inputs | ||
| 2636 | (list pkg-config | ||
| 2637 | python-wheel | ||
| 2638 | python-wrapper | ||
| 2639 | python-setuptools-rust)) | ||
| 2640 | (home-page "https://github.com/pyo3/maturin") | ||
| 2641 | (synopsis "Build and publish crates and python packages") | ||
| 2642 | (description | ||
| 2643 | "Build and publish crates with @code{pyo3}, @code{rust-cpython} and | ||
| 2644 | @code{cffi} bindings as well as rust binaries as python packages.") | ||
| 2645 | (license (list license:expat license:asl2.0)))) | ||
| 2646 | 2545 | ||
| 2647 | (define-public mdopen | 2546 | (define-public mdopen |
| 2648 | (package | 2547 | (package |
| @@ -4201,7 +4100,8 @@ older terminal emulators.") | |||
| 4201 | (sha256 | 4100 | (sha256 |
| 4202 | (base32 "035x0dbbyi3nnyc2ajawdjq9j6slpsq2k2hmyf3p77n9qn3p2c62")))) | 4101 | (base32 "035x0dbbyi3nnyc2ajawdjq9j6slpsq2k2hmyf3p77n9qn3p2c62")))) |
| 4203 | (build-system cargo-build-system) | 4102 | (build-system cargo-build-system) |
| 4204 | (native-inputs (list maturin python-wrapper)) | 4103 | (native-inputs (list (@ (gnu packages build-tools) maturin) |
| 4104 | python-wrapper)) | ||
| 4205 | (inputs (cargo-inputs 'vtracer)) | 4105 | (inputs (cargo-inputs 'vtracer)) |
| 4206 | (arguments | 4106 | (arguments |
| 4207 | (list | 4107 | (list |
| @@ -4740,6 +4640,7 @@ Full featured offline client with caching support.") | |||
| 4740 | (license (list license:expat license:asl2.0)))) | 4640 | (license (list license:expat license:asl2.0)))) |
| 4741 | 4641 | ||
| 4742 | (define-public uv | 4642 | (define-public uv |
| 4643 | ;; TODO: Move to (gnu packages package-management). | ||
| 4743 | (package | 4644 | (package |
| 4744 | (name "uv") | 4645 | (name "uv") |
| 4745 | (version "0.10.12") | 4646 | (version "0.10.12") |
| @@ -4850,7 +4751,8 @@ Full featured offline client with caching support.") | |||
| 4850 | ,(string-append #$output "/share/nushell/vendor/autoload")))))))))) | 4751 | ,(string-append #$output "/share/nushell/vendor/autoload")))))))))) |
| 4851 | (native-inputs | 4752 | (native-inputs |
| 4852 | (append | 4753 | (append |
| 4853 | (list maturin pkg-config rust `(,rust "cargo")) | 4754 | (list (@ (gnu packages build-tools) maturin) |
| 4755 | pkg-config rust `(,rust "cargo")) | ||
| 4854 | (if (%current-target-system) | 4756 | (if (%current-target-system) |
| 4855 | (list this-package | 4757 | (list this-package |
| 4856 | (make-rust-sysroot (%current-target-system))) | 4758 | (make-rust-sysroot (%current-target-system))) |
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm index 226e0226545..faabe159734 100644 --- a/gnu/packages/time.scm +++ b/gnu/packages/time.scm | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | (define-module (gnu packages time) | 48 | (define-module (gnu packages time) |
| 49 | #:use-module (gnu packages autotools) | 49 | #:use-module (gnu packages autotools) |
| 50 | #:use-module (gnu packages base) | 50 | #:use-module (gnu packages base) |
| 51 | #:use-module (gnu packages build-tools) | ||
| 51 | #:use-module (gnu packages check) | 52 | #:use-module (gnu packages check) |
| 52 | #:use-module (gnu packages compression) | 53 | #:use-module (gnu packages compression) |
| 53 | #:use-module (gnu packages geo) | 54 | #:use-module (gnu packages geo) |
| @@ -60,7 +61,6 @@ | |||
| 60 | #:use-module (gnu packages python-check) | 61 | #:use-module (gnu packages python-check) |
| 61 | #:use-module (gnu packages python-xyz) | 62 | #:use-module (gnu packages python-xyz) |
| 62 | #:use-module (gnu packages rust) | 63 | #:use-module (gnu packages rust) |
| 63 | #:use-module (gnu packages rust-apps) | ||
| 64 | #:use-module (gnu packages serialization) | 64 | #:use-module (gnu packages serialization) |
| 65 | #:use-module (gnu packages terminals) | 65 | #:use-module (gnu packages terminals) |
| 66 | #:use-module (gnu packages textutils) | 66 | #:use-module (gnu packages textutils) |
