Skip to content

Commit a8260a9

Browse files
committed
[DDW-1213] Kill all background wine processes at the end (fix Cicero builds)
1 parent 868f87b commit a8260a9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

nix/x86_64-windows.nix

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ in rec {
203203
src = newCommon.srcLockfiles;
204204
nativeBuildInputs = [ yarn nodejs ]
205205
++ (with fresherPkgs; [ wineWowPackages.stableFull fontconfig winetricks samba /* samba for bin/ntlm_auth */ ])
206-
++ (with pkgs; [ python3 pkgconfig jq file ]);
206+
++ (with pkgs; [ python3 pkgconfig jq file procps ]);
207207
buildInputs = with pkgs; [ libusb ];
208208
configurePhase = newCommon.setupCacheAndGypDirs + ''
209209
# Grab all cached `node_modules` from above:
@@ -327,6 +327,17 @@ in rec {
327327
}
328328
))} package.json
329329
wine npm.cmd run build:electron:windows
330+
331+
# XXX: We’re running in a separate namespace, so this is fine. Otherwise, builds on Cicero hang.
332+
while pgrep wine >/dev/null ; do
333+
${mkSection "Wine is still running in the background, will try to kill it"}
334+
echo 'All remaining processes:'
335+
ps aux | cat
336+
337+
sleep 1
338+
pkill -9 wine || true
339+
sleep 4
340+
done
330341
''}
331342
'';
332343
installPhase = ''

0 commit comments

Comments
 (0)