mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-23 19:19:20 -05:00
gnu: Factorize rust-bootstrapped-package.
* gnu/packages/rust.scm (rust-bootstrapped-package): New procedure. (rust): Use rust-bootstrapped-package.
This commit is contained in:
parent
8fdde58103
commit
ca523cc518
1 changed files with 18 additions and 11 deletions
|
@ -235,6 +235,18 @@ (define-public rust-1.19
|
|||
;; Dual licensed.
|
||||
(license (list license:asl2.0 license:expat))))
|
||||
|
||||
(define (rust-bootstrapped-package base-rust version checksum)
|
||||
"Bootstrap rust VERSION with source checksum CHECKSUM using BASE-RUST."
|
||||
(package
|
||||
(inherit base-rust)
|
||||
(version version)
|
||||
(source
|
||||
(rust-source version checksum))
|
||||
(native-inputs
|
||||
(alist-replace "cargo-bootstrap" (list base-rust "cargo")
|
||||
(alist-replace "rustc-bootstrap" (list base-rust)
|
||||
(package-native-inputs base-rust))))))
|
||||
|
||||
(define-public rust-1.23
|
||||
(package
|
||||
(inherit rust-1.19)
|
||||
|
@ -337,18 +349,13 @@ (define ref (stat "README.md"))
|
|||
#t)))))))))
|
||||
|
||||
(define-public rust
|
||||
(let ((base-rust rust-1.23))
|
||||
(let ((base-rust
|
||||
(rust-bootstrapped-package rust-1.23 "1.24.1"
|
||||
"1vv10x2h9kq7fxh2v01damdq8pvlp5acyh1kzcda9sfjx12kv99y")))
|
||||
(package
|
||||
(inherit base-rust)
|
||||
(version "1.24.1")
|
||||
(source
|
||||
(rust-source version
|
||||
"1vv10x2h9kq7fxh2v01damdq8pvlp5acyh1kzcda9sfjx12kv99y"))
|
||||
(native-inputs
|
||||
(alist-replace "cargo-bootstrap" (list base-rust "cargo")
|
||||
(alist-replace "rustc-bootstrap" (list base-rust)
|
||||
(package-native-inputs base-rust))))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments base-rust)
|
||||
((#:phases phases) `(modify-phases ,phases
|
||||
(delete 'fix-mtime-bug))))))))
|
||||
((#:phases phases)
|
||||
`(modify-phases ,phases
|
||||
(delete 'fix-mtime-bug))))))))
|
||||
|
|
Loading…
Reference in a new issue