-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
cc-wrapper: convert cc-wrapper.sh to cc-wrapper.nix #266838
Conversation
This commit converts cc-wrapper.sh into a .nix file consisting of one large string. This will allow future commits to hoist conditionals out of bash code, into Nix code. This allows to add or remove conditional code from the cc-wrapper **without causing rebuilds on platforms where the condition is false**.
@ofborg build stdenv ^ mainly for darwin |
Let's try that again @ofborg build stdenv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. But I have to admit that I'm probably not experienced enough to review this change, since it could have far reaching effects. So I would strongly advise for more experienced reviewers to have a look as well!
Is the close intentional? Is there anything I can do to help you out with this? |
@malt3 I think this PR was closed in in the light of #50105 (comment). While not necessary, Adam chose to closed some of their open PRs (which is of cause okay if they like to do so). If you want to continue this work you could cherry-pick the changes and open a new PR. |
Description of changes
This commit converts cc-wrapper.sh into a .nix file consisting of one large string. This will allow future commits to hoist conditionals out of bash code, into Nix code. This allows to add or remove conditional code from the cc-wrapper without causing rebuilds on platforms where the condition is false.
Although this commit does not change the contents of the resulting
/nix/store/*-cc-wrapper.sh
it does unfortunately change the hash of that outpath, because Nix has way too many different hashing schemes. If you write./cc-wrapper.sh
you get one hashing scheme; if you write''${builtins.readFile ./cc-wrapper.sh}''
you get a different one :(Also enables
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)