dockerTools.buildLayeredImage: Fix cross compilation

This commit is contained in:
adisbladis 2020-11-19 14:31:14 +01:00
parent ba093e25d4
commit 4313ac6b29
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
2 changed files with 5 additions and 5 deletions

View file

@ -48,7 +48,7 @@ let
# A user is required by nix
# https://github.com/NixOS/nix/blob/9348f9291e5d9e4ba3c4347ea1b235640f54fd79/src/libutil/util.cc#L478
export USER=nobody
${nix}/bin/nix-store --load-db < ${closureInfo {rootPaths = contentsList;}}/registration
${buildPackages.nix}/bin/nix-store --load-db < ${closureInfo {rootPaths = contentsList;}}/registration
mkdir -p nix/var/nix/gcroots/docker/
for i in ${lib.concatStringsSep " " contentsList}; do
@ -443,7 +443,7 @@ rec {
runCommand "${name}.tar.gz" {
inherit (stream) imageName;
passthru = { inherit (stream) imageTag; };
buildInputs = [ pigz ];
nativeBuildInputs = [ pigz ];
} "${stream} | pigz -nT > $out";
# 1. extract the base image
@ -762,7 +762,7 @@ rec {
else
lib.head (lib.strings.splitString "-" (baseNameOf conf.outPath));
paths = referencesByPopularity overallClosure;
buildInputs = [ jq ];
nativeBuildInputs = [ jq ];
} ''
${if (tag == null) then ''
outName="$(basename "$out")"
@ -826,7 +826,7 @@ rec {
# take images can know in advance how the image is supposed to be used.
isExe = true;
};
buildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper ];
} ''
makeWrapper ${streamScript} $out --add-flags ${conf}
'';

View file

@ -239,7 +239,7 @@ in
grsync = callPackage ../applications/misc/grsync { };
dockerTools = callPackage ../build-support/docker {
writePython3 = writers.writePython3;
writePython3 = buildPackages.writers.writePython3;
};
snapTools = callPackage ../build-support/snap { };