gnu: rust: Update rust to 1.24.1.

* gnu/packages/rust.scm (rust-bootstrap): Freeze bootstrap version to 1.22.1.
Reorganize bootstrap binaries to match new "rust" package structure with two
ouputs "out" with Rust compiler and "cargo" with Cargo package manager.
Replace all "system*" by "invoke".
(rust-1.23): Rename "rustc" to "rust".  Update sha256 for tarball.  Add cargo
related dependencies.  Install "cargo" as separate "rust" output.  Remove
substitutes for parts that were fixed in "rustc" source code.  Install
documentation to separate "doc" output.  Update configuration according to
changes in "rustc" source code.  Replace all "system*" by "invoke".
(rust): Create package for 1.24.1 rust release based on rust-1.23 release.
* guix/build-system/cargo.scm (default-rust): Replace "default-cargo" and
"default-rustc" functions with "default-rust" function.
(cargo-build-system): Take only one package as "rust" source.  Use "rustc" of
default output of "rust" package, use "cargo" as "cargo" output of "rust"
package.
This commit is contained in:
Nikolai Merinov 2018-03-14 00:06:53 +05:00 committed by Danny Milosavljevic
parent 8456a4c5cb
commit f342bb58fe
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5
2 changed files with 127 additions and 1268 deletions

File diff suppressed because it is too large Load diff

View file

@ -43,17 +43,11 @@ (define (crate-uri name version)
to NAME and VERSION." to NAME and VERSION."
(string-append crate-url name "/" version "/download")) (string-append crate-url name "/" version "/download"))
(define (default-cargo) (define (default-rust)
"Return the default Cargo package." "Return the default Rust package."
;; Lazily resolve the binding to avoid a circular dependency. ;; Lazily resolve the binding to avoid a circular dependency.
(let ((rust (resolve-interface '(gnu packages rust)))) (let ((rust (resolve-interface '(gnu packages rust))))
(module-ref rust 'cargo))) (module-ref rust 'rust)))
(define (default-rustc)
"Return the default Rustc package."
;; Lazily resolve the binding to avoid a circular dependency.
(let ((rust (resolve-interface '(gnu packages rust))))
(module-ref rust 'rustc)))
(define %cargo-build-system-modules (define %cargo-build-system-modules
;; Build-side modules imported by default. ;; Build-side modules imported by default.
@ -115,14 +109,13 @@ (define guile-for-build
(define* (lower name (define* (lower name
#:key source inputs native-inputs outputs system target #:key source inputs native-inputs outputs system target
(cargo (default-cargo)) (rust (default-rust))
(rustc (default-rustc))
#:allow-other-keys #:allow-other-keys
#:rest arguments) #:rest arguments)
"Return a bag for NAME." "Return a bag for NAME."
(define private-keywords (define private-keywords
'(#:source #:target #:cargo #:rustc #:inputs #:native-inputs #:outputs)) '(#:source #:target #:rust #:inputs #:native-inputs #:outputs))
(and (not target) ;; TODO: support cross-compilation (and (not target) ;; TODO: support cross-compilation
(bag (bag
@ -136,8 +129,8 @@ (define private-keywords
;; Keep the standard inputs of 'gnu-build-system' ;; Keep the standard inputs of 'gnu-build-system'
,@(standard-packages))) ,@(standard-packages)))
(build-inputs `(("cargo" ,cargo) (build-inputs `(("cargo" ,rust "cargo")
("rustc" ,rustc) ("rustc" ,rust)
,@native-inputs)) ,@native-inputs))
(outputs outputs) (outputs outputs)
(build cargo-build) (build cargo-build)