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

Update default flags passed to cargo #49

Merged
merged 3 commits into from
Jul 23, 2022
Merged

Update default flags passed to cargo #49

merged 3 commits into from
Jul 23, 2022

Conversation

ipetkov
Copy link
Owner

@ipetkov ipetkov commented Jul 23, 2022

  • The --workspace flag is no longer set for cargo invocations by default. Please set cargoExtraArgs = "--workspace"; to bring this behavior back
  • The $CARGO_PROFILE environment variable can be used to specify exactly which cargo profile is used for the invocation. By default the release profile will be used. Set CARGO_PROFILE = "something else"; in the derivation to change it, or set it to null to omit specifying a profile altogether
  • All cargo invocations are now automatically logged

* This allows for fewer assumptions about the project structure
* The old behavior can easily be brought back by setting `cargoExtraArgs
  = "--workspace";` in any derivation
* It will automatically capture and log all `cargo` invocations
@ipetkov ipetkov merged commit b0cfa99 into master Jul 23, 2022
@ipetkov ipetkov deleted the default-flags branch July 23, 2022 18:49
@dpc
Copy link
Contributor

dpc commented Jul 23, 2022

Noted. BTW. Is there any way I can have my flakes pointing at the specific version of crane?

@ipetkov
Copy link
Owner Author

ipetkov commented Jul 23, 2022

@dpc you can instruct a flake to use any arbitrary revision (could be a commit, or a tag, or a branch) like so:

{
  inputs.crane.url = "github:ipetkov/crane/THE_REVISION";
}

Also worth noting that if you are committing the flake.lock file (which you should be) the inputs will not change until nix flake update is run. Though specifying an exact revision in the flake.nix file will avoid accidentally updating things. Hope this helps!

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