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
List the features a derivation requires when it cannot be built locally #2037
Conversation
P.S. this is literally the first C++ I've ever written, so ... |
Hmm... So one thought is that the requred system features stuff is technically part of the build-remote build hook, and as of today build.cc is technically build-hook agnostic. There's #1221 which may be the right way to go here, or maybethis should instead be part of |
1042f24
to
7534c75
Compare
I think you're right, it is a bit outside of the responsibilities here. Perhaps a more C++-skilled dev would like to take over the idea and carry it forward :) |
@edolstra Thoughts on this? Should we remove the concept of build-hooks separate from build-remote? |
src/libstore/build.cc
Outdated
if (features.size() > 1) { | ||
throw Error( | ||
format("a '%1%' with the system features '%4%' is required to build '%3%', but I am a '%2%'") | ||
% drv->platform % settings.thisSystem % drvPath % concatStringsSep("', '", features)); |
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.
Note that format
is obsolete, you can just write:
throw Error("a machine of type '%s' is required", drv->platform);
7534c75
to
6384965
Compare
@edolstra I just updated to use the new way, and also added tests to assert the messages come out properly. |
If this is acceptable and merges, ideally, we would also backport it. |
Shea proposes I move the impl to nix/src/build-remote/build-remote.cc Line 117 in 1df32c7
|
does that work the other way around ? like explain why a remote builder can't be selected for a package ? anyway looks useful |
This was actually committed in 1e7b8de#diff-267a6391980cbd9a743958945ff44ef9R1796 |
okay .... but ...
applies patch
ah ha!