1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-07-07 09:04:04 +02:00

Compare commits

...

16 Commits

Author SHA1 Message Date
Efraim Flashner 786fb2a695 gnu: rust-cargo-c: Update to 0.10.22+cargo-0.96.0.
* gnu/packages/rust-apps.scm (0.10.22+cargo-0.96.0): Update to
0.10.22+cargo-0.96.0.
* gnu/packages/rust-crates.scm (lookup-cargo-inputs)[rust-cargo-c]:
Update entry.

Change-Id: I8460cb49440e0cd9d7e6e1666ab123f3e877b79d
2026-05-25 14:05:08 +03:00
Efraim Flashner 554a013918 gnu: rust: Update to 1.95.
* gnu/packages/rust.scm (rust-1.95): New variable.
(rust): Update to 1.95.

Change-Id: Id79077ea01bfcc08881c3ff545f3c7bda15c2702
2026-05-25 13:50:50 +03:00
Efraim Flashner 971e70f9b5 gnu: rust-1.93: Update to 1.93.1.
* gnu/packages/rust.scm (rust-1.93): Update to 1.93.1.

Change-Id: Ifed9036acb1da4bd327f8a76c2f86bcf2ba057a1
2026-05-25 13:50:50 +03:00
Efraim Flashner e7a2b1c9af gnu: rust-1.91: Update to 1.91.1.
* gnu/packages/rust.scm (rust-1.91): Update to 1.91.1.

Change-Id: I67f5005c850d9acce743908df10aa45c8b8f46ba
2026-05-25 13:50:50 +03:00
Efraim Flashner 807a953ed9 gnu: rust-1.77: Update to 1.77.2.
* gnu/packages/rust.scm (rust-1.77): Update to 1.77.2.

Change-Id: I7d4bf58d0d286672e31a587e3167a36fd4e6b79f
2026-05-25 13:50:50 +03:00
Efraim Flashner 690b843347 gnu: rust: Never refer to previous rust version.
* gnu/packages/rust.scm (rust-bootstrapped-package)[arguments]: Adjust
the disallowed-references to have the rust and cargo inputs.
(rust)[arguments]: Don't override inherited disallowed-references.

Change-Id: I467aa47ebb85bce1c05798ac6de9ec8c32037b42
2026-05-25 13:50:50 +03:00
Efraim Flashner 9b5afcb777 gnu: rust: Remove input labels.
* gnu/packages/rust.scm (rust)[native-inputs]: Remove input labels.
[arguments]: Adjust phases accordingly.

Fixes: guix/guix#7889
Change-Id: I05aa5d846b2ee4ed374a62a89d1ae3ab979e236c
2026-05-25 13:50:50 +03:00
Efraim Flashner e4c5bbf688 gnu: rust-1.55: Remove input labels.
* gnu/packages/rust.scm (rust-1.55)[arguments]: Adjust the 'configure
phase to not need input labels.
[native-inputs]: Remove input labels.
[inputs]: Remove input labels.
(rust-bootstrapped-package)[arguments]: Adjust for change in name of
rust input.
[native-inputs]: Rewrite to use explicit inputs.
(rust-1.75)[native-inputs]: Rewrite to use explicit inputs.
(rust)[arguments]: Adjust for change in name of rust input.

Change-Id: I1077d57b359982f5b9641bebb192fa12ec28b8d5
2026-05-25 13:50:47 +03:00
Efraim Flashner 96c7671ca1 gnu: rust-cargo-c: Update to 0.10.21.
* gnu/packages/rust-apps.scm (rust-cargo-c): Update to 0.10.21.
* gnu/packages/rust-crates.scm (lookup-cargo-inputs): Update entry for
rust-cargo-c.

Change-Id: Id2c5d0cc1568d0787257ad44e1865adac7c9377e
2026-05-25 13:46:38 +03:00
Efraim Flashner aa03ba89d9 gnu: rust: Update to 1.94.
* gnu/packages/rust.scm (rust): Update to 1.94.
[arguments]: Add a phase to patch more files for the test suite. Adjust
the 'dont-reference-previous-cargo-version phase for changes in the
source.

Change-Id: I965e8b3b4046322820be632d01926331fc9afc38
2026-05-25 13:38:47 +03:00
Efraim Flashner 66b8bd3508 gnu: rav1e: Rewrite the install-completions phase.
* gnu/packages/video.scm (rav1e)[arguments]: Rewrite the
'install-completions phase to make it cleaner.
[native-inputs]: Add rav1e when cross-compiling.

Change-Id: I38e1196ea0fb96986ad5c4ae2221facc06fe746d
2026-05-25 13:38:47 +03:00
Efraim Flashner d3f738137f gnu: rust-crates: Unbundle more crates.
* gnu/packages/rust-crates.scm: Unbundle more rust crates.

Change-Id: I93abcf264272b390f526d317fb924941b884376c
2026-05-25 13:38:47 +03:00
Efraim Flashner 65b9ca32e9 gnu: rav1e: Update to 0.8.1.
* gnu/packages/video.scm (rav1e): Update to 0.8.1.
* gnu/packages/rust-crates.scm (lookup-cargo-inputs): Update the rav1e
entry.

Change-Id: I376c812e036d87f669aa035191e43f66665ab1cd
2026-05-25 13:38:12 +03:00
Efraim Flashner c129b7f01e gnu: dav1d: Update to 1.5.3.
* gnu/packages/video.scm (dav1d): Update to 1.5.3.

Change-Id: Ia14848b247b5b1cc78c78bdfde083362182792d3
2026-05-25 13:36:14 +03:00
Danny Milosavljevic af25628e0b gnu: rust: Install rust-src only once.
* gnu/packages/rust.scm (rust)[arguments]<#:phases>{install}: Install rust-src
only once.
{build}: Explicitly request src/tools/llvm-bitcode-linker (no change).

Closes: guix/guix#6671
Change-Id: I9f64c2d115794126ad82aebb87ad192fcf94abd7
2026-05-25 13:36:14 +03:00
Danny Milosavljevic 474c19ec87 build-system/cargo: Work around "cargo package" weirdness.
* guix/build/cargo-build-system.scm (package): Modify.

