How to fix latest NixOS unstable evaluation error: evaluation warning: 'hostPlatform' has been renamed to/replaced by 'stdenv.hostPlatform'?

While rebuilding my system after updating the nix flake inputs, I got the following evaluation warning:

evaluation warning: 'hostPlatform' has been renamed to/replaced by 'stdenv.hostPlatform'

I ran a find grep on my nix_configs directory and changed the option in hardware-configuration.nix

nixpkgs.hostPlatform

to

nixpkgs.stdenv.hostPlatform

which gave me the error that this option did not exist. I got a similar result changing the option to

stdenv.hostPlatform

According to grep, no other instances of ‘hostPlatform’ as text exists outside of my hardware-configuration.nix and that particular option.

Is there any way to resolve this warning?

1 Like

Don’t do that.

The warning refers to the pkgs.hostPlatform attribute being accessed. Not the nixpkgs.hostPlatform option, which to my knowledge hasn’t changed.

The code that accesses the attribute might not even be in your configuration.

3 Likes

This error is caused by the Flutter package.

1 Like

Thanks, for leading me to the cause of the error

1 Like