vmTools: fix cross compilation

executables used at build-time should be taken from buildPackages
This commit is contained in:
Michael Roitzsch 2021-01-17 15:43:14 +01:00
parent a3fec5f8cd
commit e56bddf0df

View file

@ -13,7 +13,7 @@ with import ../../../nixos/lib/qemu-flags.nix { inherit pkgs; };
rec {
qemu = pkgs.qemu_kvm;
qemu = buildPackages.qemu_kvm;
modulesClosure = makeModulesClosure {
inherit kernel rootModules;
@ -24,7 +24,7 @@ rec {
hd = "vda"; # either "sda" or "vda"
initrdUtils = runCommand "initrd-utils"
{ buildInputs = [ nukeReferences ];
{ nativeBuildInputs = [ buildPackages.nukeReferences ];
allowedReferences = [ "out" modulesClosure ]; # prevent accidents like glibc being included in the initrd
}
''
@ -653,7 +653,10 @@ rec {
rpmClosureGenerator =
{name, packagesLists, urlPrefixes, packages, archs ? []}:
assert (builtins.length packagesLists) == (builtins.length urlPrefixes);
runCommand "${name}.nix" {buildInputs = [perl perlPackages.XMLSimple]; inherit archs;} ''
runCommand "${name}.nix" {
nativeBuildInputs = [ buildPackages.perl buildPackages.perlPackages.XMLSimple ];
inherit archs;
} ''
${lib.concatImapStrings (i: pl: ''
gunzip < ${pl} > ./packages_${toString i}.xml
'') packagesLists}
@ -692,7 +695,8 @@ rec {
debClosureGenerator =
{name, packagesLists, urlPrefix, packages}:
runCommand "${name}.nix" { buildInputs = [ perl dpkg ]; } ''
runCommand "${name}.nix"
{ nativeBuildInputs = [ buildPackages.perl buildPackages.dpkg ]; } ''
for i in ${toString packagesLists}; do
echo "adding $i..."
case $i in