diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index 335af6134fb18..ac325c261466f 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -445,7 +445,7 @@ let format' = format; in let --system ${config.system.build.toplevel} \ ${if copyChannel then "--channel ${channelSources}" else "--no-channel-copy"} \ --substituters "" - + ${lib.optionalString (additionalPaths' != []) '' nix --extra-experimental-features nix-command copy --to $root --no-check-sigs ${lib.concatStringsSep " " additionalPaths'} ''} @@ -544,7 +544,7 @@ let format' = format; in let mkdir -p $out/nix-support echo "file ${format}-image $out/${filename}" >> $out/nix-support/hydra-build-products ''; - + buildSystem = pkgs.stdenv.buildPlatform.system; hostSystem = pkgs.stdenv.hostPlatform.system; crossPkgs = if (hostSystem != buildSystem) then @@ -585,7 +585,7 @@ let format' = format; in let mountPoint=/mnt mkdir $mountPoint mount $rootDisk $mountPoint - + # Fix activation error (not related to PR) mkdir $mountPoint/run mount -t tmpfs -o "mode=755" none $mountPoint/run diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index ecd25fcc28dfa..a6051ba490c61 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -162,16 +162,16 @@ rec { }; # Switch standard build environment to target host platform - stage2Stdenv = + stage2Stdenv = let buildSystem = pkgs.stdenv.buildPlatform.system; hostSystem = pkgs.stdenv.hostPlatform.system; - in if (buildSystem == hostSystem) then stdenv else + in if (buildSystem == hostSystem) then stdenv else let - targetArch = if ( hostSystem == "x86_64-linux") then + targetArch = if ( hostSystem == "x86_64-linux") then "gnu64" else "aarch64-multiplatform"; - in + in pkgs.stdenv.override { buildPlatform = pkgs.stdenv.hostPlatform; cc = null; @@ -201,7 +201,7 @@ rec { source ${stage2Stdenv}/setup export stdenv=${stage2Stdenv} - + if ! test -e /bin/sh; then ${coreutils}/bin/mkdir -p /bin ${coreutils}/bin/ln -s ${bash}/bin/sh /bin/sh