mirror of
https://codeberg.org/guix/guix.git
synced 2026-04-28 14:43:51 +00:00
Compare commits
12 Commits
python-tea
...
rust-team
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95dd2c3756 | ||
|
|
fee13afcd1 | ||
|
|
c4afae37d1 | ||
|
|
1531fa1ea3 | ||
|
|
c141ca45c0 | ||
|
|
6e162bc02d | ||
|
|
08db3d75c1 | ||
|
|
6e94f18c43 | ||
|
|
b7c52a77ad | ||
|
|
a0ce46b605 | ||
|
|
f4ff19f601 | ||
|
|
e10e878834 |
@@ -3896,14 +3896,14 @@ background agent taking care of maintaining the necessary state.")
|
||||
(define-public rust-cargo-c
|
||||
(package
|
||||
(name "rust-cargo-c")
|
||||
(version "0.10.20+cargo-0.94.0")
|
||||
(version "0.10.21+cargo-0.95.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (crate-uri "cargo-c" version))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "0q1198xlkcd50nxx722s18lpm6hacnvzqqacb0xdld8ll9z3m5ay"))))
|
||||
(base32 "14bfybh3gzcrk7h22xxxhib1zc3m95j52ib258wxv64n939gln54"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments (list #:install-source? #f))
|
||||
(native-inputs
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -126,11 +126,14 @@
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments base-rust)
|
||||
((#:disallowed-references _ '())
|
||||
(list (this-package-native-input "rustc-bootstrap")))))
|
||||
(list (this-package-native-input "rust")
|
||||
;; Refer to cargo as #$rustc:cargo.
|
||||
(gexp-input (this-package-native-input "rust") "cargo")))))
|
||||
(native-inputs
|
||||
(modify-inputs native-inputs
|
||||
(replace "rustc-bootstrap" base-rust)
|
||||
(replace "cargo-bootstrap" (list base-rust "cargo"))))))
|
||||
(list pkg-config
|
||||
python-minimal-wrapper
|
||||
base-rust
|
||||
`(,base-rust "cargo")))))
|
||||
|
||||
;;; Note: mrustc's only purpose is to be able to bootstrap Rust; it's designed
|
||||
;;; to be used in source form.
|
||||
@@ -599,40 +602,33 @@ safety and thread safety guarantees.")
|
||||
(setenv "PATH" (string-append "/tmp/bin:" (getenv "PATH")))))
|
||||
(replace 'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(gcc (assoc-ref inputs "gcc"))
|
||||
(python (assoc-ref inputs "python"))
|
||||
(binutils (assoc-ref inputs "binutils"))
|
||||
(rustc (assoc-ref inputs "rustc-bootstrap"))
|
||||
(cargo (assoc-ref inputs "cargo-bootstrap"))
|
||||
(llvm (assoc-ref inputs "llvm")))
|
||||
(call-with-output-file "config.toml"
|
||||
(lambda (port)
|
||||
(display (string-append "
|
||||
(call-with-output-file "config.toml"
|
||||
(lambda (port)
|
||||
(display (string-append "
|
||||
[llvm]
|
||||
[build]
|
||||
cargo = \"" cargo "/bin/cargo" "\"
|
||||
rustc = \"" rustc "/bin/rustc" "\"
|
||||
cargo = \"" (search-input-file inputs "bin/cargo") "\"
|
||||
rustc = \"" (search-input-file inputs "bin/rustc") "\"
|
||||
docs = false
|
||||
python = \"" python "/bin/python" "\"
|
||||
python = \"" (search-input-file inputs "bin/python") "\"
|
||||
vendor = true
|
||||
submodules = false
|
||||
[install]
|
||||
prefix = \"" out "\"
|
||||
prefix = \"" (assoc-ref outputs "out") "\"
|
||||
sysconfdir = \"etc\"
|
||||
[rust]
|
||||
debug=false
|
||||
jemalloc=false
|
||||
default-linker = \"" gcc "/bin/gcc" "\"
|
||||
default-linker = \"" (search-input-file inputs "bin/gcc") "\"
|
||||
channel = \"stable\"
|
||||
rpath = true
|
||||
[target." ,(platform-rust-target (lookup-platform-by-system (%current-system))) "]
|
||||
llvm-config = \"" llvm "/bin/llvm-config" "\"
|
||||
cc = \"" gcc "/bin/gcc" "\"
|
||||
cxx = \"" gcc "/bin/g++" "\"
|
||||
ar = \"" binutils "/bin/ar" "\"
|
||||
llvm-config = \"" (search-input-file inputs "bin/llvm-config") "\"
|
||||
cc = \"" (search-input-file inputs "bin/gcc") "\"
|
||||
cxx = \"" (search-input-file inputs "bin/g++") "\"
|
||||
ar = \"" (search-input-file inputs "bin/ar") "\"
|
||||
[dist]
|
||||
") port))))))
|
||||
") port)))))
|
||||
(replace 'build
|
||||
;; The standard library source location moved in this release.
|
||||
(lambda* (#:key parallel-build? #:allow-other-keys)
|
||||
@@ -693,14 +689,14 @@ ar = \"" binutils "/bin/ar" "\"
|
||||
`("LIBRARY_PATH" ":"
|
||||
suffix (,(string-append libc "/lib"))))))))))
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)
|
||||
("python" ,python-minimal-wrapper)
|
||||
("rustc-bootstrap" ,rust-bootstrap-1.54)
|
||||
("cargo-bootstrap" ,rust-bootstrap-1.54 "cargo")))
|
||||
(list pkg-config
|
||||
python-minimal-wrapper
|
||||
rust-bootstrap-1.54
|
||||
`(,rust-bootstrap-1.54 "cargo")))
|
||||
(inputs
|
||||
`(("bash" ,bash-minimal)
|
||||
("llvm" ,llvm-13)
|
||||
("openssl" ,openssl)))
|
||||
(list bash-minimal
|
||||
llvm-13
|
||||
openssl))
|
||||
;; rustc invokes gcc, so we need to set its search paths accordingly.
|
||||
(native-search-paths
|
||||
%gcc-search-paths)
|
||||
@@ -1153,9 +1149,10 @@ safety and thread safety guarantees.")
|
||||
(package-arguments base-rust)))
|
||||
(native-inputs
|
||||
(if (supported-package? rust-bootstrap-1.74)
|
||||
(modify-inputs native-inputs
|
||||
(replace "cargo-bootstrap" (list rust-bootstrap-1.74 "cargo"))
|
||||
(replace "rustc-bootstrap" rust-bootstrap-1.74))
|
||||
(list pkg-config
|
||||
python-minimal-wrapper
|
||||
rust-bootstrap-1.74
|
||||
(list rust-bootstrap-1.74 "cargo"))
|
||||
(package-native-inputs base-rust)))
|
||||
(inputs (modify-inputs inputs
|
||||
(replace "llvm" llvm-17))))))
|
||||
@@ -1830,8 +1827,8 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
|
||||
(define-public rust-1.94
|
||||
(let ((base-rust
|
||||
(rust-bootstrapped-package
|
||||
rust-1.93 "1.94.0"
|
||||
"0k274dla70wnajjli2w80by9k4nqf2wah1lw9xhzy8gkscf94gxq")))
|
||||
rust-1.93 "1.94.1"
|
||||
"056mbblkhn5ig62v09r6938qmnb09ygy32n62vvwvqqjbxi2l52c")))
|
||||
(package
|
||||
(inherit base-rust)
|
||||
(source
|
||||
@@ -1901,7 +1898,7 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
|
||||
;;; Here we take the latest included Rust, make it public, and re-enable tests
|
||||
;;; and extra components such as rustfmt.
|
||||
(define-public rust
|
||||
(let ((base-rust rust-1.93))
|
||||
(let ((base-rust rust-1.94))
|
||||
(package
|
||||
(inherit base-rust)
|
||||
(properties (append
|
||||
@@ -1913,15 +1910,21 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
|
||||
(substitute-keyword-arguments
|
||||
(strip-keyword-arguments '(#:tests?)
|
||||
(package-arguments base-rust))
|
||||
((#:disallowed-references _ '())
|
||||
(list (this-package-native-input "rustc-bootstrap")
|
||||
;; Refer to cargo-bootstrap as #$rustc-bootstrap:cargo.
|
||||
(gexp-input (this-package-native-input "rustc-bootstrap")
|
||||
"cargo")))
|
||||
((#:modules modules)
|
||||
(cons '(srfi srfi-26) modules))
|
||||
((#:phases phases)
|
||||
`(modify-phases ,phases
|
||||
(add-after 'unpack 'patch-shebangs-in-tests
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(with-directory-excursion
|
||||
"src/tools/rust-analyzer/crates/parser/test_data"
|
||||
(substitute* '("lexer/ok/shebang_frontmatter.rast"
|
||||
"parser/inline/ok/frontmatter.rast")
|
||||
(("/usr/bin/env cargo")
|
||||
(search-input-file inputs "bin/cargo")))
|
||||
(substitute* "lexer/ok/single_line_comments.rast"
|
||||
(("/usr/bin/env bash")
|
||||
(search-input-file inputs "bin/bash"))))))
|
||||
(add-after 'unpack 'disable-tests-requiring-git
|
||||
(lambda _
|
||||
(substitute* "src/tools/cargo/tests/testsuite/publish_lockfile.rs"
|
||||
@@ -2013,15 +2016,13 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(mkdir-p "src/llvm-project/compiler-rt")
|
||||
(copy-recursively
|
||||
(string-append (assoc-ref inputs "clang-source")
|
||||
"/compiler-rt")
|
||||
(search-input-directory inputs "/compiler-rt")
|
||||
"src/llvm-project/compiler-rt")))
|
||||
(add-after 'unpack 'unpack-libunwind
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(mkdir-p "src/llvm-project/libunwind")
|
||||
(copy-recursively
|
||||
(string-append (assoc-ref inputs "clang-source")
|
||||
"/libunwind")
|
||||
(search-input-directory inputs "/libunwind")
|
||||
"src/llvm-project/libunwind")))
|
||||
(replace 'patch-cargo-checksums
|
||||
(lambda _
|
||||
@@ -2063,6 +2064,7 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
|
||||
"library/std" ;rustc
|
||||
"src/tools/cargo"
|
||||
"src/tools/clippy"
|
||||
"src/tools/llvm-bitcode-linker"
|
||||
"src/tools/rust-analyzer"
|
||||
"src/tools/rustfmt"))))
|
||||
(replace 'check
|
||||
@@ -2082,7 +2084,10 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
|
||||
(replace 'install
|
||||
;; Phase overridden to also install more tools.
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(invoke "./x.py" "install")
|
||||
;; Install rustc, std, and llvm-bitcode-linker.
|
||||
;; rust-src is handled separately in 'install-rust-src'.
|
||||
(invoke "./x.py" "install" "compiler/rustc" "library/std"
|
||||
"llvm-bitcode-linker")
|
||||
(substitute* "config.toml"
|
||||
;; Adjust the prefix to the 'cargo' output.
|
||||
(("prefix = \"[^\"]*\"")
|
||||
@@ -2130,7 +2135,7 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
|
||||
(with-directory-excursion
|
||||
(string-append (assoc-ref outputs "rust-src")
|
||||
"/lib/rustlib/src/rust/src/tools/")
|
||||
(substitute* (find-files "." "\\.rs$")
|
||||
(substitute* (find-files "." "\\.(rs|rast)$")
|
||||
(("#!.*/bin/cargo")
|
||||
(string-append "#!" (assoc-ref outputs "cargo")
|
||||
"/bin/cargo"))))))
|
||||
@@ -2149,14 +2154,15 @@ exec -a \"$0\" \"~a\" \"$@\""
|
||||
"/lib/rustlib/src/rust/library")
|
||||
(string-append bin "/.rust-analyzer-real"))))
|
||||
(chmod (string-append bin "/rust-analyzer") #o755))))))))
|
||||
(native-inputs (cons*
|
||||
;; Keep in sync with the llvm used to build rust.
|
||||
`("clang-source" ,(package-source clang-runtime-21))
|
||||
;; Add test inputs.
|
||||
`("gdb" ,gdb/pinned)
|
||||
`("git-minimal" ,git-minimal/pinned)
|
||||
`("procps" ,procps)
|
||||
(package-native-inputs base-rust)))
|
||||
(native-inputs
|
||||
(modify-inputs (package-native-inputs base-rust)
|
||||
(prepend
|
||||
;; Keep in sync with the llvm used to build rust.
|
||||
(package-source clang-runtime-21)
|
||||
;; Add test inputs.
|
||||
gdb/pinned
|
||||
git-minimal/pinned
|
||||
procps)))
|
||||
(native-search-paths
|
||||
(cons*
|
||||
;; For HTTPS access, Cargo reads from a single-file certificate
|
||||
|
||||
@@ -4216,7 +4216,7 @@ be used for realtime video capture via Linux-specific APIs.")
|
||||
"-DENABLE_QSV11=OFF"
|
||||
"-DENABLE_NVENC=OFF"
|
||||
;; Requires a custom version of websocketpp in inputs, that's
|
||||
;; patched to be compatible with recent versions of Boost
|
||||
;; patched to be compatible with recent versions of Boost
|
||||
"-DENABLE_WEBSOCKET=ON"
|
||||
;; Browser plugin requires cef, but it is not packaged yet.
|
||||
;; <https://bitbucket.org/chromiumembedded/cef/src/master/>
|
||||
@@ -6480,7 +6480,7 @@ and audio capture, network stream playback, and many more.")
|
||||
(define-public dav1d
|
||||
(package
|
||||
(name "dav1d")
|
||||
(version "1.5.1")
|
||||
(version "1.5.3")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
@@ -6489,7 +6489,7 @@ and audio capture, network stream playback, and many more.")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "1n0b5m4srdjsqg15plc9fng5kjv14ygqahjxy8863fbzhr13vjx9"))))
|
||||
(base32 "0x19r721gf91a37xqm70j7qcpadyd3m9lcf1lasxq73wnby5lxqk"))))
|
||||
(build-system meson-build-system)
|
||||
(native-inputs
|
||||
(if (target-x86?)
|
||||
@@ -6771,63 +6771,59 @@ result in several formats:
|
||||
(define-public rav1e
|
||||
(package
|
||||
(name "rav1e")
|
||||
(version "0.7.1")
|
||||
(version "0.8.1")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (crate-uri "rav1e" version))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "1sawva6nmj2fvynydbcirr3nb7wjyg0id2hz2771qnv6ly0cx1yd"))))
|
||||
(base32 "0axk3ji3jmlr81svmsy5zvj8shmhpp8lz5nyghkq752xx1bdvdj3"))))
|
||||
(build-system cargo-build-system)
|
||||
(arguments
|
||||
`(#:install-source? #f
|
||||
(list
|
||||
#:install-source? #f
|
||||
#:modules '((guix build cargo-build-system)
|
||||
(guix build utils)
|
||||
(ice-9 match))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'build
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(invoke "cargo" "cinstall" "--release"
|
||||
;; Only build the dynamic library.
|
||||
"--library-type" "cdylib"
|
||||
(string-append "--prefix=" out)))))
|
||||
(add-after 'install 'install-completions
|
||||
(lambda* (#:key native-inputs outputs #:allow-other-keys)
|
||||
(unless ,(%current-target-system)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(share (string-append out "/share"))
|
||||
(bash-completions-dir
|
||||
(string-append out "/etc/bash_completion.d"))
|
||||
(zsh-completions-dir
|
||||
(string-append share "/zsh/site-functions"))
|
||||
(fish-completions-dir
|
||||
(string-append share "/fish/vendor_completions.d"))
|
||||
(elvish-completions-dir
|
||||
(string-append share "/elvish/lib"))
|
||||
(rav1e (string-append out "/bin/rav1e"))
|
||||
(common-flags '("-" "-o" "-" "advanced" "--completion")))
|
||||
(mkdir-p bash-completions-dir)
|
||||
(with-output-to-file
|
||||
(string-append bash-completions-dir "/rav1e")
|
||||
(lambda _ (apply invoke rav1e (append common-flags '("bash")))))
|
||||
(mkdir-p zsh-completions-dir)
|
||||
;; This one currently fails to build.
|
||||
;(with-output-to-file
|
||||
; (string-append zsh-completions-dir "/_rav1e")
|
||||
; (lambda _ (apply invoke rav1e (append common-flags '("zsh")))))
|
||||
(mkdir-p fish-completions-dir)
|
||||
(with-output-to-file
|
||||
(string-append fish-completions-dir "/rav1e.fish")
|
||||
(lambda _ (apply invoke rav1e (append common-flags '("fish")))))
|
||||
(mkdir-p elvish-completions-dir)
|
||||
(with-output-to-file
|
||||
(string-append elvish-completions-dir "/rav1e")
|
||||
(lambda _
|
||||
(apply invoke rav1e (append common-flags '("elvish"))))))))))))
|
||||
#~(modify-phases %standard-phases
|
||||
(replace 'build
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(invoke "cargo" "cinstall" "--release"
|
||||
;; Only build the dynamic library.
|
||||
"--library-type" "cdylib"
|
||||
(string-append "--prefix=" out)))))
|
||||
(add-after 'install 'install-completions
|
||||
(lambda* (#:key native-inputs #:allow-other-keys)
|
||||
(for-each
|
||||
(match-lambda
|
||||
((shell . path)
|
||||
(mkdir-p (in-vicinity #$output (dirname path)))
|
||||
(let ((binary
|
||||
(if #$(%current-target-system)
|
||||
(search-input-file native-inputs "bin/rav1e")
|
||||
(in-vicinity #$output "bin/rav1e"))))
|
||||
(with-output-to-file (in-vicinity #$output path)
|
||||
(lambda _
|
||||
(invoke binary
|
||||
"-" "-o"
|
||||
"-" "advanced"
|
||||
"--completion" shell))))))
|
||||
'(("bash" . "share/bash-completion/completions/rav1e")
|
||||
("elvish" . "share/elvish/lib/rav1e")
|
||||
("fish" . "share/fish/vendor_completions.d/rav1e.fish")
|
||||
;; This one currently fails to build.
|
||||
;("zsh" . "share/zsh/site-functions/_rav1e")
|
||||
)))))))
|
||||
(native-inputs
|
||||
(append (if (target-x86?)
|
||||
(list nasm)
|
||||
'())
|
||||
(if (%current-target-system)
|
||||
(list this-package)
|
||||
'())
|
||||
(list pkg-config rust-cargo-c)))
|
||||
(inputs
|
||||
(cons* libgit2-1.9 zlib (cargo-inputs 'rav1e)))
|
||||
|
||||
@@ -390,10 +390,20 @@ directory = '" vendor-dir "'") port)
|
||||
(for-each
|
||||
(lambda (crate)
|
||||
(invoke "tar" "xzf" crate "-C" vendor-dir))
|
||||
(find-files "target/package" "\\.crate$"))
|
||||
(map (lambda (f) (string-append "target/package/" f))
|
||||
(scandir "target/package"
|
||||
(lambda (f) (string-suffix? ".crate" f)))))
|
||||
(patch-cargo-checksums #:vendor-dir vendor-dir))
|
||||
cargo-package-crates))
|
||||
|
||||
;; Cargo creates target/package/tmp-crate/ as scratch space during
|
||||
;; packaging and leaves .crate file copies there after uplifting them
|
||||
;; to target/package/. Delete it so the repacking scandir does not
|
||||
;; pick the tmp-crate directory instead of the extracted crate
|
||||
;; directory when crate names sort after "tmp-crate" alphabetically.
|
||||
(when (file-exists? "target/package/tmp-crate")
|
||||
(delete-file-recursively "target/package/tmp-crate"))
|
||||
|
||||
;; Then unpack the crate, reset the timestamp of all contained files, and
|
||||
;; repack them. This is necessary to ensure that they are reproducible.
|
||||
(with-directory-excursion "target/package"
|
||||
|
||||
Reference in New Issue
Block a user