From 75c44b03691d6caed070276dafce96a1f4005ff5 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 13 Jun 2020 18:51:04 +0800 Subject: [PATCH] wfvm: install MSYS2 --- artiq-fast/wfvm/build.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/artiq-fast/wfvm/build.nix b/artiq-fast/wfvm/build.nix index d6c12c0..7309116 100644 --- a/artiq-fast/wfvm/build.nix +++ b/artiq-fast/wfvm/build.nix @@ -61,6 +61,30 @@ win.makeWindowsImage { echo Anaconda installer finished ''; } + { + name = "MSYS2"; + buildInputs = [ pkgs.expect ]; + script = let + msys2 = pkgs.fetchurl { + name = "msys2.exe"; + url = "https://github.com/msys2/msys2-installer/releases/download/2020-06-02/msys2-x86_64-20200602.exe"; + sha256 = "1mswlfybvk42vdr4r85dypgkwhrp5ff47gcbxgjqwq86ym44xzd4"; + }; + msys2-auto-install = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/msys2/msys2-installer/master/auto-install.js"; + sha256 = "0ww48xch2q427c58arg5llakfkfzh3kb32kahwplp0s7jc8224g7"; + }; + in '' + ln -s ${msys2} ./msys2.exe + ln -s ${msys2-auto-install} ./auto-install.js + win-put msys2.exe 'C:\Users\artiq' + win-put auto-install.js 'C:\Users\artiq' + echo Running MSYS2 installer... + # work around MSYS2 installer bug that prevents it from closing at the end of unattended install + expect -c 'set timeout 600; spawn win-exec ".\\msys2.exe --script auto-install.js -v InstallPrefix=C:\\msys64"; expect FinishedPageCallback { close }' + echo MSYS2 installer finished + ''; + } ];