cc-wrapper: convert cc-wrapper.sh to cc-wrapper.nix#266838
Closed
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**.
This was referenced Dec 1, 2023
Author
|
@ofborg build stdenv ^ mainly for darwin |
Author
Let's try that again @ofborg build stdenv |
malt3
approved these changes
Jan 5, 2024
Contributor
malt3
left a comment
There was a problem hiding this comment.
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!
Contributor
|
Is the close intentional? Is there anything I can do to help you out with this? |
Contributor
|
@malt3 I think this PR was closed in in the light of NixOS/nixpkgs-committers#60 (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. |
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.shit does unfortunately change the hash of that outpath, because Nix has way too many different hashing schemes. If you write./cc-wrapper.shyou 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 = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)