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
patch-shebangs: respect cross compilation for 18.09 #46108
patch-shebangs: respect cross compilation for 18.09 #46108
Conversation
9815f15
to
afff603
Compare
Timed out, unknown build status on x86_64-linux (full log) Attempted: stdenv Partial log (click to expand)
|
Maybe we should merge #43833 first just to make sure the changes work in all cases. I don't want to break patch shebangs in 18.09 (even if it looks harmless). This can be backported a little bit later. |
@matthewbauer err you mean merge this into |
Success on aarch64-linux (full log) Attempted: stdenv Partial log (click to expand)
|
Timed out, unknown build status on x86_64-linux (full log) Attempted: dhcpcd, stdenv Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: dhcpcd, stdenv Partial log (click to expand)
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: stdenv Partial log (click to expand)
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: stdenv The following builds were skipped because they don't evaluate on x86_64-darwin: dhcpcd Partial log (click to expand)
|
OK I think I see. It's fine if |
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.
Looks good to go now.
Alright! |
This ensures this change is safe last minute for 18.09. Master won't have this.
This hopefully makes patchShebangs respect cross compilation. It introduces the concept of the HOST_PATH. Nothing is ever executed on it but instead used as a way to get the proper path using ‘command -v’. Needs more testing. /cc @Ericson2314 @dtzWill Fixes NixOS#33956 Fixes NixOS#21138 (Modified backport of f069423. See previous commit to understand the differences between this and the original.)
7eda08d
to
e9b6300
Compare
Changed the order so that #46542 for regular |
Timed out, unknown build status on x86_64-linux (full log) Attempted: dhcpcd, stdenv Partial log (click to expand)
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: stdenv The following builds were skipped because they don't evaluate on x86_64-darwin: dhcpcd Partial log (click to expand)
|
Timed out, unknown build status on aarch64-linux (full log) Attempted: dhcpcd, stdenv Partial log (click to expand)
|
@Ericson2314 Looking at this now, I think I have found a bug in this. Lots of packages have bash scripts in their outputs but don't directly list bash as an input. Instead they get it from But for now, this will break in unexpected ways. I am going to revert this in staging-18.09 just to be safe. |
Ah man, all those little corner cases. Sure complicates everything. Good catch |
Motivation for this change
This is a version of #43833 made more conservative to only affect cross builds (well, anything enabling
strictDeps
). I hope that makes it conservative enough to land in 18.09. Sorry I didn't make this earlier, pre-fork.The idea is that if
strictDeps
isn't defined,HOST_PATH
is defined exactly the same asPATH
. This means thatpatchShebangs
,patchShebangs --build
, andpatchShebangs --host
are all defined the same as each other and aspatchShebangs
is today.I still like @matthewbauer's version for
staging
and 19.03 and beyond. The breakage it creates points us to things worth fixing, just not as part of the 18.09 deadline!Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)