-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Opt-in for running installCheckPhase
on cross builds
#273110
Comments
What you really want is to put an override between A first step should be to factor out the non-overriding logic of |
IMO emulation is a fragile hack, and we should only be using it where it's absolutely necessary. I don't think install checks rise to that bar. |
Sounds reasonable and understandable, but wanted to bring it up before deciding things on my own there because I didn't feel qualified to judge that on my own given that I'm not too experienced in tinkering with CPU arch emulators. For @roberth's suggestion there's #273815 for discussion already, so I'd close this now, thanks! |
👍
Most people cross-compile not because they have zero machines of the |
@amjoseph-nixpkgs What is EBBB? I've been involved with dynamic derivations, but I haven't yet heard of this term, and can't find it despite some searches. I don't think this kind of dynamism is needed, but I wouldn't dismiss it either, if it helps some use case or if it's more convenient. Something like the
|
EBEB = IFD = bad. EBB(B...) = RFC 92 = good.
Right, it has to be a "tail call" of the derivation, which is why you can't use it for the
I would say, more specifically: opt-in rather than opt-out. The The other problem is that most software doesn't install the test vectors into the
|
Not always but I suppose
"IFD" sucks, but next thing you know, people start using RFR: Read From Realisation.
This is going to be a new source of impurities, as well as errors. Nix scans its outputs for references to the build directory. I think it's questionable whether it should, but fact is that it currently does, fwiw. |
It's not possible to run the
installCheckPhase
on cross-builds withstdenv.buildPlatform.canExecute stdenv.hostPlatform
beingfalse
. However, in some cases that's still doable withstdenv.hostPlatform.emulator buildPackages
(i.e."${stdenv.hostPlatform.emulator buildPackages} $out/bin/rg"
).See for instance #271072.
The only workaround I found so far is something like
because whenever
doInstallCheck
gets passed tomkDerivation
(also viaoverrideAttrs
) it gets forcefully set tofalse
if! (stdenv.buildPlatform.canExecute stdenv.hostPlatform)
:nixpkgs/pkgs/stdenv/generic/make-derivation.nix
Line 220 in 515794d
I understand that we can't just drop the behavior in here because we have a lot of packages that simply set
doInstallCheck
totrue
without taking cross into account (and all of that would need to be fixed now). On the other hand I'd like to not throw away basic checks on whether the build output works fine just because of that.Some thoughts on how to tackle that issue:
doInstallCheck = mkForce (stdenv.hostPlatform.emulatorAvailable buildPackages);
.forceDoInstallCheck
argument tomkDerivation
(ugly IMHO, yet another attribute and just a hack to "simulate" our module-system)doInstallCheck
and throw a warning if the value changes fromtrue
tofalse
because ofcanExecute
for a transition period.Also, would you consider the workaround I provided above acceptable in these cases?
CC
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: