summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2026-08-15 10:29:59 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2026-08-19 08:31:56 +0900
commit6393e03a6e6a19593140f40bb2e51ddd7855d150 (patch)
tree3ba0ad8910093295ed7dbe46089c2731c66951f3 /gnu
parentaeb265f1f9b2266aedf9b0ba0166cc0de2e0b577 (diff)
gnu: uv: Relocate to (gnu package build-tools).
* gnu/packages/rust-apps.scm (uv): Add deprecation for move to... * gnu/packages/build-tools.scm (uv): ... here. * gnu/packages/package-management.scm (hatch): Delete obsolete comment.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/build-tools.scm129
-rw-r--r--gnu/packages/package-management.scm3
-rw-r--r--gnu/packages/python-check.scm1
-rw-r--r--gnu/packages/rust-apps.scm129
4 files changed, 132 insertions, 130 deletions
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 454253cc617..8c40d42de80 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, 2024 Efraim Flashner <efraim@flashner.co.il> 3;;; Copyright © 2016, 2018, 2020, 2023, 2025 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>
@@ -62,6 +62,7 @@
62 #:use-module (gnu packages gcc) 62 #:use-module (gnu packages gcc)
63 #:use-module (gnu packages guile) 63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages guile-xyz) 64 #:use-module (gnu packages guile-xyz)
65 #:use-module (gnu packages jemalloc)
65 #:use-module (gnu packages linux) 66 #:use-module (gnu packages linux)
66 #:use-module (gnu packages lisp) 67 #:use-module (gnu packages lisp)
67 #:use-module (gnu packages logging) 68 #:use-module (gnu packages logging)
@@ -82,6 +83,7 @@
82 #:use-module (gnu packages compiler-tools) 83 #:use-module (gnu packages compiler-tools)
83 #:use-module (gnu packages regex) 84 #:use-module (gnu packages regex)
84 #:use-module (gnu packages rpc) 85 #:use-module (gnu packages rpc)
86 #:use-module (gnu packages rust)
85 #:use-module (gnu packages serialization) 87 #:use-module (gnu packages serialization)
86 #:use-module (gnu packages sqlite) 88 #:use-module (gnu packages sqlite)
87 #:use-module (gnu packages tcl) 89 #:use-module (gnu packages tcl)
@@ -1668,3 +1670,128 @@ replacement, use the @code{samu-as-ninja-wrapper} package.")
1668 (description "This package provides the @command{ninja} command, 1670 (description "This package provides the @command{ninja} command,
1669implemented as a symbolic link to the @command{samu} command of @code{samurai} 1671implemented as a symbolic link to the @command{samu} command of @code{samurai}
1670package."))) 1672package.")))
1673
1674(define-public uv
1675 (package
1676 (name "uv")
1677 (version "0.10.12")
1678 (source
1679 (origin
1680 (method git-fetch)
1681 (uri (git-reference
1682 (url "https://github.com/astral-sh/uv")
1683 (commit version)))
1684 (file-name (git-file-name name version))
1685 (sha256
1686 (base32 "04jk8d6wzxclx16mdg56afy2nqfv06j5kbxdch6977226gw80i0p"))
1687 (modules '((guix build utils)))
1688 (snippet
1689 #~(begin
1690 (for-each delete-file
1691 (cons "test/packages/fake-uv/scripts/uv.exe"
1692 (find-files "crates/uv-trampoline-builder/trampolines"
1693 "\\.exe$")))
1694 ;; Our version of maturin doesn't parse this correctly
1695 (substitute* "pyproject.toml"
1696 (("license-files.*") ""))))))
1697 (build-system pyproject-build-system)
1698 (arguments
1699 (list
1700 #:imported-modules
1701 (append %cargo-build-system-modules
1702 %pyproject-build-system-modules)
1703 #:modules
1704 '((srfi srfi-26)
1705 (ice-9 match)
1706 ((guix build cargo-build-system) #:prefix cargo:)
1707 (guix build pyproject-build-system)
1708 (guix build utils))
1709 #:tests? #f ; Tests require multiple python versions and network access.
1710 #:phases
1711 #~(modify-phases %standard-phases
1712 (add-after 'unpack 'prepare-cargo-build-system
1713 (lambda args
1714 (for-each
1715 (lambda (phase)
1716 (format #t "Running cargo phase: ~a~%" phase)
1717 (apply (assoc-ref cargo:%standard-phases phase)
1718 args))
1719 '(prepare-rust-crates
1720 unpack-rust-crates
1721 configure
1722 check-for-pregenerated-files
1723 patch-cargo-checksums))))
1724 (add-before 'build 'override-jemalloc
1725 (lambda* (#:key inputs #:allow-other-keys)
1726 (let ((jemalloc (assoc-ref inputs "jemalloc")))
1727 ;; This flag is needed when not using the bundled jemalloc.
1728 ;; https://github.com/tikv/jemallocator/issues/19
1729 (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
1730 (setenv "JEMALLOC_OVERRIDE"
1731 (string-append jemalloc "/lib/libjemalloc.so")))))
1732 (replace 'install
1733 ;; We can't use the pyproject install phase because uv is a
1734 ;; binary, not a python script.
1735 (lambda* (#:key inputs outputs #:allow-other-keys)
1736 (let ((out (assoc-ref outputs "out"))
1737 (wheel (car (find-files "dist" "\\.whl$")))
1738 (site-dir (site-packages inputs outputs))
1739 (pyversion
1740 (string-append "python"
1741 (python-version
1742 (assoc-ref inputs "python")))))
1743 (invoke "python" "-m" "zipfile" "-e" wheel site-dir)
1744 (mkdir-p (string-append out "/bin"))
1745 (for-each delete-file
1746 (find-files (string-append out "/lib/" pyversion)
1747 "^uvx?$"))
1748 (for-each (cut install-file <> (string-append out "/bin"))
1749 (find-files "target" "^uvx?$")))))
1750 (replace 'check
1751 (lambda args
1752 (setenv "HOME" (getcwd))
1753 ;; NOTE: ‘#:tests?’ is honored here.
1754 (apply (assoc-ref cargo:%standard-phases 'check) args)))
1755 (add-after 'install 'install-extras
1756 (lambda* (#:key native-inputs #:allow-other-keys)
1757 (let ((uv (if #$(%current-target-system)
1758 (search-input-file native-inputs "/bin/uv")
1759 (string-append #$output "/bin/uv")))
1760 (uvx (if #$(%current-target-system)
1761 (search-input-file native-inputs "/bin/uvx")
1762 (string-append #$output "/bin/uvx"))))
1763 (for-each
1764 (match-lambda
1765 ((shell uv-name uvx-name completions-dir)
1766 (mkdir-p completions-dir)
1767 (with-output-to-file (in-vicinity completions-dir uv-name)
1768 (lambda _
1769 (invoke uv "generate-shell-completion" shell)))
1770 (with-output-to-file (in-vicinity completions-dir uvx-name)
1771 (lambda _
1772 (invoke uvx "--generate-shell-completion" shell)))))
1773 `(("bash" "uv" "uvx"
1774 ,(string-append #$output "/share/bash-completion/completions"))
1775 ("zsh" "_uv" "_uvx"
1776 ,(string-append #$output "/share/zsh/site-functions"))
1777 ("fish" "uv.fish" "uvx.fish"
1778 ,(string-append #$output "/share/fish/vendor_completions.d"))
1779 ("elvish" "uv" "uvx"
1780 ,(string-append #$output "/share/elvish/lib"))
1781 ("nushell" "uv" "uvx"
1782 ,(string-append #$output "/share/nushell/vendor/autoload"))))))))))
1783 (native-inputs
1784 (append
1785 (list maturin pkg-config rust `(,rust "cargo"))
1786 (if (%current-target-system)
1787 (list this-package
1788 (make-rust-sysroot (%current-target-system)))
1789 '())))
1790 (inputs (cons* jemalloc xz `(,zstd "lib") (cargo-inputs 'uv)))
1791 (home-page "https://docs.astral.sh/uv/")
1792 (synopsis "Python package and project manager written in Rust")
1793 (description
1794 "@command{uv} is a high-performance Python package and project manager
1795written in Rust, known for its execution speed and compatibility with existing
1796tools.")
1797 (license (list license:asl2.0 license:expat)))) ;dual-licensed
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 027e78f0b60..e8755fc5f29 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -132,7 +132,6 @@
132 #:use-module (gnu packages rust) 132 #:use-module (gnu packages rust)
133 #:use-module (gnu packages ruby-check) 133 #:use-module (gnu packages ruby-check)
134 #:use-module (gnu packages ruby-xyz) 134 #:use-module (gnu packages ruby-xyz)
135 #:use-module (gnu packages rust-apps)
136 #:use-module (gnu packages rust-crates) 135 #:use-module (gnu packages rust-crates)
137 #:use-module (gnu packages serialization) 136 #:use-module (gnu packages serialization)
138 #:use-module (gnu packages sqlite) 137 #:use-module (gnu packages sqlite)
@@ -1342,7 +1341,7 @@ the @code{(bffe)} module as the entry point.")
1342 python-tomlkit 1341 python-tomlkit
1343 python-userpath 1342 python-userpath
1344 python-virtualenv 1343 python-virtualenv
1345 uv)) ;XXX: Move uv to this module. 1344 uv))
1346 (home-page "https://hatch.pypa.io/latest/") 1345 (home-page "https://hatch.pypa.io/latest/")
1347 (synopsis "Python project management") 1346 (synopsis "Python project management")
1348 (description "Hatch is a modern, extensible Python project manager. 1347 (description "Hatch is a modern, extensible Python project manager.
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 4249de22f0b..90f2a041a3a 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -86,7 +86,6 @@
86 #:use-module (gnu packages python-web) 86 #:use-module (gnu packages python-web)
87 #:use-module (gnu packages python-xyz) 87 #:use-module (gnu packages python-xyz)
88 #:use-module (gnu packages qt) 88 #:use-module (gnu packages qt)
89 #:use-module (gnu packages rust-apps) ;for uv
90 #:use-module (gnu packages sphinx) 89 #:use-module (gnu packages sphinx)
91 #:use-module (gnu packages time) 90 #:use-module (gnu packages time)
92 #:use-module (gnu packages version-control) 91 #:use-module (gnu packages version-control)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 7d0872b97e1..7a188083f82 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -4639,132 +4639,9 @@ window manager.")
4639Full featured offline client with caching support.") 4639Full featured offline client with caching support.")
4640 (license (list license:expat license:asl2.0)))) 4640 (license (list license:expat license:asl2.0))))
4641 4641
4642(define-public uv 4642;;; TODO: Remove when 2027/03 comes.
4643 ;; TODO: Move to (gnu packages package-management). 4643(define-deprecated/public-alias uv
4644 (package 4644 (@ (gnu packages build-tools) uv))
4645 (name "uv")
4646 (version "0.10.12")
4647 (source
4648 (origin
4649 (method git-fetch)
4650 (uri (git-reference
4651 (url "https://github.com/astral-sh/uv")
4652 (commit version)))
4653 (file-name (git-file-name name version))
4654 (sha256
4655 (base32 "04jk8d6wzxclx16mdg56afy2nqfv06j5kbxdch6977226gw80i0p"))
4656 (modules '((guix build utils)))
4657 (snippet
4658 #~(begin
4659 (for-each delete-file
4660 (cons "test/packages/fake-uv/scripts/uv.exe"
4661 (find-files "crates/uv-trampoline-builder/trampolines"
4662 "\\.exe$")))
4663 ;; Our version of maturin doesn't parse this correctly
4664 (substitute* "pyproject.toml"
4665 (("license-files.*") ""))))))
4666 (build-system pyproject-build-system)
4667 (arguments
4668 (list
4669 #:imported-modules
4670 (append %cargo-build-system-modules
4671 %pyproject-build-system-modules)
4672 #:modules
4673 '((srfi srfi-26)
4674 (ice-9 match)
4675 ((guix build cargo-build-system) #:prefix cargo:)
4676 (guix build pyproject-build-system)
4677 (guix build utils))
4678 #:tests? #f ; Tests require multiple python versions and network access.
4679 #:phases
4680 #~(modify-phases %standard-phases
4681 (add-after 'unpack 'prepare-cargo-build-system
4682 (lambda args
4683 (for-each
4684 (lambda (phase)
4685 (format #t "Running cargo phase: ~a~%" phase)
4686 (apply (assoc-ref cargo:%standard-phases phase)
4687 args))
4688 '(prepare-rust-crates
4689 unpack-rust-crates
4690 configure
4691 check-for-pregenerated-files
4692 patch-cargo-checksums))))
4693 (add-before 'build 'override-jemalloc
4694 (lambda* (#:key inputs #:allow-other-keys)
4695 (let ((jemalloc (assoc-ref inputs "jemalloc")))
4696 ;; This flag is needed when not using the bundled jemalloc.
4697 ;; https://github.com/tikv/jemallocator/issues/19
4698 (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
4699 (setenv "JEMALLOC_OVERRIDE"
4700 (string-append jemalloc "/lib/libjemalloc.so")))))
4701 (replace 'install
4702 ;; We can't use the pyproject install phase because uv is a
4703 ;; binary, not a python script.
4704 (lambda* (#:key inputs outputs #:allow-other-keys)
4705 (let ((out (assoc-ref outputs "out"))
4706 (wheel (car (find-files "dist" "\\.whl$")))
4707 (site-dir (site-packages inputs outputs))
4708 (pyversion
4709 (string-append "python"
4710 (python-version
4711 (assoc-ref inputs "python")))))
4712 (invoke "python" "-m" "zipfile" "-e" wheel site-dir)
4713 (mkdir-p (string-append out "/bin"))
4714 (for-each delete-file
4715 (find-files (string-append out "/lib/" pyversion)
4716 "^uvx?$"))
4717 (for-each (cut install-file <> (string-append out "/bin"))
4718 (find-files "target" "^uvx?$")))))
4719 (replace 'check
4720 (lambda args
4721 (setenv "HOME" (getcwd))
4722 ;; NOTE: ‘#:tests?’ is honored here.
4723 (apply (assoc-ref cargo:%standard-phases 'check) args)))
4724 (add-after 'install 'install-extras
4725 (lambda* (#:key native-inputs #:allow-other-keys)
4726 (let ((uv (if #$(%current-target-system)
4727 (search-input-file native-inputs "/bin/uv")
4728 (string-append #$output "/bin/uv")))
4729 (uvx (if #$(%current-target-system)
4730 (search-input-file native-inputs "/bin/uvx")
4731 (string-append #$output "/bin/uvx"))))
4732 (for-each
4733 (match-lambda
4734 ((shell uv-name uvx-name completions-dir)
4735 (mkdir-p completions-dir)
4736 (with-output-to-file (in-vicinity completions-dir uv-name)
4737 (lambda _
4738 (invoke uv "generate-shell-completion" shell)))
4739 (with-output-to-file (in-vicinity completions-dir uvx-name)
4740 (lambda _
4741 (invoke uvx "--generate-shell-completion" shell)))))
4742 `(("bash" "uv" "uvx"
4743 ,(string-append #$output "/share/bash-completion/completions"))
4744 ("zsh" "_uv" "_uvx"
4745 ,(string-append #$output "/share/zsh/site-functions"))
4746 ("fish" "uv.fish" "uvx.fish"
4747 ,(string-append #$output "/share/fish/vendor_completions.d"))
4748 ("elvish" "uv" "uvx"
4749 ,(string-append #$output "/share/elvish/lib"))
4750 ("nushell" "uv" "uvx"
4751 ,(string-append #$output "/share/nushell/vendor/autoload"))))))))))
4752 (native-inputs
4753 (append
4754 (list (@ (gnu packages build-tools) maturin)
4755 pkg-config rust `(,rust "cargo"))
4756 (if (%current-target-system)
4757 (list this-package
4758 (make-rust-sysroot (%current-target-system)))
4759 '())))
4760 (inputs (cons* jemalloc xz `(,zstd "lib") (cargo-inputs 'uv)))
4761 (home-page "https://docs.astral.sh/uv/")
4762 (synopsis "Python package and project manager written in Rust")
4763 (description
4764 "@command{uv} is a high-performance Python package and project manager
4765written in Rust, known for its execution speed and compatibility with existing
4766tools.")
4767 (license (list license:asl2.0 license:expat)))) ;dual-licensed
4768 4645
4769(define-public git-absorb 4646(define-public git-absorb
4770 (package 4647 (package