ARG VERSION=latest
FROM amitie10g/msys2:$VERSION

# Install required packages
RUN setx path "C:\msys64\mingw64\bin;C:\msys64\mingw32\bin;%PATH%" && \
	bash -l -c " \
		pacman -S --needed --noconfirm --noprogressbar \
			mingw-w64-x86_64-toolchain \
			mingw-w64-i686-toolchain \
			make \
			texinfo \
			diffutils \
			bison \
			flex \
			gperf \
			automake \
			autoconf\
			intltool \
			libtool \
			python3 && \
		rm -r /var/cache/pacman/pkg/* \
	"

ENV MSYSTEM=MINGW64
CMD ["bash", "-l"]
