Skip to content

Commit

Permalink
dockerTools.buildLayeredImage: Fix cross compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
adisbladis committed Nov 19, 2020
1 parent ba093e2 commit 4313ac6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkgs/build-support/docker/default.nix
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")"
Expand Down Expand Up @@ -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}
'';
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -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 { };
Expand Down

0 comments on commit 4313ac6

Please sign in to comment.