-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
treewide: makeWrapper buildInputs to nativeBuildInputs, makeWrapper: use proper shell when cross-compiling #112276
Conversation
Even though I notice potentially many other incorrect placements of dependencies in |
05bc857
to
6aa7bfc
Compare
a8b0136
to
6f38448
Compare
This is being done manually. Many of the packages that I moved |
Reverting e899331 fixes eval. It seems to affect anything using This happens at the merge commit of this PR (c34b032), on the current tip of nixos-unstable (0aeba64), and at the tip of staging (d39fafe). Note that #114902 changes nothing to this issue. |
Fix NixOS#114952 Before it was using the wrong `makeWrapper`, the one that expected to run on the target platform and produce packages for the "super-target". The "super target" (sliding off the end of the platforms list) is defined to be the same as the target, to cap it with a loop so there is no sliding off. However, `targetPackages.targetPackages` is *not* similarly defined. Per the bottom of `pkgs/stdenv/booter.nix` it is an almost-empty package set that just exists as a hack to help some things with exotic `depsTargetTarget`. In particular, that rump "super `targetPackages`" does not contain a `runtimeShell`, and that's the source of our eval-time error.
buildPythonPackage: Fix after #112276
buildInputs = [ makeWrapper ]; | ||
nativeBuildInputs = [ makeWrapper ]; |
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 a buildEnv
(which doesn't support nativeBuildInputs
). I can submit a PR to revert the change in this file, but I wonder if other packages were broken this way as well, and whether buildEnv
should perhaps support nativeBuildInputs
after all?
Since NixOS#112276, we should always put `makeWrapper` in `nativeBuildInputs`. But `buildEnv` was saying put it in `buildInputs`. That's wrong! Fix the instructions, and make the right thing possible. (cherry picked from commit 4f6ec19)
Now that `buildEnv` is ready, always put `makeWrapper` in `nativeBuildInputs`, rather than `buildInputs` or (worse) mucking around with setup hooks by hand. (C.f. NixOS#112276, which didn't catch these because the manual setup hook sourcing is such a hack to being with!) Fixes NixOS#114687 (cherry picked from commit 07ecf87)
Although I'm not sure if `tsm-client` will ever be subject to cross-compiling, referencing makeWrapper from native BuildInputs is The Right Thing. This is a kind of follow-up of NixOS#112276
Motivation for this change
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)