Skip to content

cargoSetupHook: use environment flags instead of config file#220660

Closed
yu-re-ka wants to merge 1 commit intoNixOS:stagingfrom
yu-re-ka:cargo-environment-flags
Closed

cargoSetupHook: use environment flags instead of config file#220660
yu-re-ka wants to merge 1 commit intoNixOS:stagingfrom
yu-re-ka:cargo-environment-flags

Conversation

@yu-re-ka
Copy link
Contributor

@yu-re-ka yu-re-ka commented Mar 11, 2023

Description of changes

This is necessary for the flags to apply to Firefox etc. which do not build in the sourceRoot

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@yu-re-ka yu-re-ka requested a review from alyssais March 11, 2023 12:27
@github-actions github-actions bot added the 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. label Mar 11, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Mar 11, 2023
@yu-re-ka yu-re-ka changed the base branch from master to staging March 11, 2023 12:53
@yu-re-ka yu-re-ka mentioned this pull request Mar 11, 2023
13 tasks
@zowoq
Copy link
Contributor

zowoq commented Mar 12, 2023

Has this been tested at all?

@yu-re-ka
Copy link
Contributor Author

yu-re-ka commented Mar 13, 2023

Yes. I tested pkgsCross.aarch64-multiplatform.fd and pkgsMusl.firefox (together with #220731 and #198773 applied)

@alyssais alyssais added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 10, 2023
@yu-re-ka
Copy link
Contributor Author

yu-re-ka commented Apr 24, 2023

Something should definitely be changed to better support non-Cargo Rust build systems, and also the dependency / vendoring logic should be separated from the rest of the flags, however I think this is no longer the way to go. A rustc wrapper or rustc setup hook is unavoidable.

Also pkgsMusl.firefox no longer needs this since #221413

@yu-re-ka yu-re-ka closed this Apr 24, 2023
@alyssais alyssais mentioned this pull request Nov 16, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants