about summary refs log tree commit diff
path: root/nixos/tests/docker-tools.nix
diff options
context:
space:
mode:
authoradisbladis <adisbladis@gmail.com>2020-11-20 11:57:56 +0100
committeradisbladis <adisbladis@gmail.com>2020-11-20 12:57:58 +0100
commitb7b22c5814471e783fbba057cd2e7bb136b88260 (patch)
tree7f4c716ba1311fe4614fa3a469208d1a572e1f36 /nixos/tests/docker-tools.nix
parent31c3d39866016d73c8905d61e99f18f1891e332a (diff)
dockerTools: Always cross compile for another arch in the cross example
The example fails to build on aarch64, so lets cross build for gnu64.
Diffstat (limited to 'nixos/tests/docker-tools.nix')
-rw-r--r--nixos/tests/docker-tools.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/tests/docker-tools.nix b/nixos/tests/docker-tools.nix
index a20a08fc90db1..8e0e82d64cc7c 100644
--- a/nixos/tests/docker-tools.nix
+++ b/nixos/tests/docker-tools.nix
@@ -237,14 +237,14 @@ import ./make-test-python.nix ({ pkgs, ... }: {
 
     with subtest("Ensure cross compiled image can be loaded and has correct arch."):
         docker.succeed(
-            "docker load --input='${pkgs.dockerTools.examples.cross-aarch64}'",
+            "docker load --input='${pkgs.dockerTools.examples.cross}'",
         )
         assert (
             docker.succeed(
-                "docker inspect ${pkgs.dockerTools.examples.cross-aarch64.imageName} "
+                "docker inspect ${pkgs.dockerTools.examples.cross.imageName} "
                 + "| ${pkgs.jq}/bin/jq -r .[].Architecture"
             ).strip()
-            == "arm64v8"
+            == "${if pkgs.system == "aarch64-linux" then "amd64" else "arm64v8"}"
         )
   '';
 })