diff --git a/nixos/tests/wine.nix b/nixos/tests/wine.nix new file mode 100644 index 000000000000..30d417ce9faa --- /dev/null +++ b/nixos/tests/wine.nix @@ -0,0 +1,42 @@ +{ system ? builtins.currentSystem, pkgs ? import ../.. { + inherit system; + config = { }; +}, }: + +let + inherit (pkgs.lib) concatMapStrings listToAttrs; + inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest; + + hello32 = "${pkgs.pkgsCross.mingw32.hello}/bin/hello.exe"; + hello64 = "${pkgs.pkgsCross.mingwW64.hello}/bin/hello.exe"; + + makeWineTest = packageSet: exes: variant: rec { + name = "${packageSet}-${variant}"; + value = makeTest { + inherit name; + meta = with pkgs.lib.maintainers; { maintainers = [ chkno ]; }; + + machine = { pkgs, ... }: { + environment.systemPackages = [ pkgs."${packageSet}"."${variant}" ]; + virtualisation.diskSize = "800"; + }; + + testScript = '' + machine.wait_for_unit("multi-user.target") + ${concatMapStrings (exe: '' + greeting = machine.succeed( + "bash -c 'wine ${exe} 2> >(tee wine-stderr >&2)'" + ) + assert 'Hello, world!' in greeting + machine.fail( + "fgrep 'Could not find Wine Gecko. HTML rendering will be disabled.' wine-stderr" + ) + '') exes} + ''; + }; + }; + + variants = [ "base" "full" "minimal" "staging" "unstable" ]; + +in listToAttrs (map (makeWineTest "winePackages" [ hello32 ]) variants + ++ map (makeWineTest "wineWowPackages" [ hello32 hello64 ]) variants) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 3c7d5c29770f..647185c8b9ba 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -19,14 +19,14 @@ in rec { ## see http://wiki.winehq.org/Gecko gecko32 = fetchurl rec { - version = "2.47.1"; + version = "2.47.2"; url = "https://dl.winehq.org/wine/wine-gecko/${version}/wine-gecko-${version}-x86.msi"; - sha256 = "0ld03pjm65xkpgqkvfsmk6h9krjsqbgxw4b8rvl2fj20j8l0w2zh"; + sha256 = "07d6nrk2g0614kvwdjym1wq21d2bwy3pscwikk80qhnd6rrww875"; }; gecko64 = fetchurl rec { - version = "2.47.1"; + version = "2.47.2"; url = "https://dl.winehq.org/wine/wine-gecko/${version}/wine-gecko-${version}-x86_64.msi"; - sha256 = "0jj7azmpy07319238g52a8m4nkdwj9g010i355ykxnl8m5wjwcb9"; + sha256 = "0iffhvdawc499nbn4k99k33cr7g8sdfcvq8k3z1g6gw24h87d5h5"; }; ## see http://wiki.winehq.org/Mono