* guix/build/cargo: (package-cargo-inputs): Add it.
(package-cargo-development-inputs): Add it.
(crate-closure): Add it.
(expand-crate-sources): Add it.
(lower)[private-keywords]: Add #:cargo-inputs and
[bag]: Use expand-crate-sources to augment build-inputs.
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
* guix/build-system/cargo.scm (%cargo-build-system-modules):
Add (json parser).
(cargo-build):
[vendor-dir]: Define flag and pass it to builder code.
[cargo-test-flags]: Likewise.
[skip-build?]: Likewise.
* guix/build/cargo-build/system.scm (#:use-module): use (json parser).
(package-name->crate-name): Delete it.
(manifest-targets): Add it.
(has-executable-target?): Add it.
(configure): Add #:vendor-dir name and use it.
Don't touch Cargo.toml.
Don't symlink to duplicate inputs.
Remove useless registry line from cargo config.
Define RUSTFLAGS to lift lint restrictions.
(build): Add #:skip-build? flag and use it.
(check): Likewise.
Add #:cargo-test-flags and pass it to cargo.
(install): Factor source logic to install-source.
Define #:skip-build? flag and use it.
Only install if executable targets are present.
(install-source): Copy entire crate directory not just src.
[generate-checksums] pass dummy file for unused second argument.
(%standard-phases): Add install-source phase.
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
* 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.
* guix/build-system/cargo.scm (cargo-build): Add src output.
(private-keywords): Add #:outputs.
* guix/build/cargo-build-system.scm (configure): Use /share/rust-source
when replacing inputs.
(build, check): Don't do anything when there isn't a Cargo.lock file
present.
(install): Install sources to src output. When a Cargo.lock file is
present use cargo install to install binaries to out.
* guix/import/crate.scm (make-crate-sexp): Importer uses the src output
for crate inputs by default.
* guix/import/utils.scm (package-names->package-inputs, maybe-inputs,
maybe-native-inputs): Take an optional output argument.
* tests/crate.scm (crate->guix-package test): Update.
Problem reported by Francisco Gómez García <espectalll@kydara.com>.