on iko/ghcjs-patch-master help sign in
Merge #471

471: wineTestWrapper: export Windows Path based on nativeBuildInputs r=hamishmack a=jbgi otherwise `build-tools` are not available when running tests under wine. Co-authored-by: Jean-Baptiste Giraudeau <jean-baptiste.giraudeau@iohk.io>

commite6af103e8d89e082835e4dd39329d36106ed9e8e authoriohk-bors[bot] <43231472+iohk-bors[bot]@users.noreply.github.com> dateSun 8 Mar 2020, 08:56 (7 years ago) parentd5d37524483301
1 file changed+12−1
overlays/mingw_w64.nix+12−1
overlays/mingw_w64.nix+12−1
@@ -50,7 +50,18 @@ let
5050 wineTestWrapper = writeScriptBin "test-wrapper" ''
5151 #!${stdenv.shell}
5252 set -euo pipefail
53− WINEDLLOVERRIDES="winemac.drv=d" WINEDEBUG=warn-all,fixme-all,-menubuilder,-mscoree,-ole,-secur32,-winediag LC_ALL=en_US.UTF-8 WINEPREFIX=$TMP ${wine}/bin/wine64 $@
53+ export WINEDLLOVERRIDES="winemac.drv=d"
54+ export WINEDEBUG=warn-all,fixme-all,-menubuilder,-mscoree,-ole,-secur32,-winediag
55+ export LC_ALL=en_US.UTF-8
56+ export WINEPREFIX=$TMP
57+ Path="''${Path:-}"
58+ for path in ''${nativeBuildInputs:-}; do
59+ if [ -d "$path/bin" ]; then
60+ Path="$Path;$(${wine}/bin/winepath -w $path/bin)";
61+ fi
62+ done
63+ export Path
64+ ${wine}/bin/wine64 $@
5465 '';
5566 testWrapper = lib.optional hostPlatform.isWindows "${wineTestWrapper}/bin/test-wrapper";
5667