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
vmTools: fix cross compilation #109636
vmTools: fix cross compilation #109636
Conversation
The reason why I labeled this a draft is that other attributes in vmTools might need the same treatment. I can investigate, if completeness is desired. |
@@ -23,7 +23,7 @@ rec { | |||
hd = "vda"; # either "sda" or "vda" | |||
|
|||
initrdUtils = runCommand "initrd-utils" | |||
{ buildInputs = [ nukeReferences ]; | |||
{ nativeBuildInputs = [ buildPackages.nukeReferences ]; |
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 is likely needed because nukeReferences
does not come from callPackage
context where our cross-compile overlay can override it.
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.
Exactly. The alternative would be to pass nukeReferences
as an argument fulfilled one level up by callPackage
. I think then the blanket with pkgs;
should go away as it would overlay these names. Do you think this is the better solution?
In addition to nukeReferences
, I believe the dependencies perl
, perlPackages.XMLSimple
, and dpkg
further down would need the same treatment.
5c03555
to
915b7e6
Compare
executables used at build-time should be taken from buildPackages
I think I found all tools that need to be prefixed with The following works on Darwin with this patch:
Because |
I marked this as stale due to inactivity. → More info |
I am creating a Linux
initrd
on Darwin via cross compilation. This is one of the needed fixes:initrdUtils
runs thenukeReferences
tool at build-time, but a host-machine dependency is added instead of a build-machine dependency.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)