-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
makeRustPlatform prevents cargo*Hook from being spliced #263019
Comments
Proof that the rust hooks are not spliced: #263082 (comment) |
@amjoseph-nixpkgs Is there a plan to solve this? I can't seem to work around the |
Yes. The plan is:
I believe that once If you have spare time you can start on
|
I submitted #265060 for |
context: <NixOS#263019> cargoSetupHook context: <NixOS#260068 (comment)>
splice.nix walks the packageset attribute tree, but it can't see through invocations of
makeRustPlatform
(unless they getinherit
ed into the top-level packageset).To see that this is true, move
cargoSetupHook
fromnativeBuildInputs
tobuildInputs
inbuild-rust-package/default.nix
and runnix-diff
on something likepkgsMusl.fd
. You'll see that the derivation moves frombuildInputs
tonativeBuildInputs
, but the script is exactly the same, in spite of the fact thatcargoSetupHook
writesstdenv.{build,host,target}Platform
into its output!The fact that our rust hooks are unspliced has a few consequences which we will simply need to keep in mind until this gets fixed (likely by eliminating
rustPlatform
):rust/hooks/default.nix
are NOT phase-shifted back one phase. So the changes in rustPlatform.cargoSetupHook: fix platform check #260068 are correct, but as soon as we fix the unspliced hooks, we must undo those changes.rust.lib.envVars
appears unnecessary, because of the lack of splicing. e.g. rust.lib.envVars: clean up unnecessary variables #260167The text was updated successfully, but these errors were encountered: