Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crate_universe: Allow passing extra args down to crate_universe_bootstrap #2279

Merged
merged 3 commits into from
Nov 25, 2023

Conversation

DolceTriade
Copy link
Contributor

@DolceTriade DolceTriade commented Nov 23, 2023

this is useful for rules_nixpkgs which allows us to specify an external rust toolchain controlled by Nix. Currently, we are required to carry a patch to modify rules_rust: https://github.com/tweag/rules_nixpkgs/tree/master/examples/toolchains/rust

Now we can add something like this to our WORKSPACE to use a custom cargo and rustc:

crate_universe_dependencies(
    bootstrap = True,
    rust_toolchain_cargo_template = "@nix_rust//:bin/{tool}",
    rust_toolchain_rustc_template = "@nix_rust//:bin/{tool}",
)

…trap

this is useful for rules_nixpkgs which allows us to specify an external rust toolchain controlled by Nix. Currently, we are required to carry a patch to modify rules_rust: https://github.com/tweag/rules_nixpkgs/tree/master/examples/toolchains/rust
Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just need to update docs by running docs/update_docs.sh and committing the results

@DolceTriade
Copy link
Contributor Author

Done, thanks!

@UebelAndre UebelAndre merged commit b96e37e into bazelbuild:main Nov 25, 2023
3 checks passed
@DolceTriade DolceTriade deleted the nix branch November 26, 2023 06:47
illicitonion pushed a commit that referenced this pull request Dec 12, 2023
…True)` (#2313)

Seeing as #2279 is merged, this fixes the current Nix built
`cargo-bazel` getting stale because it's not able to watch the source
files. This should make for much better iteration speed as well, as the
Nix built form has to do a clean build every time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants