5dd3a57308
The streamLayeredImage wrapper invokes the image streamer at build time on the build platform. It was built with makeWrapper, which bakes targetPackages.runtimeShell into the shebang. Under cross compilation that is the host shell, so the wrapper is not executable on the builder and crashes (e.g. a Linux image built on a Darwin builder segfaults the streamer). This was fixed by switching to pkgsBuildBuild.makeWrapper (build == host == target) so the shebang points at the build-platform shell.