summary refs log tree commit diff
path: root/pkgs/build-support/docker
diff options
context:
space:
mode:
authorTerin Stock <terinjokes@gmail.com>2020-12-11 18:54:44 -0800
committerTerin Stock <terinjokes@gmail.com>2020-12-15 02:14:01 -0800
commit8f66dc94a751bf212c8e6541796025bfeabb87dd (patch)
tree425239c820ea6a26ead48a412f4bc6ddca645b97 /pkgs/build-support/docker
parent46e2a315adebe1b67dfcf83769e9597efc2ccf4d (diff)
downloadnixpkgs-8f66dc94a751bf212c8e6541796025bfeabb87dd.tar
nixpkgs-8f66dc94a751bf212c8e6541796025bfeabb87dd.tar.gz
nixpkgs-8f66dc94a751bf212c8e6541796025bfeabb87dd.tar.bz2
nixpkgs-8f66dc94a751bf212c8e6541796025bfeabb87dd.tar.lz
nixpkgs-8f66dc94a751bf212c8e6541796025bfeabb87dd.tar.xz
nixpkgs-8f66dc94a751bf212c8e6541796025bfeabb87dd.tar.zst
nixpkgs-8f66dc94a751bf212c8e6541796025bfeabb87dd.zip
dockerTools: normalize arch to GOARCH
Docker (via containerd) and the the OCI Image Configuration imply and
suggest, respectfully, that the architecture set in images matches those
of GOARCH in the Go Language document.

This changeset updates the implimentation of getArch in dockerTools to
return GOARCH values, to satisfy Docker.

Fixes: #106695
Diffstat (limited to 'pkgs/build-support/docker')
-rw-r--r--pkgs/build-support/docker/default.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix
index b30ac5c7765..93c32c68a96 100644
--- a/pkgs/build-support/docker/default.nix
+++ b/pkgs/build-support/docker/default.nix
@@ -58,15 +58,15 @@ let
     done;
   '';
 
-  # Map nixpkgs architecture to Docker notation
-  # Reference: https://github.com/docker-library/official-images#architectures-other-than-amd64
+  # Map nixpkgs architecture to OCI recomendation
+  # Reference: https://github.com/opencontainers/image-spec/blob/master/config.md#properties
   getArch = nixSystem: {
-    aarch64-linux = "arm64v8";
-    armv7l-linux = "arm32v7";
+    aarch64-linux = "arm64";
+    armv7l-linux = "arm";
     x86_64-linux = "amd64";
     powerpc64le-linux = "ppc64le";
-    i686-linux = "i386";
-  }.${nixSystem} or "Can't map Nix system ${nixSystem} to Docker architecture notation. Please check that your input and your requested build are correct or update the mapping in Nixpkgs.";
+    i686-linux = "386";
+  }.${nixSystem} or "Can't map Nix system ${nixSystem} to Docker architecture. Please check that your input and your requested build are correct or update the mapping in Nixpkgs.";
 
 in
 rec {