Makefile: Make run on non-AMD64, non-GNU/Linux systems.
This includes Rosetta 2 on macOS.
Change-Id: Ie2010546aa16c635c4f96eb409bbdeda55dd5156
diff --git a/makefile b/makefile
index ff7e8f5..f0a7f7c 100644
--- a/makefile
+++ b/makefile
@@ -1,7 +1,7 @@
RM_F = rm -f
DOCKER = docker
-NIX_DOCKER_0 = $(DOCKER) run --rm --volume $$(pwd):$$(pwd) --workdir $$(pwd)
+NIX_DOCKER_0 = $(DOCKER) run --platform linux/amd64 -e NIX_INSTALLER_EXTRA_CONF='filter-syscalls = false' --rm --volume $$(pwd):$$(pwd) --workdir $$(pwd)
NIX_DOCKER_MAINT = $(NIX_DOCKER_0) --mount source=type=volume,source=nix,target=/nix2 nixos/nix
NIX_DOCKER = $(NIX_DOCKER_0) --mount source=type=volume,source=nix,target=/nix nixos/nix
@@ -53,7 +53,7 @@
# Builds a Docker image as a .bin file that you can load with 'docker
# load'.
%.bin: images.nix
- $(NIX_DOCKER) sh -c 'cp $$(nix-build --no-out-link images.nix -A $(patsubst %.bin,%,$@).layered) $@'
+ $(NIX_DOCKER) sh -c 'echo "filter-syscalls = false" >>/etc/nix/nix.conf && cp $$(nix-build --no-out-link images.nix -A $(patsubst %.bin,%,$@).layered) $@'
# Builds and loads a Docker image into your local Docker daemon.
%.load: %.bin