From e56bddf0dfad81c60b199c0ed1e004452960f863 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sun, 17 Jan 2021 15:43:14 +0100 Subject: vmTools: fix cross compilation executables used at build-time should be taken from buildPackages --- pkgs/build-support/vm/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'pkgs/build-support/vm') diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 759245aed1ae9..3a3f4913130d8 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -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 -- cgit 1.4.1