While we’re at it, we could even improve the API a bit and do this:
{
pkgsHostHost,
pkgsBuildHost,
lib,
}:
pkgsBuildHost.stdenv.mkDerivation {
deps.buildHost = {
inherit (pkgsBuildHost)
meson
ninja
;
];
deps.hostHost = {
inherit (pkgsHostHost) libfoo;
};
postInstall = ''
${lib.getExe pkgsBuildHost.tool} $out
'';
}
as lists are notoriously hard to override when you attempt to do anything but append/prepend.