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
make-closure: needs build system mkdir and jq #42794
Conversation
Make make-closure work when cross-compiling
@@ -4,7 +4,7 @@ | |||
# "nix-store --load-db" and "nix-store --register-validity | |||
# --hash-given". | |||
|
|||
{ stdenv, coreutils, jq }: | |||
{ stdenv, coreutils, jq, buildPackages }: |
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.
The coreutils
and jq
arguments aren't needed here anymore
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.
Yes, I had had that thought. I wondered though if I've fixed it in the wrong place and there should be something in the way that make-closure is invoked/included/called by its callers which would cause it to use the build-system versions of coreutils and jq without my having to indirect explicitly through buildPackages. Maybe @Ericson2314 or @dtzWill would know?
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.
If we were to do
nativeBuildInputs = [ jq, coreutils];
it would indeed happen automatically, due to the very magical and aweful "callPackage
+ mkDerivation
splicing" we do. Without that, however, one needs use pick buildPackages
by hand.
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.
It sounds like it would be better to stick with referring through buildPackages
, but maybe that's my very low tolerance for magic? I'll remove the arguments that we don't need
Can you verify that the OVA still works in VirtualBox? It's built with |
It builds and boots into Plasma. I assume that's what it's supposed to do
I didn't intend to check any of them, because I haven't tested via any nixos tests, and i can't see any of them are checked - maybe some kind of browser weirdness? |
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.
I think using nativeBuildInputs makes the most since here. PATH should not be set directly.
Nevermind - the builder used here makes it not work. |
Shouldn't we still switch to |
If you can figure out how to get rid of the "builder" here. Right now, it doesn't run the hooks to add nativeBuildInputs to PATH. |
Oh and structured attrs to. Yeah nevermind; this is quite incompatible with stdenv for now. |
Make make-closure work when cross-compiling
Motivation for this change
Without it, anything that calls make-closure (e.g. squashfs generation) when cross-compiling dies because it tries to run a
mkdir
command built for the host system not the build systemThings done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)