Closes: guix/guix#6825
Change-Id: I0ab97662e52d53ca1558c40bd9c1cbd28eae0197
2026-05-25 13:36:10 +03:00
5 changed files with 975 additions and 644 deletions
+2 -2
View File
@@ -4212,14 +4212,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.22+cargo-0.96.0")
(source
(origin
(method url-fetch)
(uri (crate-uri "cargo-c" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0q1198xlkcd50nxx722s18lpm6hacnvzqqacb0xdld8ll9z3m5ay"))))
(base32 "1j5122hla12v6xjpvsvzv10gzvm80dbf65b2cy6669kcpjvlk1v0"))))
(build-system cargo-build-system)
(arguments (list #:install-source? #f))
(native-inputs
File diff suppressed because it is too large Load Diff
+130 -61
View File
@@ -127,11 +127,15 @@
(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
python-setuptools-bootstrap
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.
@@ -600,40 +604,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)
@@ -694,15 +691,15 @@ ar = \"" binutils "/bin/ar" "\"
`("LIBRARY_PATH" ":"
suffix (,(string-append libc "/lib"))))))))))
(native-inputs
`(("pkg-config" ,pkg-config)
("python" ,python-minimal-wrapper)
("python-setuptools" ,python-setuptools-bootstrap)
("rustc-bootstrap" ,rust-bootstrap-1.54)
("cargo-bootstrap" ,rust-bootstrap-1.54 "cargo")))
(list pkg-config
python-minimal-wrapper
python-setuptools-bootstrap
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)
@@ -1155,9 +1152,11 @@ 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
python-setuptools-bootstrap
rust-bootstrap-1.74
(list rust-bootstrap-1.74 "cargo"))
(package-native-inputs base-rust)))
(inputs (modify-inputs inputs
(replace "llvm" llvm-17))))))
@@ -1174,8 +1173,8 @@ safety and thread safety guarantees.")
(delete 'add-cc-shim-to-path))))))))
(define-public rust-1.77
(let ((base-rust (rust-bootstrapped-package rust-1.76 "1.77.1"
"18d4ncdzp0nfimmw029xdf7vv1hgh82v30mjnnixnllzar66w47f")))
(let ((base-rust (rust-bootstrapped-package rust-1.76 "1.77.2"
"1hrq2r9brhwl77qv18qk4pqrzfgnn9w6fwf7vgykhrjrizpmf566")))
(package
(inherit base-rust)
(arguments
@@ -1622,8 +1621,8 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
(define-public rust-1.91
(let ((base-rust
(rust-bootstrapped-package
rust-1.90 "1.91.0"
"12iysk87bmhlcdcbr939y8cdfcx0an4z9ixjlbq16c3ma60m4zrj")))
rust-1.90 "1.91.1"
"08sp8idsymyrqj70sxhfjz5zx7nfl4vl4i7hc495fqczsc2y5p1q")))
(package
(inherit base-rust)
(source
@@ -1772,8 +1771,8 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
(define-public rust-1.93
(let ((base-rust
(rust-bootstrapped-package
rust-1.92 "1.93.0"
"01d7a1mvyvqmq9khyw5cbnwyngzgb4pxpdwhqgzl669j7kc2n4b9")))
rust-1.92 "1.93.1"
"07z02gq7x54sdbisbzcigk95h01qz0ckg52hz77g7jfrnd20l8sc")))
(package
(inherit base-rust)
(source
@@ -1916,6 +1915,67 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
(copy-recursively "stage2/lib"
(string-append out "/lib")))))))))))))
(define-public rust-1.95
(let ((base-rust
(rust-bootstrapped-package
rust-1.94 "1.95.0"
"05d53hj717ildhvm3rln7821r08nzbbfk72nqcvpb5j67sl856za")))
(package
(inherit base-rust)
(source
(origin
(inherit (package-source base-rust))
(snippet
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/curl-sys-0.4.79+curl-8.12.0/curl"
"vendor/curl-sys-0.4.83+curl-8.15.0/curl"
"vendor/curl-sys-0.4.84+curl-8.17.0/curl"
"vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
"vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
"vendor/libffi-sys-4.1.0/libffi"
"vendor/libmimalloc-sys-0.1.44/c_src/mimalloc"
"vendor/libz-sys-1.1.21/src/zlib"
"vendor/libz-sys-1.1.23/src/zlib"
"vendor/openssl-src-111.28.2+1.1.1w/openssl"
"vendor/openssl-src-300.5.0+3.5.0/openssl"
"vendor/openssl-src-300.5.4+3.5.4/openssl"
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
"vendor/tikv-jemalloc-sys-0.6.1+5.3.0-1-\
ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" "\\.(a|dll|exe|lib)$"))
;; Use the packaged nghttp2.
(for-each
(lambda (ver)
(let ((vendored-dir
(format #f "vendor/libnghttp2-sys-~a/nghttp2" ver))
(build-rs
(format #f "vendor/libnghttp2-sys-~a/build.rs" ver)))
(delete-file-recursively vendored-dir)
(delete-file build-rs)
(call-with-output-file build-rs
(lambda (port)
(format port "fn main() {~@
println!(\"cargo:rustc-link-lib=nghttp2\");~@
}~%")))))
'("0.1.11+1.64.0"))
;; Adjust vendored dependency to explicitly use rustix with libc
;; backend.
(substitute* '("vendor/tempfile-3.14.0/Cargo.toml"
"vendor/tempfile-3.16.0/Cargo.toml"
"vendor/tempfile-3.19.1/Cargo.toml"
"vendor/tempfile-3.20.0/Cargo.toml"
"vendor/tempfile-3.21.0/Cargo.toml"
"vendor/tempfile-3.23.0/Cargo.toml"
"vendor/tempfile-3.24.0/Cargo.toml")
(("features = \\[\"fs\"" all)
(string-append all ", \"use-libc\""))))))))))
(define (make-ignore-test-list strs)
"Function to make creating a list to ignore tests a bit easier."
(map (lambda (str)
@@ -1930,7 +1990,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.95))
(package
(inherit base-rust)
(properties (append
@@ -1942,15 +2002,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"
@@ -2042,15 +2108,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 _
@@ -2092,6 +2156,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
@@ -2111,7 +2176,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 = \"[^\"]*\"")
@@ -2159,7 +2227,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"))))))
@@ -2178,14 +2246,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
+43 -47
View File
@@ -4235,7 +4235,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/>
@@ -6503,7 +6503,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)
@@ -6512,7 +6512,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?)
@@ -6794,63 +6794,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)))
+11 -1
View File
@@ -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"