As of https://github.com/NixOS/nixpkgs/commit/26eba25577388072ba13b1682860fe872ba39942, the script generated by vmTools.vmRunCommand
expects the shell variable $stdenv
to be set in its environment. This has broken disko’s use of this function: https://github.com/nix-community/disko/issues/1027
disko is clearly using vmRunCommand
outside of the norm – it’s using it in order to generate a script that’s meant to be run outside of the Nix builder. There is a wrapper around the script generated by vmRunCommand
, so there is a place to set stdenv
, but … I can’t figure out what sets stdenv
in more normal uses of vmRunCommand
, either. All the uses of that variable within vmTools
just take it for granted that it’ll be ambiently available, and the code within nixpkgs/pkgs/stdenv
is too complicated for my current level of understanding of the Nix language and the structure of nixpkgs (in both cases this is “enough to get myself in trouble, not enough to get back out again” )
Digging through the store, I’m pretty sure stdenv
is supposed to be set to something like /nix/store/lgydi1gl5wqcw6k4gyjbaxx7b40zxrsp-stdenv-linux
, but that doesn’t tell me how to poke the correct version of that store path into a script.
Any advice